Forum Discussion

Mack_Disouza's avatar
3 years ago

How to use API key in POSTMAN for authorization ?

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.

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

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

 

 

3 Replies

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

  • 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.