Updates a user. user_id, tenant and user fields to update are required. (deprecated)
PUT /users/{userId}
Operation id: UserService_UpdateUser
Description
[Deprecated: Please use the Bulk Update Users API.] Updates a user.
Tags: UserService
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | user_id of the user to update, Required: true |
Security
- Authorization (apiKey)
- Bearer token
Responses
200 — A successful response.
Content type: application/json
default — An unexpected error response.
Content type: application/json
Request body
Required: Yes
application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
tenantId | string | No | |
user | object | No |
{
"type": "object",
"properties": {
"tenantId": {
"type": "string"
},
"user": {
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string"
},
"location": {
"type": "string"
},
"site": {
"type": "string"
},
"departments": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"scope": {
"type": "string"
},
"fieldName": {
"type": "string"
},
"value": {
"type": "string"
},
"domain": {
"type": "string"
}
}
}
},
"workspacesWrapper": {
"type": "object",
"properties": {
"workspaces": {
"type": "array",
"description": "Workspaces this user is assigned to. Required: false\nNote: The tenant_id of any item is ignored. The tenant_id from the enclosing request will be used.",
"items": {
"type": "object"
}
}
}
},
"claims": {
"type": "object"
},
"scope": {
"type": "string"
},
"addresses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"UNRECOGNIZED_ADDRESS",
"HOME_ADDRESS",
"OFFICE_ADDRESS"
],
"default": "UNRECOGNIZED_ADDRESS"
},
"address": {
"type": "string"
}
}
}
},
"contactNumbers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"UNRECOGNIZED_PHONE",
"HOME_PHONE",
"OFFICE_PHONE",
"MOBILE_PHONE"
],
"default": "UNRECOGNIZED_PHONE"
},
"phoneNumber": {
"type": "string"
}
}
}
},
"isClient": {
"type": "boolean"
},
"updateFieldMask": {
"type": "string"
},
"primarySite": {
"type": "string"
},
"selectedDepartments": {
"type": "array",
"items": {
"type": "string"
}
},
"siteMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"siteName": {
"type": "string"
},
"isPrimary": {
"type": "boolean"
},
"defaultDepartments": {
"type": "array",
"items": {
"type": "string"
}
},
"defaultRoles": {
"type": "array",
"items": {
"type": "object"
}
},
"availableDepartments": {
"type": "array",
"items": {
"type": "string"
}
},
"availableRoles": {
"type": "array",
"items": {
"type": "object"
}
},
"persistentDepartments": {
"type": "array",
"items": {
"type": "string"
}
},
"persistentRoles": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
}
}
}
Response models
200 — A successful response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
userId | string | No | |
tenantId | string | No | |
firstName | string | No | |
lastName | string | No | |
email | string | No | |
location | string | No | |
site | string | No | |
departments | string | No | |
attributes | array | No | |
workspaces | array | No | |
userStatus | string | No | |
creationTime | string (date-time) | No | |
lastUpdated | string (date-time) | No | |
batchId | string | No | |
notificationPreferences | array | No | User notification preferences for different subsystems and scopes. If not present for a given subsystem/scope, it is assumed all notifications modes are enabled. |
contactNumber | string | No | |
uniqueUserId | string | No | Randomly generated string at the time of creation. Should be used to reference a unique user by other services as user_id may contain PII. |
claims | object | No | |
enabledScopes | object | No | Scopes and status (enable, disable) for a user. Scope is optional. Typically applications will always pass their scope, but it is optional for admin purposes. |
addresses | array | No | |
contactNumbers | array | No | |
roles | array | No | The user's roles. Includes nested roles. Flat list. Read only. |
defaultLocale | string | No | |
primarySite | string | No | |
selectedDepartments | array | No | |
licenses | array | No | |
middleName | string | No | Middle name of the user. |
preferredName | string | No | Preferred Name of the user. |
isClient | boolean | No | |
assignedRoles | array | No | |
inheritedRoles | array | No | |
siteMapping | array | No | |
primarySelectedDepartments | array | No | The selected departments that the user is assigned to. This is to support UI for getting the details part of the graphQL query. In V3, we can remove the existing selected_departments field and use this one instead. |
userStatusLastUpdated | string (date-time) | No |
{
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"tenantId": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string"
},
"location": {
"type": "string"
},
"site": {
"type": "string"
},
"departments": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"scope": {
"type": "string"
},
"fieldName": {
"type": "string"
},
"value": {
"type": "string"
},
"domain": {
"type": "string"
}
}
}
},
"workspaces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tenantId": {
"type": "string",
"description": "The ID of the tenant. Required: false. Defaults to the tenant of the user making the call."
},
"name": {
"type": "string"
},
"workspaceType": {
"type": "string"
},
"userIds": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"userStatus": {
"type": "string"
},
"creationTime": {
"type": "string",
"format": "date-time"
},
"lastUpdated": {
"type": "string",
"format": "date-time"
},
"batchId": {
"type": "string"
},
"notificationPreferences": {
"type": "array",
"description": "User notification preferences for different subsystems and scopes. If not present for a given subsystem/scope, it is assumed all notifications modes are enabled.",
"items": {
"type": "object",
"properties": {
"scope": {
"type": "string"
},
"subSystem": {
"type": "string"
},
"allowedTypes": {
"type": "array",
"description": "Notification Types allowed for given sub_system and scope.",
"items": {
"type": "string",
"description": "Enum with all possible values for the notification type.",
"enum": [
"EMAIL",
"SMS",
"DEVICE"
],
"default": "EMAIL"
}
}
}
}
},
"contactNumber": {
"type": "string"
},
"uniqueUserId": {
"type": "string",
"description": "Randomly generated string at the time of creation. Should be used to reference a unique user by other services as user_id may contain PII."
},
"claims": {
"type": "object"
},
"enabledScopes": {
"type": "object",
"description": "Scopes and status (enable, disable) for a user. Scope is optional. Typically applications will always pass their scope, but it is optional for admin purposes."
},
"addresses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"UNRECOGNIZED_ADDRESS",
"HOME_ADDRESS",
"OFFICE_ADDRESS"
],
"default": "UNRECOGNIZED_ADDRESS"
},
"address": {
"type": "string"
}
}
}
},
"contactNumbers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"UNRECOGNIZED_PHONE",
"HOME_PHONE",
"OFFICE_PHONE",
"MOBILE_PHONE"
],
"default": "UNRECOGNIZED_PHONE"
},
"phoneNumber": {
"type": "string"
}
}
}
},
"roles": {
"type": "array",
"description": "The user's roles. Includes nested roles. Flat list. Read only.",
"items": {
"type": "object",
"properties": {
"tenantId": {
"type": "string",
"description": "The ID of the tenant. Required: false. Defaults to the tenant of the user making the call."
},
"domain": {
"type": "string",
"description": "The platform domain. Required: true. (e.g. ZPA, Reflexis, WFC)\nDefaults to the domain in the request."
},
"scope": {
"type": "string",
"description": "Some more general scoping for the data (like a particular app in the domain). Required: false."
},
"roleId": {
"type": "string",
"description": "The role ID. Required: true."
},
"userIds": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"defaultLocale": {
"type": "string"
},
"primarySite": {
"type": "string"
},
"selectedDepartments": {
"type": "array",
"items": {
"type": "string"
}
},
"licenses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string"
},
"value": {
"type": "boolean"
},
"lastUpdated": {
"type": "string",
"format": "date-time"
}
}
}
},
"middleName": {
"type": "string",
"description": "Middle name of the user."
},
"preferredName": {
"type": "string",
"description": "Preferred Name of the user."
},
"isClient": {
"type": "boolean"
},
"assignedRoles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tenantId": {
"type": "string",
"description": "The ID of the tenant. Required: false. Defaults to the tenant of the user making the call."
},
"domain": {
"type": "string",
"description": "The platform domain. Required: true. (e.g. ZPA, Reflexis, WFC)\nDefaults to the domain in the request."
},
"scope": {
"type": "string",
"description": "Some more general scoping for the data (like a particular app in the domain). Required: false."
},
"roleId": {
"type": "string",
"description": "The role ID. Required: true."
},
"userIds": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"inheritedRoles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tenantId": {
"type": "string",
"description": "The ID of the tenant. Required: false. Defaults to the tenant of the user making the call."
},
"domain": {
"type": "string",
"description": "The platform domain. Required: true. (e.g. ZPA, Reflexis, WFC)\nDefaults to the domain in the request."
},
"scope": {
"type": "string",
"description": "Some more general scoping for the data (like a particular app in the domain). Required: false."
},
"roleId": {
"type": "string",
"description": "The role ID. Required: true."
},
"userIds": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"siteMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site": {
"type": "object",
"properties": {
"tenantId": {
"type": "string"
},
"siteName": {
"type": "string"
}
}
},
"isPrimary": {
"type": "boolean"
},
"defaultDepartments": {
"type": "array",
"items": {
"type": "object",
"description": "Protobuf created to represent a Department.\nUsing this name because UniqueDepartmentProto is already used for another use case."
}
},
"defaultRoles": {
"type": "array",
"items": {
"type": "object"
}
},
"availableDepartments": {
"type": "array",
"items": {
"type": "object",
"description": "Protobuf created to represent a Department.\nUsing this name because UniqueDepartmentProto is already used for another use case."
}
},
"availableRoles": {
"type": "array",
"items": {
"type": "object"
}
},
"persistentDepartments": {
"type": "array",
"items": {
"type": "object",
"description": "Protobuf created to represent a Department.\nUsing this name because UniqueDepartmentProto is already used for another use case."
}
},
"persistentRoles": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
},
"primarySelectedDepartments": {
"type": "array",
"description": "The selected departments that the user is assigned to. This is to support UI for getting the details part of the graphQL query.\nIn V3, we can remove the existing selected_departments field and use this one instead.",
"items": {
"type": "object",
"description": "Protobuf created to represent a Department.\nUsing this name because UniqueDepartmentProto is already used for another use case.",
"properties": {
"tenantId": {
"type": "string"
},
"departmentName": {
"type": "string"
}
}
}
},
"userStatusLastUpdated": {
"type": "string",
"format": "date-time"
}
}
}
default — An unexpected error response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
code | integer (int32) | No | |
message | string | No | |
details | array | No |
{
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
}
}
}
}
}