How to use the Invoke API call to get Authentication Token and use it another API call?

book

Article ID: 141389

calendar_today

Updated On:

Products

CLOUDTEST CA Application Test CA Cloud Test Mobile MOBILECLOUD Service Virtualization

Issue/Introduction

How to configure the API call http://localhost:1505/api/Dcm/ACL/authenticate in POSTMAN to get Authentication Token and use it another API call http://localhost:1505/api/Dcm/VSEs.

Note: "localhost" is the Registry host name.

Cause

None

Environment

Release : 10.x, which support Invoke API.

Component : CA Service Virtualization

Resolution

To configure the form parameters "username" and "password", use "x-www-form-urlencoded" in the Request Body as shown below:

Then use the "id" parameter value from the response of "http://localhost:1505/api/Dcm/ACL/authenticate" as X-Security-Token header in the other API calls http://localhost:1505/api/Dcm/VSEs as below:
Note: "X-Security-Token" shows a different value than "id" value but it should be same.

Additional Information

Invoke API 2.0 calls documentation is available at http://localhost:1505/api/swagger

Note: "localhost" is the Registry host name.

Attachments