Skip to content

Latest commit

 

History

History
646 lines (460 loc) · 19.6 KB

DefectsApi.md

File metadata and controls

646 lines (460 loc) · 19.6 KB

qaseio.DefectsApi

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

Method HTTP request Description
create_defect POST /defect/{code} Create a new defect.
delete_defect DELETE /defect/{code}/{id} Delete defect.
get_defect GET /defect/{code}/{id} Get a specific defect.
get_defects GET /defect/{code} Get all defects.
resolve_defect PATCH /defect/{code}/resolve/{id} Resolve a specific defect.
update_defect PATCH /defect/{code}/{id} Update defect.
update_defect_status PATCH /defect/{code}/status/{id} Update a specific defect status.

create_defect

IdResponse create_defect(code, defect_create)

Create a new defect.

This method allows to create a defect in selected project.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.defect_create import DefectCreate
from qaseio.models.id_response import IdResponse
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.DefectsApi(api_client)
    code = 'code_example' # str | Code of project, where to search entities.
    defect_create = qaseio.DefectCreate() # DefectCreate | 

    try:
        # Create a new defect.
        api_response = api_instance.create_defect(code, defect_create)
        print("The response of DefectsApi->create_defect:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefectsApi->create_defect: %s\n" % e)

Parameters

Name Type Description Notes
code str Code of project, where to search entities.
defect_create DefectCreate

Return type

IdResponse

Authorization

TokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A result. -
400 Bad Request. -
401 Unauthorized. -
403 Forbidden. -
404 Not Found. -
422 Unprocessable Entity. -
429 Too Many Requests. -

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

delete_defect

IdResponse delete_defect(code, id)

Delete defect.

This method completely deletes a defect from repository.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.id_response import IdResponse
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.DefectsApi(api_client)
    code = 'code_example' # str | Code of project, where to search entities.
    id = 56 # int | Identifier.

    try:
        # Delete defect.
        api_response = api_instance.delete_defect(code, id)
        print("The response of DefectsApi->delete_defect:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefectsApi->delete_defect: %s\n" % e)

Parameters

Name Type Description Notes
code str Code of project, where to search entities.
id int Identifier.

Return type

IdResponse

Authorization

TokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A Result. -
400 Bad Request. -
401 Unauthorized. -
403 Forbidden. -
404 Not Found. -
429 Too Many Requests. -

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

get_defect

DefectResponse get_defect(code, id)

Get a specific defect.

This method allows to retrieve a specific defect.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.defect_response import DefectResponse
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.DefectsApi(api_client)
    code = 'code_example' # str | Code of project, where to search entities.
    id = 56 # int | Identifier.

    try:
        # Get a specific defect.
        api_response = api_instance.get_defect(code, id)
        print("The response of DefectsApi->get_defect:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefectsApi->get_defect: %s\n" % e)

Parameters

Name Type Description Notes
code str Code of project, where to search entities.
id int Identifier.

Return type

DefectResponse

Authorization

TokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A defect. -
400 Bad Request. -
401 Unauthorized. -
403 Forbidden. -
404 Not Found. -
429 Too Many Requests. -

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

get_defects

DefectListResponse get_defects(code, status=status, limit=limit, offset=offset)

Get all defects.

This method allows to retrieve all defects stored in selected project.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.defect_list_response import DefectListResponse
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.DefectsApi(api_client)
    code = 'code_example' # str | Code of project, where to search entities.
    status = 'status_example' # str |  (optional)
    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:
        # Get all defects.
        api_response = api_instance.get_defects(code, status=status, limit=limit, offset=offset)
        print("The response of DefectsApi->get_defects:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefectsApi->get_defects: %s\n" % e)

Parameters

Name Type Description Notes
code str Code of project, where to search entities.
status str [optional]
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

DefectListResponse

Authorization

TokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A list of all defects. -
400 Bad Request. -
401 Unauthorized. -
403 Forbidden. -
404 Not Found. -
429 Too Many Requests. -

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

resolve_defect

IdResponse resolve_defect(code, id)

Resolve a specific defect.

This method allows to resolve a specific defect.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.id_response import IdResponse
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.DefectsApi(api_client)
    code = 'code_example' # str | Code of project, where to search entities.
    id = 56 # int | Identifier.

    try:
        # Resolve a specific defect.
        api_response = api_instance.resolve_defect(code, id)
        print("The response of DefectsApi->resolve_defect:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefectsApi->resolve_defect: %s\n" % e)

Parameters

Name Type Description Notes
code str Code of project, where to search entities.
id int Identifier.

Return type

IdResponse

Authorization

TokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A result. -
400 Bad Request. -
401 Unauthorized. -
403 Forbidden. -
404 Not Found. -
422 Unprocessable Entity. -
429 Too Many Requests. -

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

update_defect

IdResponse update_defect(code, id, defect_update)

Update defect.

This method updates a defect.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.defect_update import DefectUpdate
from qaseio.models.id_response import IdResponse
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.DefectsApi(api_client)
    code = 'code_example' # str | Code of project, where to search entities.
    id = 56 # int | Identifier.
    defect_update = qaseio.DefectUpdate() # DefectUpdate | 

    try:
        # Update defect.
        api_response = api_instance.update_defect(code, id, defect_update)
        print("The response of DefectsApi->update_defect:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefectsApi->update_defect: %s\n" % e)

Parameters

Name Type Description Notes
code str Code of project, where to search entities.
id int Identifier.
defect_update DefectUpdate

Return type

IdResponse

Authorization

TokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A result. -
400 Bad Request. -
401 Unauthorized. -
403 Forbidden. -
404 Not Found. -
422 Unprocessable Entity. -
429 Too Many Requests. -

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

update_defect_status

BaseResponse update_defect_status(code, id, defect_status)

Update a specific defect status.

This method allows to update a specific defect status.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.base_response import BaseResponse
from qaseio.models.defect_status import DefectStatus
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.DefectsApi(api_client)
    code = 'code_example' # str | Code of project, where to search entities.
    id = 56 # int | Identifier.
    defect_status = qaseio.DefectStatus() # DefectStatus | 

    try:
        # Update a specific defect status.
        api_response = api_instance.update_defect_status(code, id, defect_status)
        print("The response of DefectsApi->update_defect_status:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefectsApi->update_defect_status: %s\n" % e)

Parameters

Name Type Description Notes
code str Code of project, where to search entities.
id int Identifier.
defect_status DefectStatus

Return type

BaseResponse

Authorization

TokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A result. -
400 Bad Request. -
401 Unauthorized. -
403 Forbidden. -
404 Not Found. -
422 Unprocessable Entity. -
429 Too Many Requests. -

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