...
General Information
...
Service | API | Method | Data Model | Workflow |
---|
urac | /admin/ inviteUsersusers/invite | PUT |
...
...
Input
...
Type: application/json
Name | Source | Mandatory | Type | Special Format | Description |
---|
usersbodyYesArrayemail | NO | String | N/A | the user email (either username or email should be provided) | groups | array of objects | array of users to be invites | username | NO | String | N/A | the user username (either username or email should be provided) | includes user object, groups array, and pin object |
|
|
Name | Source | Mandatory | Type | Special Format | Description |
---|
groups | Body | NO | Array | Array of strings | Groups array | pin | Body | NO | Object | includes code and allowed parameters | Pin Object |
|
Name | Mandatory | Type | Description |
---|
code | YES | Boolean | set to True to create a random generated code | allowed | YES | Boolean | set to True if this user is allowed to start pin code login |
| user | Body | YES | Object | Includes one of id, username, or email | User Object |
|
Name | Mandatory | Type | Special Format | Description |
---|
id | YES | String | N/A | User ID | username | YES | String | N/A | Username | email | YES | String | N/A | User Email |
|
|
Output
...
Response
SOAJS has a unified response. Check out this link to understand more the schema of SOAJS response
Valid Response
Code Block |
---|
language | js |
---|
title | Valid Response Sample |
---|
linenumbers | true |
---|
collapse | true |
---|
|
{
"result": true,
"data": {
"..."
}
1
} |
Invalid Response
Code Block |
---|
language | js |
---|
title | Error Response Sample |
---|
linenumbers | true |
---|
collapse | true |
---|
|
{
"result":false,
"errors":{
"codes":[411602],
"details":[
{
"code":411602,
"message":"invalidModel usererror: id+ provided%model_error%"
}
]
}
} |
Response schema
Follow this link to check out the response JSON Schema
SOAJS Error Codes
405 |
---|
400 | Business logic required data are missing |
520 | Unable to find |
User. Please try again.411 | invalid id provided Example (CURL)Request
Code Block |
---|
language | bash |
---|
title | Calling Get User API |
---|
|
> CURL -X POST http://127.0.0.1:4000/urac/admin/inviteUsers --data '{"users":
[
{
username: "username",
email: "email@email.com",
pin : {
code: true,
allowed: true,
}
groups : ["group"]
}
]
}' |
Response
...
language | js |
---|
title | Get User API response |
---|
...
|
602 | Model error: + %model_error% |