Skip to content

Latest commit

 

History

History

README.md

API Tool Collections

This folder contains both Insomnia and Postman Collections of sample graphQL queries and mutations which can be imported into your Insomnia or Postman tool. Additional collections will be added from time to time as newer versions of the Remote.It graphQL API are released with newer functionality.

In general, API releases on V1 will not introduce any breaking changes only additions in functionality. V1 Queries and mutation url https://api.remote.it/graphql/v1

What is graphQL

GraphQL is a data query language for API's, developed by Facebook in 2012 before being publicly released in 2015. GraphQL provides an alternative to the REST API. For more information on GraphQL, learn on the official GraphQL website here.

Tool setup and authentication

Credentials setup

Insomnia setup Import the Insomnia Collection - Once you have downloaded the collection file you would like to work with, you can then import it into Insomnia. The Insomnia UI may change based on their releases, please refer to their documentation.

Postman setup Import the Postman Collection - Once you have downloaded the collection file you would like to work with, you can then import it into Postman. The Postman UI may change based on their releases, please refer to their documentation. You can also import the environment variables which you will need to update with your credential values.

Using the collections

Once you have setup your tool, you are ready to use the collection! The collection is broken down into categories of queries and mutations. These include, but are not limited to, samples of working with your device list, specific devices, connections, event logs and your account. Please note, permissions of authorization to fetch, update, connect, and view logs devices are based on ownership or delegated role when you do not own the device.

Using graphQL in an application (not in a query tool)

Authentication (Request Signing) -

Insomnia - You will need to use the insomnia-plugin-remoteit Plugin for Request signing. See the instructions in the Insomnia Set Up

Postman - The collection comes with a pre-script that is executed prior to sending the request that will do the request signing for you while using the tool. See the instructions in the Postman Set Up

You can use your tool to develop your queries and mutations as tests. Please note that you cannot use generated code out of your tools or any other query tool to port into your application or scripts. Each request is uniquely signed using elements such as the timestamp of the request and request body properties. The linked guide provides examples of the request signing portion for multiple languages.

Usage Guidelines - Reference page with an overview of queries, mutations and pagination. Please note, polling for state change (online/offline) is highly discouraged. Use webhooks instead.

Contributing

See the contributing guide for detailed instructions on how you can help.