diff --git a/docs/api/api-2.6.2.json b/docs/api/api-2.6.2.json new file mode 100644 index 0000000..1a60be1 --- /dev/null +++ b/docs/api/api-2.6.2.json @@ -0,0 +1,8863 @@ +{ + "schemes": [ + "http", + "https" + ], + "swagger": "2.0", + "info": { + "description": "Portainer API is an HTTP API served by Portainer. It is used by the Portainer UI and everything you can do with the UI can be done using the HTTP API.\nExamples are available at https://gist.github.com/deviantony/77026d402366b4b43fa5918d41bc42f8\nYou can find out more about Portainer at [http://portainer.io](http://portainer.io) and get some support on [Slack](http://portainer.io/slack/).\n\n# Authentication\n\nMost of the API endpoints require to be authenticated as well as some level of authorization to be used.\nPortainer API uses JSON Web Token to manage authentication and thus requires you to provide a token in the **Authorization** header of each request\nwith the **Bearer** authentication mechanism.\n\nExample:\n\n```\nBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInJvbGUiOjEsImV4cCI6MTQ5OTM3NjE1NH0.NJ6vE8FY1WG6jsRQzfMqeatJ4vh2TWAeeYfDhP71YEE\n```\n\n# Security\n\nEach API endpoint has an associated access policy, it is documented in the description of each endpoint.\n\nDifferent access policies are available:\n\n- Public access\n- Authenticated access\n- Restricted access\n- Administrator access\n\n### Public access\n\nNo authentication is required to access the endpoints with this access policy.\n\n### Authenticated access\n\nAuthentication is required to access the endpoints with this access policy.\n\n### Restricted access\n\nAuthentication is required to access the endpoints with this access policy.\nExtra-checks might be added to ensure access to the resource is granted. Returned data might also be filtered.\n\n### Administrator access\n\nAuthentication as well as an administrator role are required to access the endpoints with this access policy.\n\n# Execute Docker requests\n\nPortainer **DO NOT** expose specific endpoints to manage your Docker resources (create a container, remove a volume, etc...).\n\nInstead, it acts as a reverse-proxy to the Docker HTTP API. This means that you can execute Docker requests **via** the Portainer HTTP API.\n\nTo 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).\n\n**NOTE**: You can find more information on how to query the Docker API in the [Docker official documentation](https://docs.docker.com/engine/api/v1.30/) as well as in [this Portainer example](https://gist.github.com/deviantony/77026d402366b4b43fa5918d41bc42f8).\n", + "title": "PortainerCE API", + "contact": { + "email": "info@portainer.io" + }, + "license": { + "name": "zlib", + "url": "https://github.com/portainer/portainer/blob/develop/LICENSE" + }, + "version": "2.6.2" + }, + "basePath": "/api", + "paths": { + "/api/endpoints/{id}/settings": { + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Update settings for an endpoint.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "endpoints" + ], + "summary": "Update settings for an endpoint", + "operationId": "EndpointSettingsUpdate", + "parameters": [ + { + "type": "integer", + "description": "Endpoint identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "Endpoint details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/endpoints.endpointSettingsUpdatePayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.Endpoint" + } + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Endpoint not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/auth": { + "post": { + "description": "Use this endpoint to authenticate against Portainer using a username and password.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Authenticate", + "operationId": "AuthenticateUser", + "parameters": [ + { + "description": "Credentials used for authentication", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/auth.authenticatePayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/auth.authenticateResponse" + } + }, + "400": { + "description": "Invalid request" + }, + "422": { + "description": "Invalid Credentials" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/auth/logout": { + "post": { + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "auth" + ], + "summary": "Logout", + "operationId": "Logout", + "responses": { + "204": { + "description": "Success" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/auth/oauth/validate": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Authenticate with OAuth", + "operationId": "ValidateOAuth", + "parameters": [ + { + "description": "OAuth Credentials used for authentication", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/auth.oauthPayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/auth.authenticateResponse" + } + }, + "400": { + "description": "Invalid request" + }, + "422": { + "description": "Invalid Credentials" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/backup": { + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Creates an archive with a system data snapshot that could be used to restore the system.\n**Access policy**: admin", + "produces": [ + "application/octet-stream" + ], + "tags": [ + "backup" + ], + "summary": "Creates an archive with a system data snapshot that could be used to restore the system.", + "operationId": "Backup", + "parameters": [ + { + "description": "Password to encrypt the backup with", + "name": "Password", + "in": "body", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/custom_templates": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "List available custom templates.\n**Access policy**: authenticated", + "produces": [ + "application/json" + ], + "tags": [ + "custom_templates" + ], + "summary": "List available custom templates", + "operationId": "CustomTemplateList", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.CustomTemplate" + } + } + }, + "500": { + "description": "Server error" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Create a custom template.\n**Access policy**: authenticated", + "consumes": [ + "application/json", + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "custom_templates" + ], + "summary": "Create a custom template", + "operationId": "CustomTemplateCreate", + "parameters": [ + { + "enum": [ + "string", + "file", + "repository" + ], + "type": "string", + "description": "method for creating template", + "name": "method", + "in": "query", + "required": true + }, + { + "description": "Required when using method=string", + "name": "body_string", + "in": "body", + "schema": { + "$ref": "#/definitions/customtemplates.customTemplateFromFileContentPayload" + } + }, + { + "description": "Required when using method=repository", + "name": "body_repository", + "in": "body", + "schema": { + "$ref": "#/definitions/customtemplates.customTemplateFromGitRepositoryPayload" + } + }, + { + "type": "string", + "description": "Title of the template. required when method is file", + "name": "Title", + "in": "formData" + }, + { + "type": "string", + "description": "Description of the template. required when method is file", + "name": "Description", + "in": "formData" + }, + { + "type": "string", + "description": "A note that will be displayed in the UI. Supports HTML content", + "name": "Note", + "in": "formData" + }, + { + "enum": [ + 1, + 2 + ], + "type": "integer", + "description": "Platform associated to the template (1 - 'linux', 2 - 'windows'). required when method is file", + "name": "Platform", + "in": "formData" + }, + { + "enum": [ + 1, + 2 + ], + "type": "integer", + "description": "Type of created stack (1 - swarm, 2 - compose), required when method is file", + "name": "Type", + "in": "formData" + }, + { + "type": "file", + "description": "required when method is file", + "name": "file", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.CustomTemplate" + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/custom_templates/{id}": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Retrieve details about a template.\n**Access policy**: authenticated", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "custom_templates" + ], + "summary": "Inspect a custom template", + "operationId": "CustomTemplateInspect", + "parameters": [ + { + "type": "integer", + "description": "Template identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.CustomTemplate" + } + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Template not found" + }, + "500": { + "description": "Server error" + } + } + }, + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Update a template.\n**Access policy**: authenticated", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "custom_templates" + ], + "summary": "Update a template", + "operationId": "CustomTemplateUpdate", + "parameters": [ + { + "type": "integer", + "description": "Template identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "Template details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/customtemplates.customTemplateUpdatePayload" + } + } + ], + "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" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "description": "Remove a template.\n**Access policy**: authorized", + "tags": [ + "custom_templates" + ], + "summary": "Remove a template", + "operationId": "CustomTemplateDelete", + "parameters": [ + { + "type": "integer", + "description": "Template identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "403": { + "description": "Access denied to resource" + }, + "404": { + "description": "Template not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/custom_templates/{id}/file": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Retrieve the content of the Stack file for the specified custom template\n**Access policy**: authorized", + "produces": [ + "application/json" + ], + "tags": [ + "custom_templates" + ], + "summary": "Get Template stack file content.", + "operationId": "CustomTemplateFile", + "parameters": [ + { + "type": "integer", + "description": "Template identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/customtemplates.fileResponse" + } + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Custom template not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/dockerhub": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Use this endpoint to retrieve the information used to connect to the DockerHub\n**Access policy**: authenticated", + "produces": [ + "application/json" + ], + "tags": [ + "dockerhub" + ], + "summary": "Retrieve DockerHub information", + "operationId": "DockerHubInspect", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.DockerHub" + } + }, + "500": { + "description": "Server error" + } + } + }, + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Use this endpoint to update the information used to connect to the DockerHub\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dockerhub" + ], + "summary": "Update DockerHub information", + "operationId": "DockerHubUpdate", + "parameters": [ + { + "description": "DockerHub information", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dockerhub.dockerhubUpdatePayload" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/edge_groups": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_groups" + ], + "summary": "list EdgeGroups", + "operationId": "EdgeGroupList", + "responses": { + "200": { + "description": "EdgeGroups", + "schema": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/definitions/portainer.EdgeGroup" + }, + { + "type": "object", + "properties": { + "HasEdgeStack": { + "type": "boolean" + } + } + } + ] + } + } + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_groups" + ], + "summary": "Create an EdgeGroup", + "operationId": "EdgeGroupCreate", + "parameters": [ + { + "description": "EdgeGroup data", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/edgegroups.edgeGroupCreatePayload" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.EdgeGroup" + } + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + } + }, + "/edge_groups/{id}": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_groups" + ], + "summary": "Inspects an EdgeGroup", + "operationId": "EdgeGroupInspect", + "parameters": [ + { + "type": "integer", + "description": "EdgeGroup Id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.EdgeGroup" + } + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + }, + "put": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_groups" + ], + "summary": "Updates an EdgeGroup", + "operationId": "EgeGroupUpdate", + "parameters": [ + { + "type": "integer", + "description": "EdgeGroup Id", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "EdgeGroup data", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/edgegroups.edgeGroupUpdatePayload" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.EdgeGroup" + } + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_groups" + ], + "summary": "Deletes an EdgeGroup", + "operationId": "EdgeGroupDelete", + "parameters": [ + { + "type": "integer", + "description": "EdgeGroup Id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + } + }, + "/edge_jobs": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_jobs" + ], + "summary": "Fetch EdgeJobs list", + "operationId": "EdgeJobList", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.EdgeJob" + } + } + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_jobs" + ], + "summary": "Create an EdgeJob", + "operationId": "EdgeJobCreate", + "parameters": [ + { + "enum": [ + "file", + "string" + ], + "type": "string", + "description": "Creation Method", + "name": "method", + "in": "query", + "required": true + }, + { + "description": "EdgeGroup data when method is string", + "name": "body_string", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/edgejobs.edgeJobCreateFromFileContentPayload" + } + }, + { + "description": "EdgeGroup data when method is file", + "name": "body_file", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/edgejobs.edgeJobCreateFromFilePayload" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.EdgeGroup" + } + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + } + }, + "/edge_jobs/{id}": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_jobs" + ], + "summary": "Inspect an EdgeJob", + "operationId": "EdgeJobInspect", + "parameters": [ + { + "type": "string", + "description": "EdgeJob Id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.EdgeJob" + } + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_jobs" + ], + "summary": "Update an EdgeJob", + "operationId": "EdgeJobUpdate", + "parameters": [ + { + "type": "string", + "description": "EdgeJob Id", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "EdgeGroup data", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/edgejobs.edgeJobUpdatePayload" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.EdgeJob" + } + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_jobs" + ], + "summary": "Delete an EdgeJob", + "operationId": "EdgeJobDelete", + "parameters": [ + { + "type": "string", + "description": "EdgeJob Id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "" + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + } + }, + "/edge_jobs/{id}/file": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_jobs" + ], + "summary": "Fetch a file of an EdgeJob", + "operationId": "EdgeJobFile", + "parameters": [ + { + "type": "string", + "description": "EdgeJob Id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/edgejobs.edgeJobFileResponse" + } + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + } + }, + "/edge_jobs/{id}/tasks": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_jobs" + ], + "summary": "Fetch the list of tasks on an EdgeJob", + "operationId": "EdgeJobTasksList", + "parameters": [ + { + "type": "string", + "description": "EdgeJob Id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/edgejobs.taskContainer" + } + } + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + } + }, + "/edge_jobs/{id}/tasks/{taskID}/logs": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_jobs" + ], + "summary": "Fetch the log for a specifc task on an EdgeJob", + "operationId": "EdgeJobTaskLogsInspect", + "parameters": [ + { + "type": "string", + "description": "EdgeJob Id", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Task Id", + "name": "taskID", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/edgejobs.fileResponse" + } + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_jobs" + ], + "summary": "Collect the log for a specifc task on an EdgeJob", + "operationId": "EdgeJobTasksCollect", + "parameters": [ + { + "type": "string", + "description": "EdgeJob Id", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Task Id", + "name": "taskID", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "" + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_jobs" + ], + "summary": "Clear the log for a specifc task on an EdgeJob", + "operationId": "EdgeJobTasksClear", + "parameters": [ + { + "type": "string", + "description": "EdgeJob Id", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Task Id", + "name": "taskID", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "" + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + } + }, + "/edge_stacks": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_stacks" + ], + "summary": "Fetches the list of EdgeStacks", + "operationId": "EdgeStackList", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.EdgeStack" + } + } + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_stacks" + ], + "summary": "Create an EdgeStack", + "operationId": "EdgeStackCreate", + "parameters": [ + { + "enum": [ + "file", + "string", + "repository" + ], + "type": "string", + "description": "Creation Method", + "name": "method", + "in": "query", + "required": true + }, + { + "description": "Required when using method=string", + "name": "body_string", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/edgestacks.swarmStackFromFileContentPayload" + } + }, + { + "description": "Required when using method=file", + "name": "body_file", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/edgestacks.swarmStackFromFileUploadPayload" + } + }, + { + "description": "Required when using method=repository", + "name": "body_repository", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/edgestacks.swarmStackFromGitRepositoryPayload" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.EdgeStack" + } + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + } + }, + "/edge_stacks/{id}": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_stacks" + ], + "summary": "Inspect an EdgeStack", + "operationId": "EdgeStackInspect", + "parameters": [ + { + "type": "string", + "description": "EdgeStack Id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.EdgeStack" + } + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + }, + "put": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_stacks" + ], + "summary": "Update an EdgeStack", + "operationId": "EdgeStackUpdate", + "parameters": [ + { + "type": "string", + "description": "EdgeStack Id", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "EdgeStack data", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/edgestacks.updateEdgeStackPayload" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.EdgeStack" + } + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_stacks" + ], + "summary": "Delete an EdgeStack", + "operationId": "EdgeStackDelete", + "parameters": [ + { + "type": "string", + "description": "EdgeStack Id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "" + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + } + }, + "/edge_stacks/{id}/file": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_stacks" + ], + "summary": "Fetches the stack file for an EdgeStack", + "operationId": "EdgeStackFile", + "parameters": [ + { + "type": "string", + "description": "EdgeStack Id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/edgestacks.stackFileResponse" + } + }, + "400": { + "description": "" + }, + "500": { + "description": "" + }, + "503": { + "description": "Edge compute features are disabled" + } + } + } + }, + "/edge_stacks/{id}/status": { + "put": { + "description": "Authorized only if the request is done by an Edge Endpoint", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_stacks" + ], + "summary": "Update an EdgeStack status", + "operationId": "EdgeStackStatusUpdate", + "parameters": [ + { + "type": "string", + "description": "EdgeStack Id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.EdgeStack" + } + }, + "400": { + "description": "" + }, + "403": { + "description": "" + }, + "404": { + "description": "" + }, + "500": { + "description": "" + } + } + } + }, + "/edge_templates": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge_templates" + ], + "summary": "Fetches the list of Edge Templates", + "operationId": "EdgeTemplateList", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Template" + } + } + }, + "500": { + "description": "" + } + } + } + }, + "/endpoint_groups": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "List all endpoint groups based on the current user authorizations. Will\nreturn all endpoint groups if using an administrator account otherwise it will\nonly return authorized endpoint groups.\n**Access policy**: restricted", + "produces": [ + "application/json" + ], + "tags": [ + "endpoint_groups" + ], + "summary": "List Endpoint groups", + "operationId": "EndpointGroupList", + "responses": { + "200": { + "description": "Endpoint group", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.EndpointGroup" + } + } + }, + "500": { + "description": "Server error" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Create a new endpoint group.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "endpoint_groups" + ], + "summary": "Create an Endpoint Group", + "parameters": [ + { + "description": "Endpoint Group details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/endpointgroups.endpointGroupCreatePayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.EndpointGroup" + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/endpoint_groups/{id}": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Retrieve details abont an endpoint group.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "endpoint_groups" + ], + "summary": "Inspect an Endpoint group", + "parameters": [ + { + "type": "integer", + "description": "Endpoint group identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.EndpointGroup" + } + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "EndpointGroup not found" + }, + "500": { + "description": "Server error" + } + } + }, + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Update an endpoint group.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "endpoint_groups" + ], + "summary": "Update an endpoint group", + "operationId": "EndpointGroupUpdate", + "parameters": [ + { + "type": "integer", + "description": "EndpointGroup identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "EndpointGroup details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/endpointgroups.endpointGroupUpdatePayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.EndpointGroup" + } + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "EndpointGroup not found" + }, + "500": { + "description": "Server error" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "description": "Remove an endpoint group.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "endpoint_groups" + ], + "summary": "Remove an endpoint group", + "operationId": "EndpointGroupDelete", + "parameters": [ + { + "type": "integer", + "description": "EndpointGroup identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "EndpointGroup not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/endpoint_groups/{id}/endpoints/{endpointId}": { + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Add an endpoint to an endpoint group\n**Access policy**: administrator", + "tags": [ + "endpoint_groups" + ], + "summary": "Add an endpoint to an endpoint group", + "operationId": "EndpointGroupAddEndpoint", + "parameters": [ + { + "type": "integer", + "description": "EndpointGroup identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Endpoint identifier", + "name": "endpointId", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "EndpointGroup not found" + }, + "500": { + "description": "Server error" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "description": "**Access policy**: administrator", + "tags": [ + "endpoint_groups" + ], + "summary": "Removes endpoint from an endpoint group", + "operationId": "EndpointGroupDeleteEndpoint", + "parameters": [ + { + "type": "integer", + "description": "EndpointGroup identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Endpoint identifier", + "name": "endpointId", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "EndpointGroup not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/endpoints": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "List all endpoints based on the current user authorizations. Will\nreturn all endpoints if using an administrator account otherwise it will\nonly return authorized endpoints.\n**Access policy**: restricted", + "produces": [ + "application/json" + ], + "tags": [ + "endpoints" + ], + "summary": "List endpoints", + "operationId": "EndpointList", + "parameters": [ + { + "type": "integer", + "description": "Start searching from", + "name": "start", + "in": "query" + }, + { + "type": "string", + "description": "Search query", + "name": "search", + "in": "query" + }, + { + "type": "integer", + "description": "List endpoints of this group", + "name": "groupId", + "in": "query" + }, + { + "type": "integer", + "description": "Limit results to this value", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "description": "List endpoints of this type", + "name": "type", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "integer" + }, + "description": "search endpoints with these tags (depends on tagsPartialMatch)", + "name": "tagIds", + "in": "query" + }, + { + "type": "boolean", + "description": "If true, will return endpoint which has one of tagIds, if false (or missing) will return only endpoints that has all the tags", + "name": "tagsPartialMatch", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "integer" + }, + "description": "will return only these endpoints", + "name": "endpointIds", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Endpoints", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Endpoint" + } + } + }, + "500": { + "description": "Server error" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Create a new endpoint that will be used to manage an environment.\n**Access policy**: administrator", + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "endpoints" + ], + "summary": "Create a new endpoint", + "operationId": "EndpointCreate", + "parameters": [ + { + "type": "string", + "description": "Name that will be used to identify this endpoint (example: my-endpoint)", + "name": "Name", + "in": "formData", + "required": true + }, + { + "type": "integer", + "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", + "name": "EndpointCreationType", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "URL or IP address of a Docker host (example: docker.mydomain.tld:2375). Defaults to local if not specified (Linux: /var/run/docker.sock, Windows: //./pipe/docker_engine)", + "name": "URL", + "in": "formData" + }, + { + "type": "string", + "description": "URL or IP address where exposed containers will be reachable. Defaults to URL if not specified (example: docker.mydomain.tld:2375)", + "name": "PublicURL", + "in": "formData" + }, + { + "type": "integer", + "description": "Endpoint group identifier. If not specified will default to 1 (unassigned).", + "name": "GroupID", + "in": "formData" + }, + { + "type": "boolean", + "description": "Require TLS to connect against this endpoint", + "name": "TLS", + "in": "formData" + }, + { + "type": "boolean", + "description": "Skip server verification when using TLS", + "name": "TLSSkipVerify", + "in": "formData" + }, + { + "type": "boolean", + "description": "Skip client verification when using TLS", + "name": "TLSSkipClientVerify", + "in": "formData" + }, + { + "type": "file", + "description": "TLS CA certificate file", + "name": "TLSCACertFile", + "in": "formData" + }, + { + "type": "file", + "description": "TLS client certificate file", + "name": "TLSCertFile", + "in": "formData" + }, + { + "type": "file", + "description": "TLS client key file", + "name": "TLSKeyFile", + "in": "formData" + }, + { + "type": "string", + "description": "Azure application ID. Required if endpoint type is set to 3", + "name": "AzureApplicationID", + "in": "formData" + }, + { + "type": "string", + "description": "Azure tenant ID. Required if endpoint type is set to 3", + "name": "AzureTenantID", + "in": "formData" + }, + { + "type": "string", + "description": "Azure authentication key. Required if endpoint type is set to 3", + "name": "AzureAuthenticationKey", + "in": "formData" + }, + { + "type": "array", + "items": { + "type": "integer" + }, + "description": "List of tag identifiers to which this endpoint is associated", + "name": "TagIDs", + "in": "formData" + }, + { + "type": "integer", + "description": "The check in interval for edge agent (in seconds)", + "name": "EdgeCheckinInterval", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.Endpoint" + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/endpoints/snapshot": { + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Snapshot all endpoints\n**Access policy**: administrator", + "tags": [ + "endpoints" + ], + "summary": "Snapshot all endpoints", + "operationId": "EndpointSnapshots", + "responses": { + "204": { + "description": "Success" + }, + "500": { + "description": "Server Error" + } + } + } + }, + "/endpoints/{id}": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Retrieve details about an endpoint.\n**Access policy**: restricted", + "produces": [ + "application/json" + ], + "tags": [ + "endpoints" + ], + "summary": "Inspect an endpoint", + "operationId": "EndpointInspect", + "parameters": [ + { + "type": "integer", + "description": "Endpoint identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.Endpoint" + } + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Endpoint not found" + }, + "500": { + "description": "Server error" + } + } + }, + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Update an endpoint.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "endpoints" + ], + "summary": "Update an endpoint", + "operationId": "EndpointUpdate", + "parameters": [ + { + "type": "integer", + "description": "Endpoint identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "Endpoint details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/endpoints.endpointUpdatePayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.Endpoint" + } + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Endpoint not found" + }, + "500": { + "description": "Server error" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "description": "Remove an endpoint.\n**Access policy**: administrator", + "tags": [ + "endpoints" + ], + "summary": "Remove an endpoint", + "operationId": "EndpointDelete", + "parameters": [ + { + "type": "integer", + "description": "Endpoint identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Endpoint not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/endpoints/{id}/edge/jobs/{jobID}/logs": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge", + "endpoints" + ], + "summary": "Inspect an EdgeJob Log", + "parameters": [ + { + "type": "string", + "description": "Endpoint Id", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Job Id", + "name": "jobID", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "" + }, + "500": { + "description": "" + } + } + } + }, + "/endpoints/{id}/edge/stacks/{stackId}": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "edge", + "endpoints", + "edge_stacks" + ], + "summary": "Inspect an Edge Stack for an Endpoint", + "parameters": [ + { + "type": "string", + "description": "Endpoint Id", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "EdgeStack Id", + "name": "stackId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/endpointedge.configResponse" + } + }, + "400": { + "description": "" + }, + "404": { + "description": "" + }, + "500": { + "description": "" + } + } + } + }, + "/endpoints/{id}/snapshot": { + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Snapshots an endpoint\n**Access policy**: restricted", + "tags": [ + "endpoints" + ], + "summary": "Snapshots an endpoint", + "operationId": "EndpointSnapshot", + "parameters": [ + { + "type": "integer", + "description": "Endpoint identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Endpoint not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/endpoints/{id}/status": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Endpoint for edge agent to check status of environment\n**Access policy**: restricted only to Edge endpoints", + "tags": [ + "endpoints" + ], + "summary": "Get endpoint status", + "operationId": "EndpointStatusInspect", + "parameters": [ + { + "type": "integer", + "description": "Endpoint identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/endpoints.endpointStatusInspectResponse" + } + }, + "400": { + "description": "Invalid request" + }, + "403": { + "description": "Permission denied to access endpoint" + }, + "404": { + "description": "Endpoint not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/motd": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "motd" + ], + "summary": "fetches the message of the day", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/motd.motdResponse" + } + } + } + } + }, + "/registries": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "List all registries based on the current user authorizations.\nWill return all registries if using an administrator account otherwise it\nwill only return authorized registries.\n**Access policy**: restricted", + "produces": [ + "application/json" + ], + "tags": [ + "registries" + ], + "summary": "List Registries", + "operationId": "RegistryList", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Registry" + } + } + }, + "500": { + "description": "Server error" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Create a new registry.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "registries" + ], + "summary": "Create a new registry", + "operationId": "RegistryCreate", + "parameters": [ + { + "description": "Registry details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/registries.registryCreatePayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.Registry" + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/registries/{id}": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Retrieve details about a registry.\n**Access policy**: administrator", + "produces": [ + "application/json" + ], + "tags": [ + "registries" + ], + "summary": "Inspect a registry", + "operationId": "RegistryInspect", + "parameters": [ + { + "type": "integer", + "description": "Registry identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "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" + } + } + }, + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Update a registry\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "registries" + ], + "summary": "Update a registry", + "operationId": "RegistryUpdate", + "parameters": [ + { + "type": "integer", + "description": "Registry identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "Registry details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/registries.registryUpdatePayload" + } + } + ], + "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" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "description": "Remove a registry\n**Access policy**: administrator", + "tags": [ + "registries" + ], + "summary": "Remove a registry", + "operationId": "RegistryDelete", + "parameters": [ + { + "type": "integer", + "description": "Registry identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Registry not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/registries/{id}/configure": { + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Configures a registry.\n**Access policy**: admin", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "registries" + ], + "summary": "Configures a registry", + "operationId": "RegistryConfigure", + "parameters": [ + { + "type": "integer", + "description": "Registry identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "Registry configuration", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/registries.registryConfigurePayload" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "403": { + "description": "Permission denied" + }, + "404": { + "description": "Registry not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/resource_controls": { + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Create a new resource control to restrict access to a Docker resource.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "resource_controls" + ], + "summary": "Create a new resource control", + "operationId": "ResourceControlCreate", + "parameters": [ + { + "description": "Resource control details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/resourcecontrols.resourceControlCreatePayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.ResourceControl" + } + }, + "400": { + "description": "Invalid request" + }, + "409": { + "description": "Resource control already exists" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/resource_controls/{id}": { + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Update a resource control\n**Access policy**: restricted", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "resource_controls" + ], + "summary": "Update a resource control", + "operationId": "ResourceControlUpdate", + "parameters": [ + { + "type": "integer", + "description": "Resource control identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "Resource control details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/resourcecontrols.resourceControlUpdatePayload" + } + } + ], + "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" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "description": "Remove a resource control.\n**Access policy**: administrator", + "tags": [ + "resource_controls" + ], + "summary": "Remove a resource control", + "operationId": "ResourceControlDelete", + "parameters": [ + { + "type": "integer", + "description": "Resource control identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Resource control not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/restore": { + "post": { + "description": "Triggers a system restore using provided backup file\n**Access policy**: public", + "tags": [ + "backup" + ], + "summary": "Triggers a system restore using provided backup file", + "operationId": "Restore", + "parameters": [ + { + "description": "Content of the backup", + "name": "FileContent", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "description": "File name", + "name": "FileName", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Password to decrypt the backup with", + "name": "Password", + "in": "body", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/roles": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "List all roles available for use\n**Access policy**: administrator", + "produces": [ + "application/json" + ], + "tags": [ + "roles" + ], + "summary": "List roles", + "operationId": "RoleList", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Role" + } + } + }, + "500": { + "description": "Server error" + } + } + } + }, + "/settings": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Retrieve Portainer settings.\n**Access policy**: administrator", + "produces": [ + "application/json" + ], + "tags": [ + "settings" + ], + "summary": "Retrieve Portainer settings", + "operationId": "SettingsInspect", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.Settings" + } + }, + "500": { + "description": "Server error" + } + } + }, + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Update Portainer settings.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "settings" + ], + "summary": "Update Portainer settings", + "operationId": "SettingsUpdate", + "parameters": [ + { + "description": "New settings", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/settings.settingsUpdatePayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.Settings" + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/settings/ldap/check": { + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Test LDAP connectivity using LDAP details\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "tags": [ + "settings" + ], + "summary": "Test LDAP connectivity", + "operationId": "SettingsLDAPCheck", + "parameters": [ + { + "description": "details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/settings.settingsLDAPCheckPayload" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/settings/public": { + "get": { + "description": "Retrieve public settings. Returns a small set of settings that are not reserved to administrators only.\n**Access policy**: public", + "produces": [ + "application/json" + ], + "tags": [ + "settings" + ], + "summary": "Retrieve Portainer public settings", + "operationId": "SettingsPublic", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/settings.publicSettingsResponse" + } + }, + "500": { + "description": "Server error" + } + } + } + }, + "/stacks": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "List all stacks based on the current user authorizations.\nWill return all stacks if using an administrator account otherwise it\nwill only return the list of stacks the user have access to.\n**Access policy**: restricted", + "tags": [ + "stacks" + ], + "summary": "List stacks", + "operationId": "StackList", + "parameters": [ + { + "type": "string", + "description": "Filters to process on the stack list. Encoded as JSON (a map[string]string). For example, {", + "name": "filters", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Stack" + } + } + }, + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Deploy a new stack into a Docker environment specified via the endpoint identifier.\n**Access policy**: restricted", + "consumes": [ + "application/json", + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "stacks" + ], + "summary": "Deploy a new stack", + "operationId": "StackCreate", + "parameters": [ + { + "enum": [ + 1, + 2 + ], + "type": "integer", + "description": "Stack deployment type. Possible values: 1 (Swarm stack) or 2 (Compose stack).", + "name": "type", + "in": "query", + "required": true + }, + { + "enum": [ + "string", + "file", + "repository" + ], + "type": "string", + "description": "Stack deployment method. Possible values: file, string or repository.", + "name": "method", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "Identifier of the endpoint that will be used to deploy the stack", + "name": "endpointId", + "in": "query", + "required": true + }, + { + "description": "Required when using method=string and type=1", + "name": "body_swarm_string", + "in": "body", + "schema": { + "$ref": "#/definitions/stacks.swarmStackFromFileContentPayload" + } + }, + { + "description": "Required when using method=repository and type=1", + "name": "body_swarm_repository", + "in": "body", + "schema": { + "$ref": "#/definitions/stacks.swarmStackFromGitRepositoryPayload" + } + }, + { + "description": "Required when using method=string and type=2", + "name": "body_compose_string", + "in": "body", + "schema": { + "$ref": "#/definitions/stacks.composeStackFromFileContentPayload" + } + }, + { + "description": "Required when using method=repository and type=2", + "name": "body_compose_repository", + "in": "body", + "schema": { + "$ref": "#/definitions/stacks.composeStackFromGitRepositoryPayload" + } + }, + { + "type": "string", + "description": "Name of the stack. required when method is file", + "name": "Name", + "in": "formData" + }, + { + "type": "string", + "description": "Swarm cluster identifier. Required when method equals file and type equals 1. required when method is file", + "name": "SwarmID", + "in": "formData" + }, + { + "type": "string", + "description": "Environment variables passed during deployment, represented as a JSON array [{'name': 'name', 'value': 'value'}]. Optional, used when method equals file and type equals 1.", + "name": "Env", + "in": "formData" + }, + { + "type": "file", + "description": "Stack file. required when method is file", + "name": "file", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.CustomTemplate" + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/stacks/{id}": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Retrieve details about a stack.\n**Access policy**: restricted", + "produces": [ + "application/json" + ], + "tags": [ + "stacks" + ], + "summary": "Inspect a stack", + "operationId": "StackInspect", + "parameters": [ + { + "type": "integer", + "description": "Stack identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "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" + } + } + }, + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Update a stack.\n**Access policy**: restricted", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "stacks" + ], + "summary": "Update a stack", + "operationId": "StackUpdate", + "parameters": [ + { + "type": "integer", + "description": "Stack identifier", + "name": "id", + "in": "path", + "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.", + "name": "endpointId", + "in": "query" + }, + { + "description": "Stack details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/stacks.updateSwarmStackPayload" + } + } + ], + "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" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "description": "Remove a stack.\n**Access policy**: restricted", + "tags": [ + "stacks" + ], + "summary": "Remove a stack", + "operationId": "StackDelete", + "parameters": [ + { + "type": "integer", + "description": "Stack identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "Set to true to delete an external stack. Only external Swarm stacks are supported", + "name": "external", + "in": "query" + }, + { + "type": "integer", + "description": "Endpoint identifier used to remove an external stack (required when external is set to true)", + "name": "endpointId", + "in": "query" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "403": { + "description": "Permission denied" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/stacks/{id}/file": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Get Stack file content.\n**Access policy**: restricted", + "produces": [ + "application/json" + ], + "tags": [ + "stacks" + ], + "summary": "Retrieve the content of the Stack file for the specified stack", + "operationId": "StackFileInspect", + "parameters": [ + { + "type": "integer", + "description": "Stack identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "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" + } + } + } + }, + "/stacks/{id}/git": { + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Pull and redeploy a stack via Git\n**Access policy**: restricted", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "stacks" + ], + "summary": "Redeploy a stack", + "operationId": "StackUpdateGit", + "parameters": [ + { + "type": "integer", + "description": "Stack identifier", + "name": "id", + "in": "path", + "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.", + "name": "endpointId", + "in": "query" + }, + { + "description": "Git configs for pull and redeploy a stack", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/stacks.updateStackGitPayload" + } + } + ], + "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" + } + } + } + }, + "/stacks/{id}/migrate": { + "post": { + "security": [ + { + "jwt": [] + } + ], + "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.\n**Access policy**: restricted", + "produces": [ + "application/json" + ], + "tags": [ + "stacks" + ], + "summary": "Migrate a stack to another endpoint", + "operationId": "StackMigrate", + "parameters": [ + { + "type": "integer", + "description": "Stack identifier", + "name": "id", + "in": "path", + "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.", + "name": "endpointId", + "in": "query" + }, + { + "description": "Stack migration details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/stacks.stackMigratePayload" + } + } + ], + "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" + } + } + } + }, + "/stacks/{id}/start": { + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Starts a stopped Stack.\n**Access policy**: restricted", + "tags": [ + "stacks" + ], + "summary": "Starts a stopped Stack", + "operationId": "StackStart", + "parameters": [ + { + "type": "integer", + "description": "Stack identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "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" + } + } + } + }, + "/stacks/{id}/stop": { + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Stops a stopped Stack.\n**Access policy**: restricted", + "tags": [ + "stacks" + ], + "summary": "Stops a stopped Stack", + "operationId": "StackStop", + "parameters": [ + { + "type": "integer", + "description": "Stack identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "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" + } + } + } + }, + "/status": { + "get": { + "description": "Retrieve Portainer status\n**Access policy**: public", + "produces": [ + "application/json" + ], + "tags": [ + "status" + ], + "summary": "Check Portainer status", + "operationId": "StatusInspect", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.Status" + } + } + } + } + }, + "/status/version": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Check if portainer has an update available\n**Access policy**: authenticated", + "produces": [ + "application/json" + ], + "tags": [ + "status" + ], + "summary": "Check for portainer updates", + "operationId": "StatusInspectVersion", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/status.inspectVersionResponse" + } + } + } + } + }, + "/tags": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "List tags.\n**Access policy**: administrator", + "produces": [ + "application/json" + ], + "tags": [ + "tags" + ], + "summary": "List tags", + "operationId": "TagList", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Tag" + } + } + }, + "500": { + "description": "Server error" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Create a new tag.\n**Access policy**: administrator", + "produces": [ + "application/json" + ], + "tags": [ + "tags" + ], + "summary": "Create a new tag", + "operationId": "TagCreate", + "parameters": [ + { + "description": "Tag details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/tags.tagCreatePayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.Tag" + } + }, + "409": { + "description": "Tag name exists" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/tags/{id}": { + "delete": { + "security": [ + { + "jwt": [] + } + ], + "description": "Remove a tag.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "tags" + ], + "summary": "Remove a tag", + "operationId": "TagDelete", + "parameters": [ + { + "type": "integer", + "description": "Tag identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "403": { + "description": "Permission denied" + }, + "404": { + "description": "Tag not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/team": { + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Create a new team.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "teams" + ], + "summary": "Create a new team", + "operationId": "TeamCreate", + "parameters": [ + { + "description": "details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/teams.teamCreatePayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.Team" + } + }, + "400": { + "description": "Invalid request" + }, + "409": { + "description": "Team already exists" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/team/{id}": { + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Update a team.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "" + ], + "summary": "Update a team", + "operationId": "TeamUpdate", + "parameters": [ + { + "type": "integer", + "description": "Team identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "Team details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/teams.teamUpdatePayload" + } + } + ], + "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" + } + } + } + }, + "/team_memberships": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "List team memberships. Access is only available to administrators and team leaders.\n**Access policy**: admin", + "produces": [ + "application/json" + ], + "tags": [ + "team_memberships" + ], + "summary": "List team memberships", + "operationId": "TeamMembershipList", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.TeamMembership" + } + } + }, + "400": { + "description": "Invalid request" + }, + "403": { + "description": "Permission denied" + }, + "500": { + "description": "Server error" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Create a new team memberships. Access is only available to administrators leaders of the associated team.\n**Access policy**: admin", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "team_memberships" + ], + "summary": "Create a new team membership", + "operationId": "TeamMembershipCreate", + "parameters": [ + { + "description": "Team membership details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/teammemberships.teamMembershipCreatePayload" + } + } + ], + "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" + } + } + } + }, + "/team_memberships/{id}": { + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Update a team membership. Access is only available to administrators leaders of the associated team.\n**Access policy**: restricted", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "team_memberships" + ], + "summary": "Update a team membership", + "operationId": "TeamMembershipUpdate", + "parameters": [ + { + "type": "integer", + "description": "Team membership identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "Team membership details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/teammemberships.teamMembershipUpdatePayload" + } + } + ], + "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" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "description": "Remove a team membership. Access is only available to administrators leaders of the associated team.\n**Access policy**: restricted", + "tags": [ + "team_memberships" + ], + "summary": "Remove a team membership", + "operationId": "TeamMembershipDelete", + "parameters": [ + { + "type": "integer", + "description": "TeamMembership identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "403": { + "description": "Permission denied" + }, + "404": { + "description": "TeamMembership not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/teams": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "List teams. For non-administrator users, will only list the teams they are member of.\n**Access policy**: restricted", + "produces": [ + "application/json" + ], + "tags": [ + "teams" + ], + "summary": "List teams", + "operationId": "TeamList", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Team" + } + } + }, + "500": { + "description": "Server error" + } + } + } + }, + "/teams/{id}": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Retrieve details about a team. Access is only available for administrator and leaders of that team.\n**Access policy**: restricted", + "produces": [ + "application/json" + ], + "tags": [ + "teams" + ], + "summary": "Inspect a team", + "operationId": "TeamInspect", + "parameters": [ + { + "type": "integer", + "description": "Team identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "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" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "description": "Remove a team.\n**Access policy**: administrator", + "tags": [ + "teams" + ], + "summary": "Remove a team", + "operationId": "TeamDelete", + "parameters": [ + { + "type": "string", + "description": "Team Id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "403": { + "description": "Permission denied" + }, + "404": { + "description": "Team not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/teams/{id}/memberships": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "List team memberships. Access is only available to administrators and team leaders.\n**Access policy**: restricted", + "produces": [ + "application/json" + ], + "tags": [ + "team_memberships" + ], + "summary": "List team memberships", + "operationId": "TeamMemberships", + "parameters": [ + { + "type": "string", + "description": "Team Id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.TeamMembership" + } + } + }, + "400": { + "description": "Invalid request" + }, + "403": { + "description": "Permission denied" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/templates": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "List available templates.\n**Access policy**: restricted", + "produces": [ + "application/json" + ], + "tags": [ + "templates" + ], + "summary": "List available templates", + "operationId": "TemplateList", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/templates.listResponse" + } + }, + "500": { + "description": "Server error" + } + } + } + }, + "/templates/file": { + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Get a template's file\n**Access policy**: restricted", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "templates" + ], + "summary": "Get a template's file", + "operationId": "TemplateFile", + "parameters": [ + { + "description": "File details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/templates.filePayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/templates.fileResponse" + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/upload/tls/{certificate}": { + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Use this endpoint to upload TLS files.\n**Access policy**: administrator", + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "upload" + ], + "summary": "Upload TLS files", + "operationId": "UploadTLS", + "parameters": [ + { + "enum": [ + "ca", + "cert", + "key" + ], + "type": "string", + "description": "TLS file type. Valid values are 'ca', 'cert' or 'key'.", + "name": "certificate", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Folder where the TLS file will be stored. Will be created if not existing", + "name": "folder", + "in": "formData", + "required": true + }, + { + "type": "file", + "description": "The file to upload", + "name": "file", + "in": "formData", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/users": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "List Portainer users.\nNon-administrator users will only be able to list other non-administrator user accounts.\n**Access policy**: restricted", + "produces": [ + "application/json" + ], + "tags": [ + "users" + ], + "summary": "List users", + "operationId": "UserList", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.User" + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Server error" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "description": "Create a new Portainer user.\nOnly team leaders and administrators can create users.\nOnly administrators can create an administrator user account.\n**Access policy**: restricted", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "users" + ], + "summary": "Create a new user", + "operationId": "UserCreate", + "parameters": [ + { + "description": "User details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/users.userCreatePayload" + } + } + ], + "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" + } + } + } + }, + "/users/admin/check": { + "get": { + "description": "Check if an administrator account exists in the database.\n**Access policy**: public", + "tags": [ + "users" + ], + "summary": "Check administrator account existence", + "operationId": "UserAdminCheck", + "responses": { + "204": { + "description": "Success" + }, + "404": { + "description": "User not found" + } + } + } + }, + "/users/admin/init": { + "post": { + "description": "Initialize the 'admin' user account.\n**Access policy**: public", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "" + ], + "summary": "Initialize administrator account", + "operationId": "UserAdminInit", + "parameters": [ + { + "description": "User details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/users.adminInitPayload" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.User" + } + }, + "400": { + "description": "Invalid request" + }, + "409": { + "description": "Admin user already initialized" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/users/{id}": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Retrieve details about a user.\n**Access policy**: administrator", + "produces": [ + "application/json" + ], + "tags": [ + "users" + ], + "summary": "Inspect a user", + "operationId": "UserInspect", + "parameters": [ + { + "type": "integer", + "description": "User identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "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" + } + } + }, + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Update user details. A regular user account can only update his details.\n**Access policy**: authenticated", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "users" + ], + "summary": "Update a user", + "operationId": "UserUpdate", + "parameters": [ + { + "type": "integer", + "description": "User identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "User details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/users.userUpdatePayload" + } + } + ], + "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" + } + } + }, + "delete": { + "security": [ + { + "jwt": [] + } + ], + "description": "Remove a user.\n**Access policy**: administrator", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "users" + ], + "summary": "Remove a user", + "operationId": "UserDelete", + "parameters": [ + { + "type": "integer", + "description": "User identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "403": { + "description": "Permission denied" + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/users/{id}/memberships": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "Inspect a user memberships.\n**Access policy**: authenticated", + "produces": [ + "application/json" + ], + "tags": [ + "users" + ], + "summary": "Inspect a user memberships", + "operationId": "UserMembershipsInspect", + "parameters": [ + { + "type": "integer", + "description": "User identifier", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/portainer.TeamMembership" + } + }, + "400": { + "description": "Invalid request" + }, + "403": { + "description": "Permission denied" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/users/{id}/passwd": { + "put": { + "security": [ + { + "jwt": [] + } + ], + "description": "Update password for the specified user.\n**Access policy**: authenticated", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "users" + ], + "summary": "Update password for a user", + "operationId": "UserUpdatePassword", + "parameters": [ + { + "type": "integer", + "description": "identifier", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "details", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/users.userUpdatePasswordPayload" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request" + }, + "403": { + "description": "Permission denied" + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/webhooks": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "List webhooks", + "parameters": [ + { + "description": "Webhook data", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/webhooks.webhookCreatePayload" + } + }, + { + "type": "integer", + "name": "EndpointID", + "in": "query" + }, + { + "type": "string", + "name": "ResourceID", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Webhook" + } + } + }, + "400": { + "description": "" + }, + "500": { + "description": "" + } + } + }, + "post": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Create a webhook", + "parameters": [ + { + "description": "Webhook data", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/webhooks.webhookCreatePayload" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/portainer.Webhook" + } + }, + "400": { + "description": "" + }, + "409": { + "description": "" + }, + "500": { + "description": "" + } + } + } + }, + "/webhooks/{id}": { + "delete": { + "security": [ + { + "jwt": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Delete a webhook", + "parameters": [ + { + "type": "integer", + "description": "Webhook id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "description": "Webhook deleted" + }, + "400": { + "description": "" + }, + "500": { + "description": "" + } + } + } + }, + "/webhooks/{token}": { + "post": { + "description": "Acts on a passed in token UUID to restart the docker service", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Execute a webhook", + "parameters": [ + { + "type": "string", + "description": "Webhook token", + "name": "token", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "description": "Webhook executed" + }, + "400": { + "description": "" + }, + "500": { + "description": "" + } + } + } + }, + "/websocket/attach": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "If the nodeName query parameter is present, the request will be proxied to the underlying agent endpoint.\nIf the nodeName query parameter is not specified, the request will be upgraded to the websocket protocol and\nan AttachStart operation HTTP request will be created and hijacked.\nAuthentication and access is controlled via the mandatory token query parameter.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "websocket" + ], + "summary": "Attach a websocket", + "parameters": [ + { + "type": "integer", + "description": "endpoint ID of the endpoint where the resource is located", + "name": "endpointId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "node name", + "name": "nodeName", + "in": "query" + }, + { + "type": "string", + "description": "JWT token used for authentication against this endpoint", + "name": "token", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "" + }, + "403": { + "description": "" + }, + "404": { + "description": "" + }, + "500": { + "description": "" + } + } + } + }, + "/websocket/exec": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "If the nodeName query parameter is present, the request will be proxied to the underlying agent endpoint.\nIf the nodeName query parameter is not specified, the request will be upgraded to the websocket protocol and\nan ExecStart operation HTTP request will be created and hijacked.\nAuthentication and access is controlled via the mandatory token query parameter.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "websocket" + ], + "summary": "Execute a websocket", + "parameters": [ + { + "type": "integer", + "description": "endpoint ID of the endpoint where the resource is located", + "name": "endpointId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "node name", + "name": "nodeName", + "in": "query" + }, + { + "type": "string", + "description": "JWT token used for authentication against this endpoint", + "name": "token", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "" + }, + "409": { + "description": "" + }, + "500": { + "description": "" + } + } + } + }, + "/websocket/pod": { + "get": { + "security": [ + { + "jwt": [] + } + ], + "description": "The request will be upgraded to the websocket protocol.\nAuthentication and access is controlled via the mandatory token query parameter.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "websocket" + ], + "summary": "Execute a websocket on pod", + "parameters": [ + { + "type": "integer", + "description": "endpoint ID of the endpoint where the resource is located", + "name": "endpointId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "namespace where the container is located", + "name": "namespace", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "name of the pod containing the container", + "name": "podName", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "name of the container", + "name": "containerName", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "command to execute in the container", + "name": "command", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "JWT token used for authentication against this endpoint", + "name": "token", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "" + }, + "403": { + "description": "" + }, + "404": { + "description": "" + }, + "500": { + "description": "" + } + } + } + } + }, + "definitions": { + "auth.authenticatePayload": { + "type": "object", + "required": [ + "password", + "username" + ], + "properties": { + "password": { + "description": "Password", + "type": "string", + "example": "mypassword" + }, + "username": { + "description": "Username", + "type": "string", + "example": "admin" + } + } + }, + "auth.authenticateResponse": { + "type": "object", + "properties": { + "jwt": { + "description": "JWT token used to authenticate against the API", + "type": "string", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInJvbGUiOjEsImV4cCI6MTQ5OTM3NjE1NH0.NJ6vE8FY1WG6jsRQzfMqeatJ4vh2TWAeeYfDhP71YEE" + } + } + }, + "auth.oauthPayload": { + "type": "object", + "properties": { + "code": { + "description": "OAuth code returned from OAuth Provided", + "type": "string" + } + } + }, + "customtemplates.customTemplateFromFileContentPayload": { + "type": "object", + "required": [ + "description", + "fileContent", + "platform", + "title", + "type" + ], + "properties": { + "description": { + "description": "Description of the template", + "type": "string", + "example": "High performance web server" + }, + "fileContent": { + "description": "Content of stack file", + "type": "string" + }, + "logo": { + "description": "URL of the template's logo", + "type": "string", + "example": "https://cloudinovasi.id/assets/img/logos/nginx.png" + }, + "note": { + "description": "A note that will be displayed in the UI. Supports HTML content", + "type": "string", + "example": "This is my \u003cb\u003ecustom\u003c/b\u003e template" + }, + "platform": { + "description": "Platform associated to the template.\nValid values are: 1 - 'linux', 2 - 'windows'", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": 1 + }, + "title": { + "description": "Title of the template", + "type": "string", + "example": "Nginx" + }, + "type": { + "description": "Type of created stack (1 - swarm, 2 - compose)", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": 1 + } + } + }, + "customtemplates.customTemplateFromGitRepositoryPayload": { + "type": "object", + "required": [ + "description", + "platform", + "repositoryURL", + "title", + "type" + ], + "properties": { + "composeFilePathInRepository": { + "description": "Path to the Stack file inside the Git repository", + "type": "string", + "default": "docker-compose.yml", + "example": "docker-compose.yml" + }, + "description": { + "description": "Description of the template", + "type": "string", + "example": "High performance web server" + }, + "logo": { + "description": "URL of the template's logo", + "type": "string", + "example": "https://cloudinovasi.id/assets/img/logos/nginx.png" + }, + "note": { + "description": "A note that will be displayed in the UI. Supports HTML content", + "type": "string", + "example": "This is my \u003cb\u003ecustom\u003c/b\u003e template" + }, + "platform": { + "description": "Platform associated to the template.\nValid values are: 1 - 'linux', 2 - 'windows'", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": 1 + }, + "repositoryAuthentication": { + "description": "Use basic authentication to clone the Git repository", + "type": "boolean", + "example": true + }, + "repositoryPassword": { + "description": "Password used in basic authentication. Required when RepositoryAuthentication is true.", + "type": "string", + "example": "myGitPassword" + }, + "repositoryReferenceName": { + "description": "Reference name of a Git repository hosting the Stack file", + "type": "string", + "example": "refs/heads/master" + }, + "repositoryURL": { + "description": "URL of a Git repository hosting the Stack file", + "type": "string", + "example": "https://github.com/openfaas/faas" + }, + "repositoryUsername": { + "description": "Username used in basic authentication. Required when RepositoryAuthentication is true.", + "type": "string", + "example": "myGitUsername" + }, + "title": { + "description": "Title of the template", + "type": "string", + "example": "Nginx" + }, + "type": { + "description": "Type of created stack (1 - swarm, 2 - compose)", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": 1 + } + } + }, + "customtemplates.customTemplateUpdatePayload": { + "type": "object", + "required": [ + "description", + "fileContent", + "platform", + "title", + "type" + ], + "properties": { + "description": { + "description": "Description of the template", + "type": "string", + "example": "High performance web server" + }, + "fileContent": { + "description": "Content of stack file", + "type": "string" + }, + "logo": { + "description": "URL of the template's logo", + "type": "string", + "example": "https://cloudinovasi.id/assets/img/logos/nginx.png" + }, + "note": { + "description": "A note that will be displayed in the UI. Supports HTML content", + "type": "string", + "example": "This is my \u003cb\u003ecustom\u003c/b\u003e template" + }, + "platform": { + "description": "Platform associated to the template.\nValid values are: 1 - 'linux', 2 - 'windows'", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": 1 + }, + "title": { + "description": "Title of the template", + "type": "string", + "example": "Nginx" + }, + "type": { + "description": "Type of created stack (1 - swarm, 2 - compose)", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": 1 + } + } + }, + "customtemplates.fileResponse": { + "type": "object", + "properties": { + "fileContent": { + "type": "string" + } + } + }, + "dockerhub.dockerhubUpdatePayload": { + "type": "object", + "required": [ + "authentication", + "password", + "username" + ], + "properties": { + "authentication": { + "description": "Enable authentication against DockerHub", + "type": "boolean", + "example": false + }, + "password": { + "description": "Password used to authenticate against the DockerHub", + "type": "string", + "example": "hub_password" + }, + "username": { + "description": "Username used to authenticate against the DockerHub", + "type": "string", + "example": "hub_user" + } + } + }, + "edgegroups.edgeGroupCreatePayload": { + "type": "object", + "properties": { + "dynamic": { + "type": "boolean" + }, + "endpoints": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "partialMatch": { + "type": "boolean" + }, + "tagIDs": { + "type": "array", + "items": { + "description": "Tag identifier", + "type": "integer", + "example": 1 + } + } + } + }, + "edgegroups.edgeGroupUpdatePayload": { + "type": "object", + "properties": { + "dynamic": { + "type": "boolean" + }, + "endpoints": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "partialMatch": { + "type": "boolean" + }, + "tagIDs": { + "type": "array", + "items": { + "description": "Tag identifier", + "type": "integer", + "example": 1 + } + } + } + }, + "edgejobs.edgeJobCreateFromFileContentPayload": { + "type": "object", + "properties": { + "cronExpression": { + "type": "string" + }, + "endpoints": { + "type": "array", + "items": { + "type": "integer" + } + }, + "fileContent": { + "type": "string" + }, + "name": { + "type": "string" + }, + "recurring": { + "type": "boolean" + } + } + }, + "edgejobs.edgeJobCreateFromFilePayload": { + "type": "object", + "properties": { + "cronExpression": { + "type": "string" + }, + "endpoints": { + "type": "array", + "items": { + "type": "integer" + } + }, + "file": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "recurring": { + "type": "boolean" + } + } + }, + "edgejobs.edgeJobFileResponse": { + "type": "object", + "properties": { + "FileContent": { + "type": "string" + } + } + }, + "edgejobs.edgeJobUpdatePayload": { + "type": "object", + "properties": { + "cronExpression": { + "type": "string" + }, + "endpoints": { + "type": "array", + "items": { + "type": "integer" + } + }, + "fileContent": { + "type": "string" + }, + "name": { + "type": "string" + }, + "recurring": { + "type": "boolean" + } + } + }, + "edgejobs.fileResponse": { + "type": "object", + "properties": { + "FileContent": { + "type": "string" + } + } + }, + "edgejobs.taskContainer": { + "type": "object", + "properties": { + "EndpointId": { + "type": "integer" + }, + "Id": { + "type": "string" + }, + "LogsStatus": { + "type": "integer" + } + } + }, + "edgestacks.stackFileResponse": { + "type": "object", + "properties": { + "StackFileContent": { + "type": "string" + } + } + }, + "edgestacks.swarmStackFromFileContentPayload": { + "type": "object", + "required": [ + "name", + "stackFileContent" + ], + "properties": { + "edgeGroups": { + "description": "List of identifiers of EdgeGroups", + "type": "array", + "items": { + "description": "EdgeGroup Identifier", + "type": "integer", + "example": 1 + }, + "example": [ + 1 + ] + }, + "name": { + "description": "Name of the stack", + "type": "string", + "example": "myStack" + }, + "stackFileContent": { + "description": "Content of the Stack file", + "type": "string", + "example": "version: 3\n services:\n web:\n image:nginx" + } + } + }, + "edgestacks.swarmStackFromFileUploadPayload": { + "type": "object", + "properties": { + "edgeGroups": { + "type": "array", + "items": { + "description": "EdgeGroup Identifier", + "type": "integer", + "example": 1 + } + }, + "name": { + "type": "string" + }, + "stackFileContent": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "edgestacks.swarmStackFromGitRepositoryPayload": { + "type": "object", + "required": [ + "name", + "repositoryURL" + ], + "properties": { + "composeFilePathInRepository": { + "description": "Path to the Stack file inside the Git repository", + "type": "string", + "default": "docker-compose.yml", + "example": "docker-compose.yml" + }, + "edgeGroups": { + "description": "List of identifiers of EdgeGroups", + "type": "array", + "items": { + "description": "EdgeGroup Identifier", + "type": "integer", + "example": 1 + }, + "example": [ + 1 + ] + }, + "name": { + "description": "Name of the stack", + "type": "string", + "example": "myStack" + }, + "repositoryAuthentication": { + "description": "Use basic authentication to clone the Git repository", + "type": "boolean", + "example": true + }, + "repositoryPassword": { + "description": "Password used in basic authentication. Required when RepositoryAuthentication is true.", + "type": "string", + "example": "myGitPassword" + }, + "repositoryReferenceName": { + "description": "Reference name of a Git repository hosting the Stack file", + "type": "string", + "example": "refs/heads/master" + }, + "repositoryURL": { + "description": "URL of a Git repository hosting the Stack file", + "type": "string", + "example": "https://github.com/openfaas/faas" + }, + "repositoryUsername": { + "description": "Username used in basic authentication. Required when RepositoryAuthentication is true.", + "type": "string", + "example": "myGitUsername" + } + } + }, + "edgestacks.updateEdgeStackPayload": { + "type": "object", + "properties": { + "edgeGroups": { + "type": "array", + "items": { + "description": "EdgeGroup Identifier", + "type": "integer", + "example": 1 + } + }, + "prune": { + "type": "boolean" + }, + "stackFileContent": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "endpointedge.configResponse": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "prune": { + "type": "boolean" + }, + "stackFileContent": { + "type": "string" + } + } + }, + "endpointgroups.endpointGroupCreatePayload": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "associatedEndpoints": { + "description": "List of endpoint identifiers that will be part of this group", + "type": "array", + "items": { + "type": "integer" + }, + "example": [ + 1, + 3 + ] + }, + "description": { + "description": "Endpoint group description", + "type": "string", + "example": "description" + }, + "name": { + "description": "Endpoint group name", + "type": "string", + "example": "my-endpoint-group" + }, + "tagIDs": { + "description": "List of tag identifiers to which this endpoint group is associated", + "type": "array", + "items": { + "description": "Tag identifier", + "type": "integer", + "example": 1 + }, + "example": [ + 1, + 2 + ] + } + } + }, + "endpointgroups.endpointGroupUpdatePayload": { + "type": "object", + "properties": { + "description": { + "description": "Endpoint group description", + "type": "string", + "example": "description" + }, + "name": { + "description": "Endpoint group name", + "type": "string", + "example": "my-endpoint-group" + }, + "tagIDs": { + "description": "List of tag identifiers associated to the endpoint group", + "type": "array", + "items": { + "description": "Tag identifier", + "type": "integer", + "example": 1 + }, + "example": [ + 3, + 4 + ] + }, + "teamAccessPolicies": { + "$ref": "#/definitions/portainer.TeamAccessPolicies" + }, + "userAccessPolicies": { + "$ref": "#/definitions/portainer.UserAccessPolicies" + } + } + }, + "endpoints.edgeJobResponse": { + "type": "object", + "properties": { + "CollectLogs": { + "description": "Whether to collect logs", + "type": "boolean", + "example": true + }, + "CronExpression": { + "description": "A cron expression to schedule this job", + "type": "string", + "example": "* * * * *" + }, + "Id": { + "description": "EdgeJob Identifier", + "type": "integer", + "example": 2 + }, + "Script": { + "description": "Script to run", + "type": "string", + "example": "echo hello" + }, + "Version": { + "description": "Version of this EdgeJob", + "type": "integer", + "example": 2 + } + } + }, + "endpoints.endpointSettingsUpdatePayload": { + "type": "object", + "properties": { + "allowBindMountsForRegularUsers": { + "description": "Whether non-administrator should be able to use bind mounts when creating containers", + "type": "boolean", + "example": false + }, + "allowContainerCapabilitiesForRegularUsers": { + "description": "Whether non-administrator should be able to use container capabilities", + "type": "boolean", + "example": true + }, + "allowDeviceMappingForRegularUsers": { + "description": "Whether non-administrator should be able to use device mapping", + "type": "boolean", + "example": true + }, + "allowHostNamespaceForRegularUsers": { + "description": "Whether non-administrator should be able to use the host pid", + "type": "boolean", + "example": true + }, + "allowPrivilegedModeForRegularUsers": { + "description": "Whether non-administrator should be able to use privileged mode when creating containers", + "type": "boolean", + "example": false + }, + "allowStackManagementForRegularUsers": { + "description": "Whether non-administrator should be able to manage stacks", + "type": "boolean", + "example": true + }, + "allowSysctlSettingForRegularUsers": { + "description": "Whether non-administrator should be able to use sysctl settings", + "type": "boolean", + "example": true + }, + "allowVolumeBrowserForRegularUsers": { + "description": "Whether non-administrator should be able to browse volumes", + "type": "boolean", + "example": true + }, + "enableHostManagementFeatures": { + "description": "Whether host management features are enabled", + "type": "boolean", + "example": true + } + } + }, + "endpoints.endpointStatusInspectResponse": { + "type": "object", + "properties": { + "checkin": { + "description": "The current value of CheckinInterval", + "type": "integer", + "example": 5 + }, + "credentials": { + "type": "string" + }, + "port": { + "description": "The tunnel port", + "type": "integer", + "example": 8732 + }, + "schedules": { + "description": "List of requests for jobs to run on the endpoint", + "type": "array", + "items": { + "$ref": "#/definitions/endpoints.edgeJobResponse" + } + }, + "stacks": { + "description": "List of stacks to be deployed on the endpoints", + "type": "array", + "items": { + "$ref": "#/definitions/endpoints.stackStatusResponse" + } + }, + "status": { + "description": "Status represents the endpoint status", + "type": "string", + "example": "REQUIRED" + } + } + }, + "endpoints.endpointUpdatePayload": { + "type": "object", + "properties": { + "azureApplicationID": { + "description": "Azure application ID", + "type": "string", + "example": "eag7cdo9-o09l-9i83-9dO9-f0b23oe78db4" + }, + "azureAuthenticationKey": { + "description": "Azure authentication key", + "type": "string", + "example": "cOrXoK/1D35w8YQ8nH1/8ZGwzz45JIYD5jxHKXEQknk=" + }, + "azureTenantID": { + "description": "Azure tenant ID", + "type": "string", + "example": "34ddc78d-4fel-2358-8cc1-df84c8o839f5" + }, + "edgeCheckinInterval": { + "description": "The check in interval for edge agent (in seconds)", + "type": "integer", + "example": 5 + }, + "groupID": { + "description": "Group identifier", + "type": "integer", + "example": 1 + }, + "kubernetes": { + "description": "Associated Kubernetes data", + "$ref": "#/definitions/portainer.KubernetesData" + }, + "name": { + "description": "Name that will be used to identify this endpoint", + "type": "string", + "example": "my-endpoint" + }, + "publicURL": { + "description": "URL or IP address where exposed containers will be reachable.\\\nDefaults to URL if not specified", + "type": "string", + "example": "docker.mydomain.tld:2375" + }, + "status": { + "description": "The status of the endpoint (1 - up, 2 - down)", + "type": "integer", + "example": 1 + }, + "tagIDs": { + "description": "List of tag identifiers to which this endpoint is associated", + "type": "array", + "items": { + "description": "Tag identifier", + "type": "integer", + "example": 1 + }, + "example": [ + 1, + 2 + ] + }, + "teamAccessPolicies": { + "$ref": "#/definitions/portainer.TeamAccessPolicies" + }, + "tls": { + "description": "Require TLS to connect against this endpoint", + "type": "boolean", + "example": true + }, + "tlsskipClientVerify": { + "description": "Skip client verification when using TLS", + "type": "boolean", + "example": false + }, + "tlsskipVerify": { + "description": "Skip server verification when using TLS", + "type": "boolean", + "example": false + }, + "url": { + "description": "URL or IP address of a Docker host", + "type": "string", + "example": "docker.mydomain.tld:2375" + }, + "userAccessPolicies": { + "$ref": "#/definitions/portainer.UserAccessPolicies" + } + } + }, + "endpoints.stackStatusResponse": { + "type": "object", + "properties": { + "id": { + "description": "EdgeStack Identifier", + "type": "integer", + "example": 1 + }, + "version": { + "description": "Version of this stack", + "type": "integer", + "example": 3 + } + } + }, + "gittypes.RepoConfig": { + "type": "object", + "properties": { + "configFilePath": { + "description": "Path to where the config file is in this url/refName", + "type": "string", + "example": "docker-compose.yml" + }, + "referenceName": { + "description": "The reference name", + "type": "string", + "example": "refs/heads/branch_name" + }, + "url": { + "description": "The repo url", + "type": "string", + "example": "https://github.com/portainer/portainer-ee.git" + } + } + }, + "motd.motdResponse": { + "type": "object", + "properties": { + "ContentLayout": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Hash": { + "type": "array", + "items": { + "type": "integer" + } + }, + "Message": { + "type": "string" + }, + "Style": { + "type": "string" + }, + "Title": { + "type": "string" + } + } + }, + "portainer.AccessPolicy": { + "type": "object", + "properties": { + "RoleId": { + "description": "Role identifier. Reference the role that will be associated to this access policy", + "type": "integer", + "example": 1 + } + } + }, + "portainer.Authorizations": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "portainer.AzureCredentials": { + "type": "object", + "properties": { + "ApplicationID": { + "description": "Azure application ID", + "type": "string", + "example": "eag7cdo9-o09l-9i83-9dO9-f0b23oe78db4" + }, + "AuthenticationKey": { + "description": "Azure authentication key", + "type": "string", + "example": "cOrXoK/1D35w8YQ8nH1/8ZGwzz45JIYD5jxHKXEQknk=" + }, + "TenantID": { + "description": "Azure tenant ID", + "type": "string", + "example": "34ddc78d-4fel-2358-8cc1-df84c8o839f5" + } + } + }, + "portainer.CustomTemplate": { + "type": "object", + "properties": { + "CreatedByUserId": { + "description": "User identifier who created this template", + "type": "integer", + "example": 3 + }, + "Description": { + "description": "Description of the template", + "type": "string", + "example": "High performance web server" + }, + "EntryPoint": { + "description": "Path to the Stack file", + "type": "string", + "example": "docker-compose.yml" + }, + "Id": { + "description": "CustomTemplate Identifier", + "type": "integer", + "example": 1 + }, + "Logo": { + "description": "URL of the template's logo", + "type": "string", + "example": "https://cloudinovasi.id/assets/img/logos/nginx.png" + }, + "Note": { + "description": "A note that will be displayed in the UI. Supports HTML content", + "type": "string", + "example": "This is my \u003cb\u003ecustom\u003c/b\u003e template" + }, + "Platform": { + "description": "Platform associated to the template.\nValid values are: 1 - 'linux', 2 - 'windows'", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": 1 + }, + "ProjectPath": { + "description": "Path on disk to the repository hosting the Stack file", + "type": "string", + "example": "/data/custom_template/3" + }, + "ResourceControl": { + "$ref": "#/definitions/portainer.ResourceControl" + }, + "Title": { + "description": "Title of the template", + "type": "string", + "example": "Nginx" + }, + "Type": { + "description": "Type of created stack (1 - swarm, 2 - compose)", + "type": "integer", + "example": 1 + } + } + }, + "portainer.DockerHub": { + "type": "object", + "properties": { + "Authentication": { + "description": "Is authentication against DockerHub enabled", + "type": "boolean", + "example": true + }, + "Password": { + "description": "Password used to authenticate against the DockerHub", + "type": "string", + "example": "passwd" + }, + "Username": { + "description": "Username used to authenticate against the DockerHub", + "type": "string", + "example": "user" + } + } + }, + "portainer.DockerSnapshot": { + "type": "object", + "properties": { + "DockerSnapshotRaw": { + "$ref": "#/definitions/portainer.DockerSnapshotRaw" + }, + "DockerVersion": { + "type": "string" + }, + "HealthyContainerCount": { + "type": "integer" + }, + "ImageCount": { + "type": "integer" + }, + "NodeCount": { + "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" + } + } + }, + "portainer.DockerSnapshotRaw": { + "type": "object", + "properties": { + "Containers": { + "type": "object" + }, + "Images": { + "type": "object" + }, + "Info": { + "type": "object" + }, + "Networks": { + "type": "object" + }, + "Version": { + "type": "object" + }, + "Volumes": { + "type": "object" + } + } + }, + "portainer.EdgeGroup": { + "type": "object", + "properties": { + "Dynamic": { + "type": "boolean" + }, + "Endpoints": { + "type": "array", + "items": { + "type": "integer" + } + }, + "Id": { + "description": "EdgeGroup Identifier", + "type": "integer", + "example": 1 + }, + "Name": { + "type": "string" + }, + "PartialMatch": { + "type": "boolean" + }, + "TagIds": { + "type": "array", + "items": { + "description": "Tag identifier", + "type": "integer", + "example": 1 + } + } + } + }, + "portainer.EdgeJob": { + "type": "object", + "properties": { + "Created": { + "type": "integer" + }, + "CronExpression": { + "type": "string" + }, + "Endpoints": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/portainer.EdgeJobEndpointMeta" + } + }, + "Id": { + "description": "EdgeJob Identifier", + "type": "integer", + "example": 1 + }, + "Name": { + "type": "string" + }, + "Recurring": { + "type": "boolean" + }, + "ScriptPath": { + "type": "string" + }, + "Version": { + "type": "integer" + } + } + }, + "portainer.EdgeJobEndpointMeta": { + "type": "object", + "properties": { + "collectLogs": { + "type": "boolean" + }, + "logsStatus": { + "type": "integer" + } + } + }, + "portainer.EdgeStack": { + "type": "object", + "properties": { + "CreationDate": { + "type": "integer" + }, + "EdgeGroups": { + "type": "array", + "items": { + "description": "EdgeGroup Identifier", + "type": "integer", + "example": 1 + } + }, + "EntryPoint": { + "type": "string" + }, + "Id": { + "description": "EdgeStack Identifier", + "type": "integer", + "example": 1 + }, + "Name": { + "type": "string" + }, + "ProjectPath": { + "type": "string" + }, + "Prune": { + "type": "boolean" + }, + "Status": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/portainer.EdgeStackStatus" + } + }, + "Version": { + "type": "integer" + } + } + }, + "portainer.EdgeStackStatus": { + "type": "object", + "properties": { + "EndpointID": { + "type": "integer" + }, + "Error": { + "type": "string" + }, + "Type": { + "type": "integer" + } + } + }, + "portainer.Endpoint": { + "type": "object", + "properties": { + "AuthorizedTeams": { + "type": "array", + "items": { + "type": "integer" + } + }, + "AuthorizedUsers": { + "description": "Deprecated in DBVersion == 18", + "type": "array", + "items": { + "description": "User Identifier", + "type": "integer", + "example": 1 + } + }, + "AzureCredentials": { + "$ref": "#/definitions/portainer.AzureCredentials" + }, + "ComposeSyntaxMaxVersion": { + "description": "Maximum version of docker-compose", + "type": "string", + "example": "3.8" + }, + "EdgeCheckinInterval": { + "description": "The check in interval for edge agent (in seconds)", + "type": "integer", + "example": 5 + }, + "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" + }, + "Extensions": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.EndpointExtension" + } + }, + "GroupId": { + "description": "Endpoint group identifier", + "type": "integer", + "example": 1 + }, + "Id": { + "description": "Endpoint Identifier", + "type": "integer", + "example": 1 + }, + "Kubernetes": { + "description": "Associated Kubernetes data", + "$ref": "#/definitions/portainer.KubernetesData" + }, + "Name": { + "description": "Endpoint name", + "type": "string", + "example": "my-endpoint" + }, + "PublicURL": { + "description": "URL or IP address where exposed containers will be reachable", + "type": "string", + "example": "docker.mydomain.tld:2375" + }, + "Snapshots": { + "description": "List of snapshots", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.DockerSnapshot" + } + }, + "Status": { + "description": "The status of the endpoint (1 - up, 2 - down)", + "type": "integer", + "example": 1 + }, + "TLS": { + "description": "Deprecated fields\nDeprecated 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", + "type": "array", + "items": { + "description": "Tag identifier", + "type": "integer", + "example": 1 + } + }, + "Tags": { + "description": "Deprecated in DBVersion == 22", + "type": "array", + "items": { + "type": "string" + } + }, + "TeamAccessPolicies": { + "description": "List of team identifiers authorized to connect to this endpoint", + "$ref": "#/definitions/portainer.TeamAccessPolicies" + }, + "Type": { + "description": "Endpoint environment type. 1 for a Docker environment, 2 for an agent on Docker environment or 3 for an Azure environment.", + "type": "integer", + "example": 1 + }, + "URL": { + "description": "URL or IP address of the Docker host associated to this endpoint", + "type": "string", + "example": "docker.mydomain.tld:2375" + }, + "UserAccessPolicies": { + "description": "List of user identifiers authorized to connect to this endpoint", + "$ref": "#/definitions/portainer.UserAccessPolicies" + }, + "lastCheckInDate": { + "description": "LastCheckInDate mark last check-in date on checkin", + "type": "integer" + }, + "securitySettings": { + "description": "Endpoint specific security settings", + "$ref": "#/definitions/portainer.EndpointSecuritySettings" + } + } + }, + "portainer.EndpointAuthorizations": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/portainer.Authorizations" + } + }, + "portainer.EndpointExtension": { + "type": "object", + "properties": { + "Type": { + "type": "integer" + }, + "URL": { + "type": "string" + } + } + }, + "portainer.EndpointGroup": { + "type": "object", + "properties": { + "AuthorizedTeams": { + "type": "array", + "items": { + "type": "integer" + } + }, + "AuthorizedUsers": { + "description": "Deprecated in DBVersion == 18", + "type": "array", + "items": { + "description": "User Identifier", + "type": "integer", + "example": 1 + } + }, + "Description": { + "description": "Description associated to the endpoint group", + "type": "string", + "example": "Endpoint group description" + }, + "Id": { + "description": "Endpoint group Identifier", + "type": "integer", + "example": 1 + }, + "Labels": { + "description": "Deprecated fields", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Pair" + } + }, + "Name": { + "description": "Endpoint group name", + "type": "string", + "example": "my-endpoint-group" + }, + "TagIds": { + "description": "List of tags associated to this endpoint group", + "type": "array", + "items": { + "description": "Tag identifier", + "type": "integer", + "example": 1 + } + }, + "Tags": { + "description": "Deprecated in DBVersion == 22", + "type": "array", + "items": { + "type": "string" + } + }, + "TeamAccessPolicies": { + "$ref": "#/definitions/portainer.TeamAccessPolicies" + }, + "UserAccessPolicies": { + "$ref": "#/definitions/portainer.UserAccessPolicies" + } + } + }, + "portainer.EndpointSecuritySettings": { + "type": "object", + "properties": { + "allowBindMountsForRegularUsers": { + "description": "Whether non-administrator should be able to use bind mounts when creating containers", + "type": "boolean", + "example": false + }, + "allowContainerCapabilitiesForRegularUsers": { + "description": "Whether non-administrator should be able to use container capabilities", + "type": "boolean", + "example": true + }, + "allowDeviceMappingForRegularUsers": { + "description": "Whether non-administrator should be able to use device mapping", + "type": "boolean", + "example": true + }, + "allowHostNamespaceForRegularUsers": { + "description": "Whether non-administrator should be able to use the host pid", + "type": "boolean", + "example": true + }, + "allowPrivilegedModeForRegularUsers": { + "description": "Whether non-administrator should be able to use privileged mode when creating containers", + "type": "boolean", + "example": false + }, + "allowStackManagementForRegularUsers": { + "description": "Whether non-administrator should be able to manage stacks", + "type": "boolean", + "example": true + }, + "allowSysctlSettingForRegularUsers": { + "description": "Whether non-administrator should be able to use sysctl settings", + "type": "boolean", + "example": true + }, + "allowVolumeBrowserForRegularUsers": { + "description": "Whether non-administrator should be able to browse volumes", + "type": "boolean", + "example": true + }, + "enableHostManagementFeatures": { + "description": "Whether host management features are enabled", + "type": "boolean", + "example": true + } + } + }, + "portainer.GitlabRegistryData": { + "type": "object", + "properties": { + "InstanceURL": { + "type": "string" + }, + "ProjectId": { + "type": "integer" + }, + "ProjectPath": { + "type": "string" + } + } + }, + "portainer.KubernetesConfiguration": { + "type": "object", + "properties": { + "IngressClasses": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.KubernetesIngressClassConfig" + } + }, + "StorageClasses": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.KubernetesStorageClassConfig" + } + }, + "UseLoadBalancer": { + "type": "boolean" + }, + "UseServerMetrics": { + "type": "boolean" + } + } + }, + "portainer.KubernetesData": { + "type": "object", + "properties": { + "Configuration": { + "$ref": "#/definitions/portainer.KubernetesConfiguration" + }, + "Snapshots": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.KubernetesSnapshot" + } + } + } + }, + "portainer.KubernetesIngressClassConfig": { + "type": "object", + "properties": { + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + } + }, + "portainer.KubernetesSnapshot": { + "type": "object", + "properties": { + "KubernetesVersion": { + "type": "string" + }, + "NodeCount": { + "type": "integer" + }, + "Time": { + "type": "integer" + }, + "TotalCPU": { + "type": "integer" + }, + "TotalMemory": { + "type": "integer" + } + } + }, + "portainer.KubernetesStorageClassConfig": { + "type": "object", + "properties": { + "AccessModes": { + "type": "array", + "items": { + "type": "string" + } + }, + "AllowVolumeExpansion": { + "type": "boolean" + }, + "Name": { + "type": "string" + }, + "Provisioner": { + "type": "string" + } + } + }, + "portainer.LDAPGroupSearchSettings": { + "type": "object", + "properties": { + "GroupAttribute": { + "description": "LDAP attribute which denotes the group membership", + "type": "string", + "example": "member" + }, + "GroupBaseDN": { + "description": "The distinguished name of the element from which the LDAP server will search for groups", + "type": "string", + "example": "dc=ldap,dc=domain,dc=tld" + }, + "GroupFilter": { + "description": "The LDAP search filter used to select group elements, optional", + "type": "string", + "example": "(objectClass=account" + } + } + }, + "portainer.LDAPSearchSettings": { + "type": "object", + "properties": { + "BaseDN": { + "description": "The distinguished name of the element from which the LDAP server will search for users", + "type": "string", + "example": "dc=ldap,dc=domain,dc=tld" + }, + "Filter": { + "description": "Optional LDAP search filter used to select user elements", + "type": "string", + "example": "(objectClass=account)" + }, + "UserNameAttribute": { + "description": "LDAP attribute which denotes the username", + "type": "string", + "example": "uid" + } + } + }, + "portainer.LDAPSettings": { + "type": "object", + "properties": { + "AnonymousMode": { + "description": "Enable this option if the server is configured for Anonymous access. When enabled, ReaderDN and Password will not be used", + "type": "boolean", + "example": true + }, + "AutoCreateUsers": { + "description": "Automatically provision users and assign them to matching LDAP group names", + "type": "boolean", + "example": true + }, + "GroupSearchSettings": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.LDAPGroupSearchSettings" + } + }, + "Password": { + "description": "Password of the account that will be used to search users", + "type": "string", + "example": "readonly-password" + }, + "ReaderDN": { + "description": "Account that will be used to search for users", + "type": "string", + "example": "cn=readonly-account,dc=ldap,dc=domain,dc=tld" + }, + "SearchSettings": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.LDAPSearchSettings" + } + }, + "StartTLS": { + "description": "Whether LDAP connection should use StartTLS", + "type": "boolean", + "example": true + }, + "TLSConfig": { + "$ref": "#/definitions/portainer.TLSConfiguration" + }, + "URL": { + "description": "URL or IP address of the LDAP server", + "type": "string", + "example": "myldap.domain.tld:389" + } + } + }, + "portainer.OAuthSettings": { + "type": "object", + "properties": { + "AccessTokenURI": { + "type": "string" + }, + "AuthorizationURI": { + "type": "string" + }, + "ClientID": { + "type": "string" + }, + "ClientSecret": { + "type": "string" + }, + "DefaultTeamID": { + "type": "integer" + }, + "LogoutURI": { + "type": "string" + }, + "OAuthAutoCreateUsers": { + "type": "boolean" + }, + "RedirectURI": { + "type": "string" + }, + "ResourceURI": { + "type": "string" + }, + "SSO": { + "type": "boolean" + }, + "Scopes": { + "type": "string" + }, + "UserIdentifier": { + "type": "string" + } + } + }, + "portainer.Pair": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "name" + }, + "value": { + "type": "string", + "example": "value" + } + } + }, + "portainer.QuayRegistryData": { + "type": "object", + "properties": { + "OrganisationName": { + "type": "string" + }, + "UseOrganisation": { + "type": "boolean" + } + } + }, + "portainer.Registry": { + "type": "object", + "properties": { + "Authentication": { + "description": "Is authentication against this registry enabled", + "type": "boolean", + "example": true + }, + "AuthorizedTeams": { + "type": "array", + "items": { + "type": "integer" + } + }, + "AuthorizedUsers": { + "description": "Deprecated fields\nDeprecated in DBVersion == 18", + "type": "array", + "items": { + "description": "User Identifier", + "type": "integer", + "example": 1 + } + }, + "Gitlab": { + "$ref": "#/definitions/portainer.GitlabRegistryData" + }, + "Id": { + "description": "Registry Identifier", + "type": "integer", + "example": 1 + }, + "ManagementConfiguration": { + "$ref": "#/definitions/portainer.RegistryManagementConfiguration" + }, + "Name": { + "description": "Registry Name", + "type": "string", + "example": "my-registry" + }, + "Password": { + "description": "Password used to authenticate against this registry", + "type": "string", + "example": "registry_password" + }, + "Quay": { + "$ref": "#/definitions/portainer.QuayRegistryData" + }, + "TeamAccessPolicies": { + "$ref": "#/definitions/portainer.TeamAccessPolicies" + }, + "Type": { + "description": "Registry Type (1 - Quay, 2 - Azure, 3 - Custom, 4 - Gitlab)", + "type": "integer", + "enum": [ + 1, + 2, + 3, + 4 + ] + }, + "URL": { + "description": "URL or IP address of the Docker registry", + "type": "string", + "example": "registry.mydomain.tld:2375" + }, + "UserAccessPolicies": { + "$ref": "#/definitions/portainer.UserAccessPolicies" + }, + "Username": { + "description": "Username used to authenticate against this registry", + "type": "string", + "example": "registry user" + } + } + }, + "portainer.RegistryManagementConfiguration": { + "type": "object", + "properties": { + "Authentication": { + "type": "boolean" + }, + "Password": { + "type": "string" + }, + "TLSConfig": { + "$ref": "#/definitions/portainer.TLSConfiguration" + }, + "Type": { + "type": "integer" + }, + "Username": { + "type": "string" + } + } + }, + "portainer.ResourceControl": { + "type": "object", + "properties": { + "AccessLevel": { + "type": "integer" + }, + "AdministratorsOnly": { + "description": "Permit access to resource only to admins", + "type": "boolean", + "example": true + }, + "Id": { + "description": "ResourceControl Identifier", + "type": "integer", + "example": 1 + }, + "OwnerId": { + "description": "Deprecated fields\nDeprecated in DBVersion == 2", + "type": "integer" + }, + "Public": { + "description": "Permit access to the associated resource to any user", + "type": "boolean", + "example": true + }, + "ResourceId": { + "description": "Docker resource identifier on which access control will be applied.\\\nIn the case of a resource control applied to a stack, use the stack name as identifier", + "type": "string", + "example": "617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08" + }, + "SubResourceIds": { + "description": "List of Docker resources that will inherit this access control", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08" + ] + }, + "System": { + "type": "boolean" + }, + "TeamAccesses": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.TeamResourceAccess" + } + }, + "Type": { + "description": "Type of Docker resource. Valid values are: 1- container, 2 -service\n3 - volume, 4 - secret, 5 - stack, 6 - config or 7 - custom template", + "type": "integer", + "example": 1 + }, + "UserAccesses": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.UserResourceAccess" + } + } + } + }, + "portainer.Role": { + "type": "object", + "properties": { + "Authorizations": { + "description": "Authorizations associated to a role", + "$ref": "#/definitions/portainer.Authorizations" + }, + "Description": { + "description": "Role description", + "type": "string", + "example": "Read-only access of all resources in an endpoint" + }, + "Id": { + "description": "Role Identifier", + "type": "integer", + "example": 1 + }, + "Name": { + "description": "Role name", + "type": "string", + "example": "HelpDesk" + }, + "Priority": { + "type": "integer" + } + } + }, + "portainer.Settings": { + "type": "object", + "properties": { + "AllowBindMountsForRegularUsers": { + "type": "boolean" + }, + "AllowContainerCapabilitiesForRegularUsers": { + "type": "boolean" + }, + "AllowDeviceMappingForRegularUsers": { + "type": "boolean" + }, + "AllowHostNamespaceForRegularUsers": { + "type": "boolean" + }, + "AllowPrivilegedModeForRegularUsers": { + "type": "boolean" + }, + "AllowStackManagementForRegularUsers": { + "type": "boolean" + }, + "AllowVolumeBrowserForRegularUsers": { + "type": "boolean" + }, + "AuthenticationMethod": { + "description": "Active authentication method for the Portainer instance. Valid values are: 1 for internal, 2 for LDAP, or 3 for oauth", + "type": "integer", + "example": 1 + }, + "BlackListedLabels": { + "description": "A list of label name \u0026 value that will be used to hide containers when querying containers", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Pair" + } + }, + "EdgeAgentCheckinInterval": { + "description": "The default check in interval for edge agent (in seconds)", + "type": "integer", + "example": 5 + }, + "EnableEdgeComputeFeatures": { + "description": "Whether edge compute features are enabled", + "type": "boolean" + }, + "EnableHostManagementFeatures": { + "description": "Deprecated fields v26", + "type": "boolean" + }, + "EnableTelemetry": { + "description": "Whether telemetry is enabled", + "type": "boolean", + "example": false + }, + "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", + "type": "string", + "example": "https://mycompany.mydomain.tld/logo.png" + }, + "OAuthSettings": { + "$ref": "#/definitions/portainer.OAuthSettings" + }, + "SnapshotInterval": { + "description": "The interval in which endpoint snapshots are created", + "type": "string", + "example": "5m" + }, + "TemplatesURL": { + "description": "URL to the templates that will be displayed in the UI when navigating to App Templates", + "type": "string", + "example": "https://raw.githubusercontent.com/portainer/templates/master/templates.json" + }, + "UserSessionTimeout": { + "description": "The duration of a user session", + "type": "string", + "example": "5m" + }, + "displayDonationHeader": { + "description": "Deprecated fields", + "type": "boolean" + }, + "displayExternalContributors": { + "type": "boolean" + } + } + }, + "portainer.Stack": { + "type": "object", + "properties": { + "EndpointId": { + "description": "Endpoint identifier. Reference the endpoint that will be used for deployment", + "type": "integer", + "example": 1 + }, + "EntryPoint": { + "description": "Path to the Stack file", + "type": "string", + "example": "docker-compose.yml" + }, + "Env": { + "description": "A list of environment variables used during stack deployment", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Pair" + } + }, + "Id": { + "description": "Stack Identifier", + "type": "integer", + "example": 1 + }, + "Name": { + "description": "Stack name", + "type": "string", + "example": "myStack" + }, + "ResourceControl": { + "$ref": "#/definitions/portainer.ResourceControl" + }, + "Status": { + "description": "Stack status (1 - active, 2 - inactive)", + "type": "integer", + "example": 1 + }, + "SwarmId": { + "description": "Cluster identifier of the Swarm cluster where the stack is deployed", + "type": "string", + "example": "jpofkc0i9uo9wtx1zesuk649w" + }, + "Type": { + "description": "Stack type. 1 for a Swarm stack, 2 for a Compose stack", + "type": "integer", + "example": 2 + }, + "createdBy": { + "description": "The username which created this stack", + "type": "string", + "example": "admin" + }, + "creationDate": { + "description": "The date in unix time when stack was created", + "type": "integer", + "example": 1587399600 + }, + "gitConfig": { + "description": "The git config of this stack", + "$ref": "#/definitions/gittypes.RepoConfig" + }, + "projectPath": { + "description": "Path on disk to the repository hosting the Stack file", + "type": "string", + "example": "/data/compose/myStack_jpofkc0i9uo9wtx1zesuk649w" + }, + "updateDate": { + "description": "The date in unix time when stack was last updated", + "type": "integer", + "example": 1587399600 + }, + "updatedBy": { + "description": "The username which last updated this stack", + "type": "string", + "example": "bob" + } + } + }, + "portainer.Status": { + "type": "object", + "properties": { + "Version": { + "description": "Portainer API version", + "type": "string", + "example": "2.0.0" + } + } + }, + "portainer.TLSConfiguration": { + "type": "object", + "properties": { + "TLS": { + "description": "Use TLS", + "type": "boolean", + "example": true + }, + "TLSCACert": { + "description": "Path to the TLS CA certificate file", + "type": "string", + "example": "/data/tls/ca.pem" + }, + "TLSCert": { + "description": "Path to the TLS client certificate file", + "type": "string", + "example": "/data/tls/cert.pem" + }, + "TLSKey": { + "description": "Path to the TLS client key file", + "type": "string", + "example": "/data/tls/key.pem" + }, + "TLSSkipVerify": { + "description": "Skip the verification of the server TLS certificate", + "type": "boolean", + "example": false + } + } + }, + "portainer.Tag": { + "type": "object", + "properties": { + "EndpointGroups": { + "description": "A set of endpoint group ids that have this tag", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "Endpoints": { + "description": "A set of endpoint ids that have this tag", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "Name": { + "description": "Tag name", + "type": "string", + "example": "org/acme" + }, + "id": { + "description": "Tag identifier", + "type": "integer", + "example": 1 + } + } + }, + "portainer.Team": { + "type": "object", + "properties": { + "Id": { + "description": "Team Identifier", + "type": "integer", + "example": 1 + }, + "Name": { + "description": "Team name", + "type": "string", + "example": "developers" + } + } + }, + "portainer.TeamAccessPolicies": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/portainer.AccessPolicy" + } + }, + "portainer.TeamMembership": { + "type": "object", + "properties": { + "Id": { + "description": "Membership Identifier", + "type": "integer", + "example": 1 + }, + "Role": { + "description": "Team role (1 for team leader and 2 for team member)", + "type": "integer", + "example": 1 + }, + "TeamID": { + "description": "Team identifier", + "type": "integer", + "example": 1 + }, + "UserID": { + "description": "User identifier", + "type": "integer", + "example": 1 + } + } + }, + "portainer.TeamResourceAccess": { + "type": "object", + "properties": { + "AccessLevel": { + "type": "integer" + }, + "TeamId": { + "type": "integer" + } + } + }, + "portainer.Template": { + "type": "object", + "properties": { + "Id": { + "description": "Mandatory container/stack fields\nTemplate Identifier", + "type": "integer", + "example": 1 + }, + "administrator_only": { + "description": "Whether the template should be available to administrators only", + "type": "boolean", + "example": true + }, + "categories": { + "description": "A list of categories associated to the template", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "database" + ] + }, + "command": { + "description": "The command that will be executed in a container template", + "type": "string", + "example": "ls -lah" + }, + "description": { + "description": "Description of the template", + "type": "string", + "example": "High performance web server" + }, + "env": { + "description": "A list of environment variables used during the template deployment", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.TemplateEnv" + } + }, + "hostname": { + "description": "Container hostname", + "type": "string", + "example": "mycontainer" + }, + "image": { + "description": "Mandatory container fields\nImage associated to a container template. Mandatory for a container template", + "type": "string", + "example": "nginx:latest" + }, + "interactive": { + "description": "Whether the container should be started in\ninteractive mode (-i -t equivalent on the CLI)", + "type": "boolean", + "example": true + }, + "labels": { + "description": "Container labels", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Pair" + } + }, + "logo": { + "description": "URL of the template's logo", + "type": "string", + "example": "https://cloudinovasi.id/assets/img/logos/nginx.png" + }, + "name": { + "description": "Optional stack/container fields\nDefault name for the stack/container to be used on deployment", + "type": "string", + "example": "mystackname" + }, + "network": { + "description": "Name of a network that will be used on container deployment if it exists inside the environment", + "type": "string", + "example": "mynet" + }, + "note": { + "description": "A note that will be displayed in the UI. Supports HTML content", + "type": "string", + "example": "This is my \u003cb\u003ecustom\u003c/b\u003e template" + }, + "platform": { + "description": "Platform associated to the template.\nValid values are: 'linux', 'windows' or leave empty for multi-platform", + "type": "string", + "example": "linux" + }, + "ports": { + "description": "A list of ports exposed by the container", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "8080:80/tcp" + ] + }, + "privileged": { + "description": "Whether the container should be started in privileged mode", + "type": "boolean", + "example": true + }, + "registry": { + "description": "Optional container fields\nThe URL of a registry associated to the image for a container template", + "type": "string", + "example": "quay.io" + }, + "repository": { + "description": "Mandatory stack fields", + "$ref": "#/definitions/portainer.TemplateRepository" + }, + "restart_policy": { + "description": "Container restart policy", + "type": "string", + "example": "on-failure" + }, + "stackFile": { + "description": "Mandatory Edge stack fields\nStack file used for this template", + "type": "string" + }, + "title": { + "description": "Title of the template", + "type": "string", + "example": "Nginx" + }, + "type": { + "description": "Template type. Valid values are: 1 (container), 2 (Swarm stack) or 3 (Compose stack)", + "type": "integer", + "example": 1 + }, + "volumes": { + "description": "A list of volumes used during the container template deployment", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.TemplateVolume" + } + } + } + }, + "portainer.TemplateEnv": { + "type": "object", + "properties": { + "default": { + "description": "Default value that will be set for the variable", + "type": "string", + "example": "default_value" + }, + "description": { + "description": "Content of the tooltip that will be generated in the UI", + "type": "string", + "example": "MySQL root account password" + }, + "label": { + "description": "Text for the label that will be generated in the UI", + "type": "string", + "example": "Root password" + }, + "name": { + "description": "name of the environment variable", + "type": "string", + "example": "MYSQL_ROOT_PASSWORD" + }, + "preset": { + "description": "If set to true, will not generate any input for this variable in the UI", + "type": "boolean", + "example": false + }, + "select": { + "description": "A list of name/value that will be used to generate a dropdown in the UI", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.TemplateEnvSelect" + } + } + } + }, + "portainer.TemplateEnvSelect": { + "type": "object", + "properties": { + "default": { + "description": "Will set this choice as the default choice", + "type": "boolean", + "example": false + }, + "text": { + "description": "Some text that will displayed as a choice", + "type": "string", + "example": "text value" + }, + "value": { + "description": "A value that will be associated to the choice", + "type": "string", + "example": "value" + } + } + }, + "portainer.TemplateRepository": { + "type": "object", + "properties": { + "stackfile": { + "description": "Path to the stack file inside the git repository", + "type": "string", + "example": "./subfolder/docker-compose.yml" + }, + "url": { + "description": "URL of a git repository used to deploy a stack template. Mandatory for a Swarm/Compose stack template", + "type": "string", + "example": "https://github.com/portainer/portainer-compose" + } + } + }, + "portainer.TemplateVolume": { + "type": "object", + "properties": { + "bind": { + "description": "Path on the host", + "type": "string", + "example": "/tmp" + }, + "container": { + "description": "Path inside the container", + "type": "string", + "example": "/data" + }, + "readonly": { + "description": "Whether the volume used should be readonly", + "type": "boolean", + "example": true + } + } + }, + "portainer.User": { + "type": "object", + "properties": { + "EndpointAuthorizations": { + "$ref": "#/definitions/portainer.EndpointAuthorizations" + }, + "Id": { + "description": "User Identifier", + "type": "integer", + "example": 1 + }, + "Password": { + "type": "string", + "example": "passwd" + }, + "PortainerAuthorizations": { + "description": "Deprecated fields\nDeprecated in DBVersion == 25", + "$ref": "#/definitions/portainer.Authorizations" + }, + "Role": { + "description": "User role (1 for administrator account and 2 for regular account)", + "type": "integer", + "example": 1 + }, + "Username": { + "type": "string", + "example": "bob" + } + } + }, + "portainer.UserAccessPolicies": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/portainer.AccessPolicy" + } + }, + "portainer.UserResourceAccess": { + "type": "object", + "properties": { + "AccessLevel": { + "type": "integer" + }, + "UserId": { + "type": "integer" + } + } + }, + "portainer.Webhook": { + "type": "object", + "properties": { + "EndpointId": { + "type": "integer" + }, + "Id": { + "description": "Webhook Identifier", + "type": "integer", + "example": 1 + }, + "ResourceId": { + "type": "string" + }, + "Token": { + "type": "string" + }, + "Type": { + "type": "integer" + } + } + }, + "registries.registryConfigurePayload": { + "type": "object", + "required": [ + "authentication" + ], + "properties": { + "authentication": { + "description": "Is authentication against this registry enabled", + "type": "boolean", + "example": false + }, + "password": { + "description": "Password used to authenticate against this registry. required when Authentication is true", + "type": "string", + "example": "registry_password" + }, + "tls": { + "description": "Use TLS", + "type": "boolean", + "example": true + }, + "tlscacertFile": { + "description": "The TLS CA certificate file", + "type": "array", + "items": { + "type": "integer" + } + }, + "tlscertFile": { + "description": "The TLS client certificate file", + "type": "array", + "items": { + "type": "integer" + } + }, + "tlskeyFile": { + "description": "The TLS client key file", + "type": "array", + "items": { + "type": "integer" + } + }, + "tlsskipVerify": { + "description": "Skip the verification of the server TLS certificate", + "type": "boolean", + "example": false + }, + "username": { + "description": "Username used to authenticate against this registry. Required when Authentication is true", + "type": "string", + "example": "registry_user" + } + } + }, + "registries.registryCreatePayload": { + "type": "object", + "required": [ + "authentication", + "name", + "type", + "url" + ], + "properties": { + "authentication": { + "description": "Is authentication against this registry enabled", + "type": "boolean", + "example": false + }, + "gitlab": { + "description": "Gitlab specific details, required when type = 4", + "$ref": "#/definitions/portainer.GitlabRegistryData" + }, + "name": { + "description": "Name that will be used to identify this registry", + "type": "string", + "example": "my-registry" + }, + "password": { + "description": "Password used to authenticate against this registry. required when Authentication is true", + "type": "string", + "example": "registry_password" + }, + "quay": { + "description": "Quay specific details, required when type = 1", + "$ref": "#/definitions/portainer.QuayRegistryData" + }, + "type": { + "description": "Registry Type. Valid values are: 1 (Quay.io), 2 (Azure container registry), 3 (custom registry) or 4 (Gitlab registry)", + "type": "integer", + "enum": [ + 1, + 2, + 3, + 4 + ], + "example": 1 + }, + "url": { + "description": "URL or IP address of the Docker registry", + "type": "string", + "example": "registry.mydomain.tld:2375" + }, + "username": { + "description": "Username used to authenticate against this registry. Required when Authentication is true", + "type": "string", + "example": "registry_user" + } + } + }, + "registries.registryUpdatePayload": { + "type": "object", + "required": [ + "authentication", + "name", + "url" + ], + "properties": { + "authentication": { + "description": "Is authentication against this registry enabled", + "type": "boolean", + "example": false + }, + "name": { + "description": "Name that will be used to identify this registry", + "type": "string", + "example": "my-registry" + }, + "password": { + "description": "Password used to authenticate against this registry. required when Authentication is true", + "type": "string", + "example": "registry_password" + }, + "quay": { + "$ref": "#/definitions/portainer.QuayRegistryData" + }, + "teamAccessPolicies": { + "$ref": "#/definitions/portainer.TeamAccessPolicies" + }, + "url": { + "description": "URL or IP address of the Docker registry", + "type": "string", + "example": "registry.mydomain.tld:2375" + }, + "userAccessPolicies": { + "$ref": "#/definitions/portainer.UserAccessPolicies" + }, + "username": { + "description": "Username used to authenticate against this registry. Required when Authentication is true", + "type": "string", + "example": "registry_user" + } + } + }, + "resourcecontrols.resourceControlCreatePayload": { + "type": "object", + "required": [ + "resourceID", + "type" + ], + "properties": { + "administratorsOnly": { + "description": "Permit access to resource only to admins", + "type": "boolean", + "example": true + }, + "public": { + "description": "Permit access to the associated resource to any user", + "type": "boolean", + "example": true + }, + "resourceID": { + "type": "string", + "example": "617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08" + }, + "subResourceIDs": { + "description": "List of Docker resources that will inherit this access control", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08" + ] + }, + "teams": { + "description": "List of team identifiers with access to the associated resource", + "type": "array", + "items": { + "type": "integer" + }, + "example": [ + 56, + 7 + ] + }, + "type": { + "description": "Type of Docker resource. Valid values are: container, volume\\\nservice, secret, config or stack", + "type": "string", + "example": "container" + }, + "users": { + "description": "List of user identifiers with access to the associated resource", + "type": "array", + "items": { + "type": "integer" + }, + "example": [ + 1, + 4 + ] + } + } + }, + "resourcecontrols.resourceControlUpdatePayload": { + "type": "object", + "properties": { + "administratorsOnly": { + "description": "Permit access to resource only to admins", + "type": "boolean", + "example": true + }, + "public": { + "description": "Permit access to the associated resource to any user", + "type": "boolean", + "example": true + }, + "teams": { + "description": "List of team identifiers with access to the associated resource", + "type": "array", + "items": { + "type": "integer" + }, + "example": [ + 7 + ] + }, + "users": { + "description": "List of user identifiers with access to the associated resource", + "type": "array", + "items": { + "type": "integer" + }, + "example": [ + 4 + ] + } + } + }, + "settings.publicSettingsResponse": { + "type": "object", + "properties": { + "AuthenticationMethod": { + "description": "Active authentication method for the Portainer instance. Valid values are: 1 for internal, 2 for LDAP, or 3 for oauth", + "type": "integer", + "example": 1 + }, + "EnableEdgeComputeFeatures": { + "description": "Whether edge compute features are enabled", + "type": "boolean", + "example": true + }, + "EnableTelemetry": { + "description": "Whether telemetry is enabled", + "type": "boolean", + "example": true + }, + "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", + "type": "string", + "example": "https://mycompany.mydomain.tld/logo.png" + }, + "OAuthLoginURI": { + "description": "The URL used for oauth login", + "type": "string", + "example": "https://gitlab.com/oauth" + }, + "OAuthLogoutURI": { + "description": "The URL used for oauth logout", + "type": "string", + "example": "https://gitlab.com/oauth/logout" + } + } + }, + "settings.settingsLDAPCheckPayload": { + "type": "object", + "properties": { + "ldapsettings": { + "$ref": "#/definitions/portainer.LDAPSettings" + } + } + }, + "settings.settingsUpdatePayload": { + "type": "object", + "properties": { + "authenticationMethod": { + "description": "Active authentication method for the Portainer instance. Valid values are: 1 for internal, 2 for LDAP, or 3 for oauth", + "type": "integer", + "example": 1 + }, + "blackListedLabels": { + "description": "A list of label name \u0026 value that will be used to hide containers when querying containers", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Pair" + } + }, + "edgeAgentCheckinInterval": { + "description": "The default check in interval for edge agent (in seconds)", + "type": "integer", + "example": 5 + }, + "enableEdgeComputeFeatures": { + "description": "Whether edge compute features are enabled", + "type": "boolean", + "example": true + }, + "enableTelemetry": { + "description": "Whether telemetry is enabled", + "type": "boolean", + "example": false + }, + "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", + "type": "string", + "example": "https://mycompany.mydomain.tld/logo.png" + }, + "oauthSettings": { + "$ref": "#/definitions/portainer.OAuthSettings" + }, + "snapshotInterval": { + "description": "The interval in which endpoint snapshots are created", + "type": "string", + "example": "5m" + }, + "templatesURL": { + "description": "URL to the templates that will be displayed in the UI when navigating to App Templates", + "type": "string", + "example": "https://raw.githubusercontent.com/portainer/templates/master/templates.json" + }, + "userSessionTimeout": { + "description": "The duration of a user session", + "type": "string", + "example": "5m" + } + } + }, + "stacks.composeStackFromFileContentPayload": { + "type": "object", + "required": [ + "name", + "stackFileContent" + ], + "properties": { + "env": { + "description": "A list of environment variables used during stack deployment", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Pair" + } + }, + "name": { + "description": "Name of the stack", + "type": "string", + "example": "myStack" + }, + "stackFileContent": { + "description": "Content of the Stack file", + "type": "string", + "example": "version: 3\n services:\n web:\n image:nginx" + } + } + }, + "stacks.composeStackFromGitRepositoryPayload": { + "type": "object", + "required": [ + "name", + "repositoryURL" + ], + "properties": { + "composeFilePathInRepository": { + "description": "Path to the Stack file inside the Git repository", + "type": "string", + "default": "docker-compose.yml", + "example": "docker-compose.yml" + }, + "env": { + "description": "A list of environment variables used during stack deployment", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Pair" + } + }, + "name": { + "description": "Name of the stack", + "type": "string", + "example": "myStack" + }, + "repositoryAuthentication": { + "description": "Use basic authentication to clone the Git repository", + "type": "boolean", + "example": true + }, + "repositoryPassword": { + "description": "Password used in basic authentication. Required when RepositoryAuthentication is true.", + "type": "string", + "example": "myGitPassword" + }, + "repositoryReferenceName": { + "description": "Reference name of a Git repository hosting the Stack file", + "type": "string", + "example": "refs/heads/master" + }, + "repositoryURL": { + "description": "URL of a Git repository hosting the Stack file", + "type": "string", + "example": "https://github.com/openfaas/faas" + }, + "repositoryUsername": { + "description": "Username used in basic authentication. Required when RepositoryAuthentication is true.", + "type": "string", + "example": "myGitUsername" + } + } + }, + "stacks.stackFileResponse": { + "type": "object", + "properties": { + "StackFileContent": { + "description": "Content of the Stack file", + "type": "string", + "example": "version: 3\n services:\n web:\n image:nginx" + } + } + }, + "stacks.stackMigratePayload": { + "type": "object", + "required": [ + "endpointID" + ], + "properties": { + "endpointID": { + "description": "Endpoint identifier of the target endpoint where the stack will be relocated", + "type": "integer", + "example": 2 + }, + "name": { + "description": "If provided will rename the migrated stack", + "type": "string", + "example": "new-stack" + }, + "swarmID": { + "description": "Swarm cluster identifier, must match the identifier of the cluster where the stack will be relocated", + "type": "string", + "example": "jpofkc0i9uo9wtx1zesuk649w" + } + } + }, + "stacks.swarmStackFromFileContentPayload": { + "type": "object", + "required": [ + "name", + "stackFileContent", + "swarmID" + ], + "properties": { + "env": { + "description": "A list of environment variables used during stack deployment", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Pair" + } + }, + "name": { + "description": "Name of the stack", + "type": "string", + "example": "myStack" + }, + "stackFileContent": { + "description": "Content of the Stack file", + "type": "string", + "example": "version: 3\n services:\n web:\n image:nginx" + }, + "swarmID": { + "description": "Swarm cluster identifier", + "type": "string", + "example": "jpofkc0i9uo9wtx1zesuk649w" + } + } + }, + "stacks.swarmStackFromGitRepositoryPayload": { + "type": "object", + "required": [ + "name", + "repositoryURL", + "swarmID" + ], + "properties": { + "composeFilePathInRepository": { + "description": "Path to the Stack file inside the Git repository", + "type": "string", + "default": "docker-compose.yml", + "example": "docker-compose.yml" + }, + "env": { + "description": "A list of environment variables used during stack deployment", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Pair" + } + }, + "name": { + "description": "Name of the stack", + "type": "string", + "example": "myStack" + }, + "repositoryAuthentication": { + "description": "Use basic authentication to clone the Git repository", + "type": "boolean", + "example": true + }, + "repositoryPassword": { + "description": "Password used in basic authentication. Required when RepositoryAuthentication is true.", + "type": "string", + "example": "myGitPassword" + }, + "repositoryReferenceName": { + "description": "Reference name of a Git repository hosting the Stack file", + "type": "string", + "example": "refs/heads/master" + }, + "repositoryURL": { + "description": "URL of a Git repository hosting the Stack file", + "type": "string", + "example": "https://github.com/openfaas/faas" + }, + "repositoryUsername": { + "description": "Username used in basic authentication. Required when RepositoryAuthentication is true.", + "type": "string", + "example": "myGitUsername" + }, + "swarmID": { + "description": "Swarm cluster identifier", + "type": "string", + "example": "jpofkc0i9uo9wtx1zesuk649w" + } + } + }, + "stacks.updateStackGitPayload": { + "type": "object", + "properties": { + "repositoryAuthentication": { + "type": "boolean" + }, + "repositoryPassword": { + "type": "string" + }, + "repositoryReferenceName": { + "type": "string" + }, + "repositoryUsername": { + "type": "string" + } + } + }, + "stacks.updateSwarmStackPayload": { + "type": "object", + "properties": { + "env": { + "description": "A list of environment variables used during stack deployment", + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Pair" + } + }, + "prune": { + "description": "Prune services that are no longer referenced (only available for Swarm stacks)", + "type": "boolean", + "example": true + }, + "stackFileContent": { + "description": "New content of the Stack file", + "type": "string", + "example": "version: 3\n services:\n web:\n image:nginx" + } + } + }, + "status.inspectVersionResponse": { + "type": "object", + "properties": { + "LatestVersion": { + "description": "The latest version available", + "type": "string", + "example": "2.0.0" + }, + "UpdateAvailable": { + "description": "Whether portainer has an update available", + "type": "boolean", + "example": false + } + } + }, + "tags.tagCreatePayload": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Name", + "type": "string", + "example": "org/acme" + } + } + }, + "teammemberships.teamMembershipCreatePayload": { + "type": "object", + "required": [ + "role", + "teamID", + "userID" + ], + "properties": { + "role": { + "description": "Role for the user inside the team (1 for leader and 2 for regular member)", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": 1 + }, + "teamID": { + "description": "Team identifier", + "type": "integer", + "example": 1 + }, + "userID": { + "description": "User identifier", + "type": "integer", + "example": 1 + } + } + }, + "teammemberships.teamMembershipUpdatePayload": { + "type": "object", + "required": [ + "role", + "teamID", + "userID" + ], + "properties": { + "role": { + "description": "Role for the user inside the team (1 for leader and 2 for regular member)", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": 1 + }, + "teamID": { + "description": "Team identifier", + "type": "integer", + "example": 1 + }, + "userID": { + "description": "User identifier", + "type": "integer", + "example": 1 + } + } + }, + "teams.teamCreatePayload": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Name", + "type": "string", + "example": "developers" + } + } + }, + "teams.teamUpdatePayload": { + "type": "object", + "properties": { + "name": { + "description": "Name", + "type": "string", + "example": "developers" + } + } + }, + "templates.filePayload": { + "type": "object", + "required": [ + "composeFilePathInRepository", + "repositoryURL" + ], + "properties": { + "composeFilePathInRepository": { + "description": "Path to the file inside the git repository", + "type": "string", + "example": "./subfolder/docker-compose.yml" + }, + "repositoryURL": { + "description": "URL of a git repository where the file is stored", + "type": "string", + "example": "https://github.com/portainer/portainer-compose" + } + } + }, + "templates.fileResponse": { + "type": "object", + "properties": { + "fileContent": { + "description": "The requested file content", + "type": "string" + } + } + }, + "templates.listResponse": { + "type": "object", + "properties": { + "templates": { + "type": "array", + "items": { + "$ref": "#/definitions/portainer.Template" + } + }, + "version": { + "type": "string" + } + } + }, + "users.adminInitPayload": { + "type": "object", + "required": [ + "password", + "username" + ], + "properties": { + "password": { + "description": "Password for the admin user", + "type": "string", + "example": "admin-password" + }, + "username": { + "description": "Username for the admin user", + "type": "string", + "example": "admin" + } + } + }, + "users.userCreatePayload": { + "type": "object", + "required": [ + "password", + "role", + "username" + ], + "properties": { + "password": { + "type": "string", + "example": "cg9Wgky3" + }, + "role": { + "description": "User role (1 for administrator account and 2 for regular account)", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": 2 + }, + "username": { + "type": "string", + "example": "bob" + } + } + }, + "users.userUpdatePasswordPayload": { + "type": "object", + "required": [ + "newPassword", + "password" + ], + "properties": { + "newPassword": { + "description": "New Password", + "type": "string", + "example": "new_passwd" + }, + "password": { + "description": "Current Password", + "type": "string", + "example": "passwd" + } + } + }, + "users.userUpdatePayload": { + "type": "object", + "required": [ + "password", + "role", + "username" + ], + "properties": { + "password": { + "type": "string", + "example": "cg9Wgky3" + }, + "role": { + "description": "User role (1 for administrator account and 2 for regular account)", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": 2 + }, + "username": { + "type": "string", + "example": "bob" + } + } + }, + "webhooks.webhookCreatePayload": { + "type": "object", + "properties": { + "endpointID": { + "type": "integer" + }, + "resourceID": { + "type": "string" + }, + "webhookType": { + "type": "integer" + } + } + } + }, + "securityDefinitions": { + "jwt": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + }, + "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 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" + } + ] +} \ No newline at end of file diff --git a/docs/api/api-schema-ce.md b/docs/api/api-schema-ce.md index 20d1b1e..37f44ae 100644 --- a/docs/api/api-schema-ce.md +++ b/docs/api/api-schema-ce.md @@ -4,7 +4,7 @@ Portainer exposes an HTTP API that you can use to automate everything you do via !!! Note "API examples are [here](../api-examples/)" -!!swagger api-2.6.json!! +!!swagger api-2.6.2.json!!
diff --git a/docs/v2.0-be/upgrade/updk8s.md b/docs/v2.0-be/upgrade/updk8s.md index dfeadcc..00404c8 100644 --- a/docs/v2.0-be/upgrade/updk8s.md +++ b/docs/v2.0-be/upgrade/updk8s.md @@ -17,7 +17,7 @@ helm repo update Run the command below to upgrade to latest version of Portainer ```shell -helm upgrade -n portainer portainer portainer/portainer --reuse-values +helm upgrade -n portainer portainer portainer/portainer ``` ## Using YAML Manifest diff --git a/docs/v2.0/upgrade/updk8s.md b/docs/v2.0/upgrade/updk8s.md index 5cc99e0..3332e6e 100644 --- a/docs/v2.0/upgrade/updk8s.md +++ b/docs/v2.0/upgrade/updk8s.md @@ -17,7 +17,7 @@ helm repo update Run the command below to upgrade to latest version of Portainer ```shell -helm upgrade -n portainer portainer portainer/portainer --reuse-values +helm upgrade -n portainer portainer portainer/portainer ``` ## Using YAML Manifest