Update data in columns of the Users panel via API

In LMS365 it's possible to update user's information in custom and system columns (except the Username, User is in Course Catalog and Manager columns) with your own data source, using the LMS365 APIs or via the LMS365 Global Settings > LMS Configuration > Users Columns.

This article describes what API can help to update user's data in the existing custom and system columns.

NOTE   

The Custom Synchronization option is enabled for each column individually. When the Custom Synchronization is enabled on a specific сolumn, LMS365 will no longer synchronize the data from Microsoft Azure AD for that particular column and you will be able to configure the data displayed in Users columns. For the columns with Custom Synchronization disabled, the data will be automatically pulled from you Azure Active Directory.

In this article

 

Update data in custom column fields via API

To update user's data in a custom column via API, do the following:

1. Go to https://api.365.systems/ and authorize with the relevant API key. You can find more about the authorization process here.

 

2. Find the Users section, expand it, find the POST method /odata/v2/Users('{LoginName}')/ UpdateUserFieldValues with the Update user's filed values description and then select Try it out in the top left corner.

 

 

3. After you select Try it out, you will be able to set the following required parameters:

  • key: LoginName where you need to enter the login name of the user whose data you want to update. 
  • "UserId" where you need to enter the ID of the user in question.
  • "FieldId" where you need to enter the Id of the column.

FieldId can be found with the help of the GET method /odata/v2/UserFields with the Returns all user fields description. Select Try it out and then select Execute to run the request. In the Response body find and cope the ID of the relevant column.

 

mceclip0.png

 

Be aware that you cannot update the 'Predefind' value ( when "IsPredefined": true).

  • "Value" where you need enter your value. It should correspond to data type of the column. For example, for a column of the number type you can specify positive or decimal numbers (max. 2 digits after the decimal point or comma). The data type of the column—"Type"—can be found in the same response as for the "FieldId" parameter.

Type can be found with the help of the GET method /odata/v2/UserFields with the Returns all user fields description. Select Try it out and then select Execute to run the request. In the Response body find the data type of the column next to the Type parameter. 

 

 

An example of the request to change the country of the user:

{
"UserFieldValues": [
{"UserId": "6db804bd-f790-4844-a592-a21cb6acd875",
"FieldId": "7dd89e71-470a-4932-904d-6890b7f06f82",
"Value": "Denmark"}
]
}

 

 

4. When ready, select the Execute button to run the command.

 

5. Go to the Responses block to check the results:

  • Number 2xx (for example, 200) under Code shows that the request worked correctly.
  • In the Response body field the results of the request will be displayed. The data in the column will be updated which can be checked on the Users panel.

 

 

 

Update data in system column fields via API

To update an LMS365 system column field, follow the steps:

1. Go to https://api.365.systems/ and authorize with the relevant API key. You can find more about the authorization process here.

 

2. Find the Users section, expand it, find the POST method /odata/v2/Users('{LoginName}') with the update user's info description and then select Try it out in the top left corner.

 

 

3. After you select Try it out, you will be able to set the following required parameters:

  • key: LoginName where you need to enter the login name (with all prefixes) of the user whose data you want to update.
  • Under the Edit Value field set the required "Title" parameter - the name of the user that will be displayed in the Users panel - and other optional parameter from the provided in the field that you want to update for the user.

Here is an example of an API request to update the data of a user in the City, Country, Office , Job Position and Company columns of the Users panel:

 

{
"Title": "Grady Archie",
"City": "Nebraska",
"Country": "United States",
"Office": "115/088",
"JobTitle": "Legacy Branding Analyst",
"Company": "CCRT"
}

 

 

4. When ready, select the Execute button to run the command.

 

5. Go to the Responses block to check the results:

  • Number 2xx (for example, 200) under Code shows that the request worked correctly.
  • In the Response body field the results of the request will be displayed. The user's data in the relevant columns will be updated which can be checked in the Users panel.

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

Article is closed for comments.