Eurofiber-CloudInfra / azure-url-monitor

Slightly more advanced version of the URL monitor tool of Azure that stores the results in Application Insights
Apache License 2.0
1 stars 0 forks source link

Allow secure Postman collection retrieval through API call #15

Open DennisR73 opened 2 years ago

DennisR73 commented 2 years ago

Summary

Currently we offer two ways to retrieve Postman collections:

As a third option we could allow the collection retrieval via the Postman API. The only things that would be needed as input are then Collection UID and an API key.

curl -H "X-API-Key: PMAK-62c59xxxxxxx" https://api.getpostman.com/collections/742895-df2f2a6d-d344-43c1-a442-067a0c9d13b4

Implementation

Add two input variables:

Container configuration would either use PM_COLLECTION_URL or PM_API_KEY and PM_COLLECTION_UID.

During deployment the PM_API_KEY should be passed as a secure variable to ACI.

DennisR73 commented 2 years ago

We could mitigate the uncontrolled deployment of changes in the API case by creating a flag on the container to only fetch the collection on start and not on every cycle. This way a container restart is required to load the new Collection.

DennisR73 commented 2 years ago

Noticed there is a rate limit on the Postman API: 1000 / month on a free plan and 10.000 on a basic plan. Definitely need to consider this when pulling collections via the API