All URIs are relative to https://apitryout.qtestnet.com/
Method | HTTP request | Description |
---|---|---|
query_histories | POST /api/v3/projects/{projectId}/histories | Queries objects' histories |
search | POST /api/v3/projects/{projectId}/comments | Queries Comments |
search_0 | POST /api/v3/projects/{projectId}/search | Queries objects |
ArtifactHistoryResource query_histories(project_id, body, page_size=page_size, page=page)
Queries objects' histories
To query histories of Requirements, Test Cases, Test Runs and internal Defects qTest Manager version: 7.6+
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.SearchApi()
project_id = 789 # int | ID of the project
body = swagger_client.HistoryQueryParams() # HistoryQueryParams | <em>object_type (required):</em> valid values include <em>requirements</em>, <em>test-cases</em>, <em>test-runs</em>, or <em>defects</em> <em>fields:</em> specify which object fields you want to include in the response. If you omit it or specify an asterisk (*), all fields are included <em>object_query:</em> specify a structured query to search for qTest objects. <br/>Refer to attribute <em>query</em> in the Request Body of <em>Queries Objects</em> API <em>query:</em> specify a structured query to retrieve histories of objects specified in attribute <em>object_query</em> above. You can use operators <em>and</em> and <em>or</em> to combine multiple criteria. Only these 2 criteria are supported: <br/>i) <em>created:</em> it can be used for querying by updated date of the object. Its values need to be in ISO Date format. Applicable operator include: =, <>, <= and >= <br/>ii) <em>author:</em> it can be used for querying by ID of the users who made the update. Applicable operators include: = and <>
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 objects (optional) (default to 1)
try:
# Queries objects' histories
api_response = api_instance.query_histories(project_id, body, page_size=page_size, page=page)
pprint(api_response)
except ApiException as e:
print("Exception when calling SearchApi->query_histories: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | int | ID of the project | |
body | HistoryQueryParams | <em>object_type (required):</em> valid values include <em>requirements</em>, <em>test-cases</em>, <em>test-runs</em>, or <em>defects</em> <em>fields:</em> specify which object fields you want to include in the response. If you omit it or specify an asterisk (*), all fields are included <em>object_query:</em> specify a structured query to search for qTest objects. <br/>Refer to attribute <em>query</em> in the Request Body of <em>Queries Objects</em> API <em>query:</em> specify a structured query to retrieve histories of objects specified in attribute <em>object_query</em> above. You can use operators <em>and</em> and <em>or</em> to combine multiple criteria. Only these 2 criteria are supported: <br/>i) <em>created:</em> it can be used for querying by updated date of the object. Its values need to be in ISO Date format. Applicable operator include: =, <>, <= and >= <br/>ii) <em>author:</em> it can be used for querying by ID of the users who made the update. Applicable operators include: = and <> | |
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 objects | [optional] [default to 1] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
QueryCommentResource search(project_id, body, page=page, page_size=page_size)
Queries Comments
To search for comments qTest Manager version: 7.6+
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.SearchApi()
project_id = 789 # int | ID of the project
body = swagger_client.CommentQueryParams() # CommentQueryParams | <em>object_type (required):</em> valid values include requirements, test-cases, test-runs and defects <em>object:</em> ID of the object from which you want to retrieve comments <em>authors:</em> ID of the user who made the comments <em>start:</em> This value needs to be in ISO Date format <em>end:</em> This value needs to be in ISO Date format
page = 1 # int | By default the first page is returned but you can specify any page number to retrieve objects (optional) (default to 1)
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)
try:
# Queries Comments
api_response = api_instance.search(project_id, body, page=page, page_size=page_size)
pprint(api_response)
except ApiException as e:
print("Exception when calling SearchApi->search: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | int | ID of the project | |
body | CommentQueryParams | <em>object_type (required):</em> valid values include requirements, test-cases, test-runs and defects <em>object:</em> ID of the object from which you want to retrieve comments <em>authors:</em> ID of the user who made the comments <em>start:</em> This value needs to be in ISO Date format <em>end:</em> This value needs to be in ISO Date format | |
page | int | By default the first page is returned but you can specify any page number to retrieve objects | [optional] [default to 1] |
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] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PagedResource search_0(project_id, body, page_size=page_size, page=page)
Queries objects
This API mimics the Data Query function of qTest Manager web app. It provides the capability to query Requirements, Test Cases, Test Runs and internal 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.SearchApi()
project_id = 789 # int | ID of the project
body = swagger_client.ArtifactSearchParams() # ArtifactSearchParams | <em>object_type (required):</em> Its value can be <em>requirements</em>, <em>test-cases</em>, <em>test-runs</em>, or <em>defects</em> <em>fields:</em> specify which object fields you want to include in the response. If you omit it or specify an asterisk (*), all fields are included <em>query:</em> specify a structured query to search for qTest Manager objects. Basically, you can use the Query Summary text in qTest web app as in the below image for this attribute <strong>IMPORTANT:</strong> When using Query Summary to specify the query, you will need to modify the Query Summary in some special cases as below: - If there are spaces in the criteria name, put it between '' (single quotation marks) - There need to be spaces between a criteria, operator and value - You can use field name or field ID in the query - You can use a value text or its ID in the query - For date time typed fields: you will need to convert the values to ISO Date Time format - <em>Affected Release/Build:</em> if you want to query Defects by their affected release, use <em>Affected Release</em> instead. Otherwise, use <em>Affected Build</em> - <em>Target Release/Build:</em> similarly, you will need to break it down to <em>Target Release</em> and <em>Target Build</em> - <em>Fixed Release/Build:</em> similarly, you will need to break it down to <em>Fixed Release</em> and <em>Fixed Build</em> - Subscriber: modify it to Subscribers and use user ID instead of username to query - You will need to use object Id when querying using these fields: Id, Affected Release, Affected Build, Target Release, Target Build, Fixed Release and Fixed Build - Modify operator <em>contains</em> to <em>~</em>, and modify operator <em>not contains</em> to <em>!~</em>. Eg: instead of <em>Name contains \"login\"</em>, change it to <em>Name ~ \"login\"</em> - Modify operator <em>is not empty</em> to <strong>is 'not empty'</strong>. Eg: Name is 'not empty'
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 objects (optional) (default to 1)
try:
# Queries objects
api_response = api_instance.search_0(project_id, body, page_size=page_size, page=page)
pprint(api_response)
except ApiException as e:
print("Exception when calling SearchApi->search_0: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | int | ID of the project | |
body | ArtifactSearchParams | <em>object_type (required):</em> Its value can be <em>requirements</em>, <em>test-cases</em>, <em>test-runs</em>, or <em>defects</em> <em>fields:</em> specify which object fields you want to include in the response. If you omit it or specify an asterisk (*), all fields are included <em>query:</em> specify a structured query to search for qTest Manager objects. Basically, you can use the Query Summary text in qTest web app as in the below image for this attribute <strong>IMPORTANT:</strong> When using Query Summary to specify the query, you will need to modify the Query Summary in some special cases as below: - If there are spaces in the criteria name, put it between '' (single quotation marks) - There need to be spaces between a criteria, operator and value - You can use field name or field ID in the query - You can use a value text or its ID in the query - For date time typed fields: you will need to convert the values to ISO Date Time format - <em>Affected Release/Build:</em> if you want to query Defects by their affected release, use <em>Affected Release</em> instead. Otherwise, use <em>Affected Build</em> - <em>Target Release/Build:</em> similarly, you will need to break it down to <em>Target Release</em> and <em>Target Build</em> - <em>Fixed Release/Build:</em> similarly, you will need to break it down to <em>Fixed Release</em> and <em>Fixed Build</em> - Subscriber: modify it to Subscribers and use user ID instead of username to query - You will need to use object Id when querying using these fields: Id, Affected Release, Affected Build, Target Release, Target Build, Fixed Release and Fixed Build - Modify operator <em>contains</em> to <em> |
|
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 objects | [optional] [default to 1] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]