defectdojo_api_generated.Oa3Api
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| schema_retrieve | GET /api/v2/oa3/schema/ |
schema_retrieve
Dict[str, object] schema_retrieve(format=format, lang=lang)
OpenApi3 schema for this API. Format can be selected via content negotiation.
- YAML: application/vnd.oai.openapi
- JSON: application/vnd.oai.openapi+json
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.Oa3Api(api_client)
format = 'format_example' # str | (optional)
lang = 'lang_example' # str | (optional)
try:
api_response = api_instance.schema_retrieve(format=format, lang=lang)
print("The response of Oa3Api->schema_retrieve:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling Oa3Api->schema_retrieve: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| format | str | [optional] | |
| lang | str | [optional] |
Return type
Dict[str, object]
Authorization
basicAuth, cookieAuth, tokenAuth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/vnd.oai.openapi, application/yaml, application/vnd.oai.openapi+json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]