All URIs are relative to http://portainer.domain/api
| Method | HTTP request | Description |
|---|---|---|
| teamCreate | POST /teams | Create a new team |
| teamDelete | DELETE /teams/{id} | Remove a team |
| teamInspect | GET /teams/{id} | Inspect a team |
| teamList | GET /teams | List teams |
| teamMembershipsInspect | GET /teams/{id}/memberships | Inspect a team memberships |
| teamUpdate | PUT /teams/{id} | Update a team |
Team teamCreate(body)
Create a new team
Create a new team. 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.TeamsApi();
var body = new PortainerApi.TeamCreateRequest(); // TeamCreateRequest | Team details
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.teamCreate(body, callback);
| Name | Type | Description | Notes |
|---|---|---|---|
| body | TeamCreateRequest | Team details |
teamDelete(id)
Remove a team
Remove a team. 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.TeamsApi();
var id = 56; // Number | Team identifier
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.teamDelete(id, callback);
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Team identifier |
null (empty response body)
Team teamInspect(id)
Inspect a team
Retrieve details about a team. Access is only available for administrator and leaders of that 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.TeamsApi();
var id = 56; // Number | Team identifier
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.teamInspect(id, callback);
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Team identifier |
TeamListResponse teamList()
List teams
List teams. For non-administrator users, will only list the teams they are member of. 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.TeamsApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.teamList(callback);
This endpoint does not need any parameter.
TeamMembershipsResponse teamMembershipsInspect(id)
Inspect a team memberships
Inspect a team memberships. Access is only available for administrator and leaders of that 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.TeamsApi();
var id = 56; // Number | Team identifier
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.teamMembershipsInspect(id, callback);
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Team identifier |
teamUpdate(id, body)
Update a team
Update a team. 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.TeamsApi();
var id = 56; // Number | Team identifier
var body = new PortainerApi.TeamUpdateRequest(); // TeamUpdateRequest | Team details
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.teamUpdate(id, body, callback);
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Team identifier | |
| body | TeamUpdateRequest | Team details |
null (empty response body)