An Organization owns projects, repositories, inventories, secrets and teams.
The REST API provides support for working with organizations:
Creates a new organization with specified parameters.
Only administrators can create new organizations.
/api/v1/org
POST
Authorization
, Content-Type: application/json
{
"name": "myOrg"
}
Success response
Content-Type: application/json
{
"result": "CREATED",
"ok": true,
"id": "..."
}
Updates parameters of an existing organization.
/api/v1/org
POST
Authorization
, Content-Type: application/json
{
"name": "new name",
"id": "---"
}
Organization id
is mandatory, in case of updating organization name
.
Success response
Content-Type: application/json
{
"result": "UPDATED",
"ok": true,
"id": "..."
}
Removes an existing organization and all resources associated with it (projects, secrets, teams, etc). This operation is irreversible.
Only administrators can delete organizations.
/api/v1/org/${orgName}?confirmation=yes
DELETE
Authorization
Success response
Content-Type: application/json
{
"result": "DELETED",
"ok": true
}
Lists all available organizations.
/api/v1/org?onlyCurrent=${onlyCurrent}
GET
Authorization
${onlyCurrent}
parameter is true
, then the server will
return the list of the current user’s organizations. Otherwise,
all organizations will be returned.Success response
Content-Type: application/json
[
{
"id": "...",
"name": "..."
},
{
"id": "...",
"name": "..."
}
]