Portainer icon

Portainer

Interact with Portainer via API

Actions190

Endpoints → Endpoint Registry Access

AI-generated

Overview

This node interacts with the Portainer API to perform operations related to managing endpoints within Portainer. Specifically, for the "Endpoints" resource and the "Endpoint Registry Access" operation, it allows users to access or modify registry information associated with a particular environment endpoint by specifying identifiers and sending details in the request body.

Common scenarios include automating the management of container environments registered in Portainer, updating registry credentials or settings programmatically, or integrating Portainer endpoint configurations into broader automation workflows.

For example, a user might update the registry credentials for a specific Docker environment endpoint by providing the endpoint ID, the registry ID, and the new registry details in JSON format.

Properties

Name Meaning
Id The identifier of the environment (endpoint) you want to access or modify.
Registry Id The identifier of the registry associated with the endpoint that you want to access.
Body A JSON string containing the details or payload to send to the registry endpoint.

Output

The node outputs JSON data representing the response from the Portainer API after performing the registry access operation on the specified endpoint. This typically includes confirmation of the action taken or the current state of the registry configuration.

If the API returns binary data (not indicated here), it would be handled accordingly, but based on the provided code and properties, the output is expected to be JSON only.

Dependencies

  • Requires an active Portainer API instance accessible via URL.
  • Requires an API authentication token credential configured in n8n to authorize requests to the Portainer API.
  • Uses the @devlikeapro/n8n-openapi-node package for OpenAPI-based request building.
  • The base URL and authentication are dynamically set from the node's credentials.

Troubleshooting

  • Invalid or missing IDs: Ensure that both the environment (endpoint) ID and registry ID are correct and exist in your Portainer instance.
  • Malformed JSON in Body: The "Body" property must be a valid JSON string; otherwise, the API call will fail. Validate JSON syntax before execution.
  • Authentication errors: Verify that the API key or token credential is correctly configured and has sufficient permissions.
  • Network issues: Confirm that the Portainer API URL is reachable from the n8n instance.
  • Unexpected API responses: Check the Portainer API documentation for error codes and messages if the node returns errors.

Links and References

Discussion