Create User


This request creates a user.

Resource

POST /users

Where OID is the object ID of the user.

Payload

Response

The user object. Created sub-objects are updated with their object ID.

Context

Authorization

Administrator

Errors

HTTP code Xelion code Description

404

10100

Person not found.

500

11000

Person already assigned to another user. Username already existst. Empty username.

Example

Request
POST https://xelion.nl/api/v1/master/users
Payload
{
    "userName": "username",
    "password": "",
    "active": true,
    "xccRole": "user",
    "person": {
      "oid": "1652537",
      "objectType": "Person"
    },
    "locale": {
      "oid": "1556585",
      "objectType": "Locale"
    },
    "userLicense": true,
    "defaultSecurityNewContacts": "",
    "phoneHost": "",
    "lines": [
        {
            "line": {
                "commonName": "Support",
                "oid": "1651218",
                "objectType": "XCCPhoneLine"
            },
            "orderNumber": 1,
            "skillNumber": 0,
            "incoming": true,
            "outgoing": false,
            "editable": "INCOMINGANDOUTGOING",
            "objectType": "XCCConnectedUser"
        }
    ],
    "preferences":
    {
        "wallboards": [
            {
                "phoneLine": {
                    "oid": "1651130",
                    "objectType": "XCCPhoneLine"
                },
                "objectType": "XCCUserWallboard"
            }
        ],
        "objectType": "UserPreferences"
    },
    "commonName": "user",
    "objectType": "UserProfile"
}
Response
{
  "object": {
    "userName": "username",
    "active": true,
    "xccRole": "user",
    "person": {
      "oid": "1652537",
      "objectType": "Person"
    },
    "locale": {
      "oid": "1556585",
      "objectType": "Locale"
    },
    "userLicense": true,
    "defaultSecurityNewContacts": "",
    "phoneHost": "",
    "lines": [
        {
            "line": {
                "commonName": "Support",
                "oid": "1651218",
                "objectType": "XCCPhoneLine"
            },
            "orderNumber": 1,
            "skillNumber": 0,
            "incoming": true,
            "outgoing": false,
            "editable": "INCOMINGANDOUTGOING",
            "objectType": "XCCConnectedUser",
            "oid": "1324587"
        }
    ]
    "preferences": {
        "wallboards": [
            {
                "phoneLine": {
                    "permissions": "ReadWriteRemove",
                    "commonName": "Telefoonaansluiting Arno",
                    "oid": "1651130",
                    "objectType": "XCCPhoneLine"
                },
                "oid": "1933973",
                "objectType": "XCCUserWallboard"
            }
        ],
        "permissions": "ReadWriteRemove",
        "commonName": "arno99",
        "oid": "1933939",
        "objectType": "UserPreferences"
    },
    "commonName": "user",
    "oid": "1033697",
    "objectType": "UserProfile"
  },
  "links": [
    {
      "rel": "self",
      "href": "http://sip.xelion.nl/api/v1/master/users/1033697",
      "method": "GET"
    }
  ]
}