Organization methods

GET /api/1/organizations

Returns list of all organizations that current user belong to.

Status Codes:

Response body:

[
    {
      "id" : "50dd88bee4b082b7a96d072e",
      "name" : "McDomalds",
    },
    ...
]

See also: How to find a particular organization ID?

GET /api/1/organizations/(orgId)/users

Returns list of all users in the organization.

Parameters:
  • orgId (uuid) – id of the organization
Status Codes:

Response body:

[
  {
    "id" : "40bc87abc4b083b7f06d073a",
    "name" : "John Smith",
    "email" : "jsmith@some.org",
    "roles": ["Administrator", "Guest", "DevOp"],
    "canEvict": true,
    "canManageRoles": true
  },
  ...
]
GET /api/1/organizations/(orgId)/roles

Returns list of all roles in the organization.

Parameters:
  • orgId (uuid) – id of the organization
Status Codes:

Response body:

[
  {
    "id" : "5672edafd4c6700c0c92df2b",
    "name" : "Administrator",
    "canEdit" : false,
    "canDelete" : false
  },
  {
    "id" : "5673edafd4c6701c0c92df2c",
    "name" : "Guest",
    "canEdit" : true,
    "canDelete" : false
  },
  {
    "id" : "5674edafd4c6702c0c92df2d",
    "name" : "DevOp",
    "canEdit" : true,
    "canDelete" : true
  },
  ...
]
GET /api/1/roles/(roleId)

Returns the specified role details.

Parameters:
  • roleId (uuid) – id of the role
Status Codes:

Response body:

{
  "id" : "5674edafd4c6702c0c92df2d",
  "name" : "DevOp",
  "canEdit" : true,
  "canDelete" : true,
  "permissions": "- RunInstanceWorkflow:\n  - '/applications/*/instances/*/workflows/deploy*'\n"
}
POST /api/1/organizations/(orgId)/roles

Creates new role in the organization.

Parameters:
  • orgId (uuid) – id of the organization
Status Codes:

Request body:

{
  "name" : "DevOp",
  "permissions" : "- RunInstanceWorkflow:\n  - '/applications/*/instances/*/workflows/deploy*'\n"
}

Response body:

{
  "id" : "5674edafd4c6702c0c92df2d",
  "name" : "DevOp",
  "permissions" : "- RunInstanceWorkflow:\n  - '/applications/*/instances/*/workflows/deploy*'\n",
  "canEdit" : true,
  "canDelete" : true
}
PUT /api/1/roles/(roleId)

Modifies the specified role

Parameters:
  • roleId (uuid) – id of the role
Status Codes:

Request body:

{
  "name" : "DevOpNew",
  "permissions" : "- RunInstanceWorkflow:\n  - '/applications/*/instances/*/workflows/deployNew*'\n"
}
DELETE /api/1/roles/(roleId)

Removes the specified role

Parameters:
  • roleId (uuid) – id of the role
Status Codes:
PUT /api/1/organizations/(orgId)/users/(userId)/roles

Assigns roles to the user in the organization.

Parameters:
  • orgId (uuid) – id of the organization
  • userId (uuid) – id of the user
Status Codes:

Request body:

[
  "Administrator",
  "DevOpNew"
]
DELETE /api/1/organizations/(orgId)/users/(userId)/roles

Revoke roles from the user in the organization.

Parameters:
  • orgId (uuid) – id of the organization
  • userId (uuid) – id of the user
Status Codes:

Request body:

[
  "Guest",
  "DevOpOld"
]