All URIs are relative to https://apitryout.qtestnet.com/
Method | HTTP request | Description |
---|---|---|
delete | DELETE /api/v3/projects/{projectId}/{objectType}/{objectId}/blob-handles/{blobHandleId} | Deletes an Attachment from an Object |
get_attachment | GET /api/v3/projects/{projectId}/{objectType}/{objectId}/attachments/{attachmentId} | Gets an Attachment of an Object |
get_attachments_of | GET /api/v3/projects/{projectId}/{objectType}/{objectId}/attachments | Gets all Attachments of an Object |
search | GET /api/v3/projects/{projectId}/attachments | Searches for Attachments |
upload | POST /api/v3/projects/{projectId}/{objectType}/{objectId}/blob-handles | Uploads an Attachment to an Object |
Message delete(project_id, blob_handle_id, object_type, object_id)
Deletes an Attachment from an Object
To delete an Attachment from a Release, Build, Requirement, Test Case, Test Log, Test Step or Defect qTest Manager version: 7.5+
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
project_id = 789 # int | ID of the project
blob_handle_id = 789 # int | ID of the Attachment
object_type = 'object_type_example' # str | Valid values include releases, builds, requirements, test-cases, test-logs, test-steps or defects <strong>qTest Manager version:</strong> 4+
object_id = 789 # int | ID of the object (Release, Build, Requirement, Test Case, Test Log, Test Step or Defect)
try:
# Deletes an Attachment from an Object
api_response = api_instance.delete(project_id, blob_handle_id, object_type, object_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentApi->delete: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | int | ID of the project | |
blob_handle_id | int | ID of the Attachment | |
object_type | str | Valid values include releases, builds, requirements, test-cases, test-logs, test-steps or defects <strong>qTest Manager version:</strong> 4+ | |
object_id | int | ID of the object (Release, Build, Requirement, Test Case, Test Log, Test Step or Defect) |
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OutputStream get_attachment(project_id, attachment_id, object_type, object_id)
Gets an Attachment of an Object
To retrieve an Attachment from a Release, Build, Requirement, Test Case, Test Log, Test Step or Defect
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
project_id = 789 # int | ID of the project
attachment_id = 789 # int | ID of attachment
object_type = 'object_type_example' # str | Valid values include <em>release</em>, <em>build</em>, <em>requirements</em>, <em>test-cases</em>, <em>test-logs</em>, <em>test-steps</em>, or <em>defects</em>
object_id = 789 # int | ID of the object (Release, Build, Requirement, Test Case, Test Log, Test Step or Defect)
try:
# Gets an Attachment of an Object
api_response = api_instance.get_attachment(project_id, attachment_id, object_type, object_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentApi->get_attachment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | int | ID of the project | |
attachment_id | int | ID of attachment | |
object_type | str | Valid values include <em>release</em>, <em>build</em>, <em>requirements</em>, <em>test-cases</em>, <em>test-logs</em>, <em>test-steps</em>, or <em>defects</em> | |
object_id | int | ID of the object (Release, Build, Requirement, Test Case, Test Log, Test Step or Defect) |
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[AttachmentResource] get_attachments_of(project_id, object_type, object_id)
Gets all Attachments of an Object
To retrieve all Attachments of a Release, Build, Requirement, Test Case, Test Log, Test Step or Defect
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
project_id = 789 # int | ID of the project
object_type = 'object_type_example' # str | Valid values include <em>release</em>, <em>build</em>, <em>requirements</em>, <em>test-cases</em>, <em>test-logs</em>, <em>test-steps</em>, or <em>defects</em>
object_id = 789 # int | ID of the object (Release, Build, Requirement, Test Case, Test Log, Test Step or Defect)
try:
# Gets all Attachments of an Object
api_response = api_instance.get_attachments_of(project_id, object_type, object_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentApi->get_attachments_of: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | int | ID of the project | |
object_type | str | Valid values include <em>release</em>, <em>build</em>, <em>requirements</em>, <em>test-cases</em>, <em>test-logs</em>, <em>test-steps</em>, or <em>defects</em> | |
object_id | int | ID of the object (Release, Build, Requirement, Test Case, Test Log, Test Step or Defect) |
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PagedResourceAttachmentResource search(project_id, type, ids=ids, author=author, created_date=created_date, page_size=page_size, page=page)
Searches for Attachments
To query for attachments of Releases, Builds, Requirements, Test Cases, Test Logs, Test Steps or Defects
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
project_id = 789 # int | ID of the project
type = 'type_example' # str | Its valid values include <em>releases</em>, <em>builds</em>, <em>requirements</em>, <em>test-cases</em>, <em>test-steps</em>, <em>test-logs</em> or <em>defects</em>
ids = [56] # list[int] | List of object IDs (of the same type as specified in the parameter above), separated by commas (optional)
author = 789 # int | ID of the user who created the attachment (optional)
created_date = 'created_date_example' # str | Its format is: <strong>{operator} {createdDate in timestamp or UTC}</strong> The <em>operator</em> can be one of the following values: <b>lt</b>: less than the given date <b>gt</b>: greater than given date <b>eq</b>: equal to the given date <b>le</b>: less than or equal to the given date <b>ge</b>: greater then or equal to the given date (optional)
page_size = 100 # int | The result is paginated. By the default, the number of objects in each page is 100 if this is omitted. You can specify your custom number (up to 999) in this parameter (optional) (default to 100)
page = 1 # int | By default, the first page is returned but you can specify any page number to retrieve attachments (optional) (default to 1)
try:
# Searches for Attachments
api_response = api_instance.search(project_id, type, ids=ids, author=author, created_date=created_date, page_size=page_size, page=page)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentApi->search: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | int | ID of the project | |
type | str | Its valid values include <em>releases</em>, <em>builds</em>, <em>requirements</em>, <em>test-cases</em>, <em>test-steps</em>, <em>test-logs</em> or <em>defects</em> | |
ids | list[int] | List of object IDs (of the same type as specified in the parameter above), separated by commas | [optional] |
author | int | ID of the user who created the attachment | [optional] |
created_date | str | Its format is: <strong>{operator} {createdDate in timestamp or UTC}</strong> The <em>operator</em> can be one of the following values: <b>lt</b>: less than the given date <b>gt</b>: greater than given date <b>eq</b>: equal to the given date <b>le</b>: less than or equal to the given date <b>ge</b>: greater then or equal to the given date | [optional] |
page_size | int | The result is paginated. By the default, the number of objects in each page is 100 if this is omitted. You can specify your custom number (up to 999) in this parameter | [optional] [default to 100] |
page | int | By default, the first page is returned but you can specify any page number to retrieve attachments | [optional] [default to 1] |
PagedResourceAttachmentResource
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AttachmentResource upload(project_id, object_type, object_id, file_name, content_type, body)
Uploads an Attachment to an Object
To upload an Attachment to a Release, Build, Requirement, Test Case, Test Log, Test Step, or Defect
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
project_id = 789 # int | ID of the project
object_type = 'object_type_example' # str | Valid values include releases, builds, requirements, test-cases, test-logs, test-steps or defects <strong>qTest Manager version:</strong> 4+
object_id = 789 # int | ID of the object (Release, Build, Requirement, Test Case, Test Log, Test Step or Defect)
file_name = 'file_name_example' # str |
content_type = 'content_type_example' # str |
body = 'body_example' # str |
try:
# Uploads an Attachment to an Object
api_response = api_instance.upload(project_id, object_type, object_id, file_name, content_type, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentApi->upload: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | int | ID of the project | |
object_type | str | Valid values include releases, builds, requirements, test-cases, test-logs, test-steps or defects <strong>qTest Manager version:</strong> 4+ | |
object_id | int | ID of the object (Release, Build, Requirement, Test Case, Test Log, Test Step or Defect) | |
file_name | str | ||
content_type | str | ||
body | str |
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]