Actions86
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
- Environment Actions
- Image Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Setting Actions
- Stack Actions
- System Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
Stack → Get
AI-generatedOverview
This node operation retrieves detailed information about a specific Docker Compose stack managed by Portainer. It is useful for users who want to fetch the current configuration and status of a stack by providing its unique Stack ID. For example, a DevOps engineer can use this operation to monitor or audit the configuration of a deployed stack in their Docker environment.
Use Case Examples
- Retrieve details of a stack by its ID to verify its configuration and status.
- Fetch stack information to integrate with other automation workflows or dashboards.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the environment/endpoint in Portainer where the stack is deployed. This is required to specify the target environment for the stack operation. |
| Stack ID | The unique identifier of the stack to retrieve. This is required to specify which stack's details to fetch. |
Output
JSON
id- The unique identifier of the stack.name- The name of the stack.endpointId- The environment/endpoint ID where the stack is deployed.creationDate- The date and time when the stack was created.updateDate- The date and time when the stack was last updated.stackFileContent- The content of the stack's Docker Compose file.services- List of services defined in the stack.status- Current status of the stack.
Dependencies
- Portainer API key credential and base URL for authentication and API access.
Troubleshooting
- Ensure the Environment ID and Stack ID are correctly specified and exist in Portainer.
- Check that the API key credential has sufficient permissions to access stack details.
- Verify network connectivity to the Portainer API endpoint.
- If SSL issues occur, consider enabling the option to ignore SSL certificate validation in request options.
Links
- Portainer API - Stacks - Official Portainer API documentation for managing stacks, including retrieving stack details.