basePath: /api definitions: auth.authenticatePayload: properties: password: description: Password example: mypassword type: string username: description: Username example: admin type: string required: - password - username type: object auth.authenticateResponse: properties: jwt: description: JWT token used to authenticate against the API example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInJvbGUiOjEsImV4cCI6MTQ5OTM3NjE1NH0.NJ6vE8FY1WG6jsRQzfMqeatJ4vh2TWAeeYfDhP71YEE type: string type: object auth.oauthPayload: properties: code: description: OAuth code returned from OAuth Provided type: string type: object customtemplates.customTemplateFromFileContentPayload: properties: description: description: Description of the template example: High performance web server type: string fileContent: description: Content of stack file type: string logo: description: URL of the template's logo example: https://cloudinovasi.id/assets/img/logos/nginx.png type: string note: description: A note that will be displayed in the UI. Supports HTML content example: This is my custom template type: string platform: description: |- Platform associated to the template. Valid values are: 1 - 'linux', 2 - 'windows' enum: - 1 - 2 example: 1 type: integer title: description: Title of the template example: Nginx type: string type: description: Type of created stack (1 - swarm, 2 - compose) enum: - 1 - 2 example: 1 type: integer required: - description - fileContent - platform - title - type type: object customtemplates.customTemplateFromGitRepositoryPayload: properties: composeFilePathInRepository: default: docker-compose.yml description: Path to the Stack file inside the Git repository example: docker-compose.yml type: string description: description: Description of the template example: High performance web server type: string logo: description: URL of the template's logo example: https://cloudinovasi.id/assets/img/logos/nginx.png type: string note: description: A note that will be displayed in the UI. Supports HTML content example: This is my custom template type: string platform: description: |- Platform associated to the template. Valid values are: 1 - 'linux', 2 - 'windows' enum: - 1 - 2 example: 1 type: integer repositoryAuthentication: description: Use basic authentication to clone the Git repository example: true type: boolean repositoryPassword: description: Password used in basic authentication. Required when RepositoryAuthentication is true. example: myGitPassword type: string repositoryReferenceName: description: Reference name of a Git repository hosting the Stack file example: refs/heads/master type: string repositoryURL: description: URL of a Git repository hosting the Stack file example: https://github.com/openfaas/faas type: string repositoryUsername: description: Username used in basic authentication. Required when RepositoryAuthentication is true. example: myGitUsername type: string title: description: Title of the template example: Nginx type: string type: description: Type of created stack (1 - swarm, 2 - compose) enum: - 1 - 2 example: 1 type: integer required: - description - platform - repositoryURL - title - type type: object customtemplates.customTemplateUpdatePayload: properties: description: description: Description of the template example: High performance web server type: string fileContent: description: Content of stack file type: string logo: description: URL of the template's logo example: https://cloudinovasi.id/assets/img/logos/nginx.png type: string note: description: A note that will be displayed in the UI. Supports HTML content example: This is my custom template type: string platform: description: |- Platform associated to the template. Valid values are: 1 - 'linux', 2 - 'windows' enum: - 1 - 2 example: 1 type: integer title: description: Title of the template example: Nginx type: string type: description: Type of created stack (1 - swarm, 2 - compose) enum: - 1 - 2 example: 1 type: integer required: - description - fileContent - platform - title - type type: object customtemplates.fileResponse: properties: fileContent: type: string type: object dockerhub.dockerhubUpdatePayload: properties: authentication: description: Enable authentication against DockerHub example: false type: boolean password: description: Password used to authenticate against the DockerHub example: hub_password type: string username: description: Username used to authenticate against the DockerHub example: hub_user type: string required: - authentication - password - username type: object edgegroups.edgeGroupCreatePayload: properties: dynamic: type: boolean endpoints: items: type: integer type: array name: type: string partialMatch: type: boolean tagIDs: items: description: Tag identifier example: 1 type: integer type: array type: object edgegroups.edgeGroupUpdatePayload: properties: dynamic: type: boolean endpoints: items: type: integer type: array name: type: string partialMatch: type: boolean tagIDs: items: description: Tag identifier example: 1 type: integer type: array type: object edgejobs.edgeJobCreateFromFileContentPayload: properties: cronExpression: type: string endpoints: items: type: integer type: array fileContent: type: string name: type: string recurring: type: boolean type: object edgejobs.edgeJobCreateFromFilePayload: properties: cronExpression: type: string endpoints: items: type: integer type: array file: items: type: integer type: array name: type: string recurring: type: boolean type: object edgejobs.edgeJobFileResponse: properties: FileContent: type: string type: object edgejobs.edgeJobUpdatePayload: properties: cronExpression: type: string endpoints: items: type: integer type: array fileContent: type: string name: type: string recurring: type: boolean type: object edgejobs.fileResponse: properties: FileContent: type: string type: object edgejobs.taskContainer: properties: EndpointId: type: integer Id: type: string LogsStatus: type: integer type: object edgestacks.stackFileResponse: properties: StackFileContent: type: string type: object edgestacks.swarmStackFromFileContentPayload: properties: edgeGroups: items: description: EdgeGroup Identifier example: 1 type: integer type: array name: type: string stackFileContent: type: string type: object edgestacks.swarmStackFromFileUploadPayload: properties: edgeGroups: items: description: EdgeGroup Identifier example: 1 type: integer type: array name: type: string stackFileContent: items: type: integer type: array type: object edgestacks.swarmStackFromGitRepositoryPayload: properties: composeFilePathInRepository: type: string edgeGroups: items: description: EdgeGroup Identifier example: 1 type: integer type: array name: type: string repositoryAuthentication: type: boolean repositoryPassword: type: string repositoryReferenceName: type: string repositoryURL: type: string repositoryUsername: type: string type: object edgestacks.updateEdgeStackPayload: properties: edgeGroups: items: description: EdgeGroup Identifier example: 1 type: integer type: array prune: type: boolean stackFileContent: type: string version: type: integer type: object endpointedge.configResponse: properties: name: type: string prune: type: boolean stackFileContent: type: string type: object endpointgroups.endpointGroupCreatePayload: properties: associatedEndpoints: description: List of endpoint identifiers that will be part of this group example: - 1 - 3 items: type: integer type: array description: description: Endpoint group description example: description type: string name: description: Endpoint group name example: my-endpoint-group type: string tagIDs: description: List of tag identifiers to which this endpoint group is associated example: - 1 - 2 items: description: Tag identifier example: 1 type: integer type: array required: - name type: object endpointgroups.endpointGroupUpdatePayload: properties: description: description: Endpoint group description example: description type: string name: description: Endpoint group name example: my-endpoint-group type: string tagIDs: description: List of tag identifiers associated to the endpoint group example: - 3 - 4 items: description: Tag identifier example: 1 type: integer type: array teamAccessPolicies: $ref: '#/definitions/portainer.TeamAccessPolicies' userAccessPolicies: $ref: '#/definitions/portainer.UserAccessPolicies' type: object endpoints.edgeJobResponse: properties: CollectLogs: description: Whether to collect logs example: true type: boolean CronExpression: description: A cron expression to schedule this job example: '* * * * *' type: string Id: description: EdgeJob Identifier example: 2 type: integer Script: description: Script to run example: echo hello type: string Version: description: Version of this EdgeJob example: 2 type: integer type: object endpoints.endpointEdgeStatusInspectResponse: properties: checkin: description: The current value of CheckinInterval example: 5 type: integer credentials: type: string port: description: The tunnel port example: 8732 type: integer schedules: description: List of requests for jobs to run on the endpoint items: $ref: '#/definitions/endpoints.edgeJobResponse' type: array stacks: description: List of stacks to be deployed on the endpoints items: $ref: '#/definitions/endpoints.stackStatusResponse' type: array status: description: Status represents the endpoint status example: REQUIRED type: string type: object endpoints.endpointUpdatePayload: properties: azureApplicationID: description: Azure application ID example: eag7cdo9-o09l-9i83-9dO9-f0b23oe78db4 type: string azureAuthenticationKey: description: Azure authentication key example: cOrXoK/1D35w8YQ8nH1/8ZGwzz45JIYD5jxHKXEQknk= type: string azureTenantID: description: Azure tenant ID example: 34ddc78d-4fel-2358-8cc1-df84c8o839f5 type: string edgeCheckinInterval: description: The check in interval for edge agent (in seconds) example: 5 type: integer groupID: description: Group identifier example: 1 type: integer kubernetes: $ref: '#/definitions/portainer.KubernetesData' description: Associated Kubernetes data name: description: Name that will be used to identify this endpoint example: my-endpoint type: string publicURL: description: |- URL or IP address where exposed containers will be reachable.\ Defaults to URL if not specified example: docker.mydomain.tld:2375 type: string status: description: The status of the endpoint (1 - up, 2 - down) example: 1 type: integer tagIDs: description: List of tag identifiers to which this endpoint is associated example: - 1 - 2 items: description: Tag identifier example: 1 type: integer type: array teamAccessPolicies: $ref: '#/definitions/portainer.TeamAccessPolicies' tls: description: Require TLS to connect against this endpoint example: true type: boolean tlsskipClientVerify: description: Skip client verification when using TLS example: false type: boolean tlsskipVerify: description: Skip server verification when using TLS example: false type: boolean url: description: URL or IP address of a Docker host example: docker.mydomain.tld:2375 type: string userAccessPolicies: $ref: '#/definitions/portainer.UserAccessPolicies' type: object endpoints.stackStatusResponse: properties: id: description: EdgeStack Identifier example: 1 type: integer version: description: Version of this stack example: 3 type: integer type: object motd.motdResponse: properties: ContentLayout: additionalProperties: type: string type: object Hash: items: type: integer type: array Message: type: string Style: type: string Title: type: string type: object portainer.AccessPolicy: properties: RoleId: description: Role identifier. Reference the role that will be associated to this access policy example: 1 type: integer type: object portainer.Authorizations: additionalProperties: type: boolean type: object portainer.AzureCredentials: properties: ApplicationID: description: Azure application ID example: eag7cdo9-o09l-9i83-9dO9-f0b23oe78db4 type: string AuthenticationKey: description: Azure authentication key example: cOrXoK/1D35w8YQ8nH1/8ZGwzz45JIYD5jxHKXEQknk= type: string TenantID: description: Azure tenant ID example: 34ddc78d-4fel-2358-8cc1-df84c8o839f5 type: string type: object portainer.CustomTemplate: properties: CreatedByUserId: description: User identifier who created this template example: 3 type: integer Description: description: Description of the template example: High performance web server type: string EntryPoint: description: Path to the Stack file example: docker-compose.yml type: string Id: description: CustomTemplate Identifier example: 1 type: integer Logo: description: URL of the template's logo example: https://cloudinovasi.id/assets/img/logos/nginx.png type: string Note: description: A note that will be displayed in the UI. Supports HTML content example: This is my custom template type: string Platform: description: |- Platform associated to the template. Valid values are: 1 - 'linux', 2 - 'windows' enum: - 1 - 2 example: 1 type: integer ProjectPath: description: Path on disk to the repository hosting the Stack file example: /data/custom_template/3 type: string ResourceControl: $ref: '#/definitions/portainer.ResourceControl' Title: description: Title of the template example: Nginx type: string Type: description: Type of created stack (1 - swarm, 2 - compose) example: 1 type: integer type: object portainer.DockerHub: properties: Authentication: description: Is authentication against DockerHub enabled example: true type: boolean Password: description: Password used to authenticate against the DockerHub example: passwd type: string Username: description: Username used to authenticate against the DockerHub example: user type: string type: object portainer.DockerSnapshot: properties: DockerSnapshotRaw: $ref: '#/definitions/portainer.DockerSnapshotRaw' DockerVersion: type: string GpuUseAll: type: boolean GpuUseList: items: type: string type: array HealthyContainerCount: type: integer ImageCount: type: integer RunningContainerCount: type: integer ServiceCount: type: integer StackCount: type: integer StoppedContainerCount: type: integer Swarm: type: boolean Time: type: integer TotalCPU: type: integer TotalMemory: type: integer UnhealthyContainerCount: type: integer VolumeCount: type: integer type: object portainer.DockerSnapshotRaw: properties: Containers: type: object Images: type: object Info: type: object Networks: type: object Version: type: object Volumes: type: object type: object portainer.EdgeGroup: properties: Dynamic: type: boolean Endpoints: items: type: integer type: array Id: description: EdgeGroup Identifier example: 1 type: integer Name: type: string PartialMatch: type: boolean TagIds: items: description: Tag identifier example: 1 type: integer type: array type: object portainer.EdgeJob: properties: Created: type: integer CronExpression: type: string Endpoints: additionalProperties: $ref: '#/definitions/portainer.EdgeJobEndpointMeta' type: object Id: description: EdgeJob Identifier example: 1 type: integer Name: type: string Recurring: type: boolean ScriptPath: type: string Version: type: integer type: object portainer.EdgeJobEndpointMeta: properties: collectLogs: type: boolean logsStatus: type: integer type: object portainer.EdgeStack: properties: CreationDate: type: integer EdgeGroups: items: description: EdgeGroup Identifier example: 1 type: integer type: array EntryPoint: type: string Id: description: EdgeStack Identifier example: 1 type: integer Name: type: string ProjectPath: type: string Prune: type: boolean Status: additionalProperties: $ref: '#/definitions/portainer.EdgeStackStatus' type: object Version: type: integer type: object portainer.EdgeStackStatus: properties: EndpointID: type: integer Error: type: string Type: type: integer type: object portainer.Endpoint: properties: AuthorizedTeams: items: type: integer type: array AuthorizedUsers: description: Deprecated in DBVersion == 18 items: description: User identifier who created this template example: 3 type: integer type: array AzureCredentials: $ref: '#/definitions/portainer.AzureCredentials' EdgeCheckinInterval: description: The check in interval for edge agent (in seconds) example: 5 type: integer EdgeID: description: The identifier of the edge agent associated with this endpoint type: string EdgeKey: description: The key which is used to map the agent to Portainer type: string Gpus: description: Endpoint Gpus information items: $ref: '#/definitions/portainer.Pair' type: array GroupId: description: Endpoint group identifier example: 1 type: integer Id: description: Endpoint Identifier example: 1 type: integer Kubernetes: $ref: '#/definitions/portainer.KubernetesData' description: Associated Kubernetes data Name: description: Endpoint name example: my-endpoint type: string PublicURL: description: URL or IP address where exposed containers will be reachable example: docker.mydomain.tld:2375 type: string Snapshots: description: List of snapshots items: $ref: '#/definitions/portainer.DockerSnapshot' type: array Status: description: The status of the endpoint (1 - up, 2 - down) example: 1 type: integer TLS: description: |- Deprecated fields Deprecated in DBVersion == 4 type: boolean TLSCACert: type: string TLSCert: type: string TLSConfig: $ref: '#/definitions/portainer.TLSConfiguration' TLSKey: type: string TagIds: description: List of tag identifiers to which this endpoint is associated items: description: Tag identifier example: 1 type: integer type: array Tags: description: Deprecated in DBVersion == 22 items: type: string type: array TeamAccessPolicies: $ref: '#/definitions/portainer.TeamAccessPolicies' description: List of team identifiers authorized to connect to this endpoint Type: description: Endpoint environment type. 1 for a Docker environment, 2 for an agent on Docker environment or 3 for an Azure environment. example: 1 type: integer URL: description: URL or IP address of the Docker host associated to this endpoint example: docker.mydomain.tld:2375 type: string UserAccessPolicies: $ref: '#/definitions/portainer.UserAccessPolicies' description: List of user identifiers authorized to connect to this endpoint type: object portainer.EndpointAuthorizations: additionalProperties: $ref: '#/definitions/portainer.Authorizations' type: object portainer.EndpointGroup: properties: AuthorizedTeams: items: type: integer type: array AuthorizedUsers: description: Deprecated in DBVersion == 18 items: description: User identifier who created this template example: 3 type: integer type: array Description: description: Description associated to the endpoint group example: Endpoint group description type: string Id: description: Endpoint group Identifier example: 1 type: integer Labels: description: Deprecated fields items: $ref: '#/definitions/portainer.Pair' type: array Name: description: Endpoint group name example: my-endpoint-group type: string TagIds: description: List of tags associated to this endpoint group items: description: Tag identifier example: 1 type: integer type: array Tags: description: Deprecated in DBVersion == 22 items: type: string type: array TeamAccessPolicies: $ref: '#/definitions/portainer.TeamAccessPolicies' UserAccessPolicies: $ref: '#/definitions/portainer.UserAccessPolicies' type: object portainer.GitlabRegistryData: properties: InstanceURL: type: string ProjectId: type: integer ProjectPath: type: string type: object portainer.KubernetesConfiguration: properties: IngressClasses: items: $ref: '#/definitions/portainer.KubernetesIngressClassConfig' type: array StorageClasses: items: $ref: '#/definitions/portainer.KubernetesStorageClassConfig' type: array UseLoadBalancer: type: boolean UseServerMetrics: type: boolean RestrictDefaultNamespace: type: boolean type: object portainer.KubernetesData: properties: Configuration: $ref: '#/definitions/portainer.KubernetesConfiguration' Snapshots: items: $ref: '#/definitions/portainer.KubernetesSnapshot' type: array type: object portainer.KubernetesIngressClassConfig: properties: Name: type: string Type: type: string type: object portainer.KubernetesSnapshot: properties: KubernetesVersion: type: string NodeCount: type: integer Time: type: integer TotalCPU: type: integer TotalMemory: type: integer type: object portainer.KubernetesStorageClassConfig: properties: AccessModes: items: type: string type: array AllowVolumeExpansion: type: boolean Name: type: string Provisioner: type: string type: object portainer.InternalAuthSettings: properties: RequiredPasswordLength: description: The minimum character length a user can set their password example: 12 type: integer portainer.LDAPGroupSearchSettings: properties: GroupAttribute: description: LDAP attribute which denotes the group membership example: member type: string GroupBaseDN: description: The distinguished name of the element from which the LDAP server will search for groups example: dc=ldap,dc=domain,dc=tld type: string GroupFilter: description: The LDAP search filter used to select group elements, optional example: (objectClass=account type: string type: object portainer.LDAPSearchSettings: properties: BaseDN: description: The distinguished name of the element from which the LDAP server will search for users example: dc=ldap,dc=domain,dc=tld type: string Filter: description: Optional LDAP search filter used to select user elements example: (objectClass=account) type: string UserNameAttribute: description: LDAP attribute which denotes the username example: uid type: string type: object portainer.LDAPSettings: properties: AnonymousMode: description: Enable this option if the server is configured for Anonymous access. When enabled, ReaderDN and Password will not be used example: true type: boolean AutoCreateUsers: description: Automatically provision users and assign them to matching LDAP group names example: true type: boolean GroupSearchSettings: items: $ref: '#/definitions/portainer.LDAPGroupSearchSettings' type: array Password: description: Password of the account that will be used to search users example: readonly-password type: string ReaderDN: description: Account that will be used to search for users example: cn=readonly-account,dc=ldap,dc=domain,dc=tld type: string SearchSettings: items: $ref: '#/definitions/portainer.LDAPSearchSettings' type: array StartTLS: description: Whether LDAP connection should use StartTLS example: true type: boolean TLSConfig: $ref: '#/definitions/portainer.TLSConfiguration' URL: description: URL or IP address of the LDAP server example: myldap.domain.tld:389 type: string type: object portainer.OAuthSettings: properties: AccessTokenURI: type: string AuthorizationURI: type: string ClientID: type: string ClientSecret: type: string DefaultTeamID: type: integer OAuthAutoCreateUsers: type: boolean RedirectURI: type: string ResourceURI: type: string Scopes: type: string UserIdentifier: type: string type: object portainer.Pair: properties: name: example: name type: string value: example: value type: string type: object portainer.Registry: properties: Authentication: description: Is authentication against this registry enabled example: true type: boolean AuthorizedTeams: items: type: integer type: array AuthorizedUsers: description: |- Deprecated fields Deprecated in DBVersion == 18 items: description: User identifier who created this template example: 3 type: integer type: array Gitlab: $ref: '#/definitions/portainer.GitlabRegistryData' Id: description: Registry Identifier example: 1 type: integer ManagementConfiguration: $ref: '#/definitions/portainer.RegistryManagementConfiguration' Name: description: Registry Name example: my-registry type: string Password: description: Password used to authenticate against this registry example: registry_password type: string TeamAccessPolicies: $ref: '#/definitions/portainer.TeamAccessPolicies' Type: description: Registry Type (1 - Quay, 2 - Azure, 3 - Custom, 4 - Gitlab, 5 - ProGet) enum: - 1 - 2 - 3 - 4 - 5 type: integer URL: description: URL or IP address of the Docker registry example: registry.mydomain.tld:2375 type: string BaseURL: description: Base URL or IP address of the ProGet registry example: registry.mydomain.tld:2375 type: string UserAccessPolicies: $ref: '#/definitions/portainer.UserAccessPolicies' Username: description: Username used to authenticate against this registry example: registry user type: string type: object portainer.RegistryManagementConfiguration: properties: Authentication: type: boolean Password: type: string TLSConfig: $ref: '#/definitions/portainer.TLSConfiguration' Type: type: integer Username: type: string type: object portainer.ResourceControl: properties: AccessLevel: type: integer AdministratorsOnly: description: Permit access to resource only to admins example: true type: boolean Id: description: ResourceControl Identifier example: 1 type: integer OwnerId: description: |- Deprecated fields Deprecated in DBVersion == 2 type: integer Public: description: Permit access to the associated resource to any user example: true type: boolean ResourceId: 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 example: 617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08 type: string SubResourceIds: description: List of Docker resources that will inherit this access control example: - 617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08 items: type: string type: array System: type: boolean TeamAccesses: items: $ref: '#/definitions/portainer.TeamResourceAccess' type: array Type: description: |- Type of Docker resource. Valid values are: 1- container, 2 -service 3 - volume, 4 - secret, 5 - stack, 6 - config or 7 - custom template example: 1 type: integer UserAccesses: items: $ref: '#/definitions/portainer.UserResourceAccess' type: array type: object portainer.Role: properties: Authorizations: $ref: '#/definitions/portainer.Authorizations' description: Authorizations associated to a role Description: description: Role description example: Read-only access of all resources in an endpoint type: string Id: description: Role Identifier example: 1 type: integer Name: description: Role name example: HelpDesk type: string Priority: type: integer type: object portainer.Settings: properties: AllowBindMountsForRegularUsers: description: Whether non-administrator should be able to use bind mounts when creating containers example: false type: boolean AllowContainerCapabilitiesForRegularUsers: description: Whether non-administrator should be able to use container capabilities type: boolean AllowDeviceMappingForRegularUsers: description: Whether non-administrator should be able to use device mapping type: boolean AllowHostNamespaceForRegularUsers: description: Whether non-administrator should be able to use the host pid type: boolean AllowPrivilegedModeForRegularUsers: description: Whether non-administrator should be able to use privileged mode when creating containers example: false type: boolean AllowStackManagementForRegularUsers: description: Whether non-administrator should be able to manage stacks type: boolean AllowVolumeBrowserForRegularUsers: description: Whether non-administrator should be able to browse volumes type: boolean AuthenticationMethod: description: 'Active authentication method for the Portainer instance. Valid values are: 1 for internal, 2 for LDAP, or 3 for oauth' example: 1 type: integer BlackListedLabels: description: A list of label name & value that will be used to hide containers when querying containers items: $ref: '#/definitions/portainer.Pair' type: array EdgeAgentCheckinInterval: description: The default check in interval for edge agent (in seconds) example: 5 type: integer EnableEdgeComputeFeatures: description: Whether edge compute features are enabled type: boolean EnableHostManagementFeatures: description: Whether host management features are enabled type: boolean EnableTelemetry: description: Whether telemetry is enabled example: false type: boolean InternalAuthSettings: $ref: '#/definitions/portainer.InternalAuthSettings' LDAPSettings: $ref: '#/definitions/portainer.LDAPSettings' LogoURL: 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 example: https://mycompany.mydomain.tld/logo.png type: string OAuthSettings: $ref: '#/definitions/portainer.OAuthSettings' SnapshotInterval: description: The interval in which endpoint snapshots are created example: 5m type: string TemplatesURL: description: URL to the templates that will be displayed in the UI when navigating to App Templates example: https://raw.githubusercontent.com/portainer/templates/master/templates.json type: string UserSessionTimeout: description: The duration of a user session example: 5m type: string displayDonationHeader: description: Deprecated fields type: boolean displayExternalContributors: type: boolean type: object portainer.Stack: properties: EndpointId: description: Endpoint identifier. Reference the endpoint that will be used for deployment example: 1 type: integer EntryPoint: description: Path to the Stack file example: docker-compose.yml type: string Env: description: A list of environment variables used during stack deployment items: $ref: '#/definitions/portainer.Pair' type: array Id: description: Stack Identifier example: 1 type: integer Name: description: Stack name example: myStack type: string ResourceControl: $ref: '#/definitions/portainer.ResourceControl' Status: description: Stack status (1 - active, 2 - inactive) example: 1 type: integer SwarmId: description: Cluster identifier of the Swarm cluster where the stack is deployed example: jpofkc0i9uo9wtx1zesuk649w type: string Type: description: Stack type. 1 for a Swarm stack, 2 for a Compose stack example: 2 type: integer createdBy: description: The username which created this stack example: admin type: string creationDate: description: The date in unix time when stack was created example: 1587399600 type: integer projectPath: description: Path on disk to the repository hosting the Stack file example: /data/compose/myStack_jpofkc0i9uo9wtx1zesuk649w type: string updateDate: description: The date in unix time when stack was last updated example: 1587399600 type: integer updatedBy: description: The username which last updated this stack example: bob type: string type: object portainer.Status: properties: Version: description: Portainer API version example: 2.0.0 type: string type: object portainer.TLSConfiguration: properties: TLS: description: Use TLS example: true type: boolean TLSCACert: description: Path to the TLS CA certificate file example: /data/tls/ca.pem type: string TLSCert: description: Path to the TLS client certificate file example: /data/tls/cert.pem type: string TLSKey: description: Path to the TLS client key file example: /data/tls/key.pem type: string TLSSkipVerify: description: Skip the verification of the server TLS certificate example: false type: boolean type: object portainer.Tag: properties: EndpointGroups: additionalProperties: type: boolean description: A set of endpoint group ids that have this tag type: object Endpoints: additionalProperties: type: boolean description: A set of endpoint ids that have this tag type: object Name: description: Tag name example: org/acme type: string id: description: Tag identifier example: 1 type: integer type: object portainer.Team: properties: Id: description: Team Identifier example: 1 type: integer Name: description: Team name example: developers type: string type: object portainer.TeamAccessPolicies: additionalProperties: $ref: '#/definitions/portainer.AccessPolicy' type: object portainer.TeamMembership: properties: Id: description: Membership Identifier example: 1 type: integer Role: description: Team role (1 for team leader and 2 for team member) example: 1 type: integer TeamID: description: Team identifier example: 1 type: integer UserID: description: User identifier example: 1 type: integer type: object portainer.TeamResourceAccess: properties: AccessLevel: type: integer TeamId: type: integer type: object portainer.Template: properties: Id: description: |- Mandatory container/stack fields Template Identifier example: 1 type: integer administrator_only: description: Whether the template should be available to administrators only example: true type: boolean categories: description: A list of categories associated to the template example: - database items: type: string type: array command: description: The command that will be executed in a container template example: ls -lah type: string description: description: Description of the template example: High performance web server type: string env: description: A list of environment variables used during the template deployment items: $ref: '#/definitions/portainer.TemplateEnv' type: array hostname: description: Container hostname example: mycontainer type: string image: description: |- Mandatory container fields Image associated to a container template. Mandatory for a container template example: nginx:latest type: string interactive: description: |- Whether the container should be started in interactive mode (-i -t equivalent on the CLI) example: true type: boolean labels: description: Container labels items: $ref: '#/definitions/portainer.Pair' type: array logo: description: URL of the template's logo example: https://cloudinovasi.id/assets/img/logos/nginx.png type: string name: description: |- Optional stack/container fields Default name for the stack/container to be used on deployment example: mystackname type: string network: description: Name of a network that will be used on container deployment if it exists inside the environment example: mynet type: string note: description: A note that will be displayed in the UI. Supports HTML content example: This is my custom template type: string platform: description: |- Platform associated to the template. Valid values are: 'linux', 'windows' or leave empty for multi-platform example: linux type: string ports: description: A list of ports exposed by the container example: - 8080:80/tcp items: type: string type: array privileged: description: Whether the container should be started in privileged mode example: true type: boolean registry: description: |- Optional container fields The URL of a registry associated to the image for a container template example: quay.io type: string repository: $ref: '#/definitions/portainer.TemplateRepository' description: Mandatory stack fields restart_policy: description: Container restart policy example: on-failure type: string stackFile: description: |- Mandatory Edge stack fields Stack file used for this template type: string title: description: Title of the template example: Nginx type: string type: description: 'Template type. Valid values are: 1 (container), 2 (Swarm stack) or 3 (Compose stack)' example: 1 type: integer volumes: description: A list of volumes used during the container template deployment items: $ref: '#/definitions/portainer.TemplateVolume' type: array type: object portainer.TemplateEnv: properties: default: description: Default value that will be set for the variable example: default_value type: string description: description: Content of the tooltip that will be generated in the UI example: MySQL root account password type: string label: description: Text for the label that will be generated in the UI example: Root password type: string name: description: name of the environment variable example: MYSQL_ROOT_PASSWORD type: string preset: description: If set to true, will not generate any input for this variable in the UI example: false type: boolean select: description: A list of name/value that will be used to generate a dropdown in the UI items: $ref: '#/definitions/portainer.TemplateEnvSelect' type: array type: object portainer.TemplateEnvSelect: properties: default: description: Will set this choice as the default choice example: false type: boolean text: description: Some text that will displayed as a choice example: text value type: string value: description: A value that will be associated to the choice example: value type: string type: object portainer.TemplateRepository: properties: stackfile: description: Path to the stack file inside the git repository example: ./subfolder/docker-compose.yml type: string url: description: URL of a git repository used to deploy a stack template. Mandatory for a Swarm/Compose stack template example: https://github.com/portainer/portainer-compose type: string type: object portainer.TemplateVolume: properties: bind: description: Path on the host example: /tmp type: string container: description: Path inside the container example: /data type: string readonly: description: Whether the volume used should be readonly example: true type: boolean type: object portainer.User: properties: EndpointAuthorizations: $ref: '#/definitions/portainer.EndpointAuthorizations' Id: description: User Identifier example: 1 type: integer Password: example: passwd type: string PortainerAuthorizations: $ref: '#/definitions/portainer.Authorizations' description: |- Deprecated fields Deprecated in DBVersion == 25 Role: description: User role (1 for administrator account and 2 for regular account) example: 1 type: integer Username: example: bob type: string type: object portainer.UserAccessPolicies: additionalProperties: $ref: '#/definitions/portainer.AccessPolicy' type: object portainer.UserResourceAccess: properties: AccessLevel: type: integer UserId: type: integer type: object portainer.Webhook: properties: EndpointId: type: integer Id: description: Webhook Identifier example: 1 type: integer ResourceId: type: string Token: type: string Type: type: integer type: object registries.registryConfigurePayload: properties: authentication: description: Is authentication against this registry enabled example: false type: boolean password: description: Password used to authenticate against this registry. required when Authentication is true example: registry_password type: string tls: description: Use TLS example: true type: boolean tlscacertFile: description: The TLS CA certificate file items: type: integer type: array tlscertFile: description: The TLS client certificate file items: type: integer type: array tlskeyFile: description: The TLS client key file items: type: integer type: array tlsskipVerify: description: Skip the verification of the server TLS certificate example: false type: boolean username: description: Username used to authenticate against this registry. Required when Authentication is true example: registry_user type: string required: - authentication type: object registries.registryCreatePayload: properties: authentication: description: Is authentication against this registry enabled example: false type: boolean gitlab: $ref: '#/definitions/portainer.GitlabRegistryData' description: Gitlab specific details, required when type = 4 name: description: Name that will be used to identify this registry example: my-registry type: string password: description: Password used to authenticate against this registry. required when Authentication is true example: registry_password type: string type: description: 'Registry Type. Valid values are: 1 (Quay.io), 2 (Azure container registry), 3 (custom registry), 4 (Gitlab registry) or 5 (ProGet registry)' enum: - 1 - 2 - 3 - 4 - 5 example: 1 type: integer url: description: URL or IP address of the Docker registry example: registry.mydomain.tld:2375 type: string baseUrl: description: Base URL or IP address of the ProGet registry example: registry.mydomain.tld:2375 type: string username: description: Username used to authenticate against this registry. Required when Authentication is true example: registry_user type: string required: - authentication - name - type - url type: object registries.registryUpdatePayload: properties: authentication: description: Is authentication against this registry enabled example: false type: boolean name: description: Name that will be used to identify this registry example: my-registry type: string password: description: Password used to authenticate against this registry. required when Authentication is true example: registry_password type: string teamAccessPolicies: $ref: '#/definitions/portainer.TeamAccessPolicies' url: description: URL or IP address of the Docker registry example: registry.mydomain.tld:2375 type: string baseUrl: description: Base URL or IP address of the ProGet registry example: registry.mydomain.tld:2375 type: string userAccessPolicies: $ref: '#/definitions/portainer.UserAccessPolicies' username: description: Username used to authenticate against this registry. Required when Authentication is true example: registry_user type: string required: - authentication - name - url type: object resourcecontrols.resourceControlCreatePayload: properties: administratorsOnly: description: Permit access to resource only to admins example: true type: boolean public: description: Permit access to the associated resource to any user example: true type: boolean resourceID: example: 617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08 type: string subResourceIDs: description: List of Docker resources that will inherit this access control example: - 617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08 items: type: string type: array teams: description: List of team identifiers with access to the associated resource example: - 56 - 7 items: type: integer type: array type: description: |- Type of Docker resource. Valid values are: container, volume\ service, secret, config or stack example: container type: string users: description: List of user identifiers with access to the associated resource example: - 1 - 4 items: type: integer type: array required: - resourceID - type type: object resourcecontrols.resourceControlUpdatePayload: properties: administratorsOnly: description: Permit access to resource only to admins example: true type: boolean public: description: Permit access to the associated resource to any user example: true type: boolean teams: description: List of team identifiers with access to the associated resource example: - 7 items: type: integer type: array users: description: List of user identifiers with access to the associated resource example: - 4 items: type: integer type: array type: object settings.publicSettingsResponse: properties: AllowBindMountsForRegularUsers: description: Whether non-administrator should be able to use bind mounts when creating containers example: true type: boolean AllowContainerCapabilitiesForRegularUsers: description: Whether non-administrator should be able to use container capabilities example: true type: boolean AllowDeviceMappingForRegularUsers: description: Whether non-administrator should be able to use device mapping example: true type: boolean AllowHostNamespaceForRegularUsers: description: Whether non-administrator should be able to use the host pid example: true type: boolean AllowPrivilegedModeForRegularUsers: description: Whether non-administrator should be able to use privileged mode when creating containers example: true type: boolean AllowStackManagementForRegularUsers: description: Whether non-administrator should be able to manage stacks example: true type: boolean AllowVolumeBrowserForRegularUsers: description: Whether non-administrator should be able to browse volumes example: true type: boolean AuthenticationMethod: description: 'Active authentication method for the Portainer instance. Valid values are: 1 for internal, 2 for LDAP, or 3 for oauth' example: 1 type: integer EnableEdgeComputeFeatures: description: Whether edge compute features are enabled example: true type: boolean EnableHostManagementFeatures: description: Whether host management features are enabled example: true type: boolean EnableTelemetry: description: Whether telemetry is enabled example: true type: boolean LogoURL: 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 example: https://mycompany.mydomain.tld/logo.png type: string OAuthLoginURI: description: The URL used for oauth login example: https://gitlab.com/oauth type: string type: object settings.settingsLDAPCheckPayload: properties: ldapsettings: $ref: '#/definitions/portainer.LDAPSettings' type: object settings.settingsUpdatePayload: properties: allowBindMountsForRegularUsers: description: Whether non-administrator should be able to use bind mounts when creating containers example: false type: boolean allowContainerCapabilitiesForRegularUsers: description: Whether non-administrator should be able to use container capabilities example: true type: boolean allowDeviceMappingForRegularUsers: description: Whether non-administrator should be able to use device mapping example: true type: boolean allowHostNamespaceForRegularUsers: description: Whether non-administrator should be able to use the host pid example: true type: boolean allowPrivilegedModeForRegularUsers: description: Whether non-administrator should be able to use privileged mode when creating containers example: false type: boolean allowStackManagementForRegularUsers: description: Whether non-administrator should be able to manage stacks example: true type: boolean allowVolumeBrowserForRegularUsers: description: Whether non-administrator should be able to browse volumes example: true type: boolean authenticationMethod: description: 'Active authentication method for the Portainer instance. Valid values are: 1 for internal, 2 for LDAP, or 3 for oauth' example: 1 type: integer blackListedLabels: description: A list of label name & value that will be used to hide containers when querying containers items: $ref: '#/definitions/portainer.Pair' type: array edgeAgentCheckinInterval: description: The default check in interval for edge agent (in seconds) example: 5 type: integer enableEdgeComputeFeatures: description: Whether edge compute features are enabled example: true type: boolean enableHostManagementFeatures: description: Whether host management features are enabled example: true type: boolean enableTelemetry: description: Whether telemetry is enabled example: false type: boolean internalAuthSettings: $ref: '#/definitions/portainer.InternalAuthSettings' ldapsettings: $ref: '#/definitions/portainer.LDAPSettings' logoURL: 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 example: https://mycompany.mydomain.tld/logo.png type: string oauthSettings: $ref: '#/definitions/portainer.OAuthSettings' snapshotInterval: description: The interval in which endpoint snapshots are created example: 5m type: string templatesURL: description: URL to the templates that will be displayed in the UI when navigating to App Templates example: https://raw.githubusercontent.com/portainer/templates/master/templates.json type: string userSessionTimeout: description: The duration of a user session example: 5m type: string type: object stacks.composeStackFromFileContentPayload: properties: env: description: A list of environment variables used during stack deployment items: $ref: '#/definitions/portainer.Pair' type: array name: description: Name of the stack example: myStack type: string stackFileContent: description: Content of the Stack file example: |- version: 3 services: web: image:nginx type: string required: - name - stackFileContent type: object stacks.composeStackFromGitRepositoryPayload: properties: composeFilePathInRepository: default: docker-compose.yml description: Path to the Stack file inside the Git repository example: docker-compose.yml type: string env: description: A list of environment variables used during stack deployment items: $ref: '#/definitions/portainer.Pair' type: array name: description: Name of the stack example: myStack type: string repositoryAuthentication: description: Use basic authentication to clone the Git repository example: true type: boolean repositoryPassword: description: Password used in basic authentication. Required when RepositoryAuthentication is true. example: myGitPassword type: string repositoryReferenceName: description: Reference name of a Git repository hosting the Stack file example: refs/heads/master type: string repositoryURL: description: URL of a Git repository hosting the Stack file example: https://github.com/openfaas/faas type: string repositoryUsername: description: Username used in basic authentication. Required when RepositoryAuthentication is true. example: myGitUsername type: string required: - name - repositoryURL type: object stacks.stackFileResponse: properties: StackFileContent: description: Content of the Stack file example: |- version: 3 services: web: image:nginx type: string type: object stacks.stackMigratePayload: properties: endpointID: description: Endpoint identifier of the target endpoint where the stack will be relocated example: 2 type: integer name: description: If provided will rename the migrated stack example: new-stack type: string swarmID: description: Swarm cluster identifier, must match the identifier of the cluster where the stack will be relocated example: jpofkc0i9uo9wtx1zesuk649w type: string required: - endpointID type: object stacks.swarmStackFromFileContentPayload: properties: env: description: A list of environment variables used during stack deployment items: $ref: '#/definitions/portainer.Pair' type: array name: description: Name of the stack example: myStack type: string stackFileContent: description: Content of the Stack file example: |- version: 3 services: web: image:nginx type: string swarmID: description: Swarm cluster identifier example: jpofkc0i9uo9wtx1zesuk649w type: string required: - name - stackFileContent - swarmID type: object stacks.swarmStackFromGitRepositoryPayload: properties: composeFilePathInRepository: default: docker-compose.yml description: Path to the Stack file inside the Git repository example: docker-compose.yml type: string env: description: A list of environment variables used during stack deployment items: $ref: '#/definitions/portainer.Pair' type: array name: description: Name of the stack example: myStack type: string repositoryAuthentication: description: Use basic authentication to clone the Git repository example: true type: boolean repositoryPassword: description: Password used in basic authentication. Required when RepositoryAuthentication is true. example: myGitPassword type: string repositoryReferenceName: description: Reference name of a Git repository hosting the Stack file example: refs/heads/master type: string repositoryURL: description: URL of a Git repository hosting the Stack file example: https://github.com/openfaas/faas type: string repositoryUsername: description: Username used in basic authentication. Required when RepositoryAuthentication is true. example: myGitUsername type: string swarmID: description: Swarm cluster identifier example: jpofkc0i9uo9wtx1zesuk649w type: string required: - name - repositoryURL - swarmID type: object stacks.updateSwarmStackPayload: properties: env: description: A list of environment variables used during stack deployment items: $ref: '#/definitions/portainer.Pair' type: array prune: description: Prune services that are no longer referenced (only available for Swarm stacks) example: true type: boolean stackFileContent: description: New content of the Stack file example: |- version: 3 services: web: image:nginx type: string type: object status.inspectVersionResponse: properties: LatestVersion: description: The latest version available example: 2.0.0 type: string UpdateAvailable: description: Whether portainer has an update available example: false type: boolean type: object tags.tagCreatePayload: properties: name: description: Name example: org/acme type: string required: - name type: object teammemberships.teamMembershipCreatePayload: properties: role: description: Role for the user inside the team (1 for leader and 2 for regular member) enum: - 1 - 2 example: 1 type: integer teamID: description: Team identifier example: 1 type: integer userID: description: User identifier example: 1 type: integer required: - role - teamID - userID type: object teammemberships.teamMembershipUpdatePayload: properties: role: description: Role for the user inside the team (1 for leader and 2 for regular member) enum: - 1 - 2 example: 1 type: integer teamID: description: Team identifier example: 1 type: integer userID: description: User identifier example: 1 type: integer required: - role - teamID - userID type: object teams.teamCreatePayload: properties: name: description: Name example: developers type: string required: - name type: object teams.teamUpdatePayload: properties: name: description: Name example: developers type: string type: object templates.filePayload: properties: composeFilePathInRepository: description: Path to the file inside the git repository example: ./subfolder/docker-compose.yml type: string repositoryURL: description: URL of a git repository where the file is stored example: https://github.com/portainer/portainer-compose type: string required: - composeFilePathInRepository - repositoryURL type: object templates.fileResponse: properties: fileContent: description: The requested file content type: string type: object templates.listResponse: properties: templates: items: $ref: '#/definitions/portainer.Template' type: array version: type: string type: object users.adminInitPayload: properties: password: description: Password for the admin user example: admin-password type: string username: description: Username for the admin user example: admin type: string required: - password - username type: object users.userCreatePayload: properties: password: example: cg9Wgky3 type: string role: description: User role (1 for administrator account and 2 for regular account) enum: - 1 - 2 example: 2 type: integer username: example: bob type: string required: - password - role - username type: object users.userUpdatePasswordPayload: properties: newPassword: description: New Password example: new_passwd type: string password: description: Current Password example: passwd type: string required: - newPassword - password type: object users.userUpdatePayload: properties: password: example: cg9Wgky3 type: string role: description: User role (1 for administrator account and 2 for regular account) enum: - 1 - 2 example: 2 type: integer username: example: bob type: string required: - password - role - username type: object webhooks.webhookCreatePayload: properties: endpointID: type: integer resourceID: type: string webhookType: type: integer type: object info: contact: email: info@portainer.io 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://documentation.portainer.io/api/api-examples/ 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://documentation.portainer.io/api/api-examples/). license: {} title: PortainerCE API version: 2.0.0 paths: /auth: post: consumes: - application/json description: Use this endpoint to authenticate against Portainer using a username and password. operationId: AuthenticateUser parameters: - description: Credentials used for authentication in: body name: body required: true schema: $ref: '#/definitions/auth.authenticatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/auth.authenticateResponse' '400': description: Invalid request '422': description: Invalid Credentials '500': description: Server error summary: Authenticate tags: - auth /auth/logout: post: consumes: - application/json operationId: logout produces: - application/json responses: '204': description: '' security: - jwt: [] summary: Logout tags: - auth /auth/oauth/validate: post: consumes: - application/json operationId: authenticate_oauth parameters: - description: OAuth Credentials used for authentication in: body name: body required: true schema: $ref: '#/definitions/auth.oauthPayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/auth.authenticateResponse' '400': description: Invalid request '422': description: Invalid Credentials '500': description: Server error summary: Authenticate with OAuth tags: - auth /custom_templates: get: description: |- List available custom templates. **Access policy**: authenticated operationId: CustomTemplateList produces: - application/json responses: '200': description: Success schema: items: $ref: '#/definitions/portainer.CustomTemplate' type: array '500': description: Server error security: - jwt: [] summary: List available custom templates tags: - custom_templates post: consumes: - application/json - ' multipart/form-data' description: |- Create a custom template. **Access policy**: authenticated operationId: CustomTemplateCreate parameters: - description: method for creating template enum: - string - file - repository in: query name: method required: true type: string - description: Required when using method=string in: body name: body_string schema: $ref: '#/definitions/customtemplates.customTemplateFromFileContentPayload' - description: Required when using method=repository in: body name: body_repository schema: $ref: '#/definitions/customtemplates.customTemplateFromGitRepositoryPayload' - description: Title of the template. required when method is file in: formData name: Title type: string - description: Description of the template. required when method is file in: formData name: Description type: string - description: A note that will be displayed in the UI. Supports HTML content in: formData name: Note type: string - description: Platform associated to the template (1 - 'linux', 2 - 'windows'). required when method is file enum: - 1 - 2 in: formData name: Platform type: integer - description: Type of created stack (1 - swarm, 2 - compose), required when method is file enum: - 1 - 2 in: formData name: Type type: integer - description: required when method is file in: formData name: file type: file produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.CustomTemplate' '400': description: Invalid request '500': description: Server error security: - jwt: [] summary: Create a custom template tags: - custom_templates /custom_templates/{id}: delete: description: |- Remove a template. **Access policy**: authorized operationId: CustomTemplateDelete parameters: - description: Template identifier in: path name: id required: true type: integer responses: '204': description: Success '400': description: Invalid request '403': description: Access denied to resource '404': description: Template not found '500': description: Server error security: - jwt: [] summary: Remove a template tags: - custom_templates get: consumes: - application/json description: |- Retrieve details about a template. **Access policy**: authenticated operationId: CustomTemplateInspect parameters: - description: Template identifier in: path name: id required: true type: integer produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.CustomTemplate' '400': description: Invalid request '404': description: Template not found '500': description: Server error security: - jwt: [] summary: Inspect a custom template tags: - custom_templates put: consumes: - application/json description: |- Update a template. **Access policy**: authenticated operationId: CustomTemplateUpdate parameters: - description: Template identifier in: path name: id required: true type: integer - description: Template details in: body name: body required: true schema: $ref: '#/definitions/customtemplates.customTemplateUpdatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.CustomTemplate' '400': description: Invalid request '403': description: Permission denied to access template '404': description: Template not found '500': description: Server error security: - jwt: [] summary: Update a template tags: - custom_templates /custom_templates/{id}/file: get: description: |- Retrieve the content of the Stack file for the specified custom template **Access policy**: authorized operationId: CustomTemplateFile parameters: - description: Template identifier in: path name: id required: true type: integer produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/customtemplates.fileResponse' '400': description: Invalid request '404': description: Custom template not found '500': description: Server error security: - jwt: [] summary: Get Template stack file content. tags: - custom_templates /dockerhub: get: description: |- Use this endpoint to retrieve the information used to connect to the DockerHub **Access policy**: authenticated operationId: DockerHubInspect produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.DockerHub' '500': description: Server error security: - jwt: [] summary: Retrieve DockerHub information tags: - dockerhub put: consumes: - application/json description: |- Use this endpoint to update the information used to connect to the DockerHub **Access policy**: administrator operationId: DockerHubUpdate parameters: - description: DockerHub information in: body name: body required: true schema: $ref: '#/definitions/dockerhub.dockerhubUpdatePayload' produces: - application/json responses: '204': description: Success '400': description: Invalid request '500': description: Server error security: - jwt: [] summary: Update DockerHub information tags: - dockerhub /edge_groups: get: consumes: - application/json produces: - application/json responses: '200': description: EdgeGroups schema: items: allOf: - $ref: '#/definitions/portainer.EdgeGroup' - properties: HasEdgeStack: type: boolean type: object type: array '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: list EdgeGroups tags: - edge_groups post: consumes: - application/json parameters: - description: EdgeGroup data in: body name: body required: true schema: $ref: '#/definitions/edgegroups.edgeGroupCreatePayload' produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.EdgeGroup' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Create an EdgeGroup tags: - edge_groups /edge_groups/{id}: delete: consumes: - application/json parameters: - description: EdgeGroup Id in: path name: id required: true type: integer produces: - application/json responses: '204': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Deletes an EdgeGroup tags: - edge_groups get: consumes: - application/json parameters: - description: EdgeGroup Id in: path name: id required: true type: integer produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.EdgeGroup' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Inspects an EdgeGroup tags: - edge_groups put: consumes: - application/json parameters: - description: EdgeGroup Id in: path name: id required: true type: integer - description: EdgeGroup data in: body name: body required: true schema: $ref: '#/definitions/edgegroups.edgeGroupUpdatePayload' produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.EdgeGroup' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Updates an EdgeGroup tags: - edge_groups /edge_jobs: get: consumes: - application/json produces: - application/json responses: '200': description: OK schema: items: $ref: '#/definitions/portainer.EdgeJob' type: array '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Fetch EdgeJobs list tags: - edge_jobs post: consumes: - application/json parameters: - description: Creation Method enum: - file - string in: query name: method required: true type: string - description: EdgeGroup data when method is string in: body name: body required: true schema: $ref: '#/definitions/edgejobs.edgeJobCreateFromFileContentPayload' - description: EdgeGroup data when method is file in: body name: body required: true schema: $ref: '#/definitions/edgejobs.edgeJobCreateFromFilePayload' produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.EdgeGroup' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Create an EdgeJob tags: - edge_jobs /edge_jobs/{id}: delete: consumes: - application/json parameters: - description: EdgeJob Id in: path name: id required: true type: string produces: - application/json responses: '204': description: '' '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Delete an EdgeJob tags: - edge_jobs get: consumes: - application/json parameters: - description: EdgeJob Id in: path name: id required: true type: string produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.EdgeJob' '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Inspect an EdgeJob tags: - edge_jobs post: consumes: - application/json parameters: - description: EdgeJob Id in: path name: id required: true type: string - description: EdgeGroup data in: body name: body required: true schema: $ref: '#/definitions/edgejobs.edgeJobUpdatePayload' produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.EdgeJob' '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Update an EdgeJob tags: - edge_jobs /edge_jobs/{id}/file: get: consumes: - application/json parameters: - description: EdgeJob Id in: path name: id required: true type: string produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/edgejobs.edgeJobFileResponse' '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Fetch a file of an EdgeJob tags: - edge_jobs /edge_jobs/{id}/tasks: get: consumes: - application/json parameters: - description: EdgeJob Id in: path name: id required: true type: string produces: - application/json responses: '200': description: OK schema: items: $ref: '#/definitions/edgejobs.taskContainer' type: array '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Fetch the list of tasks on an EdgeJob tags: - edge_jobs /edge_jobs/{id}/tasks/{taskID}/logs: delete: consumes: - application/json parameters: - description: EdgeJob Id in: path name: id required: true type: string - description: Task Id in: path name: taskID required: true type: string produces: - application/json responses: '204': description: '' '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Clear the log for a specifc task on an EdgeJob tags: - edge_jobs get: consumes: - application/json parameters: - description: EdgeJob Id in: path name: id required: true type: string - description: Task Id in: path name: taskID required: true type: string produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/edgejobs.fileResponse' '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Fetch the log for a specifc task on an EdgeJob tags: - edge_jobs post: consumes: - application/json parameters: - description: EdgeJob Id in: path name: id required: true type: string - description: Task Id in: path name: taskID required: true type: string produces: - application/json responses: '204': description: '' '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Collect the log for a specifc task on an EdgeJob tags: - edge_jobs /edge_stacks: get: consumes: - application/json produces: - application/json responses: '200': description: OK schema: items: $ref: '#/definitions/portainer.EdgeStack' type: array '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Fetches the list of EdgeStacks tags: - edge_stacks post: consumes: - application/json parameters: - description: Creation Method enum: - file - string - repository in: query name: method required: true type: string - description: Required when using method=string in: body name: body_string required: true schema: $ref: '#/definitions/edgestacks.swarmStackFromFileContentPayload' - description: Required when using method=file in: body name: body_file required: true schema: $ref: '#/definitions/edgestacks.swarmStackFromFileUploadPayload' - description: Required when using method=repository in: body name: body_repository required: true schema: $ref: '#/definitions/edgestacks.swarmStackFromGitRepositoryPayload' produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.EdgeStack' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Create an EdgeStack tags: - edge_stacks /edge_stacks/{id}: delete: consumes: - application/json parameters: - description: EdgeStack Id in: path name: id required: true type: string produces: - application/json responses: '204': description: '' '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Delete an EdgeStack tags: - edge_stacks get: consumes: - application/json parameters: - description: EdgeStack Id in: path name: id required: true type: string produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.EdgeStack' '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Inspect an EdgeStack tags: - edge_stacks put: consumes: - application/json parameters: - description: EdgeStack Id in: path name: id required: true type: string - description: EdgeStack data in: body name: body required: true schema: $ref: '#/definitions/edgestacks.updateEdgeStackPayload' produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.EdgeStack' '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Update an EdgeStack tags: - edge_stacks /edge_stacks/{id}/file: get: consumes: - application/json parameters: - description: EdgeStack Id in: path name: id required: true type: string produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/edgestacks.stackFileResponse' '400': description: '' '500': description: '' '503': description: Service Unavailable schema: type: Edge security: - jwt: [] summary: Fetches the stack file for an EdgeStack tags: - edge_stacks /edge_stacks/{id}/status: put: consumes: - application/json description: Authorized only if the request is done by an Edge Endpoint parameters: - description: EdgeStack Id in: path name: id required: true type: string produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.EdgeStack' '400': description: '' '403': description: '' '404': description: '' '500': description: '' summary: Update an EdgeStack status tags: - edge_stacks /edge_templates: get: consumes: - application/json produces: - application/json responses: '200': description: OK schema: items: $ref: '#/definitions/portainer.Template' type: array '500': description: '' security: - jwt: [] summary: Fetches the list of Edge Templates tags: - edge_templates /endpoint_groups: get: 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 responses: '200': description: Endpoint group schema: items: $ref: '#/definitions/portainer.EndpointGroup' type: array '500': description: Server error security: - jwt: [] summary: List Endpoint groups tags: - endpoint_groups post: consumes: - application/json description: |- Create a new endpoint group. **Access policy**: administrator parameters: - description: Endpoint Group details in: body name: body required: true schema: $ref: '#/definitions/endpointgroups.endpointGroupCreatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.EndpointGroup' '400': description: Invalid request '500': description: Server error security: - jwt: [] summary: Create an Endpoint Group tags: - endpoint_groups /endpoint_groups/:id: get: consumes: - application/json description: |- Retrieve details abont an endpoint group. **Access policy**: administrator parameters: - description: Endpoint group identifier in: path name: id required: true type: integer produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.EndpointGroup' '400': description: Invalid request '404': description: EndpointGroup not found '500': description: Server error security: - jwt: [] summary: Inspect an Endpoint group tags: - endpoint_groups put: consumes: - application/json description: |- Update an endpoint group. **Access policy**: administrator operationId: EndpointGroupUpdate parameters: - description: EndpointGroup identifier in: path name: id required: true type: integer - description: EndpointGroup details in: body name: body required: true schema: $ref: '#/definitions/endpointgroups.endpointGroupUpdatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.EndpointGroup' '400': description: Invalid request '404': description: EndpointGroup not found '500': description: Server error security: - jwt: [] summary: Update an endpoint group tags: - endpoint_groups /endpoint_groups/{id}: delete: consumes: - application/json description: |- Remove an endpoint group. **Access policy**: administrator operationId: EndpointGroupDelete parameters: - description: EndpointGroup identifier in: path name: id required: true type: integer produces: - application/json responses: '204': description: Success '400': description: Invalid request '404': description: EndpointGroup not found '500': description: Server error security: - jwt: [] summary: Remove an endpoint group tags: - endpoint_groups /endpoint_groups/{id}/endpoints/{endpointId}: delete: description: '**Access policy**: administrator' operationId: EndpointGroupDeleteEndpoint parameters: - description: EndpointGroup identifier in: path name: id required: true type: integer - description: Endpoint identifier in: path name: endpointId required: true type: integer responses: '204': description: Success '400': description: Invalid request '404': description: EndpointGroup not found '500': description: Server error security: - jwt: [] summary: Removes endpoint from an endpoint group tags: - endpoint_groups put: description: |- Add an endpoint to an endpoint group **Access policy**: administrator operationId: EndpointGroupAddEndpoint parameters: - description: EndpointGroup identifier in: path name: id required: true type: integer - description: Endpoint identifier in: path name: endpointId required: true type: integer responses: '204': description: Success '400': description: Invalid request '404': description: EndpointGroup not found '500': description: Server error security: - jwt: [] summary: Add an endpoint to an endpoint group tags: - endpoint_groups /endpoints: get: 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 parameters: - description: Start searching from in: query name: start type: integer - description: Search query in: query name: search type: string - description: List endpoints of this group in: query name: groupId type: integer - description: Limit results to this value in: query name: limit type: integer - description: List endpoints of this type in: query name: type type: integer - description: search endpoints with these tags (depends on tagsPartialMatch) in: query items: type: integer name: tagIds type: array - description: If true, will return endpoint which has one of tagIds, if false (or missing) will return only endpoints that has all the tags in: query name: tagsPartialMatch type: boolean - description: will return only these endpoints in: query items: type: integer name: endpointIds type: array produces: - application/json responses: '200': description: Endpoints schema: items: $ref: '#/definitions/portainer.Endpoint' type: array '500': description: Internal Server Error schema: type: Server security: - jwt: [] summary: List endpoints tags: - endpoints post: consumes: - multipart/form-data description: |- Create a new endpoint that will be used to manage an environment. **Access policy**: administrator operationId: EndpointCreate parameters: - description: 'Name that will be used to identify this endpoint (example: my-endpoint)' in: formData name: Name required: true type: string - description: 'Environment type. Value must be one of: 1 (Local Docker environment), 2 (Agent environment), 3 (Azure environment), 4 (Edge agent environment) or 5 (Local Kubernetes Environment' in: formData name: EndpointType required: true type: integer - 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)' in: formData name: URL type: string - description: 'URL or IP address where exposed containers will be reachable. Defaults to URL if not specified (example: docker.mydomain.tld:2375)' in: formData name: PublicURL type: string - description: Endpoint group identifier. If not specified will default to 1 (unassigned). in: formData name: GroupID type: integer - description: Require TLS to connect against this endpoint in: formData name: TLS type: boolean - description: Skip server verification when using TLS in: formData name: TLSSkipVerify type: boolean - description: Skip client verification when using TLS in: formData name: TLSSkipClientVerify type: boolean - description: TLS CA certificate file in: formData name: TLSCACertFile type: file - description: TLS client certificate file in: formData name: TLSCertFile type: file - description: TLS client key file in: formData name: TLSKeyFile type: file - description: Azure application ID. Required if endpoint type is set to 3 in: formData name: AzureApplicationID type: string - description: Azure tenant ID. Required if endpoint type is set to 3 in: formData name: AzureTenantID type: string - description: Azure authentication key. Required if endpoint type is set to 3 in: formData name: AzureAuthenticationKey type: string - description: List of tag identifiers to which this endpoint is associated in: formData items: type: integer name: TagIDs type: array - description: The check in interval for edge agent (in seconds) in: formData name: EdgeCheckinInterval type: integer produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Endpoint' '400': description: Invalid request '500': description: Server error security: - jwt: [] summary: Create a new endpoint tags: - endpoints /endpoints/{id}: delete: description: |- Remove an endpoint. **Access policy**: administrator operationId: EndpointDelete parameters: - description: Endpoint identifier in: path name: id required: true type: integer responses: '204': description: Success '400': description: Invalid request '404': description: Endpoint not found '500': description: Server error security: - jwt: [] summary: Remove an endpoint tags: - endpoints get: description: |- Retrieve details about an endpoint. **Access policy**: restricted operationId: EndpointInspect parameters: - description: Endpoint identifier in: path name: id required: true type: integer produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Endpoint' '400': description: Invalid request '404': description: Endpoint not found '500': description: Server error security: - jwt: [] summary: Inspect an endpoint tags: - endpoints put: consumes: - application/json description: |- Update an endpoint. **Access policy**: administrator operationId: EndpointUpdate parameters: - description: Endpoint identifier in: path name: id required: true type: integer - description: Endpoint details in: body name: body required: true schema: $ref: '#/definitions/endpoints.endpointUpdatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Endpoint' '400': description: Invalid request '404': description: Endpoint not found '500': description: Server error security: - jwt: [] summary: Update an endpoint tags: - endpoints /endpoints/{id}/edge/jobs/{jobID}/logs: post: consumes: - application/json parameters: - description: Endpoint Id in: path name: id required: true type: string - description: Job Id in: path name: jobID required: true type: string produces: - application/json responses: '200': description: '' '400': description: '' '500': description: '' summary: Inspect an EdgeJob Log tags: - edge - endpoints /endpoints/{id}/edge/stacks/{stackId}: get: consumes: - application/json parameters: - description: Endpoint Id in: path name: id required: true type: string - description: EdgeStack Id in: path name: stackID required: true type: string produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/endpointedge.configResponse' '400': description: '' '404': description: '' '500': description: '' summary: Inspect an Edge Stack for an Endpoint tags: - edge - endpoints - edge_stacks /endpoints/{id}/snapshot: post: description: |- Snapshots an endpoint **Access policy**: restricted operationId: EndpointSnapshot parameters: - description: Endpoint identifier in: path name: id required: true type: integer responses: '204': description: Success '400': description: Invalid request '404': description: Endpoint not found '500': description: Server error security: - jwt: [] summary: Snapshots an endpoint tags: - endpoints /endpoints/{id}/edge/status: get: description: |- Endpoint for edge agent to check status of environment **Access policy**: restricted only to Edge endpoints operationId: EndpointEdgeStatusInspect parameters: - description: Endpoint identifier in: path name: id required: true type: integer responses: '200': description: Success schema: $ref: '#/definitions/endpoints.endpointEdgeStatusInspectResponse' '400': description: Invalid request '403': description: Permission denied to access endpoint '404': description: Endpoint not found '500': description: Server error security: - jwt: [] summary: Get endpoint status tags: - endpoints /endpoints/snapshot: post: description: |- Snapshot all endpoints **Access policy**: administrator operationId: EndpointSnapshots responses: '204': description: Success '500': description: Server Error security: - jwt: [] summary: Snapshot all endpoints tags: - endpoints /motd: get: produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/motd.motdResponse' security: - jwt: [] summary: fetches the message of the day tags: - motd /registries: get: 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 responses: '200': description: Success schema: items: $ref: '#/definitions/portainer.Registry' type: array '500': description: Server error security: - jwt: [] summary: List Registries tags: - registries post: consumes: - application/json description: |- Create a new registry. **Access policy**: administrator operationId: RegistryCreate parameters: - description: Registry details in: body name: body required: true schema: $ref: '#/definitions/registries.registryCreatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Registry' '400': description: Invalid request '500': description: Server error security: - jwt: [] summary: Create a new registry tags: - registries /registries/{id}: delete: description: |- Remove a registry **Access policy**: administrator operationId: RegistryDelete parameters: - description: Registry identifier in: path name: id required: true type: integer responses: '204': description: Success '400': description: Invalid request '404': description: Registry not found '500': description: Server error security: - jwt: [] summary: Remove a registry tags: - registries get: description: |- Retrieve details about a registry. **Access policy**: administrator operationId: RegistryInspect parameters: - description: Registry identifier in: path name: id required: true type: integer produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Registry' '400': description: Invalid request '403': description: Permission denied to access registry '404': description: Registry not found '500': description: Server error security: - jwt: [] summary: Inspect a registry tags: - registries put: consumes: - application/json description: |- Update a registry **Access policy**: administrator operationId: RegistryUpdate parameters: - description: Registry identifier in: path name: id required: true type: integer - description: Registry details in: body name: body required: true schema: $ref: '#/definitions/registries.registryUpdatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Registry' '400': description: Invalid request '404': description: Registry not found '409': description: Another registry with the same URL already exists '500': description: Server error security: - jwt: [] summary: Update a registry tags: - registries /registries/{id}/configure: post: consumes: - application/json description: |- Configures a registry. **Access policy**: admin operationId: RegistryConfigure parameters: - description: Registry identifier in: path name: id required: true type: integer - description: Registry configuration in: body name: body required: true schema: $ref: '#/definitions/registries.registryConfigurePayload' produces: - application/json responses: '204': description: Success '400': description: Invalid request '403': description: Permission denied '404': description: Registry not found '500': description: Server error security: - jwt: [] summary: Configures a registry tags: - registries /resource_controls: post: consumes: - application/json description: |- Create a new resource control to restrict access to a Docker resource. **Access policy**: administrator operationId: ResourceControlCreate parameters: - description: Resource control details in: body name: body required: true schema: $ref: '#/definitions/resourcecontrols.resourceControlCreatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.ResourceControl' '400': description: Invalid request '409': description: Resource control already exists '500': description: Server error security: - jwt: [] summary: Create a new resource control tags: - resource_controls /resource_controls/{id}: delete: description: |- Remove a resource control. **Access policy**: administrator parameters: - description: Resource control identifier in: path name: id required: true type: integer responses: '204': description: Success '400': description: Invalid request '404': description: Resource control not found '500': description: Server error security: - jwt: [] summary: Remove a resource control tags: - resource_controls put: consumes: - application/json description: |- Update a resource control **Access policy**: restricted operationId: ResourceControlUpdate parameters: - description: Resource control identifier in: path name: id required: true type: integer - description: Resource control details in: body name: body required: true schema: $ref: '#/definitions/resourcecontrols.resourceControlUpdatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.ResourceControl' '400': description: Invalid request '403': description: Unauthorized '404': description: Resource control not found '500': description: Server error security: - jwt: [] summary: Update a resource control tags: - resource_controls /roles: get: description: |- List all roles available for use **Access policy**: administrator operationId: RoleList produces: - application/json responses: '200': description: Success schema: items: $ref: '#/definitions/portainer.Role' type: array '500': description: Server error security: - jwt: [] summary: List roles tags: - roles /settings: get: description: |- Retrieve Portainer settings. **Access policy**: administrator operationId: SettingsInspect produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Settings' '500': description: Server error security: - jwt: [] summary: Retrieve Portainer settings tags: - settings put: consumes: - application/json description: |- Update Portainer settings. **Access policy**: administrator operationId: SettingsUpdate parameters: - description: New settings in: body name: body required: true schema: $ref: '#/definitions/settings.settingsUpdatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Settings' '400': description: Invalid request '500': description: Server error security: - jwt: [] summary: Update Portainer settings tags: - settings /settings/ldap/check: put: consumes: - application/json description: |- Test LDAP connectivity using LDAP details **Access policy**: administrator operationId: SettingsLDAPCheck parameters: - description: details in: body name: body required: true schema: $ref: '#/definitions/settings.settingsLDAPCheckPayload' responses: '204': description: Success '400': description: Invalid request '500': description: Server error security: - jwt: [] summary: Test LDAP connectivity tags: - settings /settings/public: get: description: |- Retrieve public settings. Returns a small set of settings that are not reserved to administrators only. **Access policy**: public produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/settings.publicSettingsResponse' '500': description: Server error summary: Retrieve Portainer public settings tags: - settings /stacks: get: 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 parameters: - description: Filters to process on the stack list. Encoded as JSON (a map[string]string). For example, { in: query name: filters type: string responses: '200': description: Success schema: items: $ref: '#/definitions/portainer.Stack' type: array '204': description: Success '400': description: Invalid request '500': description: Server error security: - jwt: [] summary: List stacks tags: - stacks post: consumes: - application/json - ' multipart/form-data' description: |- Deploy a new stack into a Docker environment specified via the endpoint identifier. **Access policy**: restricted operationId: StackCreate parameters: - description: 'Stack deployment type. Possible values: 1 (Swarm stack) or 2 (Compose stack).' enum: - 1 - 2 in: query name: type required: true type: integer - description: 'Stack deployment method. Possible values: file, string or repository.' enum: - string - file - repository in: query name: method required: true type: string - description: Identifier of the endpoint that will be used to deploy the stack in: query name: endpointId required: true type: integer - description: Required when using method=string and type=1 in: body name: body_swarm_string schema: $ref: '#/definitions/stacks.swarmStackFromFileContentPayload' - description: Required when using method=repository and type=1 in: body name: body_swarm_repository schema: $ref: '#/definitions/stacks.swarmStackFromGitRepositoryPayload' - description: Required when using method=string and type=2 in: body name: body_compose_string schema: $ref: '#/definitions/stacks.composeStackFromFileContentPayload' - description: Required when using method=repository and type=2 in: body name: body_compose_repository schema: $ref: '#/definitions/stacks.composeStackFromGitRepositoryPayload' - description: Name of the stack. required when method is file in: formData name: Name type: string - description: Swarm cluster identifier. Required when method equals file and type equals 1. required when method is file in: formData name: SwarmID 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." in: formData name: Env type: string - description: Stack file. required when method is file in: formData name: file type: file produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.CustomTemplate' '400': description: Invalid request '500': description: Server error security: - jwt: [] summary: Deploy a new stack tags: - stacks /stacks/{id}: delete: description: |- Remove a stack. **Access policy**: restricted operationId: StackDelete parameters: - description: Stack identifier in: path name: id required: true type: integer - description: Set to true to delete an external stack. Only external Swarm stacks are supported in: query name: external type: boolean - description: Endpoint identifier used to remove an external stack (required when external is set to true) in: query name: endpointId type: integer responses: '204': description: Success '400': description: Invalid request '403': description: Permission denied '404': description: ' not found' '500': description: Server error security: - jwt: [] summary: Remove a stack tags: - stacks get: description: |- Retrieve details about a stack. **Access policy**: restricted operationId: StackInspect parameters: - description: Stack identifier in: path name: id required: true type: integer produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Stack' '400': description: Invalid request '403': description: Permission denied '404': description: Stack not found '500': description: Server error security: - jwt: [] summary: Inspect a stack tags: - stacks put: consumes: - application/json description: |- Update a stack. **Access policy**: restricted operationId: StackUpdate parameters: - description: Stack identifier in: path name: id required: true type: integer - 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. in: query name: endpointId type: integer - description: Stack details in: body name: body required: true schema: $ref: '#/definitions/stacks.updateSwarmStackPayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Stack' '400': description: Invalid request '403': description: Permission denied '404': description: ' not found' '500': description: Server error security: - jwt: [] summary: Update a stack tags: - stacks /stacks/{id}/file: get: description: |- Get Stack file content. **Access policy**: restricted operationId: StackFileInspect parameters: - description: Stack identifier in: path name: id required: true type: integer produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/stacks.stackFileResponse' '400': description: Invalid request '403': description: Permission denied '404': description: Stack not found '500': description: Server error security: - jwt: [] summary: Retrieve the content of the Stack file for the specified stack tags: - stacks /stacks/{id}/migrate: post: 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 parameters: - description: Stack identifier in: path name: id required: true type: integer - 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. in: query name: endpointId type: integer - description: Stack migration details in: body name: body required: true schema: $ref: '#/definitions/stacks.stackMigratePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Stack' '400': description: Invalid request '403': description: Permission denied '404': description: Stack not found '500': description: Server error security: - jwt: [] summary: Migrate a stack to another endpoint tags: - stacks /stacks/{id}/start: post: description: |- Starts a stopped Stack. **Access policy**: restricted operationId: StackStart parameters: - description: Stack identifier in: path name: id required: true type: integer responses: '200': description: Success schema: $ref: '#/definitions/portainer.Stack' '400': description: Invalid request '403': description: Permission denied '404': description: ' not found' '500': description: Server error security: - jwt: [] summary: Starts a stopped Stack tags: - stacks /stacks/{id}/stop: post: description: |- Stops a stopped Stack. **Access policy**: restricted operationId: StackStop parameters: - description: Stack identifier in: path name: id required: true type: integer responses: '200': description: Success schema: $ref: '#/definitions/portainer.Stack' '400': description: Invalid request '403': description: Permission denied '404': description: ' not found' '500': description: Server error security: - jwt: [] summary: Stops a stopped Stack tags: - stacks /status: get: description: |- Retrieve Portainer status **Access policy**: public operationId: StatusInspect produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Status' summary: Check Portainer status tags: - status /status/version: get: description: |- Check if portainer has an update available **Access policy**: authenticated operationId: StatusInspectVersion produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/status.inspectVersionResponse' security: - jwt: [] summary: Check for portainer updates tags: - status /tags: get: description: |- List tags. **Access policy**: administrator operationId: TagList produces: - application/json responses: '200': description: Success schema: items: $ref: '#/definitions/portainer.Tag' type: array '500': description: Server error security: - jwt: [] summary: List tags tags: - tags post: description: |- Create a new tag. **Access policy**: administrator operationId: TagCreate parameters: - description: Tag details in: body name: body required: true schema: $ref: '#/definitions/tags.tagCreatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Tag' '409': description: Tag name exists '500': description: Server error security: - jwt: [] summary: Create a new tag tags: - tags /tags/{id}: delete: consumes: - application/json description: |- Remove a tag. **Access policy**: administrator operationId: TagDelete parameters: - description: Tag identifier in: path name: id required: true type: integer produces: - application/json responses: '204': description: Success '400': description: Invalid request '403': description: Permission denied '404': description: Tag not found '500': description: Server error security: - jwt: [] summary: Remove a tag tags: - tags /team: post: consumes: - application/json description: |- Create a new team. **Access policy**: administrator operationId: TeamCreate parameters: - description: details in: body name: body required: true schema: $ref: '#/definitions/teams.teamCreatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Team' '400': description: Invalid request '409': description: Team already exists '500': description: Server error security: - jwt: [] summary: Create a new team tags: - teams /team/{id}: put: consumes: - application/json description: |- Update a team. **Access policy**: administrator operationId: TeamUpdate parameters: - description: Team identifier in: path name: id required: true type: integer - description: Team details in: body name: body required: true schema: $ref: '#/definitions/teams.teamUpdatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Team' '204': description: Success '400': description: Invalid request '403': description: Permission denied '404': description: Team not found '500': description: Server error security: - jwt: [] summary: Update a team tags: - '' /team_memberships: get: description: |- List team memberships. Access is only available to administrators and team leaders. **Access policy**: admin operationId: TeamMembershipList produces: - application/json responses: '200': description: Success schema: items: $ref: '#/definitions/portainer.TeamMembership' type: array '400': description: Invalid request '403': description: Permission denied '500': description: Server error security: - jwt: [] summary: List team memberships tags: - team_memberships post: consumes: - application/json description: |- Create a new team memberships. Access is only available to administrators leaders of the associated team. **Access policy**: admin operationId: TeamMembershipCreate parameters: - description: Team membership details in: body name: body required: true schema: $ref: '#/definitions/teammemberships.teamMembershipCreatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.TeamMembership' '204': description: Success '400': description: Invalid request '403': description: Permission denied to manage memberships '409': description: Team membership already registered '500': description: Server error security: - jwt: [] summary: Create a new team membership tags: - team_memberships /team_memberships/{id}: delete: description: |- Remove a team membership. Access is only available to administrators leaders of the associated team. **Access policy**: restricted operationId: TeamMembershipDelete parameters: - description: TeamMembership identifier in: path name: id required: true type: integer responses: '204': description: Success '400': description: Invalid request '403': description: Permission denied '404': description: TeamMembership not found '500': description: Server error security: - jwt: [] summary: Remove a team membership tags: - team_memberships put: consumes: - application/json description: |- Update a team membership. Access is only available to administrators leaders of the associated team. **Access policy**: restricted operationId: TeamMembershipUpdate parameters: - description: Team membership identifier in: path name: id required: true type: integer - description: Team membership details in: body name: body required: true schema: $ref: '#/definitions/teammemberships.teamMembershipUpdatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.TeamMembership' '400': description: Invalid request '403': description: Permission denied '404': description: TeamMembership not found '500': description: Server error security: - jwt: [] summary: Update a team membership tags: - team_memberships /teams: get: description: |- List teams. For non-administrator users, will only list the teams they are member of. **Access policy**: restricted operationId: TeamList produces: - application/json responses: '200': description: Success schema: items: $ref: '#/definitions/portainer.Team' type: array '500': description: Server error security: - jwt: [] summary: List teams tags: - teams /teams/{id}: delete: description: |- Remove a team. **Access policy**: administrator operationId: TeamDelete responses: '204': description: Success '400': description: Invalid request '403': description: Permission denied '404': description: Team not found '500': description: Server error security: - jwt: [] summary: Remove a team tags: - teams get: description: |- Retrieve details about a team. Access is only available for administrator and leaders of that team. **Access policy**: restricted operationId: TeamInspect parameters: - description: Team identifier in: path name: id required: true type: integer produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.Team' '204': description: Success '400': description: Invalid request '403': description: Permission denied '404': description: Team not found '500': description: Server error security: - jwt: [] summary: Inspect a team tags: - teams /teams/{id}/memberships: get: description: |- List team memberships. Access is only available to administrators and team leaders. **Access policy**: restricted operationId: TeamMemberships produces: - application/json responses: '200': description: Success schema: items: $ref: '#/definitions/portainer.TeamMembership' type: array '400': description: Invalid request '403': description: Permission denied '500': description: Server error security: - jwt: [] summary: List team memberships tags: - team_memberships /templates: get: description: |- List available templates. **Access policy**: restricted operationId: TemplateList produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/templates.listResponse' '500': description: Server error security: - jwt: [] summary: List available templates tags: - templates /templates/file: post: consumes: - application/json description: |- Get a template's file **Access policy**: restricted operationId: TemplateFile parameters: - description: File details in: body name: body required: true schema: $ref: '#/definitions/templates.filePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/templates.fileResponse' '400': description: Invalid request '500': description: Server error security: - jwt: [] summary: Get a template's file tags: - templates /upload/tls/{certificate}: post: consumes: - multipart/form-data description: |- Use this endpoint to upload TLS files. **Access policy**: administrator operationId: UploadTLS parameters: - description: TLS file type. Valid values are 'ca', 'cert' or 'key'. enum: - ca - cert - key in: path name: certificate required: true type: string - description: Folder where the TLS file will be stored. Will be created if not existing in: formData name: folder required: true type: string - description: The file to upload in: formData name: file required: true type: file produces: - application/json responses: '204': description: Success '400': description: Invalid request '500': description: Server error security: - jwt: [] summary: Upload TLS files tags: - upload /users: get: 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 responses: '200': description: Success schema: items: $ref: '#/definitions/portainer.User' type: array '400': description: Invalid request '500': description: Server error security: - jwt: [] summary: List users tags: - users post: consumes: - application/json 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 parameters: - description: User details in: body name: body required: true schema: $ref: '#/definitions/users.userCreatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.User' '400': description: Invalid request '403': description: Permission denied '409': description: User already exists '500': description: Server error security: - jwt: [] summary: Create a new user tags: - users /users/{id}: delete: consumes: - application/json description: |- Remove a user. **Access policy**: administrator operationId: UserDelete parameters: - description: User identifier in: path name: id required: true type: integer produces: - application/json responses: '204': description: Success '400': description: Invalid request '403': description: Permission denied '404': description: User not found '500': description: Server error security: - jwt: [] summary: Remove a user tags: - users get: description: |- Retrieve details about a user. **Access policy**: administrator operationId: UserInspect parameters: - description: User identifier in: path name: id required: true type: integer produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.User' '400': description: Invalid request '403': description: Permission denied '404': description: User not found '500': description: Server error security: - jwt: [] summary: Inspect a user tags: - users put: consumes: - application/json description: |- Update user details. A regular user account can only update his details. **Access policy**: authenticated operationId: UserUpdate parameters: - description: User identifier in: path name: id required: true type: integer - description: User details in: body name: body required: true schema: $ref: '#/definitions/users.userUpdatePayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.User' '400': description: Invalid request '403': description: Permission denied '404': description: User not found '409': description: Username already exist '500': description: Server error security: - jwt: [] summary: Update a user tags: - users /users/{id}/memberships: get: description: |- Inspect a user memberships. **Access policy**: authenticated operationId: UserMembershipsInspect parameters: - description: User identifier in: path name: id required: true type: integer produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.TeamMembership' '400': description: Invalid request '403': description: Permission denied '500': description: Server error security: - jwt: [] summary: Inspect a user memberships tags: - users /users/{id}/passwd: put: consumes: - application/json description: |- Update password for the specified user. **Access policy**: authenticated operationId: UserUpdatePassword parameters: - description: identifier in: path name: id required: true type: integer - description: details in: body name: body required: true schema: $ref: '#/definitions/users.userUpdatePasswordPayload' produces: - application/json responses: '204': description: Success '400': description: Invalid request '403': description: Permission denied '404': description: User not found '500': description: Server error security: - jwt: [] summary: Update password for a user tags: - users /users/admin/check: get: description: |- Check if an administrator account exists in the database. **Access policy**: public operationId: UserAdminCheck responses: '204': description: Success '404': description: User not found summary: Check administrator account existence tags: - users /users/admin/init: post: consumes: - application/json description: |- Initialize the 'admin' user account. **Access policy**: public operationId: UserAdminInit parameters: - description: User details in: body name: body required: true schema: $ref: '#/definitions/users.adminInitPayload' produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/portainer.User' '400': description: Invalid request '409': description: Admin user already initialized '500': description: Server error summary: Initialize administrator account tags: - '' /webhooks: get: consumes: - application/json parameters: - description: Webhook data in: body name: body required: true schema: $ref: '#/definitions/webhooks.webhookCreatePayload' - in: query name: EndpointID type: integer - in: query name: ResourceID type: string produces: - application/json responses: '200': description: OK schema: items: $ref: '#/definitions/portainer.Webhook' type: array '400': description: '' '500': description: '' security: - jwt: [] summary: List webhooks tags: - webhooks post: consumes: - application/json parameters: - description: Webhook data in: body name: body required: true schema: $ref: '#/definitions/webhooks.webhookCreatePayload' produces: - application/json responses: '200': description: OK schema: $ref: '#/definitions/portainer.Webhook' '400': description: '' '409': description: '' '500': description: '' security: - jwt: [] summary: Create a webhook tags: - webhooks /webhooks/{id}: delete: consumes: - application/json parameters: - description: Webhook id in: path name: id required: true type: integer produces: - application/json responses: '202': description: Webhook deleted '400': description: '' '500': description: '' security: - jwt: [] summary: Delete a webhook tags: - webhooks /webhooks/{token}: post: consumes: - application/json description: Acts on a passed in token UUID to restart the docker service parameters: - description: Webhook token in: path name: token required: true type: string produces: - application/json responses: '202': description: Webhook executed '400': description: '' '500': description: '' summary: Execute a webhook tags: - webhooks /websocket/attach: get: consumes: - application/json description: |- If the nodeName query parameter is present, the request will be proxied to the underlying agent endpoint. If the nodeName query parameter is not specified, the request will be upgraded to the websocket protocol and an AttachStart operation HTTP request will be created and hijacked. Authentication and access is controlled via the mandatory token query parameter. parameters: - description: endpoint ID of the endpoint where the resource is located in: query name: endpointId required: true type: integer - description: node name in: query name: nodeName type: string - description: JWT token used for authentication against this endpoint in: query name: token required: true type: string produces: - application/json responses: '200': description: '' '400': description: '' '403': description: '' '404': description: '' '500': description: '' security: - jwt: [] summary: Attach a websocket tags: - websocket /websocket/exec: get: consumes: - application/json description: |- If the nodeName query parameter is present, the request will be proxied to the underlying agent endpoint. If the nodeName query parameter is not specified, the request will be upgraded to the websocket protocol and an ExecStart operation HTTP request will be created and hijacked. Authentication and access is controlled via the mandatory token query parameter. parameters: - description: endpoint ID of the endpoint where the resource is located in: query name: endpointId required: true type: integer - description: node name in: query name: nodeName type: string - description: JWT token used for authentication against this endpoint in: query name: token required: true type: string produces: - application/json responses: '200': description: '' '400': description: '' '409': description: '' '500': description: '' security: - jwt: [] summary: Execute a websocket tags: - websocket /websocket/pod: get: consumes: - application/json description: |- The request will be upgraded to the websocket protocol. Authentication and access is controlled via the mandatory token query parameter. parameters: - description: endpoint ID of the endpoint where the resource is located in: query name: endpointId required: true type: integer - description: namespace where the container is located in: query name: namespace required: true type: string - description: name of the pod containing the container in: query name: podName required: true type: string - description: name of the container in: query name: containerName required: true type: string - description: command to execute in the container in: query name: command required: true type: string - description: JWT token used for authentication against this endpoint in: query name: token required: true type: string produces: - application/json responses: '200': description: '' '400': description: '' '403': description: '' '404': description: '' '500': description: '' security: - jwt: [] summary: Execute a websocket on pod tags: - websocket schemes: - http - https securityDefinitions: jwt: in: header name: Authorization type: apiKey swagger: '2.0' tags: - description: Authenticate against Portainer HTTP API name: auth - description: Manage Custom Templates name: custom_templates - description: Manage how Portainer connects to the DockerHub name: dockerhub - description: Manage Edge Groups name: edge_groups - description: Manage Edge Jobs name: edge_jobs - description: Manage Edge Stacks name: edge_stacks - description: Manage Edge Templates name: edge_templates - description: Manage Edge related endpoint settings name: edge - description: Manage Docker environments name: endpoints - description: Manage endpoint groups name: endpoint_groups - description: Fetch the message of the day name: motd - description: Manage Docker registries name: registries - description: Manage access control on Docker resources name: resource_controls - description: Manage roles name: roles - description: Manage Portainer settings name: settings - description: Information about the Portainer instance name: status - description: Manage Docker stacks name: stacks - description: Manage users name: users - description: Manage tags name: tags - description: Manage teams name: teams - description: Manage team memberships name: team_memberships - description: Manage App Templates name: templates - description: Manage stacks name: stacks - description: Upload files name: upload - description: Manage webhooks name: webhooks - description: Create exec sessions using websockets name: websocket