defectdojo_api_generated.DojoGroupsApi

All URIs are relative to http://localhost

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

create

DojoGroup create(dojo_group_request)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.dojo_group import DojoGroup
from defectdojo_api_generated.models.dojo_group_request import DojoGroupRequest
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.DojoGroupsApi(api_client)
    dojo_group_request = defectdojo_api_generated.DojoGroupRequest() # DojoGroupRequest | 

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

Parameters

Name Type Description Notes
dojo_group_request DojoGroupRequest

Return type

DojoGroup

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

Parameters

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

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

Parameters

Name Type Description Notes
id int A unique integer value identifying this dojo_ group.

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

PaginatedDojoGroupList list(id=id, limit=limit, name=name, offset=offset, prefetch=prefetch, social_provider=social_provider)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.paginated_dojo_group_list import PaginatedDojoGroupList
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.DojoGroupsApi(api_client)
    id = 56 # int |  (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)
    social_provider = 'social_provider_example' # str | Group imported from a social provider.  * `AzureAD` - AzureAD * `Remote` - Remote (optional)

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

Parameters

Name Type Description Notes
id int [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]
social_provider str Group imported from a social provider. * `AzureAD` - AzureAD * `Remote` - Remote [optional]

Return type

PaginatedDojoGroupList

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

DojoGroup partial_update(id, patched_dojo_group_request=patched_dojo_group_request)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.dojo_group import DojoGroup
from defectdojo_api_generated.models.patched_dojo_group_request import PatchedDojoGroupRequest
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.DojoGroupsApi(api_client)
    id = 56 # int | A unique integer value identifying this dojo_ group.
    patched_dojo_group_request = defectdojo_api_generated.PatchedDojoGroupRequest() # PatchedDojoGroupRequest |  (optional)

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

Parameters

Name Type Description Notes
id int A unique integer value identifying this dojo_ group.
patched_dojo_group_request PatchedDojoGroupRequest [optional]

Return type

DojoGroup

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

DojoGroup 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.dojo_group import DojoGroup
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.DojoGroupsApi(api_client)
    id = 56 # int | A unique integer value identifying this dojo_ group.
    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 DojoGroupsApi->retrieve:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DojoGroupsApi->retrieve: %s\n" % e)

Parameters

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

Return type

DojoGroup

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

DojoGroup update(id, dojo_group_request)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.dojo_group import DojoGroup
from defectdojo_api_generated.models.dojo_group_request import DojoGroupRequest
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.DojoGroupsApi(api_client)
    id = 56 # int | A unique integer value identifying this dojo_ group.
    dojo_group_request = defectdojo_api_generated.DojoGroupRequest() # DojoGroupRequest | 

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

Parameters

Name Type Description Notes
id int A unique integer value identifying this dojo_ group.
dojo_group_request DojoGroupRequest

Return type

DojoGroup

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]