User Groups help to organize users within a particular organization.

Create

Beyond the Global User Group that’s automatically created when a new Organization is created, new User Groups can be created in an Organization by a User with Creator Role permissions. The API JSON POST must contain the desired User Group name and description in the body of the request. The API JSON response contains the User Group’s unique identity.

RequestResponse
POST https://<moab url>/api/v1/usergroupSuccess
{
“Name”:”<user group name>”,
“Description”:”<user group description>”
}
{
“id”:<user group id>,
“status”: “success”,
“message”: “user group created”
}
Failure
{
“id”:”0″,
“status”:”error”,
“message”:”user group creation failed”
}
{
“type”: “https://tools.ietf.org/html/rfc…”,
“title”: “Unauthorized”,
“status”: 401,
“traceId”: “|…”
}
Curl
curl -L -X POST ‘https://<moab url>/api/v1/usergroup’ \
-H ‘Content-Type: application/json’ \
-H ‘Authorization: Bearer <identity>.<security token>’ \
–data-raw ‘{
“Name”:”<user group name>”,
“Description”:”<user group description>”
}’

Read All

To retrieve a list of all User Groups in a particular Organization, a User from that Organization with Reader Role permissions makes an API GET request with no parameters. The API JSON response contains repeating User Group identities, names, and descriptions.

RequestResponse
GET https://<moab url>/api/v1/usergroupSuccess
[
{
“id”: <user group id>,
“name”: “<user group name>”,
“description”: “<user group description>”
},
{
“id”: <user group id>,
“name”: “<user group name>”,
“description”: “<user group description>”
}
]
Failure
{
“type”: “https://tools.ietf.org/html/rfc…”,
“title”: “Not Found”,
“status”: 404,
“traceId”: “|…”
}
{
“type”: “https://tools.ietf.org/html/rfc…”,
“title”: “Unauthorized”,
“status”: 401,
“traceId”: “|…”
}
Curl
curl -L -X GET ‘https://<moab url>/api/v1/usergroup’ \
-H ‘Content-Type: application/json’ \
-H ‘Authorization: Bearer <identity>.<security token>’ \

Read One

To retrieve a User Group in a particular Organization, a User from that Organization with Reader Role permissions makes an API GET request with the User Group identity parameter at the end of the URL. The API JSON response contains the User Group identity, name, and description.

GET https://<moab url>/api/v1/usergroup/<id>Success
{
“id”: <user group id>,
“name”: “<user group name>”,
“description”: “<user group description>”
}
Failures
{
“type”: “https://tools.ietf.org/html/rfc…”,
“title”: “Not Found”,
“status”: 404,
“traceId”: “|…”
}
{
“type”: “https://tools.ietf.org/html/rfc…”,
“title”: “One or more validation errors occurred.”,
“status”: 400,
“traceId”: “|…”,
“errors”: { [ … ] }
}
{
“type”: “https://tools.ietf.org/html/rfc…”,
“title”: “Unauthorized”,
“status”: 401,
“traceId”: “|…”
}
Curl
curl -L -X GET ‘https://<moab url>/api/v1/usergroup/<id>’ \
-H ‘Content-Type: application/json’ \
-H ‘Authorization: Bearer <identity>.<security token>’ \

Delete

To delete a User Group in a particular Organization, a User from that Organization with Creator or Contributor Role permissions makes an API DELETE request with the User Group identity parameter at the end of the URL. The API JSON response contains the User Group identity.

DELETE https://<moab url>/api/v1/usergroup/<id>Success
{
“id”: <user group id>,
“status”: “success”,
“message”: “user group deleted”
}
Failures
{
“id”: <user group id>,
“status”: “error”,
“message”: “user group deletion failed”
}
{
“type”: “https://tools.ietf.org/html/rfc…”,
“title”: “One or more validation errors occurred.”,
“status”: 400,
“traceId”: “|…”,
“errors”: { [ … ] }
}
{
“type”: “https://tools.ietf.org/html/rfc…”,
“title”: “Unauthorized”,
“status”: 401,
“traceId”: “|…”
}
Curl
curl -L -X DELETE ‘https://<moab url>/api/v1/usergroup/<id>’ \
-H ‘Content-Type: application/json’ \