Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

General Information

...

ServiceAPIMethodData ModelsWorkflow
urac/admin/editUseruserPUT

...

...

Input

...

Type: application/json
password

NameSourceMandatoryTypeSpecial FormatDescription
uIdidQueryYESStringN/AUser ID
usernameBodyYESStringalphanumeric with _ , - characters onlyUsername
firstNameBodyYESStringN/AFirst Name
lastNameBodyYESStringN/ALast Name
emailBodyYESStringEmail Address Format (JSON Schema Validation)Email
statusBodyYESString - Enum

'active',

'inactive' , 'pendingNew'

restricted to either 'active' OR , 'inactive', or 'pendingNew'
groupsBodyNOArrayArray of Stringsarray of group code values
profileBodyNOObjectN/AProfilebody


Output

...

Properties:

  • id (String)
  • code (String)
  • pin (Object)
    • code (Boolean)
    • allowed (Boolean)

...

Example of config:

Code Block
languageactionscript3
titleconfig
 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

...

Response

SOAJS has a unified response. Check out this link to understand more the schema of SOAJS response 

Valid Response

Code Block
languagejs
titleValid Response Sample
linenumberstrue
collapsetrue
{
	"result": true,
	"data": true
}

...

Code Block
languagejs
titleError Response Sample
linenumberstrue
collapsetrue
{
    "result":false,
    "errors":{
        "codes":[405602],
        "details":[
            {
                "code":405602,
                "message":"UnableModel toerror: find User. Please try again.+ %model_error%"
            }
        ]
    }
}

Response schema

Follow this link to check out the response JSON Schema

SOAJS Error Codes



Code
Description
405Unable to find User. Please try again.407Problem validating Request. Please try again.410username taken, please choose another username411invalid user id provided415Unable to find group.500This record in locked. You cannot modify or delete it

Example (CURL)

Request

Code Block
languagebash
titleCalling 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'

Response

...

languagejs
titleEdit User API response

...

400

Business logic required data are missing

602Model error: + %model_error%