...
Service | API | Method |
---|
urac | /admin/group/add | POST |
...
Workflow: Add Group Flow
Input
...
Type: application/json
Name | Source | Mandatory | Type | Special Format | Description |
---|
tId | Body or Query |
---|
code | Body | YES | String | Alphanumeric - String - 20 letters Maximum |
|
name | Body | YES | String | N/A |
the Id of the tenant where this group is added | tCode or Querycode | the code of the tenant | Stringname | Body | YES | String
|
| allowedPackages |
| YES | Object | N/A |
|
|
| ^([A-Za-z0-9]+)$ |
| YES | Array of strings |
| Then keys should follow the pattern : ^([A-Za-z0-9]+)$
|
| allowedEnvironments |
| NO | Object | N/A |
description | BodyStringObject | N/A | for it is just an empty object |
Output
...
Valid Response
Code Block |
---|
language | js |
---|
title | Valid Response Sample |
---|
|
{
"result": true,
"data": true
} |
...
Code Block |
---|
language | bash |
---|
title | Calling Add Group API |
---|
|
> CURL -X POST http://127.0.0.1:4000/urac/admin/group/add?tId=5551aca9e179c39b760f7a1a&tCode=DBTN -d {
'code=gold&name=Gold&description=Group Description' "code": "silver",
"name": "Silver Group",
"description": "grp description",
"config": {
"allowedPackages": {
"prod": ["pack"]
},
"allowedEnvironments": {
"PROD": {}
}
}
} |
Response
Code Block |
---|
language | js |
---|
title | Add Group API response |
---|
|
{
"result": true,
"data": {
"code": "ADMIN",
"name": "Administration",
"description": "This is the admin group etc...",
"config": {
"allowedPackages": {
"MOBI": [": trueMOBI_BASIC"]
}
},
"tenant": {
"id": "5cadea196d44342107efe52c",
"code": "TEST"
},
"_id": "5cc835c0d7fc2f9c75b9f5ed"
}
} |