Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

API not giving expected result

varunpuri
Regular Contributor
Regular Contributor

Hi,

We are trying to run the createAccount and createTask APIs through Postman. However, the result is not coming as expected. Neither the account is getting created within Saviynt nor task. Attaching snapshots of the requests here :

1. createAccount request - Postman_Create_Account.png

varunpuri_0-1680180928843.png

2. createTask request - Postman_Create_Task.PNG

varunpuri_1-1680180949615.png

Request you to kindly assist here.

Best Regards,
Varun

5 REPLIES 5

nimitdave
Saviynt Employee
Saviynt Employee

Please follow below postman dump for the saviynt rest APIs.

https://documenter.getpostman.com/view/1797923/RWaLwo21#intro

Also in the screenshot shared , I see that v6 is mentioned in the url which is not correct. It should be v5 and if you have got this from any documentation, please share the same.

1. You need to have a API user of ROLE_ADMIN Access in the particular environment. You can trim the sav role access once you get things working.

2. Make sure the authentication successful using api as {{url}}/ECM/api/login.

3. You need to use the access token in further call as authorization as Bearer <AccessToken> 

prasannta
Saviynt Employee
Saviynt Employee

Are you passing the Authorization token in the header? Please see refer below screenshot and ensure that the correct headers are added.

prasannta_1-1680182402321.png

 

DixshantValecha
Saviynt Employee
Saviynt Employee

Hi @varunpuri 

As per the image you have attached the path is ECM/V6 the correct Path should be api/v5.Please validate and let us know if futher details is needed.

Documentation Link:-https://documenter.getpostman.com/view/1797923/RWaLwo21#intro 

varunpuri
Regular Contributor
Regular Contributor

Thank You, @nimitdave - I was incorrectly calling the API. using v5 instead of v6 helped. However, I have a further question.

I was able to generate a New Account task for a given user for Active directory.

But, the use case which we have is - we need to create a Service Account in Active Directory. The complete request and approval process will happen in Service Now, and after the approval is granted, Service Now will issue a createTask API to get the task created in Saviynt. 

In the customer environment, a Service Account in Active Directory is NOT correlated to a user. My questions :

1. In the createTask API, username is a mandatory parameter. How can i achieve my use case ?
2. Even if we are able to achieve 1 somehow, how can Service Now team pass the values of OTHER parameters which are important to provision an AD account eg : location, street, regionCode etc. and then subsequently how can we read those values in createAccount JSON.

Best Regards,
Varun

nimitdave
Saviynt Employee
Saviynt Employee

You can try creating a service account request using below api

nimitdave_0-1680599422206.png

Have a autoapproval configured for service account workflow .

First try to accomplish the request submitted from ARS and then use api.