Portainer icon

Portainer

Interact with Portainer via API

Actions190

Registries → Registry Create

AI-generated

Overview

This node enables creating a new registry in Portainer by sending registry details to the Portainer API. It is useful for automating the management of container registries within Portainer, such as adding new Docker registries or other supported registry types programmatically. For example, you can use this node to add a private Docker registry with credentials, enabling your container deployments to pull images from that registry seamlessly.

Properties

Name Meaning
Body Registry details in JSON string format. This should include all necessary information about the registry you want to create, such as its type, URL, credentials, and any other required configuration fields.

Output

The node outputs the response from the Portainer API after attempting to create the registry. The json output field contains the details of the newly created registry or an error message if the creation failed. The structure typically includes registry identifiers, status, and metadata returned by the API.

No binary data output is expected from this operation.

Dependencies

  • Requires an active connection to a Portainer instance via its API.
  • Needs an API authentication token configured in the node's credentials to authorize requests.
  • The base URL for the Portainer API must be provided in the credentials.
  • The node uses standard HTTP headers for JSON content negotiation.

Troubleshooting

  • Invalid JSON in Body: If the "Body" property contains malformed JSON, the API request will fail. Ensure the JSON string is correctly formatted.
  • Authentication Errors: If the API key or token is missing or invalid, the node will return authorization errors. Verify the credentials are correct and have sufficient permissions.
  • API Endpoint Unreachable: Network issues or incorrect base URL can cause connection failures. Confirm the Portainer API URL is accessible from the n8n environment.
  • Missing Required Fields: The Portainer API may reject the request if mandatory registry fields are missing in the body. Consult Portainer API documentation for required fields when creating a registry.

Links and References

Discussion