cancel
Showing results for 
Search instead for 
Did you mean: 

How to use API key in POSTMAN for authorization ?

Mack_Disouza
Level 4

Hello Folks,

I am tying to setup authorization with my flex-appinace from POSTMAN.I am using the metrics API key for this purpose.Generated from Flex.

Mack_Disouza_0-1684301418478.png

However , Authorization is still not getting establish and i am getting output as "Unauthorized"

Mack_Disouza_1-1684301722593.png

Any clue ,knonwn method,Procedure to get it authorised.

 

 

3 REPLIES 3

jnardello
Moderator
Moderator
   VIP    Certified

Just to cover the bases, does your API key work outside of POSTMAN ?

kiyan
Level 4

I came across below article, it has steps for setting up API with POSTMAN and Grafana,

FlexApplianceAPIGuide (veritas.com)

I hope it is useful for you.

meuhassan
Level 4

To set up authorization with your Flex appliance from Postman using the metrics API key, you will need to do the following:

  1. Create a new request in Postman.
  2. Select the "Authorization" tab.
  3. Select the "API Key" type of authorization.
  4. Enter your metrics API key in the "Key" field.
  5. Select the "Header" option from the "Add to" dropdown list.
  6. Click on the "Save" button.

Now, when you send the request, Postman will automatically add the metrics API key to the header of the request. This will allow you to access the metrics API on your Flex appliance.

Here is an example of a Postman request that you can use to test the authorization:

GET https://<flex-appliance-ip>/api/v1/metrics
Authorization: Bearer <metrics-api-key>

Replace the <flex-appliance-ip> and <metrics-api-key> values with the actual values for your Flex appliance and metrics API key.

If you have successfully set up the authorization, you should see a response from the metrics API. The response will contain a list of metrics for your Flex appliance.

I hope this helps! Let me know if you have any other questions.