RegistriesApi.md 8.4 KB

PortainerApi.RegistriesApi

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

registryAccessUpdate

Registry registryAccessUpdate(id, body)

Manage accesses to a registry

Manage user and team accesses to a registry. Access policy: administrator

Example

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);

Parameters

Name Type Description Notes
id Number Registry identifier
body RegistryAccessUpdateRequest Authorizations details

Return type

Registry

Authorization

jwt

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

registryCreate

Registry registryCreate(body)

Create a new registry

Create a new registry. Access policy: administrator

Example

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);

Parameters

Name Type Description Notes
body RegistryCreateRequest Registry details

Return type

Registry

Authorization

jwt

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

registryDelete

registryDelete(id)

Remove a registry

Remove a registry. Access policy: administrator

Example

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);

Parameters

Name Type Description Notes
id Number Registry identifier

Return type

null (empty response body)

Authorization

jwt

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

registryInspect

Registry registryInspect(id)

Inspect a registry

Retrieve details about a registry. Access policy: administrator

Example

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);

Parameters

Name Type Description Notes
id Number Registry identifier

Return type

Registry

Authorization

jwt

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

registryList

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

Example

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);

Parameters

This endpoint does not need any parameter.

Return type

RegistryListResponse

Authorization

jwt

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

registryUpdate

Registry registryUpdate(id, body)

Update a registry

Update a registry. Access policy: administrator

Example

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);

Parameters

Name Type Description Notes
id Number Registry identifier
body RegistryUpdateRequest Registry details

Return type

Registry

Authorization

jwt

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json