Use with Postman, Bruno or Insomnia
Every endpoint of the API is ready to import into the API client you already use, built from the same description as the reference. Each comes with an environment holding three variables: baseUrl, token and organization_id. None of the files contains a token.
Start with a test token from your sandbox. Its sample data is safe to change, and nothing you send there reaches a provider or the internet. Switch to a live token once your requests do what you expect.
| File | For |
|---|---|
infranest.postman_collection.json | Postman: every endpoint, one folder per reference page |
infranest.postman_environment.json | Postman: the environment |
infranest.bruno.zip | Bruno: the collection as a folder of .bru files, with its environment |
openapi.json | Insomnia, Bruno, Hoppscotch and anything else that imports OpenAPI 3 |
The same files are kept, versioned, in infranest-openapi.
Postman
- Select Import, and drop in both
infranest.postman_collection.jsonandinfranest.postman_environment.json. - Pick the InfraNest environment in the top right.
- Set
tokento your token (it is a secret variable, so Postman masks it) andorganization_idto your organization's ID — the number after/organizations/in the app's address. - Open Account → Get the signed-in user and select Send: it works with any token, so it checks the token and the variables.
Requests with an ID in the path, such as a zone's records, show it as a path variable (:dnsZone_id) under Params; fill it in there.
Bruno
- Unzip
infranest.bruno.zip. It holds one folder,infranest. - In Bruno, select Open collection and pick the
infranestfolder. Keep it in your repository if you like: Bruno's files are made to be committed. - Pick the InfraNest environment and set
organization_id.tokenis a secret: Bruno keeps its value on your machine, never in the files. - Send a request. Filters a request can take are listed under Params, switched off until you tick one.
Bruno can also import openapi.json directly (Import collection → OpenAPI), if you prefer its own layout.
Insomnia
Insomnia imports the OpenAPI description itself:
- Select Import, and give it
https://developers.infranest.io/openapi.json(or the downloaded file). - In the environment it creates, set the base URL to
https://api.infranest.ioand add your token as a Bearer token on the collection.
Generating a client
openapi.json also feeds code generators. For example, with openapi-generator:
npx @openapitools/openapi-generator-cli generate \
-i https://developers.infranest.io/openapi.json -g typescript-fetch -o ./infranest-clientUse -g python, -g php, -g go or -g csharp for those languages. Each operation carries x-infranest-scope, the scope a token needs for it.