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": "..."
}
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": "..."
}
]