defectdojo_api_generated.OrganizationsApi

All URIs are relative to http://localhost

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

create

Organization create(organization_request)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.organization import Organization
from defectdojo_api_generated.models.organization_request import OrganizationRequest
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.OrganizationsApi(api_client)
    organization_request = defectdojo_api_generated.OrganizationRequest() # OrganizationRequest | 

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

Parameters

Name Type Description Notes
organization_request OrganizationRequest

Return type

Organization

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.OrganizationsApi(api_client)
    id = 56 # int | A unique integer value identifying this product_ type.
    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 OrganizationsApi->delete_preview_list:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling OrganizationsApi->delete_preview_list: %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this product_ type.
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.OrganizationsApi(api_client)
    id = 56 # int | A unique integer value identifying this product_ type.

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

Parameters

Name Type Description Notes
id int A unique integer value identifying this product_ type.

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]

generate_report_create

ReportGenerate generate_report_create(id, report_generate_option_request=report_generate_option_request)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.report_generate import ReportGenerate
from defectdojo_api_generated.models.report_generate_option_request import ReportGenerateOptionRequest
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.OrganizationsApi(api_client)
    id = 56 # int | A unique integer value identifying this product_ type.
    report_generate_option_request = defectdojo_api_generated.ReportGenerateOptionRequest() # ReportGenerateOptionRequest |  (optional)

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

Parameters

Name Type Description Notes
id int A unique integer value identifying this product_ type.
report_generate_option_request ReportGenerateOptionRequest [optional]

Return type

ReportGenerate

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]

list

PaginatedOrganizationList list(created=created, critical_asset=critical_asset, id=id, key_asset=key_asset, limit=limit, name=name, offset=offset, prefetch=prefetch, updated=updated)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.paginated_organization_list import PaginatedOrganizationList
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.OrganizationsApi(api_client)
    created = '2013-10-20T19:20:30+01:00' # datetime |  (optional)
    critical_asset = True # bool |  (optional)
    id = 56 # int |  (optional)
    key_asset = True # bool |  (optional)
    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)
    prefetch = ['prefetch_example'] # List[str] | List of fields for which to prefetch model instances and add those to the response (optional)
    updated = '2013-10-20T19:20:30+01:00' # datetime |  (optional)

    try:
        api_response = api_instance.list(created=created, critical_asset=critical_asset, id=id, key_asset=key_asset, limit=limit, name=name, offset=offset, prefetch=prefetch, updated=updated)
        print("The response of OrganizationsApi->list:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling OrganizationsApi->list: %s\n" % e)

Parameters

Name Type Description Notes
created datetime [optional]
critical_asset bool [optional]
id int [optional]
key_asset bool [optional]
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]
prefetch List[str] List of fields for which to prefetch model instances and add those to the response [optional]
updated datetime [optional]

Return type

PaginatedOrganizationList

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

Organization partial_update(id, patched_organization_request=patched_organization_request)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.organization import Organization
from defectdojo_api_generated.models.patched_organization_request import PatchedOrganizationRequest
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.OrganizationsApi(api_client)
    id = 56 # int | A unique integer value identifying this product_ type.
    patched_organization_request = defectdojo_api_generated.PatchedOrganizationRequest() # PatchedOrganizationRequest |  (optional)

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

Parameters

Name Type Description Notes
id int A unique integer value identifying this product_ type.
patched_organization_request PatchedOrganizationRequest [optional]

Return type

Organization

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

Organization retrieve(id, prefetch=prefetch)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.organization import Organization
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.OrganizationsApi(api_client)
    id = 56 # int | A unique integer value identifying this product_ type.
    prefetch = ['prefetch_example'] # List[str] | List of fields for which to prefetch model instances and add those to the response (optional)

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

Parameters

Name Type Description Notes
id int A unique integer value identifying this product_ type.
prefetch List[str] List of fields for which to prefetch model instances and add those to the response [optional]

Return type

Organization

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

Organization update(id, organization_request)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.organization import Organization
from defectdojo_api_generated.models.organization_request import OrganizationRequest
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.OrganizationsApi(api_client)
    id = 56 # int | A unique integer value identifying this product_ type.
    organization_request = defectdojo_api_generated.OrganizationRequest() # OrganizationRequest | 

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

Parameters

Name Type Description Notes
id int A unique integer value identifying this product_ type.
organization_request OrganizationRequest

Return type

Organization

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]