Help articles
How to use Insomnia
TI provides all of our APIs as OpenAPI documents that can be imported into tools such as Insomnia. Insomnia can be downloaded for free at https://insomnia.rest/.
Steps:
- Open Insomnia
- Create a new project
- Click on create > Request collection
4. Import the TI OpenAPI file.
5. Go to Manage environments.
- Ensure that your base environment contains the following variable:
- {
"base_url": "{{ scheme }}://{{ host }}{{ base_path }}"
}
- {
6. After updating the base environment select the transact.ti.com environment.
7. Update "oauth2ClientId" with your TI store API key and "oauth2ClientSecret" with your TI store API secret.
How to use code snippets
Code snippets that can be used in your implementation can be generated in many different languages for TI APIs by using the OpenAPI specifications embedded in documentation of the TI API portal or using the Insomnia tool.
Steps:
- Go to the TI API portal.
- Go to the desired API page.
- Expand one of the methods.
- Select "Try it out”.
- Select "Execute”.
- A tab page of code snippets will open up.
From Insomnia:
- After importing the collection into Insomnia, select the method and down arrow.
- Select "Generate Code".