Skip to content

Set LockpathUser

Robert Klohr edited this page Nov 12, 2020 · 2 revisions

Set-LockpathUser

Setting any property, including those with multiple values, overwrites the attribute with the new value.

If the property is an array and multiple values are passed in the API request then only those that do not result in an error are updated. If all values result in an error then that property is not changed, no error is indicated and the API response is GetUser. This means that when updating an array property only way to check for success is to compare the API request to the API response and see if the intended changes were applied successfully.

If the property contains a single value and the value passed on the API request results in an error the entire update fails with an "Invalid permissions" response.

The API response is modified version of the GetUser request on the UserId. Normally GetUsers returns all user fields but the response from UpdateUser is all non null user fields.

It is also important to note that unlike the normal GetUser response that returns all user fields the modifed GetUser response from UpdateUser only includes non-null fields.

Read Only Properties

Deleted

Partially Updatable Properties

Locked: true (can't set to false)

Fully Updatable Properties

Active: true|false APIAccess: true|false (must be full user, i.e. AccountType=1) IsSAML: True|false (setting to true wipes the currently set password. The password must be set at the same time when changing this from true to false) IsLDAP: true|false (you must set the LDAP directory at the same time as changing this from false to true)

LDAPDirectory: id=# Manager: id=# SecurityConfiguration: id=# Department: id=#

SecurityRoles: (id=#,id=#) groups: (id=#,id=#) FunctionalRoles: (id=#,id=#)

Password: (password requirements are enforced via the API)

Language: # (must select local ID from languages loaded on the platform 1033 english US or 2057 english UK by default) AccountType: # (can change between full user (AccountType=1) and awareness user (AccountType=4))

Username: string (must be unique) EmailAddress: string (duplicates allowed)

FirstName: string MiddleNam: string LastName: string HomePhone: string WorkPhone: string Fax: string Title: string

{
    "Id": 7,
    "Username": "ApiUserName",
    "Active": false,
    "Locked": false,
    "AccountType": 1,
    "FirstName": "ApiFirst",
    "MiddleName": "A.",
    "LastName": "ApiLast",
    "title": "Api Title",
    "Language": 1033,
    "EmailAddress": "api@api.api",
    "HomePhone": "(api) home-phone",
    "WorkPhone": "api.work.phone",
    "MobilePhone": "api-mobile-phone",
    "fax": "api.fax",
    "Manager": {
        "Id": 10
     },
    "Department": {
        "Id": 13
    },
    "IsSAML": false,
     "IsLDAP": true,
    "LDAPDirectory": {
        "Id": 4
    },
    "SecurityConfiguration": {
      "Id": 8
    },
    "APIAccess": false,
    "groups": [
        {
            "id": 60
        },
        {
            "id": 59
        }
    ],
    "SecurityRoles": [
        {
            "Id": 5
        },
        {
            "id": 4
        }
    ],
    "FunctionalRoles": [
        {
            "Id": 134
        },
        {
            "Id": 135
        }
    ]
}

Clone this wiki locally