defectdojo_api_generated.TestImportsApi

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/v2/test_imports/
delete_preview_list GET /api/v2/test_imports/{id}/delete_preview/
destroy DELETE /api/v2/test_imports/{id}/
list GET /api/v2/test_imports/
partial_update PATCH /api/v2/test_imports/{id}/
retrieve GET /api/v2/test_imports/{id}/
update PUT /api/v2/test_imports/{id}/

create

TestImport create(test_import_request=test_import_request)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.test_import import TestImport
from defectdojo_api_generated.models.test_import_request import TestImportRequest
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.TestImportsApi(api_client)
    test_import_request = defectdojo_api_generated.TestImportRequest() # TestImportRequest |  (optional)

    try:
        api_response = api_instance.create(test_import_request=test_import_request)
        print("The response of TestImportsApi->create:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TestImportsApi->create: %s\n" % e)

Parameters

Name Type Description Notes
test_import_request TestImportRequest [optional]

Return type

TestImport

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]

delete_preview_list

PaginatedDeletePreviewList delete_preview_list(id, limit=limit, offset=offset)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.paginated_delete_preview_list import PaginatedDeletePreviewList
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.TestImportsApi(api_client)
    id = 56 # int | A unique integer value identifying this test_ import.
    limit = 56 # int | Number of results to return per page. (optional)
    offset = 56 # int | The initial index from which to return the results. (optional)

    try:
        api_response = api_instance.delete_preview_list(id, limit=limit, offset=offset)
        print("The response of TestImportsApi->delete_preview_list:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TestImportsApi->delete_preview_list: %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this test_ import.
limit int Number of results to return per page. [optional]
offset int The initial index from which to return the results. [optional]

Return type

PaginatedDeletePreviewList

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]

destroy

destroy(id)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
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.TestImportsApi(api_client)
    id = 56 # int | A unique integer value identifying this test_ import.

    try:
        api_instance.destroy(id)
    except Exception as e:
        print("Exception when calling TestImportsApi->destroy: %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this test_ import.

Return type

void (empty response body)

Authorization

basicAuth, cookieAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No response body -

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

list

PaginatedTestImportList list(branch_tag=branch_tag, build_id=build_id, commit_hash=commit_hash, findings_affected=findings_affected, limit=limit, o=o, offset=offset, test=test, test_import_finding_action__action=test_import_finding_action__action, test_import_finding_action__created=test_import_finding_action__created, test_import_finding_action__finding=test_import_finding_action__finding, version=version)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.paginated_test_import_list import PaginatedTestImportList
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.TestImportsApi(api_client)
    branch_tag = 'branch_tag_example' # str |  (optional)
    build_id = 'build_id_example' # str |  (optional)
    commit_hash = 'commit_hash_example' # str |  (optional)
    findings_affected = [56] # List[int] |  (optional)
    limit = 56 # int | Number of results to return per page. (optional)
    o = ['o_example'] # List[str] | Ordering  * `id` - Id * `-id` - Id (descending) * `created` - Created * `-created` - Created (descending) * `modified` - Modified * `-modified` - Modified (descending) * `version` - Version * `-version` - Version (descending) * `branch_tag` - Branch tag * `-branch_tag` - Branch tag (descending) * `build_id` - Build id * `-build_id` - Build id (descending) * `commit_hash` - Commit hash * `-commit_hash` - Commit hash (descending) (optional)
    offset = 56 # int | The initial index from which to return the results. (optional)
    test = 56 # int |  (optional)
    test_import_finding_action__action = 'test_import_finding_action__action_example' # str | * `N` - created * `C` - closed * `R` - reactivated * `U` - untouched (optional)
    test_import_finding_action__created = '2013-10-20T19:20:30+01:00' # datetime |  (optional)
    test_import_finding_action__finding = 56 # int |  (optional)
    version = 'version_example' # str |  (optional)

    try:
        api_response = api_instance.list(branch_tag=branch_tag, build_id=build_id, commit_hash=commit_hash, findings_affected=findings_affected, limit=limit, o=o, offset=offset, test=test, test_import_finding_action__action=test_import_finding_action__action, test_import_finding_action__created=test_import_finding_action__created, test_import_finding_action__finding=test_import_finding_action__finding, version=version)
        print("The response of TestImportsApi->list:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TestImportsApi->list: %s\n" % e)

Parameters

Name Type Description Notes
branch_tag str [optional]
build_id str [optional]
commit_hash str [optional]
findings_affected List[int] [optional]
limit int Number of results to return per page. [optional]
o List[str] Ordering * `id` - Id * `-id` - Id (descending) * `created` - Created * `-created` - Created (descending) * `modified` - Modified * `-modified` - Modified (descending) * `version` - Version * `-version` - Version (descending) * `branch_tag` - Branch tag * `-branch_tag` - Branch tag (descending) * `build_id` - Build id * `-build_id` - Build id (descending) * `commit_hash` - Commit hash * `-commit_hash` - Commit hash (descending) [optional]
offset int The initial index from which to return the results. [optional]
test int [optional]
test_import_finding_action__action str * `N` - created * `C` - closed * `R` - reactivated * `U` - untouched [optional]
test_import_finding_action__created datetime [optional]
test_import_finding_action__finding int [optional]
version str [optional]

Return type

PaginatedTestImportList

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

TestImport partial_update(id, patched_test_import_request=patched_test_import_request)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.patched_test_import_request import PatchedTestImportRequest
from defectdojo_api_generated.models.test_import import TestImport
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.TestImportsApi(api_client)
    id = 56 # int | A unique integer value identifying this test_ import.
    patched_test_import_request = defectdojo_api_generated.PatchedTestImportRequest() # PatchedTestImportRequest |  (optional)

    try:
        api_response = api_instance.partial_update(id, patched_test_import_request=patched_test_import_request)
        print("The response of TestImportsApi->partial_update:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TestImportsApi->partial_update: %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this test_ import.
patched_test_import_request PatchedTestImportRequest [optional]

Return type

TestImport

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

TestImport retrieve(id)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.test_import import TestImport
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.TestImportsApi(api_client)
    id = 56 # int | A unique integer value identifying this test_ import.

    try:
        api_response = api_instance.retrieve(id)
        print("The response of TestImportsApi->retrieve:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TestImportsApi->retrieve: %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this test_ import.

Return type

TestImport

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

TestImport update(id, test_import_request=test_import_request)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.test_import import TestImport
from defectdojo_api_generated.models.test_import_request import TestImportRequest
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.TestImportsApi(api_client)
    id = 56 # int | A unique integer value identifying this test_ import.
    test_import_request = defectdojo_api_generated.TestImportRequest() # TestImportRequest |  (optional)

    try:
        api_response = api_instance.update(id, test_import_request=test_import_request)
        print("The response of TestImportsApi->update:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TestImportsApi->update: %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this test_ import.
test_import_request TestImportRequest [optional]

Return type

TestImport

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]