Versions Compared

Key

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

This article covers the following topics:

...

If user exists, then Luma returns an array of users. If the ''data'' array returns any value, then it means that a single or multiple users exist in Luma, that align to that data as shown below.

Code Block
languagexml
titleSample Response Code Block
linenumberstrue
{
    "timestamp": 1562831242123,
    "status": 200,
    "message": "OK",
    "errors": [],
    "data": [
        {
            "id": 7,
            "tenant": 1054,
            "createdDate": 1551360119403,
            "createdByContact": {
                "id": -1,
                "name": "system-user"
            },
            "modifiedDate": 1553494021370,
            "modifiedByContact": {
                "id": -1,
                "name": "system-user"
            },
            "recordsStatus": 1,
            "createdBy": {
                "id": -1,
                "name": "System User"
            },
            "modifiedBy": {
                "id": -1,
                "name": "System User"
            },
            "subTenant": 1,
            "userName": "john",
            "email": "john.williams@gmail.com",
            "firstName": "john",
            "lastName": "williams",
            "middleName": "",
            "title": null,
            "phone": null,
            "roles": [
                {
                    "id": -1,
                    "roleName": "Administrator",
                    "isItsmRole": "Yes"
                }
            ],
            "lastUpdatedSource": "ITSM",
            "language": {
                "id": 6,
                "tenant": 1054,
                "createdDate": 1549277386000,
                "createdByContact": {
                    "id": -1,
                    "name": "system-user"
                },
                "modifiedDate": 1549277386000,
                "modifiedByContact": {
                    "id": -1,
                    "name": "system-user"
                },
                "recordsStatus": 1,
                "createdBy": {
                    "id": -1,
                    "name": "System User"
                },
                "modifiedBy": {
                    "id": -1,
                    "name": "System User"
                },
                "subTenant": 1,
                "code": "en",
                "name": "English",
                "displayName": "English (United States)",
                "locale": "United States"
            },
            "groupNames": null,
            "contactGlobalAttributesVos": null
        }
    ]
}

...

Code Block
languagexml
titleSample Response Code Block
linenumberstrue
{
    "timestamp": 1562837529912,
    "status": 200,
    "message": "OK",
    "errors": [],
    "data": false
}


Info
titleNote

...

This API will work only if it is called from

...

a skill from

...

Luma,

...

since some more information will be passed implicitly from the respective channel from where the user

...

invokes the skill

...

. This is not possible when the API is called directly

...

from the

...

REST client.

Create a new user

Use the following JSON code while creating a new user in Luma.

...