Swagger UXswagger

Docker Trusted Registry
 2.6.0 

Docker Trusted Registry has an experimental API that you can use to manage DTR repositories, permissions, and settings.

This API is experimental and subject to change, which could affect future backwards compatibility.

You can authenticate your requests by using an authentication token. In the DTR web UI, navigate to your user profile and choose Access tokens to create a new token. The authentication token issued will have the same permissions your user has.

To authenticate your requests, use HTTP basic authentication to pass the authentication token to the DTR API. Here’s an example:

curl -sL -u {user}:{token} /api/v0/repositories

repositoryNamespacesRepository Namespaces

GET/api/v0/repositoryNamespaces/{namespace}/teamAccess
List teams granted access to an organization-owned namespace of repositories
GET/api/v0/repositoryNamespaces/{namespace}/teamAccess/{teamname}
Get a team's granted access to an organization-owned namespace of repositories
PUT/api/v0/repositoryNamespaces/{namespace}/teamAccess/{teamname}
Set a team's access to an organization-owned namespace of repositories
DELETE/api/v0/repositoryNamespaces/{namespace}/teamAccess/{teamname}
Revoke a team's access to an organization-owned namespace of repositories

metaAdmin

GET/api/v0/meta/alerts
Get alerts
GET/api/v0/meta/cluster_status
Get cluster status
GET/api/v0/meta/features
Get features
GET/api/v0/meta/settings
Get settings
POST/api/v0/meta/settings
Update settings

cronsCrons

GET/api/v0/crons
List all crons
POST/api/v0/crons
Create / update a periodic task
GET/api/v0/crons/{action}
Get info about the cron with the given action
DELETE/api/v0/crons/{action}
Delete the cron. Jobs created from it will not be canceled.

remote

POST/api/v0/remote/registry
Create a check for connection status of remote registry

accountsAccounts

GET/api/v0/accounts/language
Get the chosen language
DELETE/api/v0/accounts/{namespace}
Removes a user or organization along with all repositories
DELETE/api/v0/accounts/{namespace}/repositories
Removes all of a user or organization's repositories
GET/api/v0/accounts/{namespace}/webhooks
List the webhook subscriptions for a namespace
GET/api/v0/accounts/{orgname}/teams/{teamname}/repositoryAccess
List repository access grants for a team
GET/api/v0/accounts/{username}/repositoryAccess/{namespace}/{reponame}
Check a user's access to a repository
GET/api/v0/accounts/{username}/settings
Check a user's settings
PATCH/api/v0/accounts/{username}/settings
Update a user's settings

action_configsAction Configs

GET/api/v0/action_configs
List all action configs
POST/api/v0/action_configs
Configure actions
GET/api/v0/action_configs/{action}
Get info about the actionConfig with the given action
DELETE/api/v0/action_configs/{action}
Delete the action config. The defaults will be used.

repositoriesRepositories

GET/api/v0/repositories
List all repositories
POST/api/v0/repositories/scan/toggle
Toggles scan on push for all repositories
GET/api/v0/repositories/{namespace}
List repositories in a namespace
POST/api/v0/repositories/{namespace}
Create repository
GET/api/v0/repositories/{namespace}/{reponame}
View details of a repository
DELETE/api/v0/repositories/{namespace}/{reponame}
Remove a repository
PATCH/api/v0/repositories/{namespace}/{reponame}
Update details of a repository
GET/api/v0/repositories/{namespace}/{reponame}/events
List the events for a repository
GET/api/v0/repositories/{namespace}/{reponame}/manifests
List the available manifests for a repository
DELETE/api/v0/repositories/{namespace}/{reponame}/manifests/{reference}
Delete a manifest for a repository
GET/api/v0/repositories/{namespace}/{reponame}/mirroringPolicies
List the mirroring policies for a repository
DELETE/api/v0/repositories/{namespace}/{reponame}/mirroringPolicies
Deletes a set of mirroring policies for a repository
GET/api/v0/repositories/{namespace}/{reponame}/pollMirroringPolicies
List the poll mirroring policies for a repository
POST/api/v0/repositories/{namespace}/{reponame}/pollMirroringPolicies
Create a poll mirroring policy for a repository
GET/api/v0/repositories/{namespace}/{reponame}/pollMirroringPolicies/{pollmirroringpolicyid}
Retrieve a specific poll mirroring policy for a repository
PUT/api/v0/repositories/{namespace}/{reponame}/pollMirroringPolicies/{pollmirroringpolicyid}
Updates a specific poll mirroring policy for a repository
DELETE/api/v0/repositories/{namespace}/{reponame}/pollMirroringPolicies/{pollmirroringpolicyid}
Deletes a specific poll mirroring policy for a repository
GET/api/v0/repositories/{namespace}/{reponame}/promotionPolicies
List the promotion policies for a repository
POST/api/v0/repositories/{namespace}/{reponame}/promotionPolicies
Create a promotion policy for a repository
GET/api/v0/repositories/{namespace}/{reponame}/promotionPolicies/{promotionpolicyid}
Retrieve a specific promotion policy for a repository
PUT/api/v0/repositories/{namespace}/{reponame}/promotionPolicies/{promotionpolicyid}
Updates a specific promotion policy for a repository
DELETE/api/v0/repositories/{namespace}/{reponame}/promotionPolicies/{promotionpolicyid}
Deletes a specific promotion policy for a repository
GET/api/v0/repositories/{namespace}/{reponame}/pruningPolicies
List the pruning policies for a repository
POST/api/v0/repositories/{namespace}/{reponame}/pruningPolicies
Create a pruning policy for a repository
POST/api/v0/repositories/{namespace}/{reponame}/pruningPolicies/test
Test a pruning policy for a repository
GET/api/v0/repositories/{namespace}/{reponame}/pruningPolicies/{pruningpolicyid}
Retrieve a specific pruning policy for a repository
PUT/api/v0/repositories/{namespace}/{reponame}/pruningPolicies/{pruningpolicyid}
Updates a specific pruning policy for a repository
DELETE/api/v0/repositories/{namespace}/{reponame}/pruningPolicies/{pruningpolicyid}
Deletes a specific pruning policy for a repository
GET/api/v0/repositories/{namespace}/{reponame}/pushMirroringPolicies
List the push mirroring policies for a repository
POST/api/v0/repositories/{namespace}/{reponame}/pushMirroringPolicies
Create a push mirroring policy for a repository
GET/api/v0/repositories/{namespace}/{reponame}/pushMirroringPolicies/{pushmirroringpolicyid}
Retrieve a specific push mirroring policy for a repository
PUT/api/v0/repositories/{namespace}/{reponame}/pushMirroringPolicies/{pushmirroringpolicyid}
Updates a specific push mirroring policy for a repository
DELETE/api/v0/repositories/{namespace}/{reponame}/pushMirroringPolicies/{pushmirroringpolicyid}
Deletes a specific push mirroring policy for a repository
GET/api/v0/repositories/{namespace}/{reponame}/tags
List the available tags for a repository
GET/api/v0/repositories/{namespace}/{reponame}/tags/{reference}
Retrieve a specific tag for a repository
DELETE/api/v0/repositories/{namespace}/{reponame}/tags/{tag}
Delete a tag for a repository
POST/api/v0/repositories/{namespace}/{reponame}/tags/{tag}/promotion
Promotes a specific tag for a repository
POST/api/v0/repositories/{namespace}/{reponame}/tags/{tag}/pushMirroring
Mirrors a local tag by pushing to a remote repository
GET/api/v0/repositories/{namespace}/{reponame}/teamAccess
List teams granted access to an organization-owned repository
PUT/api/v0/repositories/{namespace}/{reponame}/teamAccess/{teamname}
Set a team's access to an orgnization-owned repository
DELETE/api/v0/repositories/{namespace}/{reponame}/teamAccess/{teamname}
Revoke a team's acccess to an organization-owned repository
GET/api/v0/repositories/{namespace}/{reponame}/webhooks
List the webhook subscriptions for a repository

index

GET/api/v0/index/autocomplete
Autocompletion for repositories and/or accounts
GET/api/v0/index/dockersearch
Search Docker repositories

workersWorkers

GET/api/v0/workers
List all workers
POST/api/v0/workers/{id}/capacity
Update the capacity for a worker

jobsJobs

GET/api/v0/jobs
List all jobs ordered by most recently scheduled
POST/api/v0/jobs
Schedule a job to be run immediately
GET/api/v0/jobs/{jobID}
Get info about the job with the given ID
DELETE/api/v0/jobs/{jobID}
Signal this job's worker to cancel and delete the job
POST/api/v0/jobs/{jobID}/cancel
Signal this job's worker to cancel the job
GET/api/v0/jobs/{jobID}/logs
Retrieve logs for this job from its worker

content_cachesContent Caches

GET/api/v0/content_caches
List all content caches
POST/api/v0/content_caches
Create content cache
GET/api/v0/content_caches/{contentcacheuuid}
View details of a content cache
DELETE/api/v0/content_caches/{contentcacheuuid}
Remove a content cache

imagescanDocker Security Scanner

GET/api/v0/imagescan/layeroverride
Gets a list of all the available overrides
POST/api/v0/imagescan/layeroverride/{layerid}
Sets a vulnerability override for the given layer
DELETE/api/v0/imagescan/layeroverride/{vulnerabilityid}
Deletes a layer vulnerability override
GET/api/v0/imagescan/repositories/{namespace}/{reponame}/{tag}
Deprecated use /scansummary/repositories/{namespace}/{reponame}/{tag}
POST/api/v0/imagescan/scan
Do a scan or a scan/check of all layers
PUT/api/v0/imagescan/scan/update
Update the vulnerability database for security scanning
POST/api/v0/imagescan/scan/{namespace}/{reponame}/{tag}/{os}/{arch}
Do a scan or a scan/check of given image
GET/api/v0/imagescan/scansummary/component/{component}
Get the image by component
GET/api/v0/imagescan/scansummary/cve/{cve}
Get the image by CVE
GET/api/v0/imagescan/scansummary/layer/{layerid}
Get the image by layer sha
GET/api/v0/imagescan/scansummary/license/{license}
Get the image by license
GET/api/v0/imagescan/scansummary/repositories/{namespace}/{reponame}/{reference}
Get the scan summary info on a namespace/repo:tag or namespace/repo@digest
GET/api/v0/imagescan/scansummary/repositories/{namespace}/{reponame}/{tag}/export
Get the scan summary info on a namespace/repo:tag as a file
POST/api/v0/imagescan/scansummary/tags
Get a list of scan summaries
GET/api/v0/imagescan/status
Get the status and version of scanning service

eventsEvents

GET/api/v0/events
Get Events

webhooksWebhooks

GET/api/v0/webhooks
List Webhooks
POST/api/v0/webhooks
Create Webhook
POST/api/v0/webhooks/test
Test Webhook
POST/api/v0/webhooks/update
Update Webhook
DELETE/api/v0/webhooks/{webhook}
Delete Webhook

API_tokens

GET/api/v0/api_tokens
Get all API tokens associated with user. Get all tokens if no user is not specified
POST/api/v0/api_tokens
Create a new API token
DELETE/api/v0/api_tokens
Mass deletion of API tokens from database based on user, time created, and/or generation method
GET/api/v0/api_tokens/{hashedtoken}
Get an API token's information based on it's token id
DELETE/api/v0/api_tokens/{hashedtoken}
Delete a specific API token
PATCH/api/v0/api_tokens/{hashedtoken}
Update information about a specific API token

Models

#/definitions/forms.Accessforms.Access{...}
#/definitions/forms.CreateAPITokenforms.CreateAPIToken{...}
#/definitions/forms.CreateContentCacheforms.CreateContentCache{...}
#/definitions/forms.CreateMirroringforms.CreateMirroring{...}
#/definitions/forms.CreatePollMirroringPolicyforms.CreatePollMirroringPolicy{...}
#/definitions/forms.CreatePromotionforms.CreatePromotion{...}
#/definitions/forms.CreatePromotionPolicyforms.CreatePromotionPolicy{...}
#/definitions/forms.CreatePruningPolicyforms.CreatePruningPolicy{...}
#/definitions/forms.CreatePushMirroringPolicyforms.CreatePushMirroringPolicy{...}
#/definitions/forms.CreateRemoteRegistryCheckforms.CreateRemoteRegistryCheck{...}
#/definitions/forms.CreateRepoforms.CreateRepo{...}
#/definitions/forms.DeleteMirroringPolicyIDsforms.DeleteMirroringPolicyIDs{...}
#/definitions/forms.Imageforms.Image{...}
#/definitions/forms.ImagesFormforms.ImagesForm{...}
#/definitions/forms.ScanOptionsforms.ScanOptions{...}
#/definitions/forms.Settingsforms.Settings{...}
#/definitions/forms.ToggleScanOnPushforms.ToggleScanOnPush{...}
#/definitions/forms.UpdateAPITokenforms.UpdateAPIToken{...}
#/definitions/forms.UpdatePollMirroringPolicyforms.UpdatePollMirroringPolicy{...}
#/definitions/forms.UpdatePromotionPolicyforms.UpdatePromotionPolicy{...}
#/definitions/forms.UpdatePruningPolicyforms.UpdatePruningPolicy{...}
#/definitions/forms.UpdatePushMirroringPolicyforms.UpdatePushMirroringPolicy{...}
#/definitions/forms.UpdateRepoforms.UpdateRepo{...}
#/definitions/forms.UserSettingsforms.UserSettings{...}
#/definitions/forms.VulnOverrideOptionforms.VulnOverrideOption{...}
#/definitions/forms.Webhookforms.Webhook{...}
#/definitions/forms.WebhookTestPayloadforms.WebhookTestPayload{...}
#/definitions/forms.WebhookUpdateforms.WebhookUpdate{...}
#/definitions/responses.APITokenresponses.APIToken{...}
#/definitions/responses.Accountresponses.Account{...}
#/definitions/responses.Alertresponses.Alert{...}
#/definitions/responses.Autocompleteresponses.Autocomplete{...}
#/definitions/responses.ClusterStatusresponses.ClusterStatus{...}
#/definitions/responses.Componentresponses.Component{...}
#/definitions/responses.ContentCacheresponses.ContentCache{...}
#/definitions/responses.DetailedSummaryresponses.DetailedSummary{...}
#/definitions/responses.DockerRepositoryresponses.DockerRepository{...}
#/definitions/responses.DockerSearchresponses.DockerSearch{...}
#/definitions/responses.DockerfileLineresponses.DockerfileLine{...}
#/definitions/responses.Eventsresponses.Events{...}
#/definitions/responses.Featuresresponses.Features{...}
#/definitions/responses.Languageresponses.Language{...}
#/definitions/responses.LayerVulnOverrideresponses.LayerVulnOverride{...}
#/definitions/responses.Licenseresponses.License{...}
#/definitions/responses.ListRepoNamespaceTeamAccessresponses.ListRepoNamespaceTeamAccess{...}
#/definitions/responses.ListRepoTeamAccessresponses.ListRepoTeamAccess{...}
#/definitions/responses.ListTagresponses.ListTag{...}
#/definitions/responses.ListTeamRepoAccessresponses.ListTeamRepoAccess{...}
#/definitions/responses.Manifestresponses.Manifest{...}
#/definitions/responses.Mirroringresponses.Mirroring{...}
#/definitions/responses.MirroringPolicyresponses.MirroringPolicy{...}
#/definitions/responses.NamespaceTeamAccessresponses.NamespaceTeamAccess{...}
#/definitions/responses.NautilusStatusresponses.NautilusStatus{...}
#/definitions/responses.NewAPITokenresponses.NewAPIToken{...}
#/definitions/responses.Noteresponses.Note{...}
#/definitions/responses.OldScanSummaryresponses.OldScanSummary{...}
#/definitions/responses.PollMirroringPolicyresponses.PollMirroringPolicy{...}
#/definitions/responses.Promotionresponses.Promotion{...}
#/definitions/responses.PromotionPolicyresponses.PromotionPolicy{...}
#/definitions/responses.PruningPolicyresponses.PruningPolicy{...}
#/definitions/responses.PushMirroringPolicyresponses.PushMirroringPolicy{...}
#/definitions/responses.RemoteRegistryCheckresponses.RemoteRegistryCheck{...}
#/definitions/responses.RemoteRepositoryPermissionsresponses.RemoteRepositoryPermissions{...}
#/definitions/responses.ReplicaSettingsresponses.ReplicaSettings{...}
#/definitions/responses.RepoAccessresponses.RepoAccess{...}
#/definitions/responses.RepoUserAccessresponses.RepoUserAccess{...}
#/definitions/responses.Repositoriesresponses.Repositories{...}
#/definitions/responses.Repositoryresponses.Repository{...}
#/definitions/responses.ScanSummaryresponses.ScanSummary{...}
#/definitions/responses.Settingsresponses.Settings{...}
#/definitions/responses.Tagresponses.Tag{...}
#/definitions/responses.Teamresponses.Team{...}
#/definitions/responses.TeamAccessresponses.TeamAccess{...}
#/definitions/responses.ThinScanSummariesresponses.ThinScanSummaries{...}
#/definitions/responses.ThinTagresponses.ThinTag{...}
#/definitions/responses.UserSettingsresponses.UserSettings{...}
#/definitions/responses.Vulnerabilityresponses.Vulnerability{...}
#/definitions/responses.VulnerabilityDetailsresponses.VulnerabilityDetails{...}
#/definitions/responses.Webhookresponses.Webhook{...}
#/definitions/ruleengine.Ruleruleengine.Rule{...}
#/definitions/schema.Eventschema.Event{...}
#/definitions/schema.LayerVulnOverrideschema.LayerVulnOverride{...}
#/definitions/schema.MirroringStatusschema.MirroringStatus{...}
#/definitions/schema.Objectschema.Object{...}
#/definitions/schema.ScannedImageschema.ScannedImage{...}
#/definitions/schema.ScannerCVEschema.ScannerCVE{...}
#/definitions/schema.ScannerComponentschema.ScannerComponent{...}
#/definitions/schema.ScannerFingerprintschema.ScannerFingerprint{...}
#/definitions/schema.ScannerLayerschema.ScannerLayer{...}
#/definitions/schema.ScannerLicenseschema.ScannerLicense{...}
#/definitions/schema.ScannerVulnCountschema.ScannerVulnCount{...}
#/definitions/tmpforms.ActionConfigCreatetmpforms.ActionConfigCreate{...}
#/definitions/tmpforms.CronCreatetmpforms.CronCreate{...}
#/definitions/tmpforms.JobSubmissiontmpforms.JobSubmission{...}
#/definitions/tmpforms.UpdateWorkerCapacitytmpforms.UpdateWorkerCapacity{...}
#/definitions/tmpresponses.ActionConfigtmpresponses.ActionConfig{...}
#/definitions/tmpresponses.ActionConfigstmpresponses.ActionConfigs{...}
#/definitions/tmpresponses.Crontmpresponses.Cron{...}
#/definitions/tmpresponses.Cronstmpresponses.Crons{...}
#/definitions/tmpresponses.Jobtmpresponses.Job{...}
#/definitions/tmpresponses.JobLogtmpresponses.JobLog{...}
#/definitions/tmpresponses.Jobstmpresponses.Jobs{...}
#/definitions/tmpresponses.Workertmpresponses.Worker{...}
#/definitions/tmpresponses.Workerstmpresponses.Workers{...}