How to use POST API method to create Extended User Attributes?

Options
Sivakumar.S883
Sivakumar.S883 Posts: 2 🌱
edited November 2022 in Development

We are having custom attributes for the users called Extended User Profile Attributes. Kindly let me know is there any API methods for Extended User Profile Attributes.

Tagged:

Answers

  • [Deleted User]
    Options

    @Sivakumar S​ Hi Siva,

     

    Currently there exists no any API method for Extended User Profile Attributes.

     

    However you can visit https://docs.valence.desire2learn.com/res/user.html for all the api methods available for attributes related to Users

     

    Thanks,

    Nik

     

  • Sivakumar.S883
    Sivakumar.S883 Posts: 2 🌱
    edited November 2022
    Options

    Hi All,

     

    This is https://docs.valence.desire2learn.com/res/user.html only to create a User using Rest API. This doesn't provide any clue that extended user attributes exists.

     

    For extended user attributes BrightSpace don't have postman collection for this operation. There is no documentation for it. So please follow the steps carefully.

     

    Step 1: Create register an application in Brightspace-> Manage Extensibility-> OAuth 2.0 from a Super admin user login. In call back URL use https://apitesttool.desire2learnvalence.com/ if you don't have call back URL in your application.

     

    Step 2: Download the template.csv from user attributes->upload, try to open with notepad and add few test data. ( Date must be in YYYY-MM-DD format).

     

    Step 3: Find the region of your brightspace instance or contact Support to know it.

     

    Step 4: In postman , create a post call for the following URL https://US-central-1.extended-user-profile.api.brightspace.com/v1/ImportJobs with OAuth2 authentication token. The token will be valid for 2 mins, If the token is expired, there is no option to create new job or kill the job, confirmed by Brightspace support.

     

    The job will be deleted automatically after four days, till that you could not able to create new job.

     

    I found a solution for this issue.

     

    If you POST with Job Id like this https://US-central-1.extended-user-profile.api.brightspace.com/v1/ImportJobs/ 3a2f41fc-9c26-4ef6-a772-a98745612ghe9.01

     

    New token will be generated for this job and you can retry again.

     

    Step 5: Import the attached post man collection into your postman and copy paste the values from the previous post response and attach the file template.csv and POST. The data will be uploaded to the corresponding user attributes.

     

     Step 6: GET https://US-central-1.extended-user-profile.api.brightspace.com/v1/ImportJobs/3a2f41fc-9c26-4ef6-a772-a98745612ghe9.01 like this by replacing the job id in this URL with the job id from the response from Step 4. You will get to know the status of the job which you POST in step 5. If the status is applied, it means your data uploaded successfully.

     

    If you need any help let me know.

     

    Regards

    Sivakumar S