API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

Data Connect allows you to retrieve report data from your RQ database (v4.23 and up).

To get started, see Data Connect Guide.

Authentication

Data Connect supports many different methods of authentication, see Authentication Options.

Note that for all reports the Access Token should be mapped to an employee in RQ.

ENDPOINTS

RESOURCES

MasterEntityRelationship

[
    {
        "CompanyID": 21090,
        "CompanyName": "KENTEL",
        "PreferredEndpoint": "https://rqdataconnecttest12.iqmetrix.net"
    }
]
Name Description
CompanyID (Integer) Identifier for a Company
CompanyName (String) Database name
PreferredEndpoint (String) A URL that represents the version of Data Connect that is closest to the company database. Use this URL for best performance

REQUESTS

GET Master Entity Relationships

This request will return a list of Companies the Master Entity can access data from.

Definition

GET /master/relationships?Auth={Auth}&Response={Response}

Headers

Example Request

GET /master/relationships
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/master/relationships" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingMasterEntityRelationships()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/master/relationships");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept-Encoding", "gzip"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingMasterEntityRelationships() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/master/relationships");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept-Encoding", "gzip"); 
    
    return httpClient.execute(request);
}
require 'rest-client'


response = RestClient.get 'https://dataconnectdemo.iqmetrix.net/master/relationships', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[MasterEntityRelationship]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "CompanyID": 21090,
        "CompanyName": "KENTEL",
        "PreferredEndpoint": "https://rqdataconnecttest12.iqmetrix.net"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "CompanyID": 21090,
            "CompanyName": "KENTEL",
            "PreferredEndpoint": "https://rqdataconnecttest12.iqmetrix.net"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <CompanyID>21090</CompanyID>
    <CompanyName>KENTEL</CompanyName>
    <PreferredEndpoint>https://rqdataconnecttest12.iqmetrix.net</PreferredEndpoint>
  </Record>
  <Schema>
    <Column_Name>ColumnName</Column_Name>
    <Type>datatybe</Type>
    <SafeType>safetype</SafeType>
    <Length>100</Length>
  </Schema>
</Table>

Example Response (CSV)

HTTP 200 Content-Type: text/csv
CompanyID,CompanyName,PreferredEndpoint
21090,KENTEL,https://rqdataconnecttest12.iqmetrix.net

Example Response (Excel)

HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
content-disposition: attachment;filename=reportname-2016-07-11.xlsx
Binary *.xlsx file

ERRORS

HTTP Status Code Description How to Resolve
HTTP 400 Bad Request Ensure request body is formatted properly
HTTP 401 Tokan is invalid Ensure Access Token is valid and has not expired
HTTP 403 Unauthorized Ensure Access Token is valid and user has appropriate security
HTTP 404 Not Found Ensure URI is valid
HTTP 500 Unexpected Error See Message in response for more information
Was this page helpful?