DockerhubApi.md 2.8 KB

PortainerApi.DockerhubApi

All URIs are relative to http://portainer.domain/api

Method HTTP request Description
dockerHubInspect GET /dockerhub Retrieve DockerHub information
dockerHubUpdate PUT /dockerhub Update DockerHub information

dockerHubInspect

DockerHubSubset dockerHubInspect()

Retrieve DockerHub information

Use this endpoint to retrieve the information used to connect to the DockerHub Access policy: authenticated

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.DockerhubApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.dockerHubInspect(callback);

Parameters

This endpoint does not need any parameter.

Return type

DockerHubSubset

Authorization

jwt

HTTP request headers

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

dockerHubUpdate

DockerHub dockerHubUpdate(body)

Update DockerHub information

Use this endpoint to update the information used to connect to the DockerHub 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.DockerhubApi();

var body = new PortainerApi.DockerHubUpdateRequest(); // DockerHubUpdateRequest | DockerHub information


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.dockerHubUpdate(body, callback);

Parameters

Name Type Description Notes
body DockerHubUpdateRequest DockerHub information

Return type

DockerHub

Authorization

jwt

HTTP request headers

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