Obtain a sessionId to Authorize APIs in the Swagger UI
search cancel

Obtain a sessionId to Authorize APIs in the Swagger UI

book

Article ID: 384445

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Aria Operations for Logs 8.18 introduced Swagger API documentation which includes the SwaggerUI to allow API queries to be run from any web browser. In order to use the Swagger UI to run an API, you must first obtain a Session ID.

Environment

VMware Aria Operations for Logs 8.18.x

Resolution

  1. Access the REST API with the following URL

    https://<Operations_for_Logs_host>/rest-api

  2. Scroll down the page and click on sessions to expand the section



  3. Click on POST /sessions to expand the API



  4. Click Try it out



  5. Edit the username, password, and provider in the Request body and click Execute



  6. Scroll to the Server response, select all the text between the quotation marks for the sessionId, and copy it

    Note: Do not include the quotation marks in the selection. Some browsers will copy the quotation marks using Unicode characters which will cause the sessionID to not be accepted in the next steps.



    Note: Ensure the text you are copying is from the Server response and not the Responses section. The Responses section contains sample responses and is populated with sample data.

  7. Scroll back up the page and click on the Authorize button



  8. Paste the sessionId into the Value field and click Authorize.

    Note: If there is already an expired bearer token present, click the Logout button first.



  9. Verify that the Available authorizations dialog indicates Authorized, then click Close.


Note: The session is valid for 86400 seconds (24 hours) and will need to be renewed after it is expired.