Portainer endpoints API

Manage Docker environments(endpoints)

Operations 21

DELETE /endpoints Remove multiple environments #
GET /endpoints List environments(endpoints) #
POST /endpoints Create a new environment(endpoint) #
DELETE /endpoints/{id} Remove an environment #
GET /endpoints/{id} Inspect an environment(endpoint) #
PUT /endpoints/{id} Update an environment(endpoint) #
PUT /endpoints/{id}/association De-association an edge environment(endpoint) #
POST /endpoints/{id}/docker/v2/browse/put Upload a file under a specific path on the file system of an environment (endpoint)
GET /endpoints/{id}/dockerhub/{registryId} fetch docker pull limits #
POST /endpoints/{id}/edge/jobs/{jobID}/logs Update the logs collected from an Edge Job
GET /endpoints/{id}/edge/stacks/{stackId} Inspect an Edge Stack for an Environment(Endpoint)
GET /endpoints/{id}/edge/status Get environment(endpoint) status #
PUT /endpoints/{id}/forceupdateservice force update a docker service #
GET /endpoints/{id}/registries List Registries on environment #
PUT /endpoints/{id}/registries/{registryId} update registry access for environment #
PUT /endpoints/{id}/settings Update settings for an environment(endpoint) #
POST /endpoints/{id}/snapshot Snapshots an environment(endpoint) #
POST /endpoints/delete Remove multiple environments #
POST /endpoints/global-key Create or retrieve the endpoint for an EdgeID #
PUT /endpoints/relations Update relations for a list of environments #
POST /endpoints/snapshot Snapshot all environments(endpoints) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/portainer-endpoints-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

portainer-endpoints-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: info@portainer.io
  description: 'Portainer API is an HTTP API served by Portainer. It is used by the Portainer UI and everything you can do with the UI can be done using the HTTP API.

    Examples are available at https://documentation.portainer.io/api/api-examples/

    You can find out more about Portainer at [http://portainer.io](http://portainer.io) and get some support on [Slack](http://portainer.io/slack/).


    # Authentication


    Most of the API environments(endpoints) require to be authenticated as well as some level of authorization to be used.

    Portainer API uses JSON Web Token to manage authentication and thus requires you to provide a token in the **Authorization** header of each request

    with the **Bearer** authentication mechanism.


    Example:


    ```

    Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInJvbGUiOjEsImV4cCI6MTQ5OTM3NjE1NH0.NJ6vE8FY1WG6jsRQzfMqeatJ4vh2TWAeeYfDhP71YEE

    ```


    # Security


    Each API environment(endpoint) has an associated access policy, it is documented in the description of each environment(endpoint).


    Different access policies are available:


    - Public access

    - Authenticated access

    - Restricted access

    - Administrator access


    ### Public access


    No authentication is required to access the environments(endpoints) with this access policy.


    ### Authenticated access


    Authentication is required to access the environments(endpoints) with this access policy.


    ### Restricted access


    Authentication is required to access the environments(endpoints) with this access policy.

    Extra-checks might be added to ensure access to the resource is granted. Returned data might also be filtered.


    ### Administrator access


    Authentication as well as an administrator role are required to access the environments(endpoints) with this access policy.


    # Execute Docker requests


    Portainer **DO NOT** expose specific environments(endpoints) to manage your Docker resources (create a container, remove a volume, etc...).


    Instead, it acts as a reverse-proxy to the Docker HTTP API. This means that you can execute Docker requests **via** the Portainer HTTP API.


    To do so, you can use the `/endpoints/{id}/docker` Portainer API environment(endpoint) (which is not documented below due to Swagger limitations). This environment(endpoint) has a restricted access policy so you still need to be authenticated to be able to query this environment(endpoint). Any query on this environment(endpoint) will be proxied to the Docker API of the associated environment(endpoint) (requests and responses objects are the same as documented in the Docker API).


    # Private Registry


    Using private registry, you will need to pass a based64 encoded JSON string ‘{"registryId":\<registryID value\>}’ inside the Request Header. The parameter name is "X-Registry-Auth".

    \<registryID value\> - The registry ID where the repository was created.


    Example:


    ```

    eyJyZWdpc3RyeUlkIjoxfQ==

    ```


    **NOTE**: You can find more information on how to query the Docker API in the [Docker official documentation](https://docs.docker.com/engine/api/v1.30/) as well as in [this Portainer example](https://documentation.portainer.io/api/api-examples/).

    '
  license:
    name: zlib
    url: https://github.com/portainer/portainer/blob/develop/LICENSE
  title: PortainerCE auth Endpoints API
  version: 2.39.1
servers:
- url: /api
tags:
- description: Manage Docker environments(endpoints)
  name: endpoints
paths:
  /endpoints:
    delete:
      deprecated: true
      description: 'Deprecated: use the `POST` endpoint instead.

        Remove multiple environments and optionally clean-up associated resources.

        **Access policy**: Administrator only.'
      operationId: EndpointDeleteBatchDeprecated
      responses:
        '204':
          description: Environment(s) successfully deleted.
        '207':
          description: Partial success. Some environments were deleted successfully, while others failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/endpoints.endpointDeleteBatchPartialResponse'
        '400':
          description: Invalid request payload, such as missing required fields or fields not meeting validation criteria.
        '403':
          description: Unauthorized access or operation not allowed.
        '500':
          description: Server error occurred while attempting to delete the specified environments.
      security:
      - ApiKeyAuth: []
        jwt: []
      summary: Remove multiple environments
      tags:
      - endpoints
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/endpoints.endpointDeleteBatchPayload'
        description: List of environments to delete, with optional deleteCluster flag to clean-up associated resources (cloud environments only)
        required: true
    get:
      description: 'List all environments(endpoints) based on the current user authorizations. Will

        return all environments(endpoints) if using an administrator or team leader account otherwise it will

        only return authorized environments(endpoints).

        **Access policy**: restricted'
      operationId: EndpointList
      parameters:
      - description: Start searching from
        in: query
        name: start
        schema:
          type: integer
      - description: Limit results to this value
        in: query
        name: limit
        schema:
          type: integer
      - description: Sort results by this value
        in: query
        name: sort
        schema:
          type: string
          enum:
          - Name
          - Group
          - Status
          - LastCheckIn
          - EdgeID
      - description: Order sorted results by desc/asc
        in: query
        name: order
        schema:
          type: integer
      - description: Search query
        in: query
        name: search
        schema:
          type: string
      - description: List environments(endpoints) of these groups
        in: query
        name: groupIds
        style: form
        explode: false
        schema:
          type: array
          items:
            type: integer
      - description: List environments(endpoints) by this status
        in: query
        name: status
        style: form
        explode: false
        schema:
          type: array
          items:
            type: integer
      - description: List environments(endpoints) of this type
        in: query
        name: types
        style: form
        explode: false
        schema:
          type: array
          items:
            type: integer
      - description: search environments(endpoints) with these tags (depends on tagsPartialMatch)
        in: query
        name: tagIds
        style: form
        explode: false
        schema:
          type: array
          items:
            type: integer
      - description: If true, will return environment(endpoint) which has one of tagIds, if false (or missing) will return only environments(endpoints) that has all the tags
        in: query
        name: tagsPartialMatch
        schema:
          type: boolean
      - description: will return only these environments(endpoints)
        in: query
        name: endpointIds
        style: form
        explode: false
        schema:
          type: array
          items:
            type: integer
      - description: will exclude these environments(endpoints)
        in: query
        name: excludeIds
        style: form
        explode: false
        schema:
          type: array
          items:
            type: integer
      - description: will exclude environments(endpoints) belonging to these endpoint groups
        in: query
        name: excludeGroupIds
        style: form
        explode: false
        schema:
          type: array
          items:
            type: integer
      - description: If true, will return environment(endpoint) that were provisioned
        in: query
        name: provisioned
        schema:
          type: boolean
      - description: will return only environments with on of these agent versions
        in: query
        name: agentVersions
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
      - description: if exists true show only edge async agents, false show only standard edge agents. if missing, will show both types (relevant only for edge agents)
        in: query
        name: edgeAsync
        schema:
          type: boolean
      - description: if true, show only untrusted edge agents, if false show only trusted edge agents (relevant only for edge agents)
        in: query
        name: edgeDeviceUntrusted
        schema:
          type: boolean
      - description: if bigger then zero, show only edge agents that checked-in in the last provided seconds (relevant only for edge agents)
        in: query
        name: edgeCheckInPassedSeconds
        schema:
          type: number
      - description: if true, the snapshot data won't be retrieved
        in: query
        name: excludeSnapshots
        schema:
          type: boolean
      - description: will return only environments(endpoints) with this name
        in: query
        name: name
        schema:
          type: string
      - description: only applied when edgeStackId exists. Filter the returned environments based on their deployment status in the stack (not the environment status!)
        in: query
        name: edgeStackStatus
        schema:
          type: string
      - description: List environments(endpoints) of these edge groups
        in: query
        name: edgeGroupIds
        style: form
        explode: false
        schema:
          type: array
          items:
            type: integer
      - description: Exclude environments(endpoints) of these edge groups
        in: query
        name: excludeEdgeGroupIds
        style: form
        explode: false
        schema:
          type: array
          items:
            type: integer
      responses:
        '200':
          description: Endpoints
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/portainer.Endpoint'
                type: array
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: List environments(endpoints)
      tags:
      - endpoints
    post:
      description: 'Create a new environment(endpoint) that will be used to manage an environment(endpoint).

        **Access policy**: administrator'
      operationId: EndpointCreate
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/portainer.Endpoint'
        '400':
          description: Invalid request
        '409':
          description: Name is not unique
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Create a new environment(endpoint)
      tags:
      - endpoints
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                Name:
                  type: string
                  description: 'Name that will be used to identify this environment(endpoint) (example: my-environment)'
                EndpointCreationType:
                  type: integer
                  description: 'Environment(Endpoint) 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)'
                ContainerEngine:
                  type: string
                  description: 'Container engine used by the environment(endpoint). Value must be one of: ''docker'' or ''podman'''
                URL:
                  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). Cannot be empty if EndpointCreationType is set to 4 (Edge agent environment)'
                PublicURL:
                  type: string
                  description: 'URL or IP address where exposed containers will be reachable. Defaults to URL if not specified (example: docker.mydomain.tld:2375)'
                GroupID:
                  type: integer
                  description: Environment(Endpoint) group identifier. If not specified will default to 1 (unassigned).
                TLS:
                  type: boolean
                  description: Require TLS to connect against this environment(endpoint). Must be true if EndpointCreationType is set to 2 (Agent environment)
                TLSSkipVerify:
                  type: boolean
                  description: Skip server verification when using TLS. Must be true if EndpointCreationType is set to 2 (Agent environment)
                TLSSkipClientVerify:
                  type: boolean
                  description: Skip client verification when using TLS. Must be true if EndpointCreationType is set to 2 (Agent environment)
                TLSCACertFile:
                  type: string
                  description: TLS CA certificate file
                  format: binary
                TLSCertFile:
                  type: string
                  description: TLS client certificate file
                  format: binary
                TLSKeyFile:
                  type: string
                  description: TLS client key file
                  format: binary
                AzureApplicationID:
                  type: string
                  description: Azure application ID. Required if environment(endpoint) type is set to 3
                AzureTenantID:
                  type: string
                  description: Azure tenant ID. Required if environment(endpoint) type is set to 3
                AzureAuthenticationKey:
                  type: string
                  description: Azure authentication key. Required if environment(endpoint) type is set to 3
                TagIds:
                  type: array
                  items:
                    type: integer
                  description: List of tag identifiers to which this environment(endpoint) is associated
                EdgeCheckinInterval:
                  type: integer
                  description: The check in interval for edge agent (in seconds)
                EdgeTunnelServerAddress:
                  type: string
                  description: URL or IP address that will be used to establish a reverse tunnel
                Gpus:
                  type: string
                  description: List of GPUs - json stringified array of {name, value} structs
              required:
              - Name
              - EndpointCreationType
              - EdgeTunnelServerAddress
  /endpoints/{id}:
    delete:
      description: 'Remove the environment associated to the specified identifier and optionally clean-up associated resources.

        **Access policy**: Administrator only.'
      operationId: EndpointDelete
      parameters:
      - description: Environment(Endpoint) identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Environment successfully deleted.
        '400':
          description: Invalid request payload, such as missing required fields or fields not meeting validation criteria.
        '403':
          description: Unauthorized access or operation not allowed.
        '404':
          description: Unable to find the environment with the specified identifier inside the database.
        '500':
          description: Server error occurred while attempting to delete the environment.
      security:
      - ApiKeyAuth: []
        jwt: []
      summary: Remove an environment
      tags:
      - endpoints
    get:
      description: 'Retrieve details about an environment(endpoint).

        **Access policy**: restricted'
      operationId: EndpointInspect
      parameters:
      - description: Environment(Endpoint) identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      - description: if true, the snapshot data won't be retrieved
        in: query
        name: excludeSnapshot
        schema:
          type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/portainer.Endpoint'
        '400':
          description: Invalid request
        '404':
          description: Environment(Endpoint) not found
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Inspect an environment(endpoint)
      tags:
      - endpoints
    put:
      description: 'Update an environment(endpoint).

        **Access policy**: authenticated'
      operationId: EndpointUpdate
      parameters:
      - description: Environment(Endpoint) identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/portainer.Endpoint'
        '400':
          description: Invalid request
        '404':
          description: Environment(Endpoint) not found
        '409':
          description: Name is not unique
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Update an environment(endpoint)
      tags:
      - endpoints
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/endpoints.endpointUpdatePayload'
        description: Environment(Endpoint) details
        required: true
  /endpoints/{id}/association:
    put:
      description: 'De-association an edge environment(endpoint).

        **Access policy**: administrator'
      operationId: EndpointAssociationDelete
      parameters:
      - description: Environment(Endpoint) identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Success
        '400':
          description: Invalid request
        '404':
          description: Environment(Endpoint) not found
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: De-association an edge environment(endpoint)
      tags:
      - endpoints
  /endpoints/{id}/docker/v2/browse/put:
    post:
      description: 'Use this environment(endpoint) to upload TLS files.

        **Access policy**: administrator'
      parameters:
      - description: Environment(Endpoint) identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      - description: Optional volume identifier to upload the file
        in: query
        name: volumeID
        schema:
          type: string
      responses:
        '204':
          description: Success
        '400':
          description: Invalid request
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Upload a file under a specific path on the file system of an environment (endpoint)
      tags:
      - endpoints
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                Path:
                  type: string
                  description: The destination path to upload the file to
                file:
                  type: string
                  description: The file to upload
                  format: binary
              required:
              - Path
              - file
  /endpoints/{id}/dockerhub/{registryId}:
    get:
      description: 'get docker pull limits for a docker hub registry in the environment

        **Access policy**:'
      operationId: endpointDockerhubStatus
      parameters:
      - description: endpoint ID
        in: path
        name: id
        required: true
        schema:
          type: integer
      - description: registry ID
        in: path
        name: registryId
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/endpoints.dockerhubStatusResponse'
        '400':
          description: Invalid request
        '403':
          description: Permission denied
        '404':
          description: registry or endpoint not found
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: fetch docker pull limits
      tags:
      - endpoints
  /endpoints/{id}/edge/jobs/{jobID}/logs:
    post:
      description: Authorized only if the request is done by an Edge Environment(Endpoint)
      parameters:
      - description: environment(endpoint) Id
        in: path
        name: id
        required: true
        schema:
          type: integer
      - description: Job Id
        in: path
        name: jobID
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '403':
          description: Forbidden
        '500':
          description: Internal Server Error
      summary: Update the logs collected from an Edge Job
      tags:
      - endpoints
  /endpoints/{id}/edge/stacks/{stackId}:
    get:
      description: '**Access policy**: public'
      parameters:
      - description: environment(endpoint) Id
        in: path
        name: id
        required: true
        schema:
          type: integer
      - description: EdgeStack Id
        in: path
        name: stackId
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/edge.StackPayload'
        '400':
          description: Bad Request
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      summary: Inspect an Edge Stack for an Environment(Endpoint)
      tags:
      - endpoints
  /endpoints/{id}/edge/status:
    get:
      description: 'environment(endpoint) for edge agent to check status of environment(endpoint)

        **Access policy**: restricted only to Edge environments(endpoints)'
      operationId: EndpointEdgeStatusInspect
      parameters:
      - description: Environment(Endpoint) identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/endpointedge.endpointEdgeStatusInspectResponse'
        '400':
          description: Invalid request
        '403':
          description: Permission denied to access environment(endpoint)
        '404':
          description: Environment(Endpoint) not found
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Get environment(endpoint) status
      tags:
      - endpoints
  /endpoints/{id}/forceupdateservice:
    put:
      description: 'force update a docker service

        **Access policy**: authenticated'
      operationId: endpointForceUpdateService
      parameters:
      - description: endpoint identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/swarm.ServiceUpdateResponse'
        '400':
          description: Invalid request
        '403':
          description: Permission denied
        '404':
          description: endpoint not found
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: force update a docker service
      tags:
      - endpoints
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/endpoints.forceUpdateServicePayload'
        description: details
        required: true
  /endpoints/{id}/registries:
    get:
      description: 'List all registries based on the current user authorizations in current environment.

        **Access policy**: authenticated'
      operationId: endpointRegistriesList
      parameters:
      - description: required if kubernetes environment, will show registries by namespace
        in: query
        name: namespace
        schema:
          type: string
      - description: Environment(Endpoint) identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/portainer.Registry'
                type: array
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: List Registries on environment
      tags:
      - endpoints
  /endpoints/{id}/registries/{registryId}:
    put:
      description: '**Access policy**: authenticated'
      operationId: endpointRegistryAccess
      parameters:
      - description: Environment(Endpoint) identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      - description: Registry identifier
        in: path
        name: registryId
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Success
        '400':
          description: Invalid request
        '403':
          description: Permission denied
        '404':
          description: Endpoint not found
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: update registry access for environment
      tags:
      - endpoints
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/endpoints.registryAccessPayload'
        description: details
        required: true
  /endpoints/{id}/settings:
    put:
      description: 'Update settings for an environment(endpoint).

        **Access policy**: authenticated'
      operationId: EndpointSettingsUpdate
      parameters:
      - description: Environment(Endpoint) identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/portainer.Endpoint'
        '400':
          description: Invalid request
        '404':
          description: Environment(Endpoint) not found
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Update settings for an environment(endpoint)
      tags:
      - endpoints
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/endpoints.endpointSettingsUpdatePayload'
        description: Environment(Endpoint) details
        required: true
  /endpoints/{id}/snapshot:
    post:
      description: 'Snapshots an environment(endpoint)

        **Access policy**: administrator'
      operationId: EndpointSnapshot
      parameters:
      - description: Environment(Endpoint) identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Success
        '400':
          description: Invalid request
        '404':
          description: Environment(Endpoint) not found
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Snapshots an environment(endpoint)
      tags:
      - endpoints
  /endpoints/delete:
    post:
      description: 'Remove multiple environments and optionally clean-up associated resources.

        **Access policy**: Administrator only.'
      operationId: EndpointDeleteBatch
      responses:
        '204':
          description: Environment(s) successfully deleted.
        '207':
          description: Partial success. Some environments were deleted successfully, while others failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/endpoints.endpointDeleteBatchPartialResponse'
        '400':
          description: Invalid request payload, such as missing required fields or fields not meeting validation criteria.
        '403':
          description: Unauthorized access or operation not allowed.
        '500':
          description: Server error occurred while attempting to delete the specified environments.
      security:
      - ApiKeyAuth: []
        jwt: []
      summary: Remove multiple environments
      tags:
      - endpoints
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/endpoints.endpointDeleteBatchPayload'
        description: List of environments to delete, with optional deleteCluster flag to clean-up associated resources (cloud environments only)
        required: true
  /endpoints/global-key:
    post:
      operationId: EndpointCreateGlobalKey
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/endpoints.endpointCreateGlobalKeyResponse'
        '400':
          description: Invalid request
        '500':
          description: Server error
      summary: Create or retrieve the endpoint for an EdgeID
      tags:
      - endpoints
  /endpoints/relations:
    put:
      description: 'Update relations for a list of environments

        Edge groups, tags and environment group can be updated.


        **Access policy**: administrator'
      operationId: EndpointUpdateRelations
      responses:
        '204':
          description: Success
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Server error
      security:
      - jwt: []
      summary: Update relations for a list of environments
      tags:
      - endpoints
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/endpoints.endpointUpdateRelationsPayload'
        description: Environment relations data
        required: true
  /endpoints/snapshot:
    post:
      description: 'Snapshot all environments(endpoints)

        **Access policy**: administrator'
      operationId: EndpointSnapshots
      responses:
        '204':
          description: Success
        '500':
          description: Server Error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Snapshot all environments(endpoints)
      tags:
      - endpoints
components:
  schemas:
    portainer.Pair:
      properties:
        name:
          example: name
          type: string
        value:
          example: value
          type: string
      type: object
    endpointedge.edgeJobResponse:
      properties:
    

# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/portainer/refs/heads/main/openapi/portainer-endpoints-api-openapi.yml