Agile Central: WSAPI - How to create a user with profile image using WSAPI
Document ID :
Last Modified Date :
Show Technical Document Details
CA Agile Central
AGILE CENTRAL SAAS:ACSAAS
How can we use WSAPI to create a
along with uploading his
Let's walk through the process of using WSAPI to create a User along with setting up his username avatar.
Let's examine WSAPI object model to find what needs to be done.
endpoint shall be used to create the User, see its methods:
We will scroll down the fields and find all the required attributes. We shall also look for the user's profile image field.
This field refers us to another REST Endpoint, named:
. Let's examine that endpoint:
We realize we need to convert the user's profile image file to a '
Let's convert our profile image file to a base64Binary format.
To do that, let's use one (of many) freely available online site:
Here is our user's profile image file:
On the website, let's upload this file and click
Convert to Base64
Now, before we continue, let's test our conversion. So, let's convert it back from the base64Binary back to an image file. To do that , we shall use another freely available website (of many):
Let's copy the text we have from our first site. Then, in the second site, let's paste the text and click to
Looks good. So we now know our converted base64Binary text from the first site is good.
to create the
objects. These are two separate objects whereas the User references the ProfileImage. Therefore, we shall first create the ProfileImage object, then use its
to set it to our new User.
- We'll use the
Let's confirm the result and get the
- We'll now create the
and include the
field set to the
we just received:
Let's check the result:
All is looking well.
Let's now check out Agile Central, locate our newly created user and see their profile image:
Bring up the user's profile and...
Our Profile Image is there.
More on WSAPI:
Was this information helpful?