In LM
- Generate a bearer token.
In Postman
- Click Import and paste https://www.logicmonitor.com/swagger-ui-master/api-v3/dist/swagger.json. This should start the import process.
- Before clicking the import button, click the gear to view import settings.
- Make sure "Always inherit authentication" is checked on.
- Go to the collection root and select the auth tab.
- Change the auth type to "Bearer Token" and put {{bearer}} as the token.
- Go to the scripts tab and add this to the pre-request script: pm.request.headers.add({key: 'X-Version', value: '3'})
- Save the collection.
- Create a new environment with the following variables. You just need one for the bearer token. You should set the type to 'secret' for sensitive credentials.
- url – https://<portalname>.logicmonitor.com/santaba/rest
- bearer - set to type "secret" and use the token generated (without prepending "bearer ")
No comments:
Post a Comment