POST v2/api/users/{id}/enabled

Sets the activity of the specified Interactive User. Disabling a user also deactivates all associated API Credentials. Re-enabling a user sets them back to their exact previous active state - i.e. password and API Credentials are exactly as they were. This API call can only be made by the Administrator who created the target user.

Request Information

Parameters

NameDescriptionAdditional information
id
The identifier.

Define this parameter in the request URI.

newStateInput
The new activity state.

Define this parameter in the request body.

Request body formats

application/json, text/json

Sample:
{
  "Enabled": "sample string 1"
}

Response Information

The newly updated Interactive User with their API Credentials is returned. This endpoint can only be called by the Administrator who created the target user, otherwise a 403:Forbidden is returned. The user's state must be a valid state, otherwise a 400:BadRequest is returned.

Response body formats

application/json, text/json

Sample:
{
  "Id": "91eb7469-d5f1-4c5b-80e4-28d7d34eefe9",
  "Name": "sample string 2",
  "Username": "sample string 3",
  "Role": "sample string 4",
  "Credentials": [
    {
      "Id": "119f619b-8f5f-44a1-adc1-266e324b9d72",
      "Enabled": true,
      "Created": "2020-07-06T04:34:30.0359647+00:00"
    },
    {
      "Id": "119f619b-8f5f-44a1-adc1-266e324b9d72",
      "Enabled": true,
      "Created": "2020-07-06T04:34:30.0359647+00:00"
    },
    {
      "Id": "119f619b-8f5f-44a1-adc1-266e324b9d72",
      "Enabled": true,
      "Created": "2020-07-06T04:34:30.0359647+00:00"
    }
  ],
  "Enabled": true,
  "Created": "2020-07-06T04:34:30.0359647+00:00"
}