You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/api/swagger.yaml

4783 lines
140 KiB

---
swagger: "2.0"
info:
description: |
Portainer API is an HTTP API served by Portainer. It is used by the Portainer UI and everything you can do with the UI can be done using the HTTP API.
Examples are available at https://gist.github.com/deviantony/77026d402366b4b43fa5918d41bc42f8
You can find out more about Portainer at [http://portainer.io](http://portainer.io) and get some support on [Slack](http://portainer.io/slack/).
# Authentication
Most of the API endpoints require to be authenticated as well as some level of authorization to be used.
Portainer API uses JSON Web Token to manage authentication and thus requires you to provide a token in the **Authorization** header of each request
with the **Bearer** authentication mechanism.
Example:
```
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInJvbGUiOjEsImV4cCI6MTQ5OTM3NjE1NH0.NJ6vE8FY1WG6jsRQzfMqeatJ4vh2TWAeeYfDhP71YEE
```
# Security
Each API endpoint has an associated access policy, it is documented in the description of each endpoint.
Different access policies are available:
* Public access
* Authenticated access
* Restricted access
* Administrator access
### Public access
No authentication is required to access the endpoints with this access policy.
### Authenticated access
Authentication is required to access the endpoints with this access policy.
### Restricted access
Authentication is required to access the endpoints with this access policy.
Extra-checks might be added to ensure access to the resource is granted. Returned data might also be filtered.
### Administrator access
Authentication as well as an administrator role are required to access the endpoints with this access policy.
# Execute Docker requests
Portainer **DO NOT** expose specific endpoints to manage your Docker resources (create a container, remove a volume, etc...).
Instead, it acts as a reverse-proxy to the Docker HTTP API. This means that you can execute Docker requests **via** the Portainer HTTP API.
To do so, you can use the `/endpoints/{id}/docker` Portainer API endpoint (which is not documented below due to Swagger limitations). This endpoint has a restricted access policy so you still need to be authenticated to be able to query this endpoint. Any query on this endpoint will be proxied to the Docker API of the associated endpoint (requests and responses objects are the same as documented in the Docker API).
**NOTE**: You can find more information on how to query the Docker API in the [Docker official documentation](https://docs.docker.com/engine/api/v1.30/) as well as in [this Portainer example](https://gist.github.com/deviantony/77026d402366b4b43fa5918d41bc42f8).
version: "1.24.0-dev"
title: "Portainer API"
contact:
email: "info@portainer.io"
host: "portainer.domain"
basePath: "/api"
tags:
- name: "auth"
description: "Authenticate against Portainer HTTP API"
- name: "dockerhub"
description: "Manage how Portainer connects to the DockerHub"
- name: "endpoints"
description: "Manage Docker environments"
- name: "endpoint_groups"
description: "Manage endpoint groups"
- name: "extensions"
description: "Manage extensions"
- name: "registries"
description: "Manage Docker registries"
- name: "resource_controls"
description: "Manage access control on Docker resources"
- name: "roles"
description: "Manage roles"
- name: "settings"
description: "Manage Portainer settings"
- name: "status"
description: "Information about the Portainer instance"
- name: "stacks"
description: "Manage Docker stacks"
- name: "users"
description: "Manage users"
- name: "tags"
description: "Manage tags"
- name: "teams"
description: "Manage teams"
- name: "team_memberships"
description: "Manage team memberships"
- name: "templates"
description: "Manage App Templates"
- name: "stacks"
description: "Manage stacks"
- name: "upload"
description: "Upload files"
- name: "websocket"
description: "Create exec sessions using websockets"
schemes:
- "http"
- "https"
paths:
/auth:
post:
tags:
- "auth"
summary: "Authenticate a user"
description: |
Use this endpoint to authenticate against Portainer using a username and password.
**Access policy**: public
operationId: "AuthenticateUser"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Credentials used for authentication"
required: true
schema:
$ref: "#/definitions/AuthenticateUserRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/AuthenticateUserResponse"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid credentials"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
503:
description: "Authentication disabled"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Authentication is disabled"
/dockerhub:
get:
tags:
- "dockerhub"
summary: "Retrieve DockerHub information"
description: |
Use this endpoint to retrieve the information used to connect to the DockerHub
**Access policy**: authenticated
operationId: "DockerHubInspect"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/DockerHubSubset"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
put:
tags:
- "dockerhub"
summary: "Update DockerHub information"
description: |
Use this endpoint to update the information used to connect to the DockerHub
**Access policy**: administrator
operationId: "DockerHubUpdate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "DockerHub information"
required: true
schema:
$ref: "#/definitions/DockerHubUpdateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/DockerHub"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/endpoints:
get:
tags:
- "endpoints"
summary: "List endpoints"
description: |
List all endpoints based on the current user authorizations. Will
return all endpoints if using an administrator account otherwise it will
only return authorized endpoints.
**Access policy**: restricted
operationId: "EndpointList"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/EndpointListResponse"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
post:
tags:
- "endpoints"
summary: "Create a new endpoint"
description: |
Create a new endpoint that will be used to manage a Docker environment.
**Access policy**: administrator
operationId: "EndpointCreate"
consumes:
- "multipart/form-data"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "Name"
in: "formData"
type: "string"
description: "Name that will be used to identify this endpoint (example: my-endpoint)"
required: true
- name: "EndpointType"
in: "formData"
type: "integer"
description: "Environment type. Value must be one of: 1 (Docker environment), 2 (Agent environment), 3 (Azure environment) or 4 (Edge agent environment)"
required: true
- name: "URL"
in: "formData"
type: "string"
description: "URL or IP address of a Docker host (example: docker.mydomain.tld:2375).\
\ Defaults to local if not specified (Linux: /var/run/docker.sock, Windows: //./pipe/docker_engine)"
- name: "PublicURL"
in: "formData"
type: "string"
description: "URL or IP address where exposed containers will be reachable.\
\ Defaults to URL if not specified (example: docker.mydomain.tld:2375)"
- name: "GroupID"
in: "formData"
type: "string"
description: "Endpoint group identifier. If not specified will default to 1 (unassigned)."
- name: "TLS"
in: "formData"
type: "string"
description: "Require TLS to connect against this endpoint (example: true)"
- name: "TLSSkipVerify"
in: "formData"
type: "string"
description: "Skip server verification when using TLS (example: false)"
- name: "TLSSkipClientVerify"
in: "formData"
type: "string"
description: "Skip client verification when using TLS (example: false)"
- name: "TLSCACertFile"
in: "formData"
type: "file"
description: "TLS CA certificate file"
- name: "TLSCertFile"
in: "formData"
type: "file"
description: "TLS client certificate file"
- name: "TLSKeyFile"
in: "formData"
type: "file"
description: "TLS client key file"
- name: "AzureApplicationID"
in: "formData"
type: "string"
description: "Azure application ID. Required if endpoint type is set to 3"
- name: "AzureTenantID"
in: "formData"
type: "string"
description: "Azure tenant ID. Required if endpoint type is set to 3"
- name: "AzureAuthenticationKey"
in: "formData"
type: "string"
description: "Azure authentication key. Required if endpoint type is set to 3"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Endpoint"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
503:
description: "Endpoint management disabled"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Endpoint management is disabled"
/endpoints/{id}:
get:
tags:
- "endpoints"
summary: "Inspect an endpoint"
description: |
Retrieve details abount an endpoint.
**Access policy**: restricted
operationId: "EndpointInspect"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Endpoint identifier"
required: true
type: "integer"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Endpoint"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
404:
description: "Endpoint not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Endpoint not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
put:
tags:
- "endpoints"
summary: "Update an endpoint"
description: |
Update an endpoint.
**Access policy**: administrator
operationId: "EndpointUpdate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Endpoint identifier"
required: true
type: "integer"
- in: "body"
name: "body"
description: "Endpoint details"
required: true
schema:
$ref: "#/definitions/EndpointUpdateRequest"
responses:
200:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
404:
description: "Endpoint not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Endpoint not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
503:
description: "Endpoint management disabled"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Endpoint management is disabled"
delete:
tags:
- "endpoints"
summary: "Remove an endpoint"
description: |
Remove an endpoint.
**Access policy**: administrator
operationId: "EndpointDelete"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Endpoint identifier"
required: true
type: "integer"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
404:
description: "Endpoint not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Endpoint not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
503:
description: "Endpoint management disabled"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Endpoint management is disabled"
/endpoints/{id}/job:
post:
tags:
- "endpoints"
summary: "Execute a job on the endpoint host"
description: |
Execute a job (script) on the underlying host of the endpoint.
**Access policy**: administrator
operationId: "EndpointJob"
consumes:
- "multipart/form-data"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Endpoint identifier"
required: true
type: "integer"
- name: "method"
in: "query"
description: "Job execution method. Possible values: file or string."
required: true
type: "string"
- name: "nodeName"
in: "query"
description: "Optional. Hostname of a node when targeting a Portainer agent cluster."
required: true
type: "string"
- in: "body"
name: "body"
description: "Job details. Required when method equals string."
required: true
schema:
$ref: "#/definitions/EndpointJobRequest"
- name: "Image"
in: "formData"
type: "string"
description: "Container image which will be used to execute the job. Required when method equals file."
- name: "file"
in: "formData"
type: "file"
description: "Job script file. Required when method equals file."
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Endpoint"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
404:
description: "Endpoint not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Endpoint not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/endpoint_groups:
get:
tags:
- "endpoint_groups"
summary: "List endpoint groups"
description: |
List all endpoint groups based on the current user authorizations. Will
return all endpoint groups if using an administrator account otherwise it will
only return authorized endpoint groups.
**Access policy**: restricted
operationId: "EndpointGroupList"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/EndpointGroupListResponse"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
post:
tags:
- "endpoint_groups"
summary: "Create a new endpoint"
description: |
Create a new endpoint group.
**Access policy**: administrator
operationId: "EndpointGroupCreate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "Registry details"
required: true
schema:
$ref: "#/definitions/EndpointGroupCreateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/EndpointGroup"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/endpoint_groups/{id}:
get:
tags:
- "endpoint_groups"
summary: "Inspect an endpoint group"
description: |
Retrieve details abount an endpoint group.
**Access policy**: administrator
operationId: "EndpointGroupInspect"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Endpoint group identifier"
required: true
type: "integer"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/EndpointGroup"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
404:
description: "EndpointGroup not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "EndpointGroup not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
put:
tags:
- "endpoint_groups"
summary: "Update an endpoint group"
description: |
Update an endpoint group.
**Access policy**: administrator
operationId: "EndpointGroupUpdate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "EndpointGroup identifier"
required: true
type: "integer"
- in: "body"
name: "body"
description: "EndpointGroup details"
required: true
schema:
$ref: "#/definitions/EndpointGroupUpdateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/EndpointGroup"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
404:
description: "EndpointGroup not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "EndpointGroup not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
503:
description: "EndpointGroup management disabled"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "EndpointGroup management is disabled"
delete:
tags:
- "endpoint_groups"
summary: "Remove an endpoint group"
description: |
Remove an endpoint group.
**Access policy**: administrator
operationId: "EndpointGroupDelete"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "EndpointGroup identifier"
required: true
type: "integer"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
404:
description: "EndpointGroup not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "EndpointGroup not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
503:
description: "EndpointGroup management disabled"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "EndpointGroup management is disabled"
/endpoint_groups/{id}/endpoints/{endpointId}:
put:
tags:
- "endpoint_groups"
summary: "Add an endpoint to an endpoint group"
description: |
Add an endpoint to an endpoint group
**Access policy**: administrator
operationId: "EndpointGroupAddEndpoint"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "EndpointGroup identifier"
required: true
type: "integer"
- name: "endpointId"
in: "path"
description: "Endpoint identifier"
required: true
type: "integer"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
404:
description: "EndpointGroup not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "EndpointGroup not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
delete:
tags:
- "endpoint_groups"
summary: "Remove an endpoint group"
description: |
Remove an endpoint group.
**Access policy**: administrator
operationId: "EndpointGroupDeleteEndpoint"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "EndpointGroup identifier"
required: true
type: "integer"
- name: "endpointId"
in: "path"
description: "Endpoint identifier"
required: true
type: "integer"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
404:
description: "EndpointGroup not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "EndpointGroup not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/extensions:
get:
tags:
- "extensions"
summary: "List extensions"
description: |
List all extensions registered inside Portainer. If the store parameter is set to true,
will retrieve extensions details from the online repository.
**Access policy**: administrator
operationId: "ExtensionList"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "store"
in: "query"
description: "Retrieve online information about extensions. Possible values: true or false."
required: false
type: "boolean"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/ExtensionListResponse"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
post:
tags:
- "extensions"
summary: "Enable an extension"
description: |
Enable an extension.
**Access policy**: administrator
operationId: "ExtensionCreate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "Extension details"
required: true
schema:
$ref: "#/definitions/ExtensionCreateRequest"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/extensions/{id}:
get:
tags:
- "extensions"
summary: "Inspect an extension"
description: |
Retrieve details abount an extension.
**Access policy**: administrator
operationId: "ExtensionInspect"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "extension identifier"
required: true
type: "integer"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Extension"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
404:
description: "Extension not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Extension not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
put:
tags:
- "extensions"
summary: "Update an extension"
description: |
Update an extension to a specific version of the extension.
**Access policy**: administrator
operationId: "ExtensionUpdate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Extension identifier"
required: true
type: "integer"
- in: "body"
name: "body"
description: "Extension details"
required: true
schema:
$ref: "#/definitions/ExtensionUpdateRequest"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
404:
description: "Extension not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Extension not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
delete:
tags:
- "extensions"
summary: "Disable an extension"
description: |
Disable an extension.
**Access policy**: administrator
operationId: "ExtensionDelete"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Extension identifier"
required: true
type: "integer"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
404:
description: "Extension not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Extension not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/registries:
get:
tags:
- "registries"
summary: "List registries"
description: |
List all registries based on the current user authorizations.
Will return all registries if using an administrator account otherwise it
will only return authorized registries.
**Access policy**: restricted
operationId: "RegistryList"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/RegistryListResponse"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
post:
tags:
- "registries"
summary: "Create a new registry"
description: |
Create a new registry.
**Access policy**: administrator
operationId: "RegistryCreate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "Registry details"
required: true
schema:
$ref: "#/definitions/RegistryCreateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Registry"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
409:
description: "Registry already exists"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "A registry is already defined for this URL"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/registries/{id}:
get:
tags:
- "registries"
summary: "Inspect a registry"
description: |
Retrieve details about a registry.
**Access policy**: administrator
operationId: "RegistryInspect"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Registry identifier"
required: true
type: "integer"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Registry"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
404:
description: "Registry not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Registry not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
put:
tags:
- "registries"
summary: "Update a registry"
description: |
Update a registry.
**Access policy**: administrator
operationId: "RegistryUpdate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Registry identifier"
required: true
type: "integer"
- in: "body"
name: "body"
description: "Registry details"
required: true
schema:
$ref: "#/definitions/RegistryUpdateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Registry"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
404:
description: "Registry not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Endpoint not found"
409:
description: "Registry already exists"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "A registry is already defined for this URL"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
delete:
tags:
- "registries"
summary: "Remove a registry"
description: |
Remove a registry.
**Access policy**: administrator
operationId: "RegistryDelete"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Registry identifier"
required: true
type: "integer"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
404:
description: "Registry not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Registry not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/resource_controls:
post:
tags:
- "resource_controls"
summary: "Create a new resource control"
description: |
Create a new resource control to restrict access to a Docker resource.
**Access policy**: administrator
operationId: "ResourceControlCreate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "Resource control details"
required: true
schema:
$ref: "#/definitions/ResourceControlCreateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/ResourceControl"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
409:
description: "Resource control already exists"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "A resource control is already applied on this resource"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/resource_controls/{id}:
put:
tags:
- "resource_controls"
summary: "Update a resource control"
description: |
Update a resource control.
**Access policy**: restricted
operationId: "ResourceControlUpdate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Resource control identifier"
required: true
type: "integer"
- in: "body"
name: "body"
description: "Resource control details"
required: true
schema:
$ref: "#/definitions/ResourceControlUpdateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/ResourceControl"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
404:
description: "Resource control not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Resource control not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
delete:
tags:
- "resource_controls"
summary: "Remove a resource control"
description: |
Remove a resource control.
**Access policy**: administrator
operationId: "ResourceControlDelete"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Resource control identifier"
required: true
type: "integer"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
404:
description: "Resource control not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Resource control not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/roles:
get:
tags:
- "roles"
summary: "List roles"
description: |
List all roles available for use with the RBAC extension.
**Access policy**: administrator
operationId: "RoleList"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/RoleListResponse"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/settings:
get:
tags:
- "settings"
summary: "Retrieve Portainer settings"
description: |
Retrieve Portainer settings.
**Access policy**: administrator
operationId: "SettingsInspect"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Settings"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
put:
tags:
- "settings"
summary: "Update Portainer settings"
description: |
Update Portainer settings.
**Access policy**: administrator
operationId: "SettingsUpdate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "New settings"
required: true
schema:
$ref: "#/definitions/SettingsUpdateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Settings"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/settings/public:
get:
tags:
- "settings"
summary: "Retrieve Portainer public settings"
description: |
Retrieve public settings. Returns a small set of settings that are not reserved to administrators only.
**Access policy**: public
operationId: "PublicSettingsInspect"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/PublicSettingsInspectResponse"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/settings/authentication/checkLDAP:
put:
tags:
- "settings"
summary: "Test LDAP connectivity"
description: |
Test LDAP connectivity using LDAP details.
**Access policy**: administrator
operationId: "SettingsLDAPCheck"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "LDAP settings"
required: true
schema:
$ref: "#/definitions/SettingsLDAPCheckRequest"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/status:
get:
tags:
- "status"
summary: "Check Portainer status"
description: |
Retrieve Portainer status.
**Access policy**: public
operationId: "StatusInspect"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Status"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/stacks:
get:
tags:
- "stacks"
summary: "List stacks"
description: |
List all stacks based on the current user authorizations.
Will return all stacks if using an administrator account otherwise it
will only return the list of stacks the user have access to.
**Access policy**: restricted
operationId: "StackList"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "filters"
in: "query"
description: |
Filters to process on the stack list. Encoded as JSON (a map[string]string).
For example, {"SwarmID": "jpofkc0i9uo9wtx1zesuk649w"} will only return stacks that are part
of the specified Swarm cluster. Available filters: EndpointID, SwarmID.
type: "string"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/StackListResponse"
examples:
application/json:
err: "Access denied to resource"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
post:
tags:
- "stacks"
summary: "Deploy a new stack"
description: |
Deploy a new stack into a Docker environment specified via the endpoint identifier.
**Access policy**: restricted
operationId: "StackCreate"
consumes:
- "multipart/form-data"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "type"
in: "query"
description: "Stack deployment type. Possible values: 1 (Swarm stack) or 2 (Compose stack)."
required: true
type: "integer"
- name: "method"
in: "query"
description: "Stack deployment method. Possible values: file, string or repository."
required: true
type: "string"
- name: "endpointId"
in: "query"
description: "Identifier of the endpoint that will be used to deploy the stack."
required: true
type: "integer"
- in: "body"
name: "body"
description: "Stack details. Required when method equals string or repository."
schema:
$ref: "#/definitions/StackCreateRequest"
- name: "Name"
in: "formData"
type: "string"
description: "Name of the stack. Required when method equals file."
- name: "EndpointID"
in: "formData"
type: "string"
description: "Endpoint identifier used to deploy the stack. Required when method equals file."
- name: "SwarmID"
in: "formData"
type: "string"
description: "Swarm cluster identifier. Required when method equals file and type equals 1."
- name: "file"
in: "formData"
type: "file"
description: "Stack file. Required when method equals file."
- name: "Env"
in: "formData"
type: "string"
description: "Environment variables passed during deployment, represented as a JSON array [{'name': 'name', 'value': 'value'}]. Optional, used when method equals file and type equals 1."
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Stack"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
404:
description: "Endpoint not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Endpoint not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/stacks/{id}:
get:
tags:
- "stacks"
summary: "Inspect a stack"
description: |
Retrieve details about a stack.
**Access policy**: restricted
operationId: "StackInspect"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Stack identifier"
required: true
type: "integer"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Stack"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
404:
description: "Stack not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Stack not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
put:
tags:
- "stacks"
summary: "Update a stack"
description: |
Update a stack.
**Access policy**: restricted
operationId: "StackUpdate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Stack identifier"
required: true
type: "integer"
- name: "endpointId"
in: "query"
description: "Stacks created before version 1.18.0 might not have an associated endpoint identifier. Use this \
optional parameter to set the endpoint identifier used by the stack."
type: "integer"
- in: "body"
name: "body"
description: "Stack details"
required: true
schema:
$ref: "#/definitions/StackUpdateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Stack"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
404:
description: "Stack not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Stack not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
delete:
tags:
- "stacks"
summary: "Remove a stack"
description: |
Remove a stack.
**Access policy**: restricted
operationId: "StackDelete"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Stack identifier"
required: true
type: "integer"
- name: "external"
in: "query"
description: "Set to true to delete an external stack. Only external Swarm stacks are supported."
type: "boolean"
- name: "endpointId"
in: "query"
description: "Endpoint identifier used to remove an external stack (required when external is set to true)"
type: "string"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
404:
description: "Stack not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Stack not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/stacks/{id}/file:
get:
tags:
- "stacks"
summary: "Retrieve the content of the Stack file for the specified stack"
description: |
Get Stack file content.
**Access policy**: restricted
operationId: "StackFileInspect"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Stack identifier"
required: true
type: "integer"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/StackFileInspectResponse"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
404:
description: "Stack not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Stack not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/stacks/{id}/migrate:
post:
tags:
- "stacks"
summary: "Migrate a stack to another endpoint"
description: |
Migrate a stack from an endpoint to another endpoint. It will re-create
the stack inside the target endpoint before removing the original stack.
**Access policy**: restricted
operationId: "StackMigrate"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Stack identifier"
required: true
type: "integer"
- name: "endpointId"
in: "query"
description: "Stacks created before version 1.18.0 might not have an associated endpoint identifier. Use this \
optional parameter to set the endpoint identifier used by the stack."
type: "integer"
- in: "body"
name: "body"
description: "Stack migration details."
schema:
$ref: "#/definitions/StackMigrateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Stack"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
404:
description: "Stack not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Stack not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/users:
get:
tags:
- "users"
summary: "List users"
description: |
List Portainer users. Non-administrator users will only be able to list other non-administrator user accounts.
**Access policy**: restricted
operationId: "UserList"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/UserListResponse"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
post:
tags:
- "users"
summary: "Create a new user"
description: |
Create a new Portainer user. Only team leaders and administrators can create users. Only administrators can
create an administrator user account.
**Access policy**: restricted
operationId: "UserCreate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "User details"
required: true
schema:
$ref: "#/definitions/UserCreateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/UserSubset"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
409:
description: "User already exists"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "User already exists"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/users/{id}:
get:
tags:
- "users"
summary: "Inspect a user"
description: |
Retrieve details about a user.
**Access policy**: administrator
operationId: "UserInspect"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "User identifier"
required: true
type: "integer"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/User"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
404:
description: "User not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "User not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
put:
tags:
- "users"
summary: "Update a user"
description: |
Update user details. A regular user account can only update his details.
**Access policy**: authenticated
operationId: "UserUpdate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "User identifier"
required: true
type: "integer"
- in: "body"
name: "body"
description: "User details"
required: true
schema:
$ref: "#/definitions/UserUpdateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/User"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
404:
description: "User not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "User not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
delete:
tags:
- "users"
summary: "Remove a user"
description: |
Remove a user.
**Access policy**: administrator
operationId: "UserDelete"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "User identifier"
required: true
type: "integer"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
404:
description: "User not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "User not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/users/{id}/memberships:
get:
tags:
- "users"
summary: "Inspect a user memberships"
description: |
Inspect a user memberships.
**Access policy**: authenticated
operationId: "UserMembershipsInspect"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "User identifier"
required: true
type: "integer"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/UserMembershipsResponse"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/users/{id}/passwd:
post:
tags:
- "users"
summary: "Check password validity for a user"
description: |
Check if the submitted password is valid for the specified user.
**Access policy**: authenticated
operationId: "UserPasswordCheck"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "User identifier"
required: true
type: "integer"
- in: "body"
name: "body"
description: "User details"
required: true
schema:
$ref: "#/definitions/UserPasswordCheckRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/UserPasswordCheckResponse"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
404:
description: "User not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "User not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/users/admin/check:
get:
tags:
- "users"
summary: "Check administrator account existence"
description: |
Check if an administrator account exists in the database.
**Access policy**: public
operationId: "UserAdminCheck"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
204:
description: "Success"
404:
description: "User not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "User not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/users/admin/init:
post:
tags:
- "users"
summary: "Initialize administrator account"
description: |
Initialize the 'admin' user account.
**Access policy**: public
operationId: "UserAdminInit"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "User details"
required: true
schema:
$ref: "#/definitions/UserAdminInitRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/User"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
409:
description: "Admin user already initialized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "User already exists"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/upload/tls/{certificate}:
post:
tags:
- "upload"
summary: "Upload TLS files"
description: |
Use this endpoint to upload TLS files.
**Access policy**: administrator
operationId: "UploadTLS"
consumes:
- multipart/form-data
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "path"
name: "certificate"
description: "TLS file type. Valid values are 'ca', 'cert' or 'key'."
required: true
type: "string"
- in: "query"
name: "folder"
description: "Folder where the TLS file will be stored. Will be created if not existing."
required: true
type: "string"
- in: "formData"
name: "file"
type: "file"
description: "The file to upload."
responses:
200:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/tags:
get:
tags:
- "tags"
summary: "List tags"
description: |
List tags.
**Access policy**: administrator
operationId: "TagList"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/TagListResponse"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
post:
tags:
- "tags"
summary: "Create a new tag"
description: |
Create a new tag.
**Access policy**: administrator
operationId: "TagCreate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "Tag details"
required: true
schema:
$ref: "#/definitions/TagCreateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Tag"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
409:
description: "Conflict"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "A tag with the specified name already exists"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/tags/{id}:
delete:
tags:
- "tags"
summary: "Remove a tag"
description: |
Remove a tag.
**Access policy**: administrator
operationId: "TagDelete"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Tag identifier"
required: true
type: "integer"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/teams:
get:
tags:
- "teams"
summary: "List teams"
description: |
List teams. For non-administrator users, will only list the teams they are member of.
**Access policy**: restricted
operationId: "TeamList"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/TeamListResponse"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
post:
tags:
- "teams"
summary: "Create a new team"
description: |
Create a new team.
**Access policy**: administrator
operationId: "TeamCreate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "Team details"
required: true
schema:
$ref: "#/definitions/TeamCreateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Team"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
409:
description: "Team already exists"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Team already exists"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/teams/{id}:
get:
tags:
- "teams"
summary: "Inspect a team"
description: |
Retrieve details about a team. Access is only available for administrator and leaders of that team.
**Access policy**: restricted
operationId: "TeamInspect"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Team identifier"
required: true
type: "integer"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Team"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
404:
description: "Team not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Team not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
put:
tags:
- "teams"
summary: "Update a team"
description: |
Update a team.
**Access policy**: administrator
operationId: "TeamUpdate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Team identifier"
required: true
type: "integer"
- in: "body"
name: "body"
description: "Team details"
required: true
schema:
$ref: "#/definitions/TeamUpdateRequest"
responses:
200:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
404:
description: "Team not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Team not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
delete:
tags:
- "teams"
summary: "Remove a team"
description: |
Remove a team.
**Access policy**: administrator
operationId: "TeamDelete"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Team identifier"
required: true
type: "integer"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
404:
description: "Team not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Team not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/teams/{id}/memberships:
get:
tags:
- "teams"
summary: "Inspect a team memberships"
description: |
Inspect a team memberships. Access is only available for administrator and leaders of that team.
**Access policy**: restricted
operationId: "TeamMembershipsInspect"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Team identifier"
required: true
type: "integer"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/TeamMembershipsResponse"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/team_memberships:
get:
tags:
- "team_memberships"
summary: "List team memberships"
description: |
List team memberships. Access is only available to administrators and team leaders.
**Access policy**: restricted
operationId: "TeamMembershipList"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/TeamMembershipListResponse"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
post:
tags:
- "team_memberships"
summary: "Create a new team membership"
description: |
Create a new team memberships. Access is only available to administrators leaders of the associated team.
**Access policy**: restricted
operationId: "TeamMembershipCreate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "Team membership details"
required: true
schema:
$ref: "#/definitions/TeamMembershipCreateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/TeamMembership"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
409:
description: "Team membership already exists"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Team membership already exists for this user and team."
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/team_memberships/{id}:
put:
tags:
- "team_memberships"
summary: "Update a team membership"
description: |
Update a team membership. Access is only available to administrators leaders of the associated team.
**Access policy**: restricted
operationId: "TeamMembershipUpdate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Team membership identifier"
required: true
type: "integer"
- in: "body"
name: "body"
description: "Team membership details"
required: true
schema:
$ref: "#/definitions/TeamMembershipUpdateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/TeamMembership"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
404:
description: "Team membership not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Team membership not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
delete:
tags:
- "team_memberships"
summary: "Remove a team membership"
description: |
Remove a team membership. Access is only available to administrators leaders of the associated team.
**Access policy**: restricted
operationId: "TeamMembershipDelete"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "TeamMembership identifier"
required: true
type: "integer"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
404:
description: "Team membership not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Team membership not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/templates:
get:
tags:
- "templates"
summary: "List available templates"
description: |
List available templates.
Administrator templates will not be listed for non-administrator users.
**Access policy**: restricted
operationId: "TemplateList"
produces:
- "application/json"
security:
- jwt: []
parameters: []
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/TemplateListResponse"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
post:
tags:
- "templates"
summary: "Create a new template"
description: |
Create a new template.
**Access policy**: administrator
operationId: "TemplateCreate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- in: "body"
name: "body"
description: "Template details"
required: true
schema:
$ref: "#/definitions/TemplateCreateRequest"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Template"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
/templates/{id}:
get:
tags:
- "templates"
summary: "Inspect a template"
description: |
Retrieve details about a template.
**Access policy**: administrator
operationId: "TemplateInspect"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Template identifier"
required: true
type: "integer"
responses:
200:
description: "Success"
schema:
$ref: "#/definitions/Template"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
404:
description: "Template not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Template not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
put:
tags:
- "templates"
summary: "Update a template"
description: |
Update a template.
**Access policy**: administrator
operationId: "TemplateUpdate"
consumes:
- "application/json"
produces:
- "application/json"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Template identifier"
required: true
type: "integer"
- in: "body"
name: "body"
description: "Template details"
required: true
schema:
$ref: "#/definitions/TemplateUpdateRequest"
responses:
200:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request data format"
403:
description: "Unauthorized"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Access denied to resource"
404:
description: "Template not found"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Template not found"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
delete:
tags:
- "templates"
summary: "Remove a template"
description: |
Remove a template.
**Access policy**: administrator
operationId: "TemplateDelete"
security:
- jwt: []
parameters:
- name: "id"
in: "path"
description: "Template identifier"
required: true
type: "integer"
responses:
204:
description: "Success"
400:
description: "Invalid request"
schema:
$ref: "#/definitions/GenericError"
examples:
application/json:
err: "Invalid request"
500:
description: "Server error"
schema:
$ref: "#/definitions/GenericError"
securityDefinitions:
jwt:
type: "apiKey"
name: "Authorization"
in: "header"
definitions:
Tag:
type: "object"
properties:
Id:
type: "integer"
example: 1
description: "Tag identifier"
Name:
type: "string"
example: "org/acme"
description: "Tag name"
Team:
type: "object"
properties:
Id:
type: "integer"
example: 1
description: "Team identifier"
Name:
type: "string"
example: "developers"
description: "Team name"
TeamMembership:
type: "object"
properties:
Id:
type: "integer"
example: 1
description: "Membership identifier"
UserID:
type: "integer"
example: 1
description: "User identifier"
TeamID:
type: "integer"
example: 1
description: "Team identifier"
Role:
type: "integer"
example: 1
description: "Team role (1 for team leader and 2 for team member)"
UserSubset:
type: "object"
properties:
Id:
type: "integer"
example: 1
description: "User identifier"
Username:
type: "string"
example: "bob"
description: "Username"
Role:
type: "integer"
example: 1
description: "User role (1 for administrator account and 2 for regular account)"
User:
type: "object"
properties:
Id:
type: "integer"
example: 1
description: "User identifier"
Username:
type: "string"
example: "bob"
description: "Username"
Password:
type: "string"
example: "passwd"
description: "Password"
Role:
type: "integer"
example: 1
description: "User role (1 for administrator account and 2 for regular account)"
Status:
type: "object"
properties:
Authentication:
type: "boolean"
example: true
description: "Is authentication enabled"
EndpointManagement:
type: "boolean"
example: true
description: "Is endpoint management enabled"
Analytics:
type: "boolean"
example: true
description: "Is analytics enabled"
Version:
type: "string"
example: "1.24.0-dev"
description: "Portainer API version"
PublicSettingsInspectResponse:
type: "object"
properties:
LogoURL:
type: "string"
example: "https://mycompany.mydomain.tld/logo.png"
description: "URL to a logo that will be displayed on the login page as well\
\ as on top of the sidebar. Will use default Portainer logo when value is\
\ empty string"
DisplayExternalContributors:
type: "boolean"
example: false
description: "Whether to display or not external templates contributions as\
\ sub-menus in the UI."
AuthenticationMethod:
type: "integer"
example: 1
description: "Active authentication method for the Portainer instance. Valid values are: 1 for managed or 2 for LDAP."
AllowBindMountsForRegularUsers:
type: "boolean"
example: false
description: "Whether non-administrator should be able to use bind mounts when creating containers"
AllowPrivilegedModeForRegularUsers:
type: "boolean"
example: true
description: "Whether non-administrator should be able to use privileged mode when creating containers"
TLSConfiguration:
type: "object"
properties:
TLS:
type: "boolean"
example: true
description: "Use TLS"
TLSSkipVerify:
type: "boolean"
example: false
description: "Skip the verification of the server TLS certificate"
TLSCACertPath:
type: "string"
example: "/data/tls/ca.pem"
description: "Path to the TLS CA certificate file"
TLSCertPath:
type: "string"
example: "/data/tls/cert.pem"
description: "Path to the TLS client certificate file"
TLSKeyPath:
type: "string"
example: "/data/tls/key.pem"
description: "Path to the TLS client key file"
AzureCredentials:
type: "object"
properties:
ApplicationID:
type: "string"
example: "eag7cdo9-o09l-9i83-9dO9-f0b23oe78db4"
description: "Azure application ID"
TenantID:
type: "string"
example: "34ddc78d-4fel-2358-8cc1-df84c8o839f5"
description: "Azure tenant ID"
AuthenticationKey:
type: "string"
example: "cOrXoK/1D35w8YQ8nH1/8ZGwzz45JIYD5jxHKXEQknk="
description: "Azure authentication key"
LDAPSearchSettings:
type: "object"
properties:
BaseDN:
type: "string"
example: "dc=ldap,dc=domain,dc=tld"
description: "The distinguished name of the element from which the LDAP server will search for users"
Filter:
type: "string"
example: "(objectClass=account)"
description: "Optional LDAP search filter used to select user elements"
UserNameAttribute:
type: "string"
example: "uid"
description: "LDAP attribute which denotes the username"
LDAPGroupSearchSettings:
type: "object"
properties:
GroupBaseDN:
type: "string"
example: "dc=ldap,dc=domain,dc=tld"
description: "The distinguished name of the element from which the LDAP server will search for groups."
GroupFilter:
type: "string"
example: "(objectClass=account)"
description: "The LDAP search filter used to select group elements, optional."
GroupAttribute:
type: "string"
example: "member"
description: "LDAP attribute which denotes the group membership."
UserAccessPolicies:
type: "object"
description: "User access policies associated to a registry/endpoint/endpoint group. RoleID is not required for registry access policies and can be set to 0."
additionalProperties:
$ref: "#/definitions/AccessPolicy"
example:
1: { RoleID: 1 }
2: { RoleID: 3 }
TeamAccessPolicies:
type: "object"
description: "Team access policies associated to a registry/endpoint/endpoint group. RoleID is not required for registry access policies and can be set to 0."
additionalProperties:
$ref: "#/definitions/AccessPolicy"
example:
1: { RoleID: 1 }
2: { RoleID: 3 }
AccessPolicy:
type: "object"
properties:
RoleID:
type: "integer"
example: "1"
description: "Role identifier. Reference the role that will be associated to this access policy"
LDAPSettings:
type: "object"
properties:
AnonymousMode:
type: "boolean"
example: true
description: "Enable this option if the server is configured for Anonymous access. When enabled, ReaderDN and Password will not be used."
ReaderDN:
type: "string"
example: "cn=readonly-account,dc=ldap,dc=domain,dc=tld"
description: "Account that will be used to search for users"
Password:
type: "string"
example: "readonly-password"
description: "Password of the account that will be used to search users"
URL:
type: "string"
example: "myldap.domain.tld:389"
description: "URL or IP address of the LDAP server"
TLSConfig:
$ref: "#/definitions/TLSConfiguration"
StartTLS:
type: "boolean"
example: true
description: "Whether LDAP connection should use StartTLS"
SearchSettings:
type: "array"
items:
$ref: "#/definitions/LDAPSearchSettings"
GroupSearchSettings:
type: "array"
items:
$ref: "#/definitions/LDAPGroupSearchSettings"
AutoCreateUsers:
type: "boolean"
example: true
description: "Automatically provision users and assign them to matching LDAP group names"
Settings:
type: "object"
properties:
TemplatesURL:
type: "string"
example: "https://raw.githubusercontent.com/portainer/templates/master/templates.json"
description: "URL to the templates that will be displayed in the UI when navigating\
\ to App Templates"
LogoURL:
type: "string"
example: "https://mycompany.mydomain.tld/logo.png"
description: "URL to a logo that will be displayed on the login page as well\
\ as on top of the sidebar. Will use default Portainer logo when value is\
\ empty string"
BlackListedLabels:
type: "array"
description: "A list of label name & value that will be used to hide containers\
\ when querying containers"
items:
$ref: "#/definitions/Settings_BlackListedLabels"
DisplayExternalContributors:
type: "boolean"
example: false
description: "Whether to display or not external templates contributions as\
\ sub-menus in the UI."
AuthenticationMethod:
type: "integer"
example: 1
description: "Active authentication method for the Portainer instance. Valid values are: 1 for managed or 2 for LDAP."
LDAPSettings:
$ref: "#/definitions/LDAPSettings"
AllowBindMountsForRegularUsers:
type: "boolean"
example: false
description: "Whether non-administrator should be able to use bind mounts when creating containers"
AllowPrivilegedModeForRegularUsers:
type: "boolean"
example: true
description: "Whether non-administrator should be able to use privileged mode when creating containers"
Settings_BlackListedLabels:
properties:
name:
type: "string"
example: "com.foo"
value:
type: "string"
example: "bar"
Pair:
properties:
name:
type: "string"
example: "name"
value:
type: "string"
example: "value"
Registry:
type: "object"
properties:
Id:
type: "integer"
example: 1
description: "Registry identifier"
Name:
type: "string"
example: "my-registry"
description: "Registry name"
URL:
type: "string"
example: "registry.mydomain.tld:2375"
description: "URL or IP address of the Docker registry"
Authentication:
type: "boolean"
example: true
description: "Is authentication against this registry enabled"
Username:
type: "string"
example: "registry_user"
description: "Username used to authenticate against this registry"
Password:
type: "string"
example: "registry_password"
description: "Password used to authenticate against this registry"
AuthorizedUsers:
type: "array"
description: "List of user identifiers authorized to use this registry"
items:
type: "integer"
example: 1
description: "User identifier"
AuthorizedTeams:
type: "array"
description: "List of team identifiers authorized to use this registry"
items:
type: "integer"
example: 1
description: "Team identifier"
RegistrySubset:
type: "object"
properties:
Id:
type: "integer"
example: 1
description: "Registry identifier"
Name:
type: "string"
example: "my-registry"
description: "Registry name"
URL:
type: "string"
example: "registry.mydomain.tld:2375"
description: "URL or IP address of the Docker registry"
Authentication:
type: "boolean"
example: true
description: "Is authentication against this registry enabled"
Username:
type: "string"
example: "registry_user"
description: "Username used to authenticate against this registry"
AuthorizedUsers:
type: "array"
description: "List of user identifiers authorized to use this registry"
items:
type: "integer"
example: 1
description: "User identifier"
AuthorizedTeams:
type: "array"
description: "List of team identifiers authorized to use this registry"
items:
type: "integer"
example: 1
description: "Team identifier"
EndpointGroup:
type: "object"
properties:
Id:
type: "integer"
example: 1
description: "Endpoint group identifier"
Name:
type: "string"
example: "my-endpoint-group"
description: "Endpoint group name"
Description:
type: "string"
example: "Description associated to the endpoint group"
description: "Endpoint group description"
AuthorizedUsers:
type: "array"
description: "List of user identifiers authorized to connect to this endpoint group. Will be inherited by endpoints that are part of the group"
items:
type: "integer"
example: 1
description: "User identifier"
AuthorizedTeams:
type: "array"
description: "List of team identifiers authorized to connect to this endpoint. Will be inherited by endpoints that are part of the group"
items:
type: "integer"
example: 1
description: "Team identifier"
Labels:
type: "array"
items:
$ref: "#/definitions/Pair"
Endpoint:
type: "object"
properties:
Id:
type: "integer"
example: 1
description: "Endpoint identifier"
Name:
type: "string"
example: "my-endpoint"
description: "Endpoint name"
Type:
type: "integer"
example: 1
description: "Endpoint environment type. 1 for a Docker environment, 2 for an agent on Docker environment or 3 for an Azure environment."
URL:
type: "string"
example: "docker.mydomain.tld:2375"
description: "URL or IP address of the Docker host associated to this endpoint"
PublicURL:
type: "string"
example: "docker.mydomain.tld:2375"
description: "URL or IP address where exposed containers will be reachable"
GroupID:
type: "integer"
example: 1
description: "Endpoint group identifier"
AuthorizedUsers:
type: "array"
description: "List of user identifiers authorized to connect to this endpoint"
items:
type: "integer"
example: 1
description: "User identifier"
AuthorizedTeams:
type: "array"
description: "List of team identifiers authorized to connect to this endpoint"
items:
type: "integer"
example: 1
description: "Team identifier"
TLSConfig:
$ref: "#/definitions/TLSConfiguration"
AzureCredentials:
$ref: "#/definitions/AzureCredentials"
EndpointSubset:
type: "object"
properties:
Id:
type: "integer"
example: 1
description: "Endpoint identifier"
Name:
type: "string"
example: "my-endpoint"
description: "Endpoint name"
Type:
type: "integer"
example: 1
description: "Endpoint environment type. 1 for a Docker environment, 2 for an agent on Docker environment, 3 for an Azure environment."
URL:
type: "string"
example: "docker.mydomain.tld:2375"
description: "URL or IP address of the Docker host associated to this endpoint"
PublicURL:
type: "string"
example: "docker.mydomain.tld:2375"
description: "URL or IP address where exposed containers will be reachable"
GroupID:
type: "integer"
example: 1
description: "Endpoint group identifier"
AuthorizedUsers:
type: "array"
description: "List of user identifiers authorized to connect to this endpoint"
items:
type: "integer"
example: 1
description: "User identifier"
AuthorizedTeams:
type: "array"
description: "List of team identifiers authorized to connect to this endpoint"
items:
type: "integer"
example: 1
description: "Team identifier"
TLSConfig:
$ref: "#/definitions/TLSConfiguration"
GenericError:
type: "object"
properties:
err:
type: "string"
example: "Something bad happened"
description: "Error message"
AuthenticateUserRequest:
type: "object"
required:
- "Password"
- "Username"
properties:
Username:
type: "string"
example: "admin"
description: "Username"
Password:
type: "string"
example: "mypassword"
description: "Password"
AuthenticateUserResponse:
type: "object"
properties:
jwt:
type: "string"
example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInJvbGUiOjEsImV4cCI6MTQ5OTM3NjE1NH0.NJ6vE8FY1WG6jsRQzfMqeatJ4vh2TWAeeYfDhP71YEE"
description: "JWT token used to authenticate against the API"
DockerHubSubset:
type: "object"
properties:
Authentication:
type: "boolean"
example: true
description: "Is authentication against DockerHub enabled"
Username:
type: "string"
example: "hub_user"
description: "Username used to authenticate against the DockerHub"
DockerHub:
type: "object"
properties:
Authentication:
type: "boolean"
example: true
description: "Is authentication against DockerHub enabled"
Username:
type: "string"
example: "hub_user"
description: "Username used to authenticate against the DockerHub"
Password:
type: "string"
example: "hub_password"
description: "Password used to authenticate against the DockerHub"
ResourceControl:
type: "object"
properties:
ResourceID:
type: "string"
example: "617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08"
description: "Docker resource identifier on which access control will be applied.\
\ In the case of a resource control applied to a stack, use the stack name as identifier"
Type:
type: "string"
example: "container"
description: "Type of Docker resource. Valid values are: container, volume\
\ service, secret, config or stack"
Public:
type: "boolean"
example: true
description: "Permit access to the associated resource to any user"
Users:
type: "array"
description: "List of user identifiers with access to the associated resource"
items:
type: "integer"
example: 1
description: "User identifier"
Teams:
type: "array"
description: "List of team identifiers with access to the associated resource"
items:
type: "integer"
example: 1
description: "Team identifier"
SubResourceIDs:
type: "array"
description: "List of Docker resources that will inherit this access control"
items:
type: "string"
example: "617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08"
description: "Docker resource identifier"
DockerHubUpdateRequest:
type: "object"
required:
- "Authentication"
- "Password"
- "Username"
properties:
Authentication:
type: "boolean"
example: true
description: "Enable authentication against DockerHub"
Username:
type: "string"
example: "hub_user"
description: "Username used to authenticate against the DockerHub"
Password:
type: "string"
example: "hub_password"
description: "Password used to authenticate against the DockerHub"
EndpointListResponse:
type: "array"
items:
$ref: "#/definitions/EndpointSubset"
EndpointGroupListResponse:
type: "array"
items:
$ref: "#/definitions/EndpointGroup"
EndpointUpdateRequest:
type: "object"
properties:
Name:
type: "string"
example: "my-endpoint"
description: "Name that will be used to identify this endpoint"
URL:
type: "string"
example: "docker.mydomain.tld:2375"
description: "URL or IP address of a Docker host"
PublicURL:
type: "string"
example: "docker.mydomain.tld:2375"
description: "URL or IP address where exposed containers will be reachable.\
\ Defaults to URL if not specified"
GroupID:
type: "integer"
example: "1"
description: "Group identifier"
TLS:
type: "boolean"
example: true
description: "Require TLS to connect against this endpoint"
TLSSkipVerify:
type: "boolean"
example: false
description: "Skip server verification when using TLS"
TLSSkipClientVerify:
type: "boolean"
example: false
description: "Skip client verification when using TLS"
ApplicationID:
type: "string"
example: "eag7cdo9-o09l-9i83-9dO9-f0b23oe78db4"
description: "Azure application ID"
TenantID:
type: "string"
example: "34ddc78d-4fel-2358-8cc1-df84c8o839f5"
description: "Azure tenant ID"
AuthenticationKey:
type: "string"
example: "cOrXoK/1D35w8YQ8nH1/8ZGwzz45JIYD5jxHKXEQknk="
description: "Azure authentication key"
UserAccessPolicies:
$ref: "#/definitions/UserAccessPolicies"
TeamAccessPolicies:
$ref: "#/definitions/TeamAccessPolicies"
RegistryCreateRequest:
type: "object"
required:
- "Authentication"
- "Name"
- "Password"
- "Type"
- "URL"
- "Username"
properties:
Name:
type: "string"
example: "my-registry"
description: "Name that will be used to identify this registry"
Type:
type: "integer"
example: 1
description: "Registry Type. Valid values are: 1 (Quay.io), 2 (Azure container registry) or 3 (custom registry)"
URL:
type: "string"
example: "registry.mydomain.tld:2375"
description: "URL or IP address of the Docker registry"
Authentication:
type: "boolean"
example: true
description: "Is authentication against this registry enabled"
Username:
type: "string"
example: "registry_user"
description: "Username used to authenticate against this registry"
Password:
type: "string"
example: "registry_password"
description: "Password used to authenticate against this registry"
RegistryListResponse:
type: "array"
items:
$ref: "#/definitions/RegistrySubset"
RegistryUpdateRequest:
type: "object"
required:
- "Name"
- "URL"
properties:
Name:
type: "string"
example: "my-registry"
description: "Name that will be used to identify this registry"
URL:
type: "string"
example: "registry.mydomain.tld:2375"
description: "URL or IP address of the Docker registry"
Authentication:
type: "boolean"
example: true
description: "Is authentication against this registry enabled"
Username:
type: "string"
example: "registry_user"
description: "Username used to authenticate against this registry"
Password:
type: "string"
example: "registry_password"
description: "Password used to authenticate against this registry"
UserAccessPolicies:
$ref: "#/definitions/UserAccessPolicies"
TeamAccessPolicies:
$ref: "#/definitions/TeamAccessPolicies"
ResourceControlCreateRequest:
type: "object"
required:
- "ResourceID"
- "Type"
properties:
ResourceID:
type: "string"
example: "617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08"
description: "Docker resource identifier on which access control will be applied.\
\ In the case of a resource control applied to a stack, use the stack name as identifier"
Type:
type: "string"
example: "container"
description: "Type of Docker resource. Valid values are: container, volume\
\ service, secret, config or stack"
Public:
type: "boolean"
example: true
description: "Permit access to the associated resource to any user"
Users:
type: "array"
description: "List of user identifiers with access to the associated resource"
items:
type: "integer"
example: 1
description: "User identifier"
Teams:
type: "array"
description: "List of team identifiers with access to the associated resource"
items:
type: "integer"
example: 1
description: "Team identifier"
SubResourceIDs:
type: "array"
description: "List of Docker resources that will inherit this access control"
items:
type: "string"
example: "617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08"
description: "Docker resource identifier"
ResourceControlUpdateRequest:
type: "object"
properties:
Public:
type: "boolean"
example: false
description: "Permit access to the associated resource to any user"
Users:
type: "array"
description: "List of user identifiers with access to the associated resource"
items:
type: "integer"
example: 1
description: "User identifier"
Teams:
type: "array"
description: "List of team identifiers with access to the associated resource"
items:
type: "integer"
example: 1
description: "Team identifier"
SettingsUpdateRequest:
type: "object"
required:
- "TemplatesURL"
- "AuthenticationMethod"
properties:
TemplatesURL:
type: "string"
example: "https://raw.githubusercontent.com/portainer/templates/master/templates.json"
description: "URL to the templates that will be displayed in the UI when navigating\
\ to App Templates"
LogoURL:
type: "string"
example: "https://mycompany.mydomain.tld/logo.png"
description: "URL to a logo that will be displayed on the login page as well\
\ as on top of the sidebar. Will use default Portainer logo when value is\
\ empty string"
BlackListedLabels:
type: "array"
description: "A list of label name & value that will be used to hide containers\
\ when querying containers"
items:
$ref: "#/definitions/Settings_BlackListedLabels"
DisplayExternalContributors:
type: "boolean"
example: false
description: "Whether to display or not external templates contributions as\
\ sub-menus in the UI."
AuthenticationMethod:
type: "integer"
example: 1
description: "Active authentication method for the Portainer instance. Valid values are: 1 for managed or 2 for LDAP."
LDAPSettings:
$ref: "#/definitions/LDAPSettings"
AllowBindMountsForRegularUsers:
type: "boolean"
example: true
description: "Whether non-administrator users should be able to use bind mounts when creating containers"
AllowPrivilegedModeForRegularUsers:
type: "boolean"
example: true
description: "Whether non-administrator users should be able to use privileged mode when creating containers"
EdgeAgentCheckinInterval:
type: "integer"
example: "30"
description: "Polling interval for Edge agent (in seconds)"
EndpointGroupCreateRequest:
type: "object"
required:
- "Name"
properties:
Name:
type: "string"
example: "my-endpoint-group"
description: "Endpoint group name"
Description:
type: "string"
example: "Endpoint group description"
description: "Endpoint group description"
Labels:
type: "array"
items:
$ref: "#/definitions/Pair"
AssociatedEndpoints:
type: "array"
description: "List of endpoint identifiers that will be part of this group"
items:
type: "integer"
example: 1
description: "Endpoint identifier"
EndpointGroupUpdateRequest:
type: "object"
properties:
Name:
type: "string"
example: "my-endpoint-group"
description: "Endpoint group name"
Description:
type: "string"
example: "Endpoint group description"
description: "Endpoint group description"
Tags:
type: "array"
description: "List of tags associated to the endpoint group"
items:
type: "string"
example: "zone/east-coast"
description: "Tag"
UserAccessPolicies:
$ref: "#/definitions/UserAccessPolicies"
TeamAccessPolicies:
$ref: "#/definitions/TeamAccessPolicies"
UserCreateRequest:
type: "object"
required:
- "Password"
- "Role"
- "Username"
properties:
Username:
type: "string"
example: "bob"
description: "Username"
Password:
type: "string"
example: "cg9Wgky3"
description: "Password"
Role:
type: "integer"
example: 1
description: "User role (1 for administrator account and 2 for regular account)"
UserListResponse:
type: "array"
items:
$ref: "#/definitions/UserSubset"
UserUpdateRequest:
type: "object"
properties:
Password:
type: "string"
example: "cg9Wgky3"
description: "Password"
Role:
type: "integer"
example: 1
description: "User role (1 for administrator account and 2 for regular account)"
UserMembershipsResponse:
type: "array"
items:
$ref: "#/definitions/TeamMembership"
UserPasswordCheckRequest:
type: "object"
required:
- "Password"
properties:
Password:
type: "string"
example: "cg9Wgky3"
description: "Password"
UserPasswordCheckResponse:
type: "object"
properties:
valid:
type: "boolean"
example: true
description: "Is the password valid"
TagListResponse:
type: "array"
items:
$ref: "#/definitions/Tag"
TagCreateRequest:
type: "object"
required:
- "Name"
properties:
Name:
type: "string"
example: "org/acme"
description: "Name"
TeamCreateRequest:
type: "object"
required:
- "Name"
properties:
Name:
type: "string"
example: "developers"
description: "Name"
TeamListResponse:
type: "array"
items:
$ref: "#/definitions/Team"
TeamUpdateRequest:
type: "object"
required:
- "Name"
properties:
Name:
type: "string"
example: "developers"
description: "Name"
TeamMembershipsResponse:
type: "array"
items:
$ref: "#/definitions/TeamMembership"
TeamMembershipCreateRequest:
type: "object"
required:
- "UserID"
- "TeamID"
- "Role"
properties:
UserID:
type: "integer"
example: 1
description: "User identifier"
TeamID:
type: "integer"
example: 1
description: "Team identifier"
Role:
type: "integer"
example: 1
description: "Role for the user inside the team (1 for leader and 2 for regular member)"
TeamMembershipListResponse:
type: "array"
items:
$ref: "#/definitions/TeamMembership"
TeamMembershipUpdateRequest:
type: "object"
required:
- "UserID"
- "TeamID"
- "Role"
properties:
UserID:
type: "integer"
example: 1
description: "User identifier"
TeamID:
type: "integer"
example: 1
description: "Team identifier"
Role:
type: "integer"
example: 1
description: "Role for the user inside the team (1 for leader and 2 for regular member)"
SettingsLDAPCheckRequest:
type: "object"
properties:
LDAPSettings:
$ref: "#/definitions/LDAPSettings"
UserAdminInitRequest:
type: "object"
properties:
Username:
type: "string"
example: "admin"
description: "Username for the admin user"
Password:
type: "string"
example: "admin-password"
description: "Password for the admin user"
TemplateListResponse:
type: "array"
items:
$ref: "#/definitions/Template"
TemplateCreateRequest:
type: "object"
required:
- "type"
- "title"
- "description"
properties:
type:
type: "integer"
example: 1
description: "Template type. Valid values are: 1 (container), 2 (Swarm stack) or 3 (Compose stack)"
title:
type: "string"
example: "Nginx"
description: "Title of the template"
description:
type: "string"
example: "High performance web server"
description: "Description of the template"
administrator_only:
type: "boolean"
example: true
description: "Whether the template should be available to administrators only"
image:
type: "string"
example: "nginx:latest"
description: "Image associated to a container template. Mandatory for a container template"
repository:
$ref: "#/definitions/TemplateRepository"
name:
type: "string"
example: "mystackname"
description: "Default name for the stack/container to be used on deployment"
logo:
type: "string"
example: "https://cloudinovasi.id/assets/img/logos/nginx.png"
description: "URL of the template's logo"
env:
type: "array"
description: "A list of environment variables used during the template deployment"
items:
$ref: "#/definitions/TemplateEnv"
note:
type: "string"
example: "This is my <b>custom</b> template"
description: "A note that will be displayed in the UI. Supports HTML content"
platform:
type: "string"
example: "linux"
description: "Platform associated to the template. Valid values are: 'linux', 'windows' or leave empty for multi-platform"
categories:
type: "array"
description: "A list of categories associated to the template"
items:
type: "string"
example: "database"
registry:
type: "string"
example: "quay.io"
description: "The URL of a registry associated to the image for a container template"
command:
type: "string"
example: "ls -lah"
description: "The command that will be executed in a container template"
network:
type: "string"
example: "mynet"
description: "Name of a network that will be used on container deployment if it exists inside the environment"
volumes:
type: "array"
description: "A list of volumes used during the container template deployment"
items:
$ref: "#/definitions/TemplateVolume"
ports:
type: "array"
description: "A list of ports exposed by the container"
items:
type: "string"
example: "8080:80/tcp"
labels:
type: "array"
description: "Container labels"
items:
$ref: '#/definitions/Pair'
privileged:
type: "boolean"
example: true
description: "Whether the container should be started in privileged mode"
interactive:
type: "boolean"
example: true
description: "Whether the container should be started in interactive mode (-i -t equivalent on the CLI)"
restart_policy:
type: "string"
example: "on-failure"
description: "Container restart policy"
hostname:
type: "string"
example: "mycontainer"
description: "Container hostname"
TemplateUpdateRequest:
type: "object"
properties:
type:
type: "integer"
example: 1
description: "Template type. Valid values are: 1 (container), 2 (Swarm stack) or 3 (Compose stack)"
title:
type: "string"
example: "Nginx"
description: "Title of the template"
description:
type: "string"
example: "High performance web server"
description: "Description of the template"
administrator_only:
type: "boolean"
example: true
description: "Whether the template should be available to administrators only"
image:
type: "string"
example: "nginx:latest"
description: "Image associated to a container template. Mandatory for a container template"
repository:
$ref: "#/definitions/TemplateRepository"
name:
type: "string"
example: "mystackname"
description: "Default name for the stack/container to be used on deployment"
logo:
type: "string"
example: "https://cloudinovasi.id/assets/img/logos/nginx.png"
description: "URL of the template's logo"
env:
type: "array"
description: "A list of environment variables used during the template deployment"
items:
$ref: "#/definitions/TemplateEnv"
note:
type: "string"
example: "This is my <b>custom</b> template"
description: "A note that will be displayed in the UI. Supports HTML content"
platform:
type: "string"
example: "linux"
description: "Platform associated to the template. Valid values are: 'linux', 'windows' or leave empty for multi-platform"
categories:
type: "array"
description: "A list of categories associated to the template"
items:
type: "string"
example: "database"
registry:
type: "string"
example: "quay.io"
description: "The URL of a registry associated to the image for a container template"
command:
type: "string"
example: "ls -lah"
description: "The command that will be executed in a container template"
network:
type: "string"
example: "mynet"
description: "Name of a network that will be used on container deployment if it exists inside the environment"
volumes:
type: "array"
description: "A list of volumes used during the container template deployment"
items:
$ref: "#/definitions/TemplateVolume"
ports:
type: "array"
description: "A list of ports exposed by the container"
items:
type: "string"
example: "8080:80/tcp"
labels:
type: "array"
description: "Container labels"
items:
$ref: '#/definitions/Pair'
privileged:
type: "boolean"
example: true
description: "Whether the container should be started in privileged mode"
interactive:
type: "boolean"
example: true
description: "Whether the container should be started in interactive mode (-i -t equivalent on the CLI)"
restart_policy:
type: "string"
example: "on-failure"
description: "Container restart policy"
hostname:
type: "string"
example: "mycontainer"
description: "Container hostname"
Template:
type: "object"
properties:
id:
type: "integer"
example: 1
description: "Template identifier"
type:
type: "integer"
example: 1
description: "Template type. Valid values are: 1 (container), 2 (Swarm stack) or 3 (Compose stack)"
title:
type: "string"
example: "Nginx"
description: "Title of the template"
description:
type: "string"
example: "High performance web server"
description: "Description of the template"
administrator_only:
type: "boolean"
example: true
description: "Whether the template should be available to administrators only"
image:
type: "string"
example: "nginx:latest"
description: "Image associated to a container template. Mandatory for a container template"
repository:
$ref: "#/definitions/TemplateRepository"
name:
type: "string"
example: "mystackname"
description: "Default name for the stack/container to be used on deployment"
logo:
type: "string"
example: "https://cloudinovasi.id/assets/img/logos/nginx.png"
description: "URL of the template's logo"
env:
type: "array"
description: "A list of environment variables used during the template deployment"
items:
$ref: "#/definitions/TemplateEnv"
note:
type: "string"
example: "This is my <b>custom</b> template"
description: "A note that will be displayed in the UI. Supports HTML content"
platform:
type: "string"
example: "linux"
description: "Platform associated to the template. Valid values are: 'linux', 'windows' or leave empty for multi-platform"
categories:
type: "array"
description: "A list of categories associated to the template"
items:
type: "string"
example: "database"
registry:
type: "string"
example: "quay.io"
description: "The URL of a registry associated to the image for a container template"
command:
type: "string"
example: "ls -lah"
description: "The command that will be executed in a container template"
network:
type: "string"
example: "mynet"
description: "Name of a network that will be used on container deployment if it exists inside the environment"
volumes:
type: "array"
description: "A list of volumes used during the container template deployment"
items:
$ref: "#/definitions/TemplateVolume"
ports:
type: "array"
description: "A list of ports exposed by the container"
items:
type: "string"
example: "8080:80/tcp"
labels:
type: "array"
description: "Container labels"
items:
$ref: '#/definitions/Pair'
privileged:
type: "boolean"
example: true
description: "Whether the container should be started in privileged mode"
interactive:
type: "boolean"
example: true
description: "Whether the container should be started in interactive mode (-i -t equivalent on the CLI)"
restart_policy:
type: "string"
example: "on-failure"
description: "Container restart policy"
hostname:
type: "string"
example: "mycontainer"
description: "Container hostname"
TemplateVolume:
type: "object"
properties:
container:
type: "string"
example: "/data"
description: "Path inside the container"
bind:
type: "string"
example: "/tmp"
description: "Path on the host"
readonly:
type: "boolean"
example: true
description: "Whether the volume used should be readonly"
TemplateEnv:
type: "object"
properties:
name:
type: "string"
example: "MYSQL_ROOT_PASSWORD"
description: "name of the environment variable"
label:
type: "string"
example: "Root password"
description: "Text for the label that will be generated in the UI"
description:
type: "string"
example: "MySQL root account password"
description: "Content of the tooltip that will be generated in the UI"
default:
type: "string"
example: "default_value"
description: "Default value that will be set for the variable"
preset:
type: "boolean"
example: true
description: "If set to true, will not generate any input for this variable in the UI"
select:
type: "array"
description: "A list of name/value that will be used to generate a dropdown in the UI"
items:
$ref: '#/definitions/TemplateEnvSelect'
TemplateEnvSelect:
type: "object"
properties:
text:
type: "string"
example: "text value"
description: "Some text that will displayed as a choice"
value:
type: "string"
example: "value"
description: "A value that will be associated to the choice"
default:
type: "boolean"
example: true
description: "Will set this choice as the default choice"
TemplateRepository:
type: "object"
required:
- "URL"
properties:
URL:
type: "string"
example: "https://github.com/portainer/portainer-compose"
description: "URL of a git repository used to deploy a stack template. Mandatory for a Swarm/Compose stack template"
stackfile:
type: "string"
example: "./subfolder/docker-compose.yml"
description: "Path to the stack file inside the git repository"
StackMigrateRequest:
type: "object"
required:
- "EndpointID"
properties:
EndpointID:
type: "integer"
example: 2
description: "Endpoint identifier of the target endpoint where the stack will be relocated"
SwarmID:
type: "string"
example: "jpofkc0i9uo9wtx1zesuk649w"
description: "Swarm cluster identifier, must match the identifier of the cluster where the stack will be relocated"
Name:
type: "string"
example: "new-stack"
description: "If provided will rename the migrated stack"
EndpointJobRequest:
type: "object"
required:
- "Image"
- "FileContent"
properties:
Image:
type: "string"
example: "ubuntu:latest"
description: "Container image which will be used to execute the job"
FileContent:
type: "string"
example: "ls -lah /host/tmp"
description: "Content of the job script"
StackCreateRequest:
type: "object"
required:
- "Name"
properties:
Name:
type: "string"
example: "myStack"
description: "Name of the stack"
SwarmID:
type: "string"
example: "jpofkc0i9uo9wtx1zesuk649w"
description: "Swarm cluster identifier. Required when creating a Swarm stack (type 1)."
StackFileContent:
type: "string"
example: "version: 3\n services:\n web:\n image:nginx"
description: "Content of the Stack file. Required when using the 'string' deployment method."
RepositoryURL:
type: "string"
example: "https://github.com/openfaas/faas"
description: "URL of a Git repository hosting the Stack file. Required when using the 'repository' deployment method."
RepositoryReferenceName:
type: "string"
example: "refs/heads/master"
description: "Reference name of a Git repository hosting the Stack file. Used in 'repository' deployment method."
ComposeFilePathInRepository:
type: "string"
example: "docker-compose.yml"
description: "Path to the Stack file inside the Git repository. Will default to 'docker-compose.yml' if not specified."
RepositoryAuthentication:
type: "boolean"
example: true
description: "Use basic authentication to clone the Git repository."
RepositoryUsername:
type: "string"
example: "myGitUsername"
description: "Username used in basic authentication. Required when RepositoryAuthentication is true."
RepositoryPassword:
type: "string"
example: "myGitPassword"
description: "Password used in basic authentication. Required when RepositoryAuthentication is true."
Env:
type: "array"
description: "A list of environment variables used during stack deployment"
items:
$ref: "#/definitions/Stack_Env"
Stack_Env:
properties:
name:
type: "string"
example: "MYSQL_ROOT_PASSWORD"
value:
type: "string"
example: "password"
StackListResponse:
type: "array"
items:
$ref: "#/definitions/Stack"
Stack:
type: "object"
properties:
Id:
type: "string"
example: "myStack_jpofkc0i9uo9wtx1zesuk649w"
description: "Stack identifier"
Name:
type: "string"
example: "myStack"
description: "Stack name"
Type:
type: "integer"
example: "1"
description: "Stack type. 1 for a Swarm stack, 2 for a Compose stack"
EndpointID:
type: "integer"
example: "1"
description: "Endpoint identifier. Reference the endpoint that will be used for deployment "
EntryPoint:
type: "string"
example: "docker-compose.yml"
description: "Path to the Stack file"
SwarmID:
type: "string"
example: "jpofkc0i9uo9wtx1zesuk649w"
description: "Cluster identifier of the Swarm cluster where the stack is deployed"
ProjectPath:
type: "string"
example: "/data/compose/myStack_jpofkc0i9uo9wtx1zesuk649w"
description: "Path on disk to the repository hosting the Stack file"
Env:
type: "array"
description: "A list of environment variables used during stack deployment"
items:
$ref: "#/definitions/Stack_Env"
StackUpdateRequest:
type: "object"
properties:
StackFileContent:
type: "string"
example: "version: 3\n services:\n web:\n image:nginx"
description: "New content of the Stack file."
Env:
type: "array"
description: "A list of environment variables used during stack deployment"
items:
$ref: "#/definitions/Stack_Env"
Prune:
type: "boolean"
example: false
description: "Prune services that are no longer referenced (only available for Swarm stacks)"
StackFileInspectResponse:
type: "object"
properties:
StackFileContent:
type: "string"
example: "version: 3\n services:\n web:\n image:nginx"
description: "Content of the Stack file."
LicenseInformation:
type: "object"
properties:
LicenseKey:
type: "string"
description: "License key"
example: "1-uKmVwboSWVIZv5URmE0VRkpbPX0rrCVeDxJl97LZ0piltw2SU28DSrNwPZAHCEAwB2SeKm6BCFcVwzGMBEixKQ"
Company:
type: "string"
description: "Company associated to the license"
example: "Portainer.io"
Expiration:
type: "string"
description: "License expiry date"
example: "2077-07-07"
Valid:
type: "boolean"
description: "Is the license valid"
example: "true"
Extension:
type: "object"
properties:
Id:
type: "integer"
example: 1
description: "Extension identifier"
Name:
type: "string"
example: "Registry Manager"
description: "Extension name"
Enabled:
type: "boolean"
example: "true"
description: "Is the extension enabled"
ShortDescription:
type: "string"
description: "Short description about the extension"
example: "Enable in-app registry management"
DescriptionURL:
type: "string"
description: "URL to the file containing the extension description"
example: https://portainer-io-assets.sfo2.digitaloceanspaces.com/description_registry_manager.html"
Available:
type: "boolean"
description: "Is the extension available for download and activation"
example: "true"
Images:
type: "array"
description: "List of screenshot URLs"
items:
type: "string"
example: "https://portainer-io-assets.sfo2.digitaloceanspaces.com/screenshots/rm01.png"
description: "Screenshot URL"
Logo:
type: "string"
description: "Icon associated to the extension"
example: "fa-database"
Price:
type: "string"
description: "Extension price"
example: "US$9.95"
PriceDescription:
type: "string"
description: "Details about extension pricing"
example: "Price per instance per year"
ShopURL:
type: "string"
description: "URL used to buy the extension"
example: "https://portainer.io/checkout/?add-to-cart=1164"
UpdateAvailable:
type: "boolean"
description: "Is an update available for this extension"
example: "true"
Version:
type: "string"
description: "Extension version"
example: "1.0.0"
License:
$ref: "#/definitions/LicenseInformation"
ExtensionListResponse:
type: "array"
items:
$ref: "#/definitions/Extension"
ExtensionCreateRequest:
type: "object"
required:
- "License"
properties:
License:
type: "string"
example: "1-uKmVwboSWVIZv5URmE0VRkpbPX0rrCVeDxJl97LZ0piltw2SU28DSrNwPZAHCEAwB2SeKm6BCFcVwzGMBEixKQ"
description: "License key"
ExtensionUpdateRequest:
type: "object"
required:
- "Version"
properties:
Version:
type: "string"
example: "1.1.0"
description: "New version of the extension"
RoleListResponse:
type: "array"
items:
$ref: "#/definitions/Role"
Role:
type: "object"
properties:
Id:
type: "integer"
description: "Role identifier"
example: 2
Name:
type: "string"
description: "Role name"
example: "HelpDesk"
Description:
type: "string"
description: "Role description"
example: "Read-only access of all resources in an endpoint"
Authorizations:
$ref: "#/definitions/Authorizations"
Authorizations:
type: "object"
description: "Authorizations associated to a role"
additionalProperties:
type: "object"
properties:
authorization:
type: "string"
value:
type: "boolean"
example:
"DockerContainerList": true
"DockerVolumeList": true