TeamMembershipsApi.md 6.0 KB

PortainerApi.TeamMembershipsApi

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

Method HTTP request Description
teamMembershipCreate POST /team_memberships Create a new team membership
teamMembershipDelete DELETE /team_memberships/{id} Remove a team membership
teamMembershipList GET /team_memberships List team memberships
teamMembershipUpdate PUT /team_memberships/{id} Update a team membership

teamMembershipCreate

TeamMembership teamMembershipCreate(body)

Create a new team membership

Create a new team memberships. Access is only available to administrators leaders of the associated team. 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.TeamMembershipsApi();

var body = new PortainerApi.TeamMembershipCreateRequest(); // TeamMembershipCreateRequest | Team membership details


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

Parameters

Name Type Description Notes
body TeamMembershipCreateRequest Team membership details

Return type

TeamMembership

Authorization

jwt

HTTP request headers

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

teamMembershipDelete

teamMembershipDelete(id)

Remove a team membership

Remove a team membership. Access is only available to administrators leaders of the associated team. 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.TeamMembershipsApi();

var id = 56; // Number | TeamMembership identifier


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.teamMembershipDelete(id, callback);

Parameters

Name Type Description Notes
id Number TeamMembership identifier

Return type

null (empty response body)

Authorization

jwt

HTTP request headers

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

teamMembershipList

TeamMembershipListResponse teamMembershipList()

List team memberships

List team memberships. Access is only available to administrators and team leaders. 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.TeamMembershipsApi();

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

Parameters

This endpoint does not need any parameter.

Return type

TeamMembershipListResponse

Authorization

jwt

HTTP request headers

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

teamMembershipUpdate

TeamMembership teamMembershipUpdate(id, body)

Update a team membership

Update a team membership. Access is only available to administrators leaders of the associated team. 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.TeamMembershipsApi();

var id = 56; // Number | Team membership identifier

var body = new PortainerApi.TeamMembershipUpdateRequest(); // TeamMembershipUpdateRequest | Team membership details


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

Parameters

Name Type Description Notes
id Number Team membership identifier
body TeamMembershipUpdateRequest Team membership details

Return type

TeamMembership

Authorization

jwt

HTTP request headers

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