API documentation - Latest

Data360 DQ+ Help

Product type
Software
Portfolio
Verify
Product family
Data360
Product
Data360 DQ+
Version
Latest
Language
English
Product name
Data360 DQ+
Title
Data360 DQ+ Help
Copyright
2024
First publish date
2016
ft:lastEdition
2024-07-09
ft:lastPublication
2024-07-09T15:09:58.774265

Welcome to the Data360 DQ+ API documentation.

The Data360 DQ+ API allows you to access the application via third party applications.

The information in this section is provided in conjunction with the GraphiQL API Console, where you can test out queries. You can access the API Console from the application by navigating to Admin > API Console.

Getting started

Tip: The example requests in this section use Curl syntax to show all of the information that is required in a request.

Using the API Console

API Console

1) Type your query in the text box on the left side of the screen. For auto complete, you can use the shortcut Ctrl + Space.

2) Click the Play button to run a query. You can also use the shortcut Ctrl + Enter to run a query.

3) The response is displayed on the right side of the screen.

4) Click Docs to see a list of available queries and mutations.

5) Click to expand the Query Variables text box where you can enter variable definitions.

Creating an application user

To connect to Data360 DQ+ from an external application, you first need to create an Application user:

  1. Sign in to Data360 DQ+. Note that only Admin users can create an Application user.
  2. From the menu in the top left corner of the page, navigate to Admin > Users.
  3. Click New, then select Application.
  4. Assign an email address, password and display name to the Application user. You will need to use the email address and password as verification credentials when connecting to Data360 DQ+ from an external application, see Authentication. The Application user's display name is purely for informational purposes and can be changed at any time.
    Note: Application users cannot sign in to the Data360 DQ+ user interface.
  5. Assign the required permissions to the Application user by adding them to User groups and Environment groups.
    Note: For a user to successfully use the API, the Application user must have the required permission.

Authentication

The Data360 DQ+ API uses HTTP Basic authentication.

To authenticate, you must provide a base64-encoded value of the Application user email address and password in the request header, in the following format:

Authorization:Basic <base64-encoded authentication value>

 

You can use Postman or a similar tool to generate the encoded value from the Application user email address and password.

 

For example:


        curl -X POST -H "Content-Type:application/json" -H "Authorization:Basic <base64-encoded value>" -H "Accept:application/json" http://subdomain.example.com/api
      
Note: On Windows, you must use double quotes.

The following example shows the header information for the same request for use when connecting to the Data360 DQ+ API via an API client, where the username is the email address of the Application user:


        POST https://subdomain.example.com/api HTTP/1.1Authorization: <username>:<password>
Content-Type: application/json
Accept: application/json
      

 

The API is accessible from the following URL, where <subdomain> is replaced with the name of your subdomain:

http://<subdomain>.example.com/api

Making a request

A request is made up of the following pieces of information:

  • Request headers - Provide information to the client and server, including authentication credentials and accepted data formats.
  • Queries and mutations - The body of the request. GraphQL is the query language for the Data360 DQ+ API.

Request headers

Header key Description
Authorization

Specifies the base64-encoded Application user email address and password.

Authorization:Basic <base64-encoded authentication value>

For example:

Authorization:Basic YXZpdXDlfgBleGFtcOxlKnNvbYiBcGhxMjM0

Content-Type

Specifies the format of the data:

Content-Type:application/json

Accept

Specifies the data format that is acceptable for the response:

Accept:application/json

Host

Specifies the domain name or IP address of the host that serves the API:

subdomain.example.com

Queries and mutations

Unlike typical REST APIs that use multiple endpoints, the GraphQL API is organized in terms of types and fields, and a single query makes up the request body. GraphQL queries enable you to fetch lots of related data in one request, rather than needing to make several requests using multiple endpoints as in a classic REST API.

There are two types of operations that you can use in a request, Query and Mutation.

Query

A query reads data, and is formatted as follows:

query {Fields to return}

Mutation

A mutation modifies data.

The Data360 DQ+ API conforms to the mutation API convention as specified at https://relay.dev/docs/guided-tour/updating-data/graphql-mutations/.

A mutation is structured as follows:

mutation {  mutationName(input: {InputFields}) {    PayloadFields}

To form a mutation, you must specify the following:

  • The mutation name - The type of modification to perform.
  • Input fields - The data you want to send to the server.
  • Payload - The data (fields) you want to return from the server.

For more information about GraphQL queries and mutation, see the GraphQL documentation:

Tip: For information about pagination, you should also make sure you are familiar with the GraphQL Cursor Connections Specification.

Example request

The following query returns a list of all environments:


        curl -X POST -H "Content-Type:application/json" -H "Authorization:Basic <base64-encoded value>" -H "Accept:application/json" -d '{"query":"query{envs {nodes {name}}}","variables":null}' https://subdomain.example.com/api
      

The following example shows the header information for the same request for use when connecting to the Data360 DQ+ API via an API client:


        POST https://subdomain.example.com/api HTTP/1.1Authorization: <username>:<password>
Content-Type: application/json
Accept: application/json
      

Example response

The response shows that there are two environments in the system, called Dev and UAT:


        
{
	"data": {
		"envs": {
			"nodes": [
				{
					"name": "Dev"
				},
				{
					"name": "UAT"
				}
			]
		}
	}
}
  
Tip: For more information, see the GraphQL documentation at: https://graphql.org/

 

Next topic: Using the API to create a pipeline