openapi: 3.2.0
info:
title: Dependency Track Team API
version: 1.0.0
contact:
name: The Dependency-Track Authors
url: https://github.com/DependencyTrack/dependency-track
license:
name: Apache-2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
description: 'Operations tagged team across 2 of this provider''s published API definitions: dependency-track-openapi-v1.yaml, dependency-track-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: /api
tags:
- name: Team
paths:
/v1/team:
delete:
description: Requires permission ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_DELETE
operationId: deleteTeam
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteTeamRequest'
responses:
'204':
description: Team removed successfully
'401':
description: Unauthorized
'404':
description: The team could not be found
security:
- ApiKeyAuth: []
- BearerAuth: []
summary: Deletes a team
tags:
- Team
get:
description: Requires permission ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_READ
operationId: getTeams
parameters:
- description: The page to return. To be used in conjunction with pageSize.
in: query
name: pageNumber
schema:
type: string
default: '1'
- description: Number of elements to return per page. To be used in conjunction with pageNumber.
in: query
name: pageSize
schema:
type: string
default: '100'
- description: Offset to start returning elements from. To be used in conjunction with limit.
in: query
name: offset
schema:
type: string
- description: Number of elements to return per page. To be used in conjunction with offset.
in: query
name: limit
schema:
type: string
- description: Name of the resource field to sort on.
in: query
name: sortName
schema:
type: string
- description: Ordering of items when sorting with sortName.
in: query
name: sortOrder
schema:
type: string
enum:
- asc, desc
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Team'
description: A list of all teams
headers:
X-Total-Count:
description: The total number of teams
schema:
format: integer
style: simple
'401':
description: Unauthorized
security:
- ApiKeyAuth: []
- BearerAuth: []
summary: Returns a list of all teams
tags:
- Team
post:
description: Requires permission ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_UPDATE
operationId: updateTeam
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Team'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Team'
description: The updated team
'401':
description: Unauthorized
'404':
description: The team could not be found
security:
- ApiKeyAuth: []
- BearerAuth: []
summary: Updates a team's fields
tags:
- Team
put:
description: Requires permission ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_CREATE
operationId: createTeam
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Team'
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Team'
application/problem+json:
schema:
$ref: '#/components/schemas/Team'
description: The created team
'401':
description: Unauthorized
'409':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/TeamAlreadyExistsProblemDetails'
description: Team already exists
security:
- ApiKeyAuth: []
- BearerAuth: []
summary: Creates a new team
tags:
- Team
servers:
- url: /api
/v1/team/key/{publicIdOrKey}:
delete:
description: Requires permission ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_DELETE
operationId: deleteApiKey
parameters:
- description: The public ID for the API key or for Legacy the full Key to delete
in: path
name: publicIdOrKey
required: true
schema:
type: string
responses:
'204':
description: API key removed successfully
'401':
description: Unauthorized
'404':
description: The API key could not be found
security:
- ApiKeyAuth: []
- BearerAuth: []
summary: Deletes the specified API key
tags:
- Team
post:
description: Requires permission ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_CREATE
operationId: regenerateApiKey
parameters:
- description: The public ID for the API key or for Legacy the complete Key to regenerate
in: path
name: publicIdOrKey
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKey'
description: The re-generated API key
'401':
description: Unauthorized
'404':
description: The API key could not be found
security:
- ApiKeyAuth: []
- BearerAuth: []
summary: Regenerates an API key by removing the specified key, generating a new one and…
tags:
- Team
servers:
- url: /api
/v1/team/key/{publicIdOrKey}/comment:
post:
description: Requires permission ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_UPDATE
operationId: updateApiKeyComment
parameters:
- description: The public ID for the API key or for Legacy the complete Key to comment on
in: path
name: publicIdOrKey
required: true
schema:
type: string
requestBody:
content:
text/plain:
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKey'
description: The updated API key
'401':
description: Unauthorized
'404':
description: The API key could not be found
security:
- ApiKeyAuth: []
- BearerAuth: []
summary: Updates an API key's comment
tags:
- Team
servers:
- url: /api
/v1/team/self:
get:
operationId: getSelf
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TeamSelfResponse'
description: Information about the current team
'400':
description: Invalid API key supplied
'401':
description: Unauthorized
'404':
description: No Team for the given API key found
security:
- ApiKeyAuth: []
- BearerAuth: []
summary: Returns information about the current team
tags:
- Team
servers:
- url: /api
/v1/team/visible:
get:
description: Optional query parameter searchText. The search is case insensitive and matches team names.
operationId: availableTeams
parameters:
- description: Optional case-insensitive substring match on team name.
in: query
name: searchText
schema:
type: string
- description: The page to return. To be used in conjunction with pageSize.
in: query
name: pageNumber
schema:
type: string
default: '1'
- description: Number of elements to return per page. To be used in conjunction with pageNumber.
in: query
name: pageSize
schema:
type: string
default: '100'
- description: Offset to start returning elements from. To be used in conjunction with limit.
in: query
name: offset
schema:
type: string
- description: Number of elements to return per page. To be used in conjunction with offset.
in: query
name: limit
schema:
type: string
- description: Name of the resource field to sort on.
in: query
name: sortName
schema:
type: string
- description: Ordering of items when sorting with sortName.
in: query
name: sortOrder
schema:
type: string
enum:
- asc, desc
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/VisibleTeams'
description: The Visible Teams
headers:
X-Total-Count:
description: The total number of visible teams
schema:
format: integer
style: simple
'401':
description: Unauthorized
security:
- ApiKeyAuth: []
- BearerAuth: []
summary: Returns a list of Teams that are visible
tags:
- Team
servers:
- url: /api
/v1/team/{uuid}:
get:
description: Requires permission ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_READ
operationId: getTeam
parameters:
- description: The UUID of the team to retrieve
in: path
name: uuid
required: true
schema:
type: string
format: uuid
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Team'
description: A specific team
'401':
description: Unauthorized
'404':
description: The team could not be found
security:
- ApiKeyAuth: []
- BearerAuth: []
summary: Returns a specific team
tags:
- Team
servers:
- url: /api
/v1/team/{uuid}/key:
put:
description: Requires permission ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_CREATE
operationId: generateApiKey
parameters:
- description: The UUID of the team to generate a key for
in: path
name: uuid
required: true
schema:
type: string
format: uuid
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKey'
description: The created API key
'401':
description: Unauthorized
'404':
description: The team could not be found
security:
- ApiKeyAuth: []
- BearerAuth: []
summary: Generates an API key and returns its value
tags:
- Team
servers:
- url: /api
components:
schemas:
ManagedUser:
type: object
properties:
confirmPassword:
type: string
email:
type: string
maxLength: 255
minLength: 0
pattern: '[\P{Cc}]+'
forcePasswordChange:
type: boolean
fullname:
type: string
maxLength: 255
minLength: 0
pattern: '[\P{Cc}]+'
lastPasswordChange:
type: integer
format: int64
description: UNIX epoch timestamp in milliseconds
newPassword:
type: string
nonExpiryPassword:
type: boolean
permissions:
type: array
items:
$ref: '#/components/schemas/Permission'
suspended:
type: boolean
teams:
type: array
items:
$ref: '#/components/schemas/Team'
username:
type: string
maxLength: 255
minLength: 1
pattern: '[\P{Cc}]+'
required:
- lastPasswordChange
- username
MappedOidcGroup:
type: object
properties:
group:
$ref: '#/components/schemas/OidcGroup'
uuid:
type: string
format: uuid
required:
- uuid
VisibleTeams:
type: object
properties:
name:
type: string
uuid:
type: string
format: uuid
ServiceAccount:
type: object
properties:
email:
type: string
maxLength: 255
minLength: 0
pattern: '[\P{Cc}]+'
permissions:
type: array
items:
$ref: '#/components/schemas/Permission'
suspended:
type: boolean
teams:
type: array
items:
$ref: '#/components/schemas/Team'
username:
type: string
maxLength: 255
minLength: 1
pattern: '[\P{Cc}]+'
required:
- username
OidcGroup:
type: object
properties:
name:
type: string
maxLength: 255
minLength: 1
pattern: '[\P{Cc}]+'
uuid:
type: string
format: uuid
required:
- name
- uuid
DeleteTeamRequest:
type: object
properties:
uuid:
type: string
format: uuid
description: UUID of the team to delete
required:
- uuid
MappedLdapGroup:
type: object
properties:
dn:
type: string
maxLength: 255
minLength: 1
pattern: '[\P{Cc}]+'
uuid:
type: string
format: uuid
required:
- dn
- uuid
Permission:
type: object
properties:
description:
type: string
ldapUsers:
type: array
items:
$ref: '#/components/schemas/LdapUser'
managedUsers:
type: array
items:
$ref: '#/components/schemas/ManagedUser'
name:
type: string
maxLength: 255
minLength: 1
pattern: ^[a-zA-Z_0-9]*$
oidcUsers:
type: array
items:
$ref: '#/components/schemas/OidcUser'
required:
- name
Team:
type: object
properties:
apiKeys:
type: array
items:
$ref: '#/components/schemas/ApiKey'
ldapUsers:
type: array
items:
$ref: '#/components/schemas/LdapUser'
managedUsers:
type: array
items:
$ref: '#/components/schemas/ManagedUser'
mappedLdapGroups:
type: array
items:
$ref: '#/components/schemas/MappedLdapGroup'
mappedOidcGroups:
type: array
items:
$ref: '#/components/schemas/MappedOidcGroup'
name:
type: string
maxLength: 255
minLength: 1
pattern: '[\P{Cc}]+'
oidcUsers:
type: array
items:
$ref: '#/components/schemas/OidcUser'
permissions:
type: array
items:
$ref: '#/components/schemas/Permission'
serviceAccounts:
type: array
items:
$ref: '#/components/schemas/ServiceAccount'
uuid:
type: string
format: uuid
required:
- name
- uuid
LdapUser:
type: object
properties:
dn:
type: string
maxLength: 255
minLength: 1
pattern: '[\P{Cc}]+'
email:
type: string
maxLength: 255
minLength: 0
pattern: '[\P{Cc}]+'
permissions:
type: array
items:
$ref: '#/components/schemas/Permission'
teams:
type: array
items:
$ref: '#/components/schemas/Team'
username:
type: string
maxLength: 255
minLength: 1
pattern: '[\P{Cc}]+'
required:
- username
OidcUser:
type: object
properties:
email:
type: string
maxLength: 255
minLength: 0
pattern: '[\P{Cc}]+'
permissions:
type: array
items:
$ref: '#/components/schemas/Permission'
subjectIdentifier:
type: string
maxLength: 255
minLength: 1
pattern: '[\P{Cc}]+'
teams:
type: array
items:
$ref: '#/components/schemas/Team'
username:
type: string
maxLength: 255
minLength: 1
pattern: '[\P{Cc}]+'
required:
- username
TeamSelfResponse:
type: object
properties:
name:
type: string
permissions:
type: array
items:
$ref: '#/components/schemas/Permission'
uuid:
type: string
format: uuid
ApiKey:
type: object
properties:
comment:
type: string
maxLength: 255
minLength: 0
created:
type: integer
format: int64
description: UNIX epoch timestamp in milliseconds
expiresAt:
type: integer
format: int64
description: UNIX epoch timestamp in milliseconds
key:
type: string
lastUsed:
type: integer
format: int64
description: UNIX epoch timestamp in milliseconds
legacy:
type: boolean
maskedKey:
type: string
publicId:
type: string
maxLength: 8
minLength: 5
TeamAlreadyExistsProblemDetails:
type: object
properties:
detail:
type: string
description: Human-readable explanation specific to this occurrence of the problem
example: Example detail
instance:
type: string
format: uri
description: Reference URI that identifies the specific occurrence of the problem
example: https://api.example.org/foo/bar/example-instance
status:
type: integer
format: int32
description: HTTP status code generated by the origin server for this occurrence of the problem
example: 400
teamName:
type: string
description: Name of the existing team
teamUuid:
type: string
format: uuid
description: UUID of the existing team
title:
type: string
description: Short, human-readable summary of the problem type
example: Example title
type:
type: string
format: uri
description: A URI reference that identifies the problem type
example: https://api.example.org/foo/bar/example-problem
required:
- detail
- status
- title
securitySchemes:
ApiKeyAuth:
description: Authentication via API key.
in: header
name: X-Api-Key
type: apiKey
BearerAuth:
bearerFormat: Opaque
description: 'Authentication via opaque server-issued session token.
Tokens are obtained from `POST /api/v1/user/login` or
`POST /api/v1/user/oidc/login`.'
scheme: bearer
type: http
x-refined-from:
- dependency-track-openapi-v1.yaml
- dependency-track-openapi.yml