CE v2.33.7
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 portainer.io and get support on Slack.
Authentication
Most API endpoints require authentication and some level of authorization. Portainer uses JSON Web Tokens (JWT). Provide the token in the Authorization header using the Bearer scheme.
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Access policies
Each endpoint has an associated access policy documented in its description.
| Policy | Description |
|---|---|
| Public | No authentication required. |
| Authenticated | Valid JWT or API key required. |
| Restricted | Authentication required; response data may be filtered per user. |
| Administrator | Authentication + administrator role required. |
Docker proxy
Portainer does not expose dedicated endpoints for every Docker resource. Instead it acts as a reverse proxy to the Docker HTTP API via /endpoints/{id}/docker. Any request to that path is proxied to the Docker API of the target environment (request/response shapes match the Docker API docs).
Private Registry
When pulling from a private registry, include a Base64-encoded JSON string {"registryId":<id>} in the X-Registry-Auth request header.
eyJyZWdpc3RyeUlkIjoxfQ==