Skip to content

Latest commit

 

History

History
453 lines (319 loc) · 13.8 KB

CustomFieldsApi.md

File metadata and controls

453 lines (319 loc) · 13.8 KB

qaseio.CustomFieldsApi

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

Method HTTP request Description
create_custom_field POST /custom_field Create new Custom Field.
delete_custom_field DELETE /custom_field/{id} Delete Custom Field by id.
get_custom_field GET /custom_field/{id} Get Custom Field by id.
get_custom_fields GET /custom_field Get all Custom Fields.
update_custom_field PATCH /custom_field/{id} Update Custom Field by id.

create_custom_field

IdResponse create_custom_field(custom_field_create)

Create new Custom Field.

This method allows to create custom field.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.custom_field_create import CustomFieldCreate
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.CustomFieldsApi(api_client)
    custom_field_create = qaseio.CustomFieldCreate() # CustomFieldCreate | 

    try:
        # Create new Custom Field.
        api_response = api_instance.create_custom_field(custom_field_create)
        print("The response of CustomFieldsApi->create_custom_field:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CustomFieldsApi->create_custom_field: %s\n" % e)

Parameters

Name Type Description Notes
custom_field_create CustomFieldCreate

Return type

IdResponse

Authorization

TokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Created Custom Field id. -
400 Bad Request. -
401 Unauthorized. -
403 Forbidden. -
422 Unprocessable Entity. -
429 Too Many Requests. -

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

delete_custom_field

BaseResponse delete_custom_field(id)

Delete Custom Field by id.

This method allows to delete custom field.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.base_response import BaseResponse
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.CustomFieldsApi(api_client)
    id = 56 # int | Identifier.

    try:
        # Delete Custom Field by id.
        api_response = api_instance.delete_custom_field(id)
        print("The response of CustomFieldsApi->delete_custom_field:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CustomFieldsApi->delete_custom_field: %s\n" % e)

Parameters

Name Type Description Notes
id int Identifier.

Return type

BaseResponse

Authorization

TokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Custom Field removal 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_custom_field

CustomFieldResponse get_custom_field(id)

Get Custom Field by id.

This method allows to retrieve custom field.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.custom_field_response import CustomFieldResponse
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.CustomFieldsApi(api_client)
    id = 56 # int | Identifier.

    try:
        # Get Custom Field by id.
        api_response = api_instance.get_custom_field(id)
        print("The response of CustomFieldsApi->get_custom_field:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CustomFieldsApi->get_custom_field: %s\n" % e)

Parameters

Name Type Description Notes
id int Identifier.

Return type

CustomFieldResponse

Authorization

TokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A Custom Field. -
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_custom_fields

CustomFieldListResponse get_custom_fields(entity=entity, type=type, limit=limit, offset=offset)

Get all Custom Fields.

This method allows to retrieve and filter custom fields.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.custom_field_list_response import CustomFieldListResponse
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.CustomFieldsApi(api_client)
    entity = 'entity_example' # str |  (optional)
    type = 'type_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 Custom Fields.
        api_response = api_instance.get_custom_fields(entity=entity, type=type, limit=limit, offset=offset)
        print("The response of CustomFieldsApi->get_custom_fields:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CustomFieldsApi->get_custom_fields: %s\n" % e)

Parameters

Name Type Description Notes
entity str [optional]
type 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

CustomFieldListResponse

Authorization

TokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Custom Field list. -
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]

update_custom_field

BaseResponse update_custom_field(id, custom_field_update)

Update Custom Field by id.

This method allows to update custom field.

Example

  • Api Key Authentication (TokenAuth):
import time
import os
import qaseio
from qaseio.models.base_response import BaseResponse
from qaseio.models.custom_field_update import CustomFieldUpdate
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.CustomFieldsApi(api_client)
    id = 56 # int | Identifier.
    custom_field_update = qaseio.CustomFieldUpdate() # CustomFieldUpdate | 

    try:
        # Update Custom Field by id.
        api_response = api_instance.update_custom_field(id, custom_field_update)
        print("The response of CustomFieldsApi->update_custom_field:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CustomFieldsApi->update_custom_field: %s\n" % e)

Parameters

Name Type Description Notes
id int Identifier.
custom_field_update CustomFieldUpdate

Return type

BaseResponse

Authorization

TokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Custom Field update 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]