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.

Note

For reports that provide optional URI parameters for filtering at different levels (ForWho/ForWhoIDs/LocationType/LocationTypeIDs), omitting these values will run the report at the default company level.

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.

Report List

For a complete list of reports in Data Connect, see Report List.

ENDPOINTS

RESOURCES

AppleDEPData

Apple Device Enrollment Program

[
    {
        "CustomerID": 10,
        "AppleDEP": "HelloWorld1",
        "RowInserted": "2017-04-12T04:10:20.573",
        "RowUpdated": "2017-04-12T20:17:57.367"
    }
]
Name Description  
CustomerID (INT) Identifier for a customer  
AppleDEP (NVARCHAR(50)) Apple DEP  
RowThumbprint (UNIQUEIDENTIFIER) For internal use only  
RowInserted (DateTime) Created date, in UTC  
RowUpdated (DateTime) Last updated date, in UTC  

REQUESTS

GET Apple DEP Records

Definition

GET /AppleDEP?CustomerID={CustomerID}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /AppleDEP?CustomerID=10
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/AppleDEP?CustomerID=10" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse GettingAppleDepRecords()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/AppleDEP?CustomerID=10");
    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 GettingAppleDepRecords() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/AppleDEP?CustomerID=10");
     
    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/AppleDEP?CustomerID=10', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[AppleDEPData]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "CustomerID": 10,
        "AppleDEP": "HelloWorld1",
        "RowInserted": "2017-04-12T04:10:20.573",
        "RowUpdated": "2017-04-12T20:17:57.367"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "CustomerID": 10,
            "AppleDEP": "HelloWorld1",
            "RowInserted": "2017-04-12T04:10:20.573",
            "RowUpdated": "2017-04-12T20:17:57.367"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <CustomerID>10</CustomerID>
    <AppleDEP>HelloWorld1</AppleDEP>
    <RowThumbprint>4a271818-b24c-538c-edb6-10744a30f4de</RowThumbprint>
    <RowInserted>2017-04-12T04:10:20.573</RowInserted>
    <RowUpdated>2017-04-12T20:17:57.367</RowUpdated>
  </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
CustomerID,AppleDEP,RowThumbprint,RowInserted,RowUpdated
10,HelloWorld1,4a271818-b24c-538c-edb6-10744a30f4de,2017-04-12T04:10:20.573,2017-04-12T20:17:57.367

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

POST an Apple DEP Record

Definition

GET /AppleDEP/Insert?CustomerID={CustomerID}&AppleDEP={AppleDEP}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /AppleDEP/Insert?CustomerID=10&AppleDEP=ABCDEFG1267
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/AppleDEP/Insert?CustomerID=10&AppleDEP=ABCDEFG1267" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse AddingAnAppleDepRecord()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/AppleDEP/Insert?CustomerID=10&AppleDEP=ABCDEFG1267");
    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 AddingAnAppleDepRecord() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/AppleDEP/Insert?CustomerID=10&AppleDEP=ABCDEFG1267");
     
    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/AppleDEP/Insert?CustomerID=10&AppleDEP=ABCDEFG1267', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[AppleDEPData]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "CustomerID": 10,
        "AppleDEP": "HelloWorld1",
        "RowInserted": "2017-04-12T04:10:20.573",
        "RowUpdated": "2017-04-12T20:17:57.367"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "CustomerID": 10,
            "AppleDEP": "HelloWorld1",
            "RowInserted": "2017-04-12T04:10:20.573",
            "RowUpdated": "2017-04-12T20:17:57.367"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <CustomerID>10</CustomerID>
    <AppleDEP>HelloWorld1</AppleDEP>
    <RowThumbprint>4a271818-b24c-538c-edb6-10744a30f4de</RowThumbprint>
    <RowInserted>2017-04-12T04:10:20.573</RowInserted>
    <RowUpdated>2017-04-12T20:17:57.367</RowUpdated>
  </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
CustomerID,AppleDEP,RowThumbprint,RowInserted,RowUpdated
10,HelloWorld1,4a271818-b24c-538c-edb6-10744a30f4de,2017-04-12T04:10:20.573,2017-04-12T20:17:57.367

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

PUT an Apple DEP Record

Definition

GET /AppleDEP/Update?CustomerID={CustomerID}&AppleDEP={AppleDEP}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /AppleDEP/Update?CustomerID=10&AppleDEP=ABCDEFG1267
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/AppleDEP/Update?CustomerID=10&AppleDEP=ABCDEFG1267" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse UpdatingAnAppleDepRecord()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/AppleDEP/Update?CustomerID=10&AppleDEP=ABCDEFG1267");
    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 UpdatingAnAppleDepRecord() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/AppleDEP/Update?CustomerID=10&AppleDEP=ABCDEFG1267");
     
    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/AppleDEP/Update?CustomerID=10&AppleDEP=ABCDEFG1267', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[AppleDEPData]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "CustomerID": 10,
        "AppleDEP": "HelloWorld1",
        "RowInserted": "2017-04-12T04:10:20.573",
        "RowUpdated": "2017-04-12T20:17:57.367"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "CustomerID": 10,
            "AppleDEP": "HelloWorld1",
            "RowInserted": "2017-04-12T04:10:20.573",
            "RowUpdated": "2017-04-12T20:17:57.367"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <CustomerID>10</CustomerID>
    <AppleDEP>HelloWorld1</AppleDEP>
    <RowThumbprint>4a271818-b24c-538c-edb6-10744a30f4de</RowThumbprint>
    <RowInserted>2017-04-12T04:10:20.573</RowInserted>
    <RowUpdated>2017-04-12T20:17:57.367</RowUpdated>
  </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
CustomerID,AppleDEP,RowThumbprint,RowInserted,RowUpdated
10,HelloWorld1,4a271818-b24c-538c-edb6-10744a30f4de,2017-04-12T04:10:20.573,2017-04-12T20:17:57.367

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

DELETE an Apple DEP Record

If successful, returns an empty array.

Definition

GET /AppleDEP/Delete?CustomerID={CustomerID}&Auth={Auth}&Response={Response}

Headers

Example Request

GET /AppleDEP/Delete?CustomerID=10
Authorization: Bearer (Access Token)
Accept-Encoding: gzip

curl -X GET "https://dataconnectdemo.iqmetrix.net/AppleDEP/Delete?CustomerID=10" -H "Authorization: Bearer (Access Token)" -H "Accept-Encoding: gzip"
static IRestResponse DeletingAnAppleDepRecord()
{
    var client = new RestClient("https://dataconnectdemo.iqmetrix.net/AppleDEP/Delete?CustomerID=10");
    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 DeletingAnAppleDepRecord() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://dataconnectdemo.iqmetrix.net/AppleDEP/Delete?CustomerID=10");
     
    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/AppleDEP/Delete?CustomerID=10', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept-Encoding' => 'gzip',
    } 

puts response

URI Parameters

Response Parameters

Array[AppleDEPData]

Example Response (Default)

HTTP 200 Content-Type: application/json
[
    {
        "CustomerID": 10,
        "AppleDEP": "HelloWorld1",
        "RowInserted": "2017-04-12T04:10:20.573",
        "RowUpdated": "2017-04-12T20:17:57.367"
    }
]

Example Response (JsonDataTable)

HTTP 200 Content-Type: application/json
{
    "Records": [
        {
            "CustomerID": 10,
            "AppleDEP": "HelloWorld1",
            "RowInserted": "2017-04-12T04:10:20.573",
            "RowUpdated": "2017-04-12T20:17:57.367"
        }
    ],
    "Schema": [
        {
            "Column_Name": "ColumnName",
            "Type": "datatype",
            "SafeType": "safetype",
            "Length": 100
        }
    ]
}

Example Response (XmlDataTable)

HTTP 200 Content-Type: text/xml
<Table>
  <Record>
    <CustomerID>10</CustomerID>
    <AppleDEP>HelloWorld1</AppleDEP>
    <RowThumbprint>4a271818-b24c-538c-edb6-10744a30f4de</RowThumbprint>
    <RowInserted>2017-04-12T04:10:20.573</RowInserted>
    <RowUpdated>2017-04-12T20:17:57.367</RowUpdated>
  </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
CustomerID,AppleDEP,RowThumbprint,RowInserted,RowUpdated
10,HelloWorld1,4a271818-b24c-538c-edb6-10744a30f4de,2017-04-12T04:10:20.573,2017-04-12T20:17:57.367

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 Token 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
HTTP 503 Maintenance The requested data is currently undergoing scheduled maintenance, please try again after 12:00PM UTC
Was this page helpful?