Skip to content

Set up Insomnia

Insomnia by Kong provides some excellent guides for you to follow to get started.

Install

Follow this guide to install Insomnia.

Once the installation process have been completed you should see a "start page" where you can choose to create a New Collection or a New document. Click on New collection and give it a name.

Setup

Once you have a collection created, you should have Base Environment in the left pane. Click on the cog on the right and you should have a new window, Manage Environments open up. Create a new private Sub Environment with a name. Copy the JSON below to the new environment and update with your URL to Easit GO and your apikey.

1
2
3
4
    {
        "uri":"https://urltoEasitGO/graphql/",
        "apikey":"efcefd87a18140585a134b4c324f1de651db51aab44ca961a827d37e55f83d57"
    }

You can read more about Environment Variables here.

First request

Now that we have the collection and environment set up we can create our first query.

  1. Either click on New HTTP Request in the middle pane or use CTRL + N.
  2. Change the method for the query to POST (next to the URL field almost at the top).
  3. In the URL field, enter _., and our variables should pop up, choose _.url.
  4. Just below POST, next to Body it probably says Auth. Click on it, choose Bearer Token. On the Token row, enter _.apikey.
  5. Just next to Bearer (previously Auth) it probably says Body, click on it and then click on it again and choose GraphQL Query.
  6. Now, copy and paste the example below and press Send.

Your response may vary from the example below but what you should get back is a list of available modules in Easit GO.

1
2
3
4
5
6
    {
        modules {
            id,
            name
        }
    }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
    {
        "data": {
            "modules": [
                {
                    "id": 1002,
                    "name": "Contact"
                },
                {
                    "id": 2,
                    "name": "Message"
                },
                {
                    "id": 1001,
                    "name": "Organization"
                },
                {
                    "id": 1012,
                    "name": "Project"
                },
                {
                    "id": 1003,
                    "name": "Request"
                },
                {
                    "id": 1100,
                    "name": "TimeAndExpenses"
                },
                {
                    "id": 1,
                    "name": "User"
                }
            ]
        }
    }

You can find the official guide from Insomnia here