All URIs are relative to http://portainer.domain/api
| Method | HTTP request | Description |
|---|---|---|
| registryAccessUpdate | PUT /registries/{id}/access | Manage accesses to a registry |
| registryCreate | POST /registries | Create a new registry |
| registryDelete | DELETE /registries/{id} | Remove a registry |
| registryInspect | GET /registries/{id} | Inspect a registry |
| registryList | GET /registries | List registries |
| registryUpdate | PUT /registries/{id} | Update a registry |
Registry registryAccessUpdate(id, body)
Manage accesses to a registry
Manage user and team accesses to a registry. Access policy: administrator
var PortainerApi = require('portainer_api');
var defaultClient = PortainerApi.ApiClient.instance;
// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';
var apiInstance = new PortainerApi.RegistriesApi();
var id = 56; // Number | Registry identifier
var body = new PortainerApi.RegistryAccessUpdateRequest(); // RegistryAccessUpdateRequest | Authorizations details
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.registryAccessUpdate(id, body, callback);
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Registry identifier | |
| body | RegistryAccessUpdateRequest | Authorizations details |
Registry registryCreate(body)
Create a new registry
Create a new registry. Access policy: administrator
var PortainerApi = require('portainer_api');
var defaultClient = PortainerApi.ApiClient.instance;
// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';
var apiInstance = new PortainerApi.RegistriesApi();
var body = new PortainerApi.RegistryCreateRequest(); // RegistryCreateRequest | Registry details
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.registryCreate(body, callback);
| Name | Type | Description | Notes |
|---|---|---|---|
| body | RegistryCreateRequest | Registry details |
registryDelete(id)
Remove a registry
Remove a registry. Access policy: administrator
var PortainerApi = require('portainer_api');
var defaultClient = PortainerApi.ApiClient.instance;
// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';
var apiInstance = new PortainerApi.RegistriesApi();
var id = 56; // Number | Registry identifier
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.registryDelete(id, callback);
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Registry identifier |
null (empty response body)
Registry registryInspect(id)
Inspect a registry
Retrieve details about a registry. Access policy: administrator
var PortainerApi = require('portainer_api');
var defaultClient = PortainerApi.ApiClient.instance;
// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';
var apiInstance = new PortainerApi.RegistriesApi();
var id = 56; // Number | Registry identifier
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.registryInspect(id, callback);
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Registry identifier |
RegistryListResponse registryList()
List registries
List all registries based on the current user authorizations. Will return all registries if using an administrator account otherwise it will only return authorized registries. Access policy: restricted
var PortainerApi = require('portainer_api');
var defaultClient = PortainerApi.ApiClient.instance;
// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';
var apiInstance = new PortainerApi.RegistriesApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.registryList(callback);
This endpoint does not need any parameter.
Registry registryUpdate(id, body)
Update a registry
Update a registry. Access policy: administrator
var PortainerApi = require('portainer_api');
var defaultClient = PortainerApi.ApiClient.instance;
// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';
var apiInstance = new PortainerApi.RegistriesApi();
var id = 56; // Number | Registry identifier
var body = new PortainerApi.RegistryUpdateRequest(); // RegistryUpdateRequest | Registry details
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.registryUpdate(id, body, callback);
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Registry identifier | |
| body | RegistryUpdateRequest | Registry details |