Use HTTP GET and POST requests to interact with the Connect API Explorer

You can use HTTP GET and POST requests to perform queries and mutations using the Connect API Explorer. This allows you to build custom applications that request and write data directly to the application.

Tip: The application SDK includes a toolkit with sample code and explanations of additional ways that you can interact with the Connect API Explorer using third-party applications. To get access to the UI Extension SDK, contact Discover.Sales@Nuix.com.

The Connect API connects using HTTP(S) and consumes data in JSON format.

A GraphQL operation returns data as a JSON object. The structure of a response mirrors the structure of an operation.

You can create and test operations in the API explorer before running operations in a third-party application. For more information about the Connect API Explorer, see Access and use the Connect API Explorer.

Before you start

Before you start, do the following:

Obtain your application API token. Your token authenticates you. For more information, see Obtain an API.

Caution: Store your API token in a secure location, the same way that you protect your password. Anyone who has your token can access all of the data that you can access through the API.

Obtain the URL of the API service for the portal from your system administrator. The URL of the API service is available in the Portal Management area, in the Settings section, on the Portal Options page. For more information, see Connect API URL.

GET requests

You can perform queries using GET requests.

HTTP method: GET

Resource URL: URL of the API service for the portal, such as http://ringtail.com/Ringtail-Svc-Portal/api/query. For more information, see Before you start.

HTTP headers:

Header

Required?

Authorization: bearer yourAPIToken

Note: You must include a space between bearer and yourAPItoken.

Required

Parameters:

Parameter

Required?

Description

query

Required

The query to run. Encode the query as valid ASCII format, so that it can be passed as part of a URL.

variables

Optional

The variables in the query. Encode the variables as valid ASCII format, so that they can be passed as part of a URL.

Request body: Not applicable.

POST requests

You can perform queries and mutations using POST requests.

HTTP method: POST

Resource URL: URL of the API service for the portal, such as http://ringtail.com/Ringtail-Svc-Portal/api/query. For more information, see Before you start.

HTTP headers:

Header

Required?

Content-Type: application/json

Required

Authorization: bearer yourAPIToken

Note: You must include a space between bearer and yourAPItoken.

Required

Parameters: Not applicable.

Request body:

Parameter

Required?

Description

query

Required

The query or mutation to run, formatted as valid JSON syntax.

variables

Optional

The variables in the operation, formatted as valid JSON syntax.