openapi: 3.2.0 info: title: Dependency Track Extensions API version: 2.0.0 contact: name: The Dependency-Track Authors url: https://github.com/DependencyTrack/dependency-track email: dependencytrack@owasp.org license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html description: 'Operations tagged Extensions across 2 of this provider''s published API definitions: dependency-track-openapi-v2.yaml, dependency-track-v2-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: /api/v2 security: - apiKeyAuth: [] - bearerAuth: [] tags: - name: Extensions description: Endpoints related to extensions paths: /extension-points: get: tags: - Extensions summary: List all extension points description: 'Returns a list of extension points, sorted by name in ascending order. Requires the `SYSTEM_CONFIGURATION` or `SYSTEM_CONFIGURATION_READ` permission.' operationId: listExtensionPoints responses: '200': description: List of extension points content: application/json: schema: $ref: '#/components/schemas/list-extension-points-response' '401': $ref: '#/components/responses/generic-unauthorized-error' '403': $ref: '#/components/responses/generic-forbidden-error' default: $ref: '#/components/responses/generic-error' servers: - url: /api/v2 /extension-points/{extension_point_name}/extensions: get: tags: - Extensions summary: List all extensions description: 'Returns a list of extensions for a given extension point, sorted by name in ascending order. Requires the `SYSTEM_CONFIGURATION` or `SYSTEM_CONFIGURATION_READ` permission.' operationId: listExtensions parameters: - name: extension_point_name in: path description: Name of the extension point required: true schema: type: string responses: '200': description: List of extensions content: application/json: schema: $ref: '#/components/schemas/list-extensions-response' '401': $ref: '#/components/responses/generic-unauthorized-error' '403': $ref: '#/components/responses/generic-forbidden-error' '404': $ref: '#/components/responses/generic-not-found-error' default: $ref: '#/components/responses/generic-error' servers: - url: /api/v2 /extension-points/{extension_point_name}/extensions/{extension_name}/config: get: tags: - Extensions summary: Get extension configuration description: 'Returns the configuration of an extension. Requires the `SYSTEM_CONFIGURATION` or `SYSTEM_CONFIGURATION_READ` permission.' operationId: getExtensionConfig parameters: - name: extension_point_name in: path description: Name of the extension point required: true schema: type: string - name: extension_name in: path description: Name of the extension required: true schema: type: string responses: '200': description: List of extensions content: application/json: schema: $ref: '#/components/schemas/get-extension-config-response' '401': $ref: '#/components/responses/generic-unauthorized-error' '403': $ref: '#/components/responses/generic-forbidden-error' '404': $ref: '#/components/responses/generic-not-found-error' default: $ref: '#/components/responses/generic-error' put: tags: - Extensions summary: Update extension configuration description: 'Updates the configuration of an extension. **Do not use clear text credentials in the supplied config**. Fields annotated with `x-secret-ref` in the config schema expect a name of a managed secret, which is resolved internally by the API. Requires the `SYSTEM_CONFIGURATION` or `SYSTEM_CONFIGURATION_UPDATE` permission.' operationId: updateExtensionConfig parameters: - name: extension_point_name in: path description: Name of the extension point required: true schema: type: string - name: extension_name in: path description: Name of the extension required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/update-extension-config-request' required: true responses: '204': description: Configuration updated '304': description: Not Modified '400': description: Bad Request content: application/problem+json: schema: anyOf: - $ref: '#/components/schemas/json-schema-validation-problem-details' - $ref: '#/components/schemas/problem-details' '401': $ref: '#/components/responses/generic-unauthorized-error' '403': $ref: '#/components/responses/generic-forbidden-error' '404': $ref: '#/components/responses/generic-not-found-error' default: $ref: '#/components/responses/generic-error' servers: - url: /api/v2 /extension-points/{extension_point_name}/extensions/{extension_name}/config-schema: get: tags: - Extensions summary: Get extension configuration schema description: 'Returns the JSON schema for an extension''s configuration. Requires the `SYSTEM_CONFIGURATION` or `SYSTEM_CONFIGURATION_READ` permission.' operationId: getExtensionConfigSchema parameters: - name: extension_point_name in: path description: Name of the extension point required: true schema: type: string - name: extension_name in: path description: Name of the extension required: true schema: type: string responses: '200': description: Extension config schema content: application/json: schema: $ref: '#/components/schemas/extension-config-schema' '204': description: Extension has no config schema '401': $ref: '#/components/responses/generic-unauthorized-error' '403': $ref: '#/components/responses/generic-forbidden-error' '404': $ref: '#/components/responses/generic-not-found-error' default: $ref: '#/components/responses/generic-error' servers: - url: /api/v2 /extension-points/{extension_point_name}/extensions/{extension_name}/test: post: tags: - Extensions summary: Test extension description: 'Tests an extension. If the extension is configurable (i.e. `/config-schema` returns status `200`), a valid configuration **must** be provided in the test request. The configuration is validated against the applicable JSON schema. **Do not use clear text credentials in the supplied config**. Fields annotated with `x-secret-ref` in the config schema expect a name of a managed secret, which is resolved internally by the API. Test results contain one or more checks, each of which can have a status of `PASSED`, `FAILED`, or `SKIPPED`. If *at least one* check is `FAILED`, the entire test should be considered `FAILED`. Requires the `SYSTEM_CONFIGURATION` or `SYSTEM_CONFIGURATION_UPDATE` permission.' operationId: testExtension parameters: - name: extension_point_name in: path description: Name of the extension point required: true schema: type: string - name: extension_name in: path description: Name of the extension required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/test-extension-request' required: true responses: '200': description: Test result content: application/json: schema: $ref: '#/components/schemas/test-extension-response' '400': description: Bad Request content: application/problem+json: schema: anyOf: - $ref: '#/components/schemas/json-schema-validation-problem-details' - $ref: '#/components/schemas/problem-details' '401': $ref: '#/components/responses/generic-unauthorized-error' '403': $ref: '#/components/responses/generic-forbidden-error' '404': $ref: '#/components/responses/generic-not-found-error' default: $ref: '#/components/responses/generic-error' servers: - url: /api/v2 components: schemas: paginated-response: required: - total type: object properties: next_page_token: type: string description: Token to retrieve the next page. Absent when no more items exist. total: $ref: '#/components/schemas/total-count' x-parent: true json-schema-validation-error: required: - instance_location - message type: object properties: instance_location: type: string description: JSON Pointer to the location in the instance that failed validation example: /config/port evaluation_path: type: string description: JSON Pointer to the location in the schema during evaluation example: /properties/config/properties/port schema_location: type: string description: Schema location that generated the error example: https://example.com/schemas/config#/properties/config/properties/port keyword: type: string description: The validation keyword that failed example: type message: type: string description: Human-readable error message example: Value must be a number description: 'A JSON Schema validation error as per .' test-extension-request: type: object properties: config: type: object additionalProperties: true list-extension-points-response: required: - items type: object properties: items: type: array items: $ref: '#/components/schemas/list-extension-points-response-item' allOf: - $ref: '#/components/schemas/paginated-response' json-schema-validation-problem-details: required: - errors type: object properties: errors: type: array description: List of JSON Schema validation errors items: $ref: '#/components/schemas/json-schema-validation-error' allOf: - $ref: '#/components/schemas/problem-details' list-extensions-response-item: required: - configurable - display_name - name - testable type: object properties: name: type: string display_name: type: string description: Human-readable name of the extension. configurable: type: boolean description: Whether the extension supports runtime configuration. testable: type: boolean description: Whether the extension can be tested. get-extension-config-response: required: - config type: object properties: config: type: object additionalProperties: true update-extension-config-request: required: - config type: object properties: config: type: object additionalProperties: true extension-test-check: required: - name - status type: object properties: name: type: string example: connection status: $ref: '#/components/schemas/extension-test-check-status' message: type: string example: Connection failed total-count-type: type: string enum: - AT_LEAST - EXACT list-extensions-response: required: - items type: object properties: items: type: array items: $ref: '#/components/schemas/list-extensions-response-item' allOf: - $ref: '#/components/schemas/paginated-response' test-extension-response: required: - checks type: object properties: checks: type: array items: $ref: '#/components/schemas/extension-test-check' problem-details: required: - detail - title - type type: object properties: type: type: string description: A URI reference that identifies the problem type format: uri-reference default: about:blank status: maximum: 599 minimum: 400 type: integer description: HTTP status code generated by the origin server for this occurrence of the problem format: int32 example: 500 title: maxLength: 255 type: string description: Short, human-readable summary of the problem type detail: maxLength: 1024 type: string description: Human-readable explanation specific to this occurrence of the problem instance: type: string description: Reference URI that identifies the specific occurrence of the problem format: uri-reference description: An RFC 9457 problem object. externalDocs: url: https://www.rfc-editor.org/rfc/rfc9457.html x-parent: true extension-config-schema: required: - $schema type: object properties: $schema: type: string format: uri additionalProperties: true list-extension-points-response-item: required: - name type: object properties: name: type: string extension-test-check-status: type: string enum: - PASSED - FAILED - SKIPPED total-count: required: - count - type type: object properties: count: minimum: 0 type: integer description: The total number of records across all pages. Might be an exact count, or a lower bound. Refer to the `type` field for the applicable semantics. format: int64 type: $ref: '#/components/schemas/total-count-type' responses: generic-error: description: Unexpected error content: application/problem+json: schema: $ref: '#/components/schemas/problem-details' generic-forbidden-error: description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/problem-details' example: type: about:blank status: 403 title: Forbidden detail: Not permitted to access the requested resource. generic-not-found-error: description: Not found content: application/problem+json: schema: $ref: '#/components/schemas/problem-details' example: type: about:blank status: 404 title: Not Found detail: The requested resource could not be found. generic-unauthorized-error: description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/problem-details' example: type: about:blank status: 401 title: Unauthorized detail: Not authorized to access the requested resource. securitySchemes: apiKeyAuth: type: apiKey description: Authentication via API key. name: X-Api-Key in: header bearerAuth: type: http description: 'Authentication via opaque server-issued session token. Tokens are obtained from `POST /api/v1/user/login`, `POST /api/v1/user/oidc/login`, or `POST /api/v2/oauth/token`.' scheme: bearer bearerFormat: Opaque x-refined-from: - dependency-track-openapi-v2.yaml - dependency-track-v2-openapi.yml