General Information
...
Service | API | Method |
---|
urac | /admin/editUser | POST |
Data Models: Users, Groups
Workflow: %Link to Architecture Page% Edit User Flow
Input
...
Type: application/json
| Name | Source | Mandatory | Type | Special Format | Description |
---|
uId | Query | YES | String | N/A |
|
|
username | Body | YES | String | alphanumeric with _ , - characters only |
|
|
firstName | Body | YES | String | N/A |
| N/A | Email Address Format (JSON Schema Validation) |
|
status | Body | YES | String |
N/A- Enum | 'active', 'inactive' | restricted to either 'active' OR 'inactive' |
groups | Body | NO | Array |
N/AArray of Strings | array of group code values |
config NameSourceMandatoryTypeSpecial Format | Description | keys | Body | YES | Object | N/A | |
packages | Body | NO | Object | N/A | |
| | Name | Source | Mandatory | Type | Special Format | Description |
%packageName% | String | Same Password Value |
|
pin |
| body | NO |
|
|
|
| code |
| NO | Boolean | set to True to change pin to a random generated code |
|
| allowed |
| NO | Boolean |
|
|
config | Body | NO | Object | N/A |
| | Name | Source | Mandatory | Type | Special Format | Description |
---|
|
acl | Name | Source | Mandatory | Type | Special Format | Description |
---|
access | keys | Body | NO | Object | N/A | Additional Properties: acl (Object) |
|
| Boolean or Array apisPermission | | String | N/A | | apis | Body | NO | Object | N/A | |
| Array |
| array of allowedTenant objects |
Name | Source | Mandatory | Type | Special Format | Description |
---|
|
|
%apiRoute%YESN/A | | | | Name | Source | Mandatory | Type | Special Format | Description |
---|
access | Body | NO | Boolean or Array | N/A | |
|
...
| Properties: - id (String)
- code (String)
- pin (Object)
- code (Boolean)
- allowed (Boolean)
| groups | Body | NO | Array |
|
|
|
Example of config: Code Block |
---|
language | actionscript3 |
---|
title | config |
---|
| config: {
packages: {},
keys: {},
allowedTenants: [
{"tenant": {
id: "THYME_tID",
code: "THYME_CODE",
pin: {"code": "1235", "allowed": true}
},
groups: ["waiter"]
},
{tenant: {
id: "ELVIRA_tID",
code: "ELVIRA_CODE"
},
groups: ["manager]
}
]
}, |
|
Output
...
Valid Response
Code Block |
---|
language | js |
---|
title | Valid Response Sample |
---|
|
{
"result": true,
"data": true
} |
Invalid Response
Code Block |
---|
language | js |
---|
title | Error Response Sample |
---|
|
{
"result":false,
"errors":{
"codes":[405],
"details":[
{
"code":405,
"message":"Unable to find User. Please try again."
}
]
}
} |
Error Codes
| |
---|
405 | Unable to find User. Please try again. |
407 | Problem validating Request. Please try again. |
410 | username taken, please choose another username |
411 | invalid user id provided |
413 | Invalid profile field provided. Profile should be a stringified object. |
415 | Unable to find group. |
500 | This record in locked. You cannot modify or delete it |
Example (CURL)
...
Request
Code Block |
---|
language | bash |
---|
title | Calling Edit User API |
---|
|
> CURL -X POST http://127.0.0.1:4000/urac/admin/editUser?uId=123 -d 'username=john&firstName=John&lastName=Doe&email=johndoe@domain.com&status=active' |
...