endpoints

Create a new environment(endpoint)

Create a new environment(endpoint) that will be used to manage an environment(endpoint). Access policy: administrator

post/endpoints

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/endpoints
  • Auth
    • API key in header X-API-KEY
    • or API key in header Authorization

Request body multipart/form-data

Namestring required

Name that will be used to identify this environment(endpoint) (example: my-environment)

EndpointCreationType0 | 1 | 2 | 3 | 4 | 5 required

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)

ContainerEnginestring

Container engine used by the environment(endpoint). Value must be one of: 'docker' or 'podman'

URLstring

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)

PublicURLstring

URL or IP address where exposed containers will be reachable. Defaults to URL if not specified (example: docker.mydomain.tld:2375)

GroupIDinteger

Environment(Endpoint) group identifier. If not specified will default to 1 (unassigned).

TLSboolean

Require TLS to connect against this environment(endpoint). Must be true if EndpointCreationType is set to 2 (Agent environment)

TLSSkipVerifyboolean

Skip server verification when using TLS. Must be true if EndpointCreationType is set to 2 (Agent environment)

TLSSkipClientVerifyboolean

Skip client verification when using TLS. Must be true if EndpointCreationType is set to 2 (Agent environment)

TLSCACertFilestring binary

TLS CA certificate file

TLSCertFilestring binary

TLS client certificate file

TLSKeyFilestring binary

TLS client key file

AzureApplicationIDstring

Azure application ID. Required if environment(endpoint) type is set to 3

AzureTenantIDstring

Azure tenant ID. Required if environment(endpoint) type is set to 3

AzureAuthenticationKeystring

Azure authentication key. Required if environment(endpoint) type is set to 3

TagIdsstring

JSON-parsable array of tag identifiers to which this environment(endpoint) is associated

EdgeCheckinIntervalinteger

The check in interval for edge agent (in seconds)

EdgeTunnelServerAddressstring

URL or IP address that will be used to establish a reverse tunnel

Gpusstring

List of GPUs - json stringified array of {name, value} structs

Response

Success

ComposeSyntaxMaxVersionstring required

Maximum version of docker-compose

ContainerEnginestring required

ContainerEngine represents the container engine type. This can be 'docker' or 'podman' when interacting directly with these environments, otherwise '' for kubernetes environments.

EdgeCheckinIntervalinteger required

The check in interval for edge agent (in seconds)

EdgeIDstring

The identifier of the edge agent associated with this environment(endpoint)

EdgeKeystring required

The key which is used to map the agent to Portainer

EnableGPUManagementboolean
GroupIdinteger required

Environment(Endpoint) group identifier

Heartbeatboolean

Heartbeat indicates the heartbeat status of an edge environment

Idinteger required

Environment(Endpoint) Identifier

LastCheckInDateinteger required

LastCheckInDate mark last check-in date on checkin

Namestring required

Environment(Endpoint) name

PublicURLstring required

URL or IP address where exposed containers will be reachable

Status0 | 1 | 2
TagIdsinteger[]

List of tag identifiers to which this environment(endpoint) is associated

TeamAccessPoliciesPortainerTeamAccessPolicies
Type0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 required
URLstring required

URL or IP address of the Docker host associated to this environment(endpoint)

UserAccessPoliciesPortainerUserAccessPolicies
UserTrustedboolean

Whether the device has been trusted or not by the user

Example response

{
  "Agent": {
    "Version": "1.0.0"
  },
  "AzureCredentials": {
    "ApplicationID": "eag7cdo9-o09l-9i83-9dO9-f0b23oe78db4",
    "AuthenticationKey": "cOrXoK/1D35w8YQ8nH1/8ZGwzz45JIYD5jxHKXEQknk=",
    "TenantID": "34ddc78d-4fel-2358-8cc1-df84c8o839f5"
  },
  "ComposeSyntaxMaxVersion": "3.8",
  "ContainerEngine": "docker",
  "Edge": {
    "CommandInterval": 60,
    "PingInterval": 60,
    "SnapshotInterval": 60
  },
  "EdgeCheckinInterval": 5,
  "Gpus": [
    {
      "name": "name",
      "value": "value"
    }
  ],
  "GroupId": 1,
  "Heartbeat": true,
  "Id": 1,
  "Name": "my-environment",
  "PublicURL": "docker.mydomain.tld:2375",
  "SecuritySettings": {
    "allowContainerCapabilitiesForRegularUsers": true,
    "allowDeviceMappingForRegularUsers": true,
    "allowHostNamespaceForRegularUsers": true,
    "allowSecurityOptForRegularUsers": true,
    "allowStackManagementForRegularUsers": true,
    "allowSysctlSettingForRegularUsers": true,
    "allowVolumeBrowserForRegularUsers": true,
    "enableHostManagementFeatures": true
  },
  "TLSConfig": {
    "TLS": true,
    "TLSCACert": "/data/tls/ca.pem",
    "TLSCert": "/data/tls/cert.pem",
    "TLSKey": "/data/tls/key.pem"
  },
  "URL": "docker.mydomain.tld:2375"
}

Changes

No recorded changes to this operation across all 21 revisions of this API.