defectdojo_api_generated.TestTypesApi
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| create | POST /api/v2/test_types/ | |
| list | GET /api/v2/test_types/ | |
| partial_update | PATCH /api/v2/test_types/{id}/ | |
| retrieve | GET /api/v2/test_types/{id}/ | |
| update | PUT /api/v2/test_types/{id}/ |
create
TestTypeCreate create(test_type_create_request)
Example
- Basic Authentication (basicAuth):
- Api Key Authentication (cookieAuth):
- Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.test_type_create import TestTypeCreate
from defectdojo_api_generated.models.test_type_create_request import TestTypeCreateRequest
from defectdojo_api_generated.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = defectdojo_api_generated.Configuration(
host = "http://localhost"
)
# 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 HTTP basic authorization: basicAuth
configuration = defectdojo_api_generated.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
# 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 defectdojo_api_generated.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = defectdojo_api_generated.TestTypesApi(api_client)
test_type_create_request = defectdojo_api_generated.TestTypeCreateRequest() # TestTypeCreateRequest |
try:
api_response = api_instance.create(test_type_create_request)
print("The response of TestTypesApi->create:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TestTypesApi->create: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| test_type_create_request | TestTypeCreateRequest |
Return type
Authorization
basicAuth, cookieAuth, tokenAuth
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 201 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list
PaginatedTestTypeList list(limit=limit, name=name, offset=offset)
Example
- Basic Authentication (basicAuth):
- Api Key Authentication (cookieAuth):
- Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.paginated_test_type_list import PaginatedTestTypeList
from defectdojo_api_generated.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = defectdojo_api_generated.Configuration(
host = "http://localhost"
)
# 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 HTTP basic authorization: basicAuth
configuration = defectdojo_api_generated.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
# 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 defectdojo_api_generated.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = defectdojo_api_generated.TestTypesApi(api_client)
limit = 56 # int | Number of results to return per page. (optional)
name = 'name_example' # str | (optional)
offset = 56 # int | The initial index from which to return the results. (optional)
try:
api_response = api_instance.list(limit=limit, name=name, offset=offset)
print("The response of TestTypesApi->list:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TestTypesApi->list: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int | Number of results to return per page. | [optional] |
| name | str | [optional] | |
| offset | int | The initial index from which to return the results. | [optional] |
Return type
Authorization
basicAuth, cookieAuth, tokenAuth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
partial_update
TestType partial_update(id, patched_test_type_request=patched_test_type_request)
Example
- Basic Authentication (basicAuth):
- Api Key Authentication (cookieAuth):
- Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.patched_test_type_request import PatchedTestTypeRequest
from defectdojo_api_generated.models.test_type import TestType
from defectdojo_api_generated.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = defectdojo_api_generated.Configuration(
host = "http://localhost"
)
# 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 HTTP basic authorization: basicAuth
configuration = defectdojo_api_generated.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
# 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 defectdojo_api_generated.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = defectdojo_api_generated.TestTypesApi(api_client)
id = 56 # int | A unique integer value identifying this test_ type.
patched_test_type_request = defectdojo_api_generated.PatchedTestTypeRequest() # PatchedTestTypeRequest | (optional)
try:
api_response = api_instance.partial_update(id, patched_test_type_request=patched_test_type_request)
print("The response of TestTypesApi->partial_update:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TestTypesApi->partial_update: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | A unique integer value identifying this test_ type. | |
| patched_test_type_request | PatchedTestTypeRequest | [optional] |
Return type
Authorization
basicAuth, cookieAuth, tokenAuth
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
retrieve
TestType retrieve(id)
Example
- Basic Authentication (basicAuth):
- Api Key Authentication (cookieAuth):
- Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.test_type import TestType
from defectdojo_api_generated.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = defectdojo_api_generated.Configuration(
host = "http://localhost"
)
# 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 HTTP basic authorization: basicAuth
configuration = defectdojo_api_generated.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
# 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 defectdojo_api_generated.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = defectdojo_api_generated.TestTypesApi(api_client)
id = 56 # int | A unique integer value identifying this test_ type.
try:
api_response = api_instance.retrieve(id)
print("The response of TestTypesApi->retrieve:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TestTypesApi->retrieve: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | A unique integer value identifying this test_ type. |
Return type
Authorization
basicAuth, cookieAuth, tokenAuth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update
TestType update(id, test_type_request=test_type_request)
Example
- Basic Authentication (basicAuth):
- Api Key Authentication (cookieAuth):
- Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.test_type import TestType
from defectdojo_api_generated.models.test_type_request import TestTypeRequest
from defectdojo_api_generated.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = defectdojo_api_generated.Configuration(
host = "http://localhost"
)
# 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 HTTP basic authorization: basicAuth
configuration = defectdojo_api_generated.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
# 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 defectdojo_api_generated.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = defectdojo_api_generated.TestTypesApi(api_client)
id = 56 # int | A unique integer value identifying this test_ type.
test_type_request = defectdojo_api_generated.TestTypeRequest() # TestTypeRequest | (optional)
try:
api_response = api_instance.update(id, test_type_request=test_type_request)
print("The response of TestTypesApi->update:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TestTypesApi->update: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | A unique integer value identifying this test_ type. | |
| test_type_request | TestTypeRequest | [optional] |
Return type
Authorization
basicAuth, cookieAuth, tokenAuth
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]