Skip to main content

Portainer API

Project description

Portainer API is an HTTP API served by Portainer. It is used by the Portainer UI and everything you can do with the UI can be done using the HTTP API. Examples are available at https://gist.github.com/deviantony/77026d402366b4b43fa5918d41bc42f8 You can find out more about Portainer at [http://portainer.io](http://portainer.io) and get some support on [Slack](http://portainer.io/slack/). # Authentication Most of the API endpoints require to be authenticated as well as some level of authorization to be used. Portainer API uses JSON Web Token to manage authentication and thus requires you to provide a token in the Authorization header of each request with the Bearer authentication mechanism. Example: ``` Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInJvbGUiOjEsImV4cCI6MTQ5OTM3NjE1NH0.NJ6vE8FY1WG6jsRQzfMqeatJ4vh2TWAeeYfDhP71YEE ``` # Security Each API endpoint has an associated access policy, it is documented in the description of each endpoint. Different access policies are available: * Public access * Authenticated access * Restricted access * Administrator access ### Public access No authentication is required to access the endpoints with this access policy. ### Authenticated access Authentication is required to access the endpoints with this access policy. ### Restricted access Authentication is required to access the endpoints with this access policy. Extra-checks might be added to ensure access to the resource is granted. Returned data might also be filtered. ### Administrator access Authentication as well as an administrator role are required to access the endpoints with this access policy. # Execute Docker requests Portainer DO NOT expose specific endpoints to manage your Docker resources (create a container, remove a volume, etc…). Instead, it acts as a reverse-proxy to the Docker HTTP API. This means that you can execute Docker requests via the Portainer HTTP API. To do so, you can use the `/endpoints/{id}/docker` Portainer API endpoint (which is not documented below due to Swagger limitations). This endpoint has a restricted access policy so you still need to be authenticated to be able to query this endpoint. Any query on this endpoint will be proxied to the Docker API of the associated endpoint (requests and responses objects are the same as documented in the Docker API). NOTE: You can find more information on how to query the Docker API in the [Docker official documentation](https://docs.docker.com/engine/api/v1.30/) as well as in [this Portainer example](https://gist.github.com/deviantony/77026d402366b4b43fa5918d41bc42f8). # noqa: E501

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

portainer-api-1.20.dev5.tar.gz (80.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

portainer_api-1.20.dev5-py2.7.egg (902.5 kB view details)

Uploaded Egg

portainer_api-1.20.dev5-py2-none-any.whl (413.3 kB view details)

Uploaded Python 2

File details

Details for the file portainer-api-1.20.dev5.tar.gz.

File metadata

  • Download URL: portainer-api-1.20.dev5.tar.gz
  • Upload date:
  • Size: 80.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

File hashes

Hashes for portainer-api-1.20.dev5.tar.gz
Algorithm Hash digest
SHA256 2110f1799025be76cc782f01a800ee71882d921a0c1334c82db390f309bd4aec
MD5 c05e2d4a6ea31a3889f8072800da9d31
BLAKE2b-256 effcd06c36e02970b84a6f3532b4826830e84f9a7c63a2fffe4dde53b711cfaf

See more details on using hashes here.

File details

Details for the file portainer_api-1.20.dev5-py2.7.egg.

File metadata

  • Download URL: portainer_api-1.20.dev5-py2.7.egg
  • Upload date:
  • Size: 902.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

File hashes

Hashes for portainer_api-1.20.dev5-py2.7.egg
Algorithm Hash digest
SHA256 da93ad35a67a0a2757db1a81379721a760d1c2ea4e33cdf7f28e638734d227c6
MD5 61b5c035eb8f48b689bc9775dd249bad
BLAKE2b-256 8a73644d8bdf9fffac6fe6160d2edba9c9b2b04fde3e562f5d34428b6cb1358e

See more details on using hashes here.

File details

Details for the file portainer_api-1.20.dev5-py2-none-any.whl.

File metadata

  • Download URL: portainer_api-1.20.dev5-py2-none-any.whl
  • Upload date:
  • Size: 413.3 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

File hashes

Hashes for portainer_api-1.20.dev5-py2-none-any.whl
Algorithm Hash digest
SHA256 df9ab74066725491b45f94eb9f3a4c87c0e49ea83fccf61c75fd43972f4a985f
MD5 6a269b8105dc4f0053c1c9581d8c29c3
BLAKE2b-256 9fdfc8add815fc150b2c5c66e6aabbc0edbb6e3e51006ac6a8313445b919b927

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page