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 |
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
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);
| Name | Type | Description | Notes |
|---|---|---|---|
| body | TeamMembershipCreateRequest | Team membership details |
teamMembershipDelete(id)
Remove a team membership
Remove a team membership. Access is only available to administrators leaders of the associated team. 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.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);
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | TeamMembership identifier |
null (empty response body)
TeamMembershipListResponse teamMembershipList()
List team memberships
List team memberships. Access is only available to administrators and team leaders. 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.TeamMembershipsApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.teamMembershipList(callback);
This endpoint does not need any parameter.
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
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);
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Team membership identifier | |
| body | TeamMembershipUpdateRequest | Team membership details |