General Information
...
Service | API | Method |
---|
urac | /admin/group/add | POST |
Data Model: %Link to Data Model% Groups
Workflow: %Link to Architecture Page% Add Group Flow
Input
...
Type: application/json
Name | Source | Mandatory | Type | Special Format | Description |
---|
|
---|
code | Body | YES | String | Alphanumeric - String - 20 letters Maximum |
|
name | Body | YES | String | N/A |
|
description | Body | YES | String | N/A |
|
config | Body | YES | Object | N/A |
|
| 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 |
|
|
| ^([A-Za-z]+)$ |
| YES | Object | N/A | for it is just an empty object |
Output
...
Valid Response
Code Block |
---|
language | js |
---|
title | Valid Response Sample |
---|
|
{
"result": true,
"data": {
"..."
}
} |
Invalid Response
Code Block |
---|
language | js |
---|
title | Error Response Sample |
---|
|
{
"result":false,
"errors":{
"codes":[400421],
"details":[
{
"code":400421,
"message":"ProblemGroup code withalready theexists. providedChoose passwordanother"
}
]
}
} |
Error Codes
Errorconnection error |
421 | Group code already exists. Choose another |
611 | invalid tenant id provided |
Example (CURL)
...
Request
Code Block |
---|
language | bash |
---|
title | Calling YOUR Add Group API |
---|
|
> CURL -X POST http://127.0.0.1:4000/...urac/admin/group/add -d {
"code": "silver",
"name": "Silver Group",
"description": "grp description",
"config": {
"allowedPackages": {
"prod": ["pack"]
},
"allowedEnvironments": {
"PROD": {}
}
}
} |
Response
Code Block |
---|
language | js |
---|
title | YOUR Add Group API response |
---|
|
{
"result": true,
"data": {
"code": "ADMIN",
"_idname": "57063608622c47b5c097d19bAdministration",
"description": "This is the admin group etc...",
"config": {
"allowedPackages": {
"MOBI": ["MOBI_BASIC"]
}
},
"tenant": {
"id": "5cadea196d44342107efe52c",
"code": "TEST"
},
"_id": "5cc835c0d7fc2f9c75b9f5ed"
}
} |