defectdojo_api_generated.ProductsApi

All URIs are relative to http://localhost

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

create

Product create(product_request)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.product import Product
from defectdojo_api_generated.models.product_request import ProductRequest
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.ProductsApi(api_client)
    product_request = defectdojo_api_generated.ProductRequest() # ProductRequest | 

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

Parameters

Name Type Description Notes
product_request ProductRequest

Return type

Product

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

Parameters

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

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

Parameters

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

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

Parameters

Name Type Description Notes
id int A unique integer value identifying this product.
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

PaginatedProductList list(business_criticality=business_criticality, created=created, description=description, external_audience=external_audience, has_tags=has_tags, id=id, internet_accessible=internet_accessible, lifecycle=lifecycle, limit=limit, name=name, name_exact=name_exact, not_tag=not_tag, not_tags=not_tags, o=o, offset=offset, origin=origin, outside_of_sla=outside_of_sla, platform=platform, prefetch=prefetch, prod_numeric_grade=prod_numeric_grade, prod_type=prod_type, product_manager=product_manager, regulations=regulations, revenue=revenue, tag=tag, tags=tags, tags__and=tags__and, team_manager=team_manager, technical_contact=technical_contact, tid=tid, updated=updated, user_records=user_records)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.paginated_product_list import PaginatedProductList
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.ProductsApi(api_client)
    business_criticality = ['business_criticality_example'] # List[Optional[str]] | * `very high` - Very High * `high` - High * `medium` - Medium * `low` - Low * `very low` - Very Low * `none` - None (optional)
    created = '2013-10-20T19:20:30+01:00' # datetime | Time that the object was initially created, and saved to the database  * `None` - Any date * `1` - Today * `2` - Past 7 days * `3` - Past 30 days * `4` - Past 90 days * `5` - Current month * `6` - Current year * `7` - Past year (optional)
    description = 'description_example' # str |  (optional)
    external_audience = True # bool |  (optional)
    has_tags = True # bool | Has tags (optional)
    id = [56] # List[int] | Multiple values may be separated by commas. (optional)
    internet_accessible = True # bool |  (optional)
    lifecycle = ['lifecycle_example'] # List[Optional[str]] | * `construction` - Construction * `production` - Production * `retirement` - Retirement (optional)
    limit = 56 # int | Number of results to return per page. (optional)
    name = 'name_example' # str |  (optional)
    name_exact = 'name_exact_example' # str |  (optional)
    not_tag = 'not_tag_example' # str | Not Tag name contains (optional)
    not_tags = ['not_tags_example'] # List[str] | Comma separated list of exact tags not present on Product (optional)
    o = ['o_example'] # List[str] | Ordering  * `id` - Id * `-id` - Id (descending) * `tid` - Tid * `-tid` - Tid (descending) * `name` - Name * `-name` - Name (descending) * `created` - Created * `-created` - Created (descending) * `prod_numeric_grade` - Prod numeric grade * `-prod_numeric_grade` - Prod numeric grade (descending) * `business_criticality` - Business criticality * `-business_criticality` - Business criticality (descending) * `platform` - Platform * `-platform` - Platform (descending) * `lifecycle` - Lifecycle * `-lifecycle` - Lifecycle (descending) * `origin` - Origin * `-origin` - Origin (descending) * `revenue` - Revenue * `-revenue` - Revenue (descending) * `external_audience` - External audience * `-external_audience` - External audience (descending) * `internet_accessible` - Internet accessible * `-internet_accessible` - Internet accessible (descending) * `product_manager` - Product manager * `-product_manager` - Product manager (descending) * `product_manager__first_name` - Product manager  first name * `-product_manager__first_name` - Product manager  first name (descending) * `product_manager__last_name` - Product manager  last name * `-product_manager__last_name` - Product manager  last name (descending) * `technical_contact` - Technical contact * `-technical_contact` - Technical contact (descending) * `technical_contact__first_name` - Technical contact  first name * `-technical_contact__first_name` - Technical contact  first name (descending) * `technical_contact__last_name` - Technical contact  last name * `-technical_contact__last_name` - Technical contact  last name (descending) * `team_manager` - Team manager * `-team_manager` - Team manager (descending) * `team_manager__first_name` - Team manager  first name * `-team_manager__first_name` - Team manager  first name (descending) * `team_manager__last_name` - Team manager  last name * `-team_manager__last_name` - Team manager  last name (descending) * `prod_type` - Prod type * `-prod_type` - Prod type (descending) * `prod_type__name` - Prod type  name * `-prod_type__name` - Prod type  name (descending) * `updated` - Updated * `-updated` - Updated (descending) * `user_records` - User records * `-user_records` - User records (descending) (optional)
    offset = 56 # int | The initial index from which to return the results. (optional)
    origin = ['origin_example'] # List[Optional[str]] | * `third party library` - Third Party Library * `purchased` - Purchased * `contractor` - Contractor Developed * `internal` - Internally Developed * `open source` - Open Source * `outsourced` - Outsourced (optional)
    outside_of_sla = 3.4 # float |  (optional)
    platform = ['platform_example'] # List[Optional[str]] | * `web service` - API * `desktop` - Desktop * `iot` - Internet of Things * `mobile` - Mobile * `web` - Web (optional)
    prefetch = ['prefetch_example'] # List[str] | List of fields for which to prefetch model instances and add those to the response (optional)
    prod_numeric_grade = [56] # List[int] | Multiple values may be separated by commas. (optional)
    prod_type = [56] # List[int] | Multiple values may be separated by commas. (optional)
    product_manager = [56] # List[int] | Multiple values may be separated by commas. (optional)
    regulations = [56] # List[int] | Multiple values may be separated by commas. (optional)
    revenue = 3.4 # float |  (optional)
    tag = 'tag_example' # str | Tag name contains (optional)
    tags = ['tags_example'] # List[str] | Comma separated list of exact tags (uses OR for multiple values) (optional)
    tags__and = ['tags__and_example'] # List[str] | Comma separated list of exact tags to match with an AND expression (optional)
    team_manager = [56] # List[int] | Multiple values may be separated by commas. (optional)
    technical_contact = [56] # List[int] | Multiple values may be separated by commas. (optional)
    tid = [56] # List[int] | Multiple values may be separated by commas. (optional)
    updated = '2013-10-20T19:20:30+01:00' # datetime | Time that the object was most recently saved to the database  * `None` - Any date * `1` - Today * `2` - Past 7 days * `3` - Past 30 days * `4` - Past 90 days * `5` - Current month * `6` - Current year * `7` - Past year (optional)
    user_records = [56] # List[int] | Multiple values may be separated by commas. (optional)

    try:
        api_response = api_instance.list(business_criticality=business_criticality, created=created, description=description, external_audience=external_audience, has_tags=has_tags, id=id, internet_accessible=internet_accessible, lifecycle=lifecycle, limit=limit, name=name, name_exact=name_exact, not_tag=not_tag, not_tags=not_tags, o=o, offset=offset, origin=origin, outside_of_sla=outside_of_sla, platform=platform, prefetch=prefetch, prod_numeric_grade=prod_numeric_grade, prod_type=prod_type, product_manager=product_manager, regulations=regulations, revenue=revenue, tag=tag, tags=tags, tags__and=tags__and, team_manager=team_manager, technical_contact=technical_contact, tid=tid, updated=updated, user_records=user_records)
        print("The response of ProductsApi->list:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProductsApi->list: %s\n" % e)

Parameters

Name Type Description Notes
business_criticality List[Optional[str]] * `very high` - Very High * `high` - High * `medium` - Medium * `low` - Low * `very low` - Very Low * `none` - None [optional]
created datetime Time that the object was initially created, and saved to the database * `None` - Any date * `1` - Today * `2` - Past 7 days * `3` - Past 30 days * `4` - Past 90 days * `5` - Current month * `6` - Current year * `7` - Past year [optional]
description str [optional]
external_audience bool [optional]
has_tags bool Has tags [optional]
id List[int] Multiple values may be separated by commas. [optional]
internet_accessible bool [optional]
lifecycle List[Optional[str]] * `construction` - Construction * `production` - Production * `retirement` - Retirement [optional]
limit int Number of results to return per page. [optional]
name str [optional]
name_exact str [optional]
not_tag str Not Tag name contains [optional]
not_tags List[str] Comma separated list of exact tags not present on Product [optional]
o List[str] Ordering * `id` - Id * `-id` - Id (descending) * `tid` - Tid * `-tid` - Tid (descending) * `name` - Name * `-name` - Name (descending) * `created` - Created * `-created` - Created (descending) * `prod_numeric_grade` - Prod numeric grade * `-prod_numeric_grade` - Prod numeric grade (descending) * `business_criticality` - Business criticality * `-business_criticality` - Business criticality (descending) * `platform` - Platform * `-platform` - Platform (descending) * `lifecycle` - Lifecycle * `-lifecycle` - Lifecycle (descending) * `origin` - Origin * `-origin` - Origin (descending) * `revenue` - Revenue * `-revenue` - Revenue (descending) * `external_audience` - External audience * `-external_audience` - External audience (descending) * `internet_accessible` - Internet accessible * `-internet_accessible` - Internet accessible (descending) * `product_manager` - Product manager * `-product_manager` - Product manager (descending) * `product_manager__first_name` - Product manager first name * `-product_manager__first_name` - Product manager first name (descending) * `product_manager__last_name` - Product manager last name * `-product_manager__last_name` - Product manager last name (descending) * `technical_contact` - Technical contact * `-technical_contact` - Technical contact (descending) * `technical_contact__first_name` - Technical contact first name * `-technical_contact__first_name` - Technical contact first name (descending) * `technical_contact__last_name` - Technical contact last name * `-technical_contact__last_name` - Technical contact last name (descending) * `team_manager` - Team manager * `-team_manager` - Team manager (descending) * `team_manager__first_name` - Team manager first name * `-team_manager__first_name` - Team manager first name (descending) * `team_manager__last_name` - Team manager last name * `-team_manager__last_name` - Team manager last name (descending) * `prod_type` - Prod type * `-prod_type` - Prod type (descending) * `prod_type__name` - Prod type name * `-prod_type__name` - Prod type name (descending) * `updated` - Updated * `-updated` - Updated (descending) * `user_records` - User records * `-user_records` - User records (descending) [optional]
offset int The initial index from which to return the results. [optional]
origin List[Optional[str]] * `third party library` - Third Party Library * `purchased` - Purchased * `contractor` - Contractor Developed * `internal` - Internally Developed * `open source` - Open Source * `outsourced` - Outsourced [optional]
outside_of_sla float [optional]
platform List[Optional[str]] * `web service` - API * `desktop` - Desktop * `iot` - Internet of Things * `mobile` - Mobile * `web` - Web [optional]
prefetch List[str] List of fields for which to prefetch model instances and add those to the response [optional]
prod_numeric_grade List[int] Multiple values may be separated by commas. [optional]
prod_type List[int] Multiple values may be separated by commas. [optional]
product_manager List[int] Multiple values may be separated by commas. [optional]
regulations List[int] Multiple values may be separated by commas. [optional]
revenue float [optional]
tag str Tag name contains [optional]
tags List[str] Comma separated list of exact tags (uses OR for multiple values) [optional]
tags__and List[str] Comma separated list of exact tags to match with an AND expression [optional]
team_manager List[int] Multiple values may be separated by commas. [optional]
technical_contact List[int] Multiple values may be separated by commas. [optional]
tid List[int] Multiple values may be separated by commas. [optional]
updated datetime Time that the object was most recently saved to the database * `None` - Any date * `1` - Today * `2` - Past 7 days * `3` - Past 30 days * `4` - Past 90 days * `5` - Current month * `6` - Current year * `7` - Past year [optional]
user_records List[int] Multiple values may be separated by commas. [optional]

Return type

PaginatedProductList

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

Product partial_update(id, patched_product_request=patched_product_request)

Example

  • Basic Authentication (basicAuth):
  • Api Key Authentication (cookieAuth):
  • Api Key Authentication (tokenAuth):
import defectdojo_api_generated
from defectdojo_api_generated.models.patched_product_request import PatchedProductRequest
from defectdojo_api_generated.models.product import Product
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.ProductsApi(api_client)
    id = 56 # int | A unique integer value identifying this product.
    patched_product_request = defectdojo_api_generated.PatchedProductRequest() # PatchedProductRequest |  (optional)

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

Parameters

Name Type Description Notes
id int A unique integer value identifying this product.
patched_product_request PatchedProductRequest [optional]

Return type

Product

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

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

Parameters

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

Return type

Product

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

Product update(id, product_request)

Example

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

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

Parameters

Name Type Description Notes
id int A unique integer value identifying this product.
product_request ProductRequest

Return type

Product

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]