Organizations represent an isolated tenant containing groups, users, and things to facilitate operations within a particular organization.

Create

Creating a new Organization has the effect of creating a new, isolated tenant within the Moab platform by a user that is unknown to the system. The API request must contain the new organization name, organization description, the first name and last name of the new user, the user’s description, a globally unique email address, and password. Once Moab has verified the organization doesn’t already exist and the terms and policies are agreed to, it will create the organization, a new global thing group, a new global user group, and make the new user a member of that group. The new user will be given Creator role permissions. The API response will contain the user’s unique identity and security token which will be used to make all subsequent API calls by the new user.

RequestResponse
POST https://<moab url>/api/v1/organization Success
{
“OrganizationName”:”<org name>”,
“OrganizationDescription”:”<org description>”,
“FirstName”:”<first name>”,
“LastName”:”<last name>”,
“UserDescription”:”<description>”,
“UserEmailAddress”:”<username@email.com>”,
“UserPassword”:”<P@ssw0rd>”,
“agreeToTermsAndPolicies”: <0 or 1>
}
{
“id”: <user id>,
“securityToken”: <token>,
“status”: “success”,
“message”: “initialization succeeded”
}
Failures
{
“id”: 0,
“securityToken”: 0,
“status”: “error”,
“message”: “organization already exists”
}
{
“type”: “https://tools.ietf.org/html/rfc…”,
“title”: “Unauthorized”,
“status”: 401,
“traceId”: “|…”
}
Curl
curl -L -X POST ‘https://<moab url>/api/v1/organization’ \
-H ‘Content-Type: application/json’ \
-H ‘Authorization: Bearer <identity>.<security token>’ \
–data-raw ‘{
“organizationName”: “<org name>”,
“organizationDescription”: “<org description>”,
“firstName”: “<first name>”,
“lastName”: “<last name>”,
“userDescription”: “<description>”,
“userEmailAddress”: “<username@email.com>”,
“userPassword”: “<P@ssw0rd>”,
“agreeToTermsAndPolicies”: <0 or 1>
}’

Delete

Due to the importance of an Organization, it can only be deleted by a User that’s a member of the Organization with Creator permissions.

RequestResponse
https://<moab url>/api/v1/organization/<id>Success
{
“id”: <organization id>,
“status”: “success”,
“message”: “organization deleted”
}
Failures
{
“id”: <organization id>,
“status”: “error”,
“message”: “organization deletion failed”
}
{
“type”: “https://tools.ietf.org/html/rfc…”,
“title”: “Unauthorized”,
“status”: 401,
“traceId”: “|…”
}
Curl
curl -L -X DELETE ‘https://<moab url>/api/v1/organization/<id>’ \
-H ‘Content-Type: application/json’ \
-H ‘Authorization: Bearer <identity>.<security token>’ \