Use the following APIs to create, view, update, and delete an organization.
Create an Organization
-
Required Permissions
-
You must have the Create Organization permission to perform this operation.
-
API
-
/api/organizations
-
Method
-
POST
-
Required Parameters
-
| Name |
Description |
| name string |
Organization name. |
| parentId string |
Immediate parent in the organization hierarchy. |
| status string |
|
-
Input Example
-
{
"name": "",
"parentId":"",
"status":""
}
-
Response
-
{
"id": "string"
}
Get a List of Organizations
-
Required Permissions
-
You must have the View Organization permission to perform this operation.
-
API
-
/api/organizations
-
Method
-
GET
-
Required Parameters
-
None.
-
Response
-
{
"tenants": [
{
"id": "",
"name": "",
"parentId": "",
"status": "",
"createdTime": "",
"lastUpdatedTime": "",
"updateVersion": 1
}
],
"pageInfo": {
"page": 1,
"pageSize": 10,
"totalElements": "11",
"totalPages": "2"
}
}
Get an Organization by ID
-
Required Permissions
-
You must have the View Organization permission to perform this operation.
-
API
-
/api/organizations/{id}
-
Method
-
GET
-
Required Parameters
-
| Name |
Description |
| id string |
Organization ID. |
-
Response
-
{
"id":"",
"name": "",
"parentId":"",
"status":"",
"createdTime": "",
"lastUpdatedTime": "",
"updateVersion":1,
"orgId":"",
"createdBy":"",
"lastUpdatedBy":""
}
Update an Organization
-
Required Permissions
-
You must have the Edit Organization permission to perform this operation.
-
API
-
/api/organizations/{id}
-
Method
-
PUT
-
Required Parameters
-
| Name |
Description |
| name string |
Organization name. |
| parentId string |
Immediate parent in the organization hierarchy. |
| status string |
|
-
Input Example
-
{
"name": "",
"parentId":"",
"status":"",
"updateVersion":1,
}
-
Response
-
{
"id": "string"
}
Delete a Organization
-
Required Permissions
-
You must have the Delete Organization permission to perform this operation.
-
API
-
/api/organizations/{id}
-
Method
-
DELETE
-
Required Parameters
-
| Name |
Description |
| id string |
Organization ID. |
-
Response
-
{}