UpdateUpRaiseUser
Background
This REST API is meant to update users in UpRaise company directory. Below are the API request and responses for creating users.
API Details
App name | Endpoint |
---|---|
UpRaise for Employee Success | https://employee-success.upraise.io/rest/upraise/public/1.0/directory/updateUser |
UpRaise People | https://people.upraise.io/rest/upraise/public/1.0/directory/updateUser |
UpRaise Employee Garrison | https://garrison.upraise.io/rest/upraise/public/1.0/directory/updateUser |
Sample request payload JSON (to update users)
{
"accountId":"557058:2b56fd84-c1f6-4f8d-a881-83458b0908fa",
"manager":{
"accountId": "612efd530f8ff40068cd8d99"
},
"designation":{
"id":"786"
},
"role":{
"id":1233
},
"teams":[
{
"id":1419
},
{
"id":1417
}
],
"leavePolicy": {
"id":771
},
"holidayScheme": {
"id":896
},
"workWeekScheme": {
"id":497
},
"enrollmentDate":"2024-05-12",
"profileAttributes":[
{
"id":6150,
"userProfileAttrValue":"Block 2A-208, 1st Floor, Z Mall, Eastern Metropolitan Bypass, Kolkata, West Bengal 700078,India"
},
{
"id":6151,
"userProfileAttrValue":".net, Jana, C++"
},
{
"id":6158,
"selectedOptions":[
6303
]
},
{
"id":6160,
"selectedOptions":[
6310, 6308
]
},
{
"id": 6154,
"userProfileAttrValue": "2022-04-16"
},
{
"id": 6156,
"userProfileAttrValue": 35.65
},
{
"id": 6162,
"selectedUsers": [
"557058:47071b1a-8622-4333-aa39-7db293f3aa34"
]
},
{
"id": 6164,
"selectedUsers": [
"557058:abffcb82-281b-422b-ad3a-683362ccd4db", "557058:47071b1a-8622-4333-aa39-7db293f3aa34"
]
}
]
}
Sample request payload JSON (to remove values from user profile attributes)
{
"accountId":"61d406c3326554006cf69278",
"designation":{},
"manager":{},
"teams":[],
"profileAttributes":[
{
"id":20
},
{
"id":21
},
{
"id":22
},
{
"id":23
},
{
"id": 24
},
{
"id": 25
},
{
"id": 26
},
{
"id": 27
}
],
"leavePolicy": {},
"holidayScheme": {},
"workWeekScheme": {}
}
Request parameters
Parent | Parameter | Type | Description | Possible values |
---|---|---|---|---|
| accountId | String | UpRaise user's account ID that needs to be updated |
|
| role | Array | This contains the details related to UpRaise role |
|
role | id | Number | UpRaise role ID | 1232, 8383, etc. |
| designation | Array | This contains the details related to designation |
|
designation | id | Number | UpRaise designation ID | 8978, 5363, etc. |
| manager | Array | This contains the details related to user's manager |
|
manager | accountId | String | UpRaise user’s manager’s account ID |
|
| teams | Array | This contains the team details that need to be updated |
|
teams | id | Number | Team ID for the team that needs to be updated | 1, 2, etc. |
| profileAttributes | Array | This array contains all the custom user profile attributes related parameters |
|
| id | Number | Profile attribute ID that needs to be updated | 89, 1, 5662, etc. |
| userProfileAttrValue | String/Number/Date | User this parameter to pass values for attributes below for field types -
| Any values based on the field types. Eg. if you want to update the address field then pass the field ID and address under ‘userProfileAttrValue’ parameter |
| selectedOptions | String/Number/Date | Use this parameter to pass values for attributes below field types -
| Any values based on the field types. Eg. if you want to update the skill attribute then pass the field ID and one or more option values under ‘selectedOptions’ parameter |
| selectedUsers | String | Use this parameter to pass values for attributes below field types -
| Any values based on the field types. Eg. if you want to update the Direct reports attribute then pass the field ID and user’s account IDs under ‘selectedUsers’ parameter |
| leavePolicy | Array | This contains the leave policy ID that needs to be updated for the user |
|
leavePolicy | id | Number | Leave policy ID that needs to be updated for the user | 1, 2, etc. |
| holidayScheme | Array | This contains the holiday scheme ID that needs to be updated for the user |
|
holidayScheme | id | Number | Holiday scheme ID that needs to be updated for the user | 1, 2, etc. |
| workWeekScheme | Array | This contains the workweek scheme ID that needs to be updated for the user |
|
workWeekScheme | id | Number | Workweek scheme ID that needs to be updated for the user | 1, 2, etc. |
| enrollmentDate | Date | Enrolment date of the user. Enroment date can be updated only when you are updating the policy for the first time or changing the policy within 24 hours of the first policy enrolment. Read Change/select enrolment date | Any date in YYYY-MM-DD format |
Sample response JSON for update user request
{
"id": 30934,
"jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=557058:2b56fd84-c1f6-4f8d-a881-83458b0908fa",
"name": "Alan",
"accountId": "557058:2b56fd84-c1f6-4f8d-a881-83458b0908fa",
"active": true,
"timeZone": "Asia/Kolkata",
"manager": {
"id": 30933,
"jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=612efd530f8ff40068cd8d99"
},
"designation": {
"id": 786,
"name": "Automation Tester"
},
"role": {
"id": 1233,
"name": "HR_ADMIN"
},
"teams": [
{
"id": 1417,
"name": "Quality Analysis"
},
{
"id": 1419,
"name": "Product QA"
}
]
}
Response parameters
Parent | Parameter | Type | Description | Possible values |
---|---|---|---|---|
| id | String | UpRaise user ID that is being updated | 90929, 35353, etc. |
| jiraUserRestApiUrl | String | Jira user Rest API URL of the user being updated | <baseURL>/rest/api/2/user?accountId=557058:2b56fd84-c1f6-4f8d-a881-83458b0908fa |
| name | String | Name of the user being updated | John Doe, Peter Rees, etc. |
| accountId | String | User’s account ID that is being updated |
|
| active | String | UpRaise status of the user |
|
| timezone | String | Timezone of the user | Any given timezone |
| manager | Array | This contains the details of the user’s manager |
|
manager | id | Number | User ID of the user who is manager of the user being updated | 6373, 0101, etc. |
manager | jiraUserRestApiUrl | String | Jira user Rest API URL of the manager | <baseURL>/rest/api/2/user?accountId=612efd530f8ff40068cd8d99 |
| designation | Array | This contains the details related to the designation of the user |
|
designation | id | Number | Designation ID | 8383, 464, etc. |
designation | name | String | Actual designation of the user that is being updated |
|
| role | Array | This contains the details of user’s UpRaise role |
|
role | id | Number | UpRaise role ID | 672, 5363, etc. |
role | name | String | UpRaise user role |
|
| teams | Array | This contains the details of the updated team/s |
|
teams | id | Number | Team ID | 7272, 392, etc. |
teams | name | String | Team name | Sales, Customer Success, etc. |
In the response, we only provide the updated default parameters and not the custom profile attributes. Response also does not include leave policy related parameters.