Skip to content

Latest commit

 

History

History
98 lines (68 loc) · 3.11 KB

SearchApi.md

File metadata and controls

98 lines (68 loc) · 3.11 KB

qaseio.SearchApi

All URIs are relative to https://api.qase.io/v1

Method HTTP request Description
search GET /search Search entities by Qase Query Language (QQL).

search

SearchResponse search(query, limit=limit, offset=offset)

Search entities by Qase Query Language (QQL).

This method allows to retrieve data sets for various entities using expressions with conditions.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.search_response import SearchResponse
from qaseio.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.qase.io/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = qaseio.Configuration(
    host = "https://api.qase.io/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: TokenAuth
configuration.api_key['TokenAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TokenAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with qaseio.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = qaseio.SearchApi(api_client)
    query = 'query_example' # str | Expression in Qase Query Language.
    limit = 10 # int | A number of entities in result set. (optional) (default to 10)
    offset = 0 # int | How many entities should be skipped. (optional) (default to 0)

    try:
        # Search entities by Qase Query Language (QQL).
        api_response = api_instance.search(query, limit=limit, offset=offset)
        print("The response of SearchApi->search:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SearchApi->search: %s\n" % e)

Parameters

Name Type Description Notes
query str Expression in Qase Query Language.
limit int A number of entities in result set. [optional] [default to 10]
offset int How many entities should be skipped. [optional] [default to 0]

Return type

SearchResponse

Authorization

TokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A list of found entities. -
400 Bad Request. -
401 Unauthorized. -
403 Forbidden. -
429 Too Many Requests. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]