WSAPI - How to create a user with profile image using WSAPI
search cancel

WSAPI - How to create a user with profile image using WSAPI

book

Article ID: 100862

calendar_today

Updated On:

Products

Rally On-Premise Rally SaaS

Issue/Introduction

How can we use WSAPI to create a User along with uploading his Profile Image file?

Environment

Release:
Component: ACSAAS

Resolution

Let's walk through the process of using WSAPI to create a User along with setting up his username avatar.

Step 1
We realize we need to convert the user's profile image file to a 'base64Binary' format.

Step 2
Let's convert our profile image file to a base64Binary format.

To do that, let's use one (of many) freely available online site:
https://www.browserling.com/tools/image-to-base64

On the website, let's upload this file and click Convert to Base64:

Step 3
Let's use WSAPI to create the User and ProfileImage objects. These are two separate objects whereas the User references the ProfileImage. Therefore, we shall first create the ProfileImage object, then use its ObjectID to set it to our new User.


- We'll now create the User and include the ProfileImage field set to the ObjectID we just received:

Additional Information

More on WSAPI: https://rally1.rallydev.com/slm/doc/webservice/