AnsweredAssumed Answered

Using the API: Is there a way to add a user and specify department, job title and hris identifier at creation time?

Question asked by Will Baldwin on Sep 30, 2019

Using the API: Is there a way to add a user and specify department, job_title and hris_identifier at creation time?  The API documentation does not list these three fields as base properties of a user request so I assumed they were custom fields however, if I list custom fields using the API, I receive an empty list.  If I look at a user's properties in the GUI the three fields are shown with read-only null values.

  

I later discovered that after I create the user using the Admin Add User API, it is possible to update the job_title field using the Author Update User API but I still have not discovered how the department field or hris_identifier field can be populated.

 

Bridge LMS API Documentation Admin-Users  

 

ADD USER REQUEST 

The following request creates a "t3user" but the department, job title and hris identifier are shown with read-only null values in the GUI.
{
  "uid": "tuser3",
  "first_name": "Test",
  "last_name": "User",
  "full_name": "Test User",
  "sortable_name": "User, Test",
  "email": "test.user@domain.edu",
  "locale": "en",
  "hire_date": "2019-09-30T08:20:24.5754648-05:00",
  "custom_fields": {
    "department": "Information Technology",
    "job_title": "Director",
    "hris_id": "test.user"
  }
}
ADD USER RESPONSE
{
  "id": 169,
  "uid": "tuser3",
  "first_name": "Test",
  "last_name": "User",
  "email": "test.user@domain.edu",
  "locale": "en",
  "roles": [],
  "name": "Test User",
  "hire_date": "2019-09-30T00:00:00"
}

 

I later discovered that after I create the user using the Admin Add User API, it is possible to update the job_title field and hris_id field using the Author Update User API (see below) but I still have not discovered how the department field can be populated.  

 

UPDATE USER REQUEST
{
  "user": {
    "job_title": "Ping Pong Player"
  }
}
UPDATE USER RESPONSE
{
  "id": 175,
  "uid": "tuser6",
  "first_name": "Test",
  "last_name": "User",
  "email": "test.user@domain.edu",
  "locale": "en",
  "roles": [],
  "name": "Test User",
  "updated_at": "2019-09-30T11:08:38.424-05:00",
  "hire_date": "2019-09-30T00:00:00",
  "job_title": "Ping Pong Player"
}

  

Simply adding the department field to the UPDATE USER REQUEST did not work (below).

  

UPDATE USER REQUEST
{
  "user": {
    "job_title": "Ping Pong Player",
    "department": "Gaming Department",
    "hris_id": "110115"
  }
}
UPDATE USER RESPONSE
{
  "id": 175,
  "uid": "tuser6",
  "first_name": "Test",
  "last_name": "User",
  "email": "test.user@domain.edu",
  "locale": "en",
  "roles": [],
  "name": "Test User",
  "updated_at": "2019-09-30T13:44:36.655-05:00",
  "hire_date": "2019-09-30T00:00:00",
  "job_title": "Ping Pong Player",
  "hris_id": "110115"
}
                                                                                                                                        

Outcomes