Loading...
NAV Navbar
Shell HTTP JavaScript Node.JS Python Ruby Java

AppInsights API Reference

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Use the following URL format to send API calls:

https://{marketplaceURL}/api/integration/v1/visualization/{endpoint}

For example:

https://myMarketplace.com/api/integration/v1/visualization/app/{appId}/templates/collections

Generated on Thu Oct 17 2019 08:55:16 GMT-0400 (EDT)

Collections

Delete collection template.

Example request

curl -X DELETE https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "errorCode": "apiError",
  "errorDetail": "The orderId parameter must be a number.",
  "tag": "1495051362575:sgw-2240268717-53tbz:21:j2s24o4n:18441"
}

DELETE/app/{appId}/templates/collections/{uuid}

Delete a collection template by id.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
*uuid path string(uuid) The ID of the collection template to operate on.

Responses

Status Meaning Description Definition
204 No Content Indicates a successful delete. Note: this API does not return a 404. A non existent object is considered a successful delete.
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

List collection templates.

Example request

curl -X GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "page": {
    "number": 1,
    "size": 5,
    "totalElements": 15,
    "totalPages": 3
  }
}

GET/app/{appId}/templates/collections

Gets a list of collection templates.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
page query integer 0 Used for pagination. Determines the page to start results from. 0 based index.
size query integer 10 Used for pagination. Determines the number of items per page.

Responses

Status Meaning Description Definition
200 OK Indicates a successful listing call. ListCollectionTemplate200
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Get collection template.

Example request

curl -X GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections/{uuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "dashboardTemplates": [
    "7f140fe8-8277-41f6-b0fc-ffcd93a37df7"
  ],
  "title": "Example Folder",
  "uuid": "8bf43993-473e-4483-b8ca-518969c0b59e"
}

GET/app/{appId}/templates/collections/{uuid}

Get a collection template by id.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
*uuid path string(uuid) The ID of the collection template to operate on.

Responses

Status Meaning Description Definition
200 OK Indicates a successful fetch. CollectionTemplate
404 Not Found Indicates the requested collection template was not found. ServiceErrorWithTag
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Create a new collection template.

Example request

curl -X POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Represents a collection-template.",
      "type": "object",
      "title": "CollectionTemplate",
      "properties": {
        "dashboardTemplates": {
          "description": "A list of UUID strings.",
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          }
        },
        "title": {
          "description": "Represents the title that will be used for an instnace of this collection template. This is exposed in the AppInsights user interface.",
          "type": "string",
          "pattern": "[a-zA-Z0-9-_ ]+"
        },
        "uuid": {
          "description": "The UUID version 4 used to identify a object.",
          "type": "string",
          "format": "uuid"
        }
      },
      "example": {
        "dashboardTemplates": [
          "7f140fe8-8277-41f6-b0fc-ffcd93a37df7"
        ],
        "title": "Example Folder"
      }
    },
    {
      "example": {
        "dashboardTemplates": [
          "7f140fe8-8277-41f6-b0fc-ffcd93a37df7"
        ],
        "title": "Example Folder"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/collections");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "dashboardTemplates": [
    "7f140fe8-8277-41f6-b0fc-ffcd93a37df7"
  ],
  "title": "Example Folder"
}

Example response

{
  "dashboardTemplates": [
    "7f140fe8-8277-41f6-b0fc-ffcd93a37df7"
  ],
  "title": "Example Folder",
  "uuid": "8bf43993-473e-4483-b8ca-518969c0b59e"
}

POST/app/{appId}/templates/collections

Create a new collection template.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.

Body Parameters

CollectionTemplate object:

Property Type Description
dashboardTemplates array of string

A list of UUID strings.

title string

Represents the title that will be used for an instnace of this collection template. This is exposed in the AppInsights user interface.

uuid string

The UUID version 4 used to identify a object.

Responses

Status Meaning Description Definition
201 Created Indicates the collection template was created. CollectionTemplate
400 Bad Request When the provided details do not meet the collection template specifications, a 400 response is sent. ServiceErrorWithTag
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Dashboards

Delete dashboard template.

Example request

curl -X DELETE https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "errorCode": "apiError",
  "errorDetail": "The orderId parameter must be a number.",
  "tag": "1495051362575:sgw-2240268717-53tbz:21:j2s24o4n:18441"
}

DELETE/app/{appId}/templates/dashboards/{uuid}

Delete a dashboard template by id.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
*uuid path string(uuid) The ID of the dashboard template to operate on.

Responses

Status Meaning Description Definition
204 No Content Indicates a successful delete. Note: this API does not return a 404. A non existent object is considered a successful delete.
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

List of dashboard templates.

Example request

curl -X GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "description": "Visits",
  "fields": {
    "description": "Visits",
    "imageURL": "template02.png",
    "name": "Site Visitors"
  },
  "imageURL": "template02.png",
  "model": "base.template",
  "name": "Site Visitors",
  "serviceTypeId": 1,
  "title": "Example Dashboard",
  "uuid": "7f140fe8-8277-41f6-b0fc-ffcd93a37df7",
  "widgetTemplates": []
}

GET/app/{appId}/templates/dashboards

Get a list of dashboard templates.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
page query integer 0 Used for pagination. Determines the page to start results from. 0 based index.
size query integer 10 Used for pagination. Determines the number of items per page.

Responses

Status Meaning Description Definition
200 OK Indicates a successful listing call. DashboardTemplate
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Get dashboard template.

Example request

curl -X GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards/{uuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "description": "Visits",
  "fields": {
    "description": "Visits",
    "imageURL": "template02.png",
    "name": "Site Visitors"
  },
  "imageURL": "template02.png",
  "model": "base.template",
  "name": "Site Visitors",
  "serviceTypeId": 1,
  "title": "Example Dashboard",
  "uuid": "7f140fe8-8277-41f6-b0fc-ffcd93a37df7",
  "widgetTemplates": []
}

GET/app/{appId}/templates/dashboards/{uuid}

Get a dashboard template by id.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
*uuid path string(uuid) The ID of the dashboard template to operate on.

Responses

Status Meaning Description Definition
200 OK Indicates a successful fetch. DashboardTemplate
404 Not Found Indicates the requested dashboard template was not found. ServiceErrorWithTag
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Create dashboard template.

Example request

curl -X POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Represents a dashboard-template.",
      "type": "object",
      "title": "DashboardTemplate",
      "properties": {
        "description": {
          "description": "Not in v1. This may be used in the future.",
          "type": "string"
        },
        "imageURL": {
          "description": "Used as a image url for a preview image that shows what this template will look like.",
          "type": "string"
        },
        "model": {
          "description": "Used as a internal identifier. The only valid value is currently base.template.",
          "type": "string"
        },
        "name": {
          "description": "Used as an internal machine readable name for this template.",
          "type": "string"
        },
        "serviceTypeId": {
          "description": "For internal use. The only valid value as of v1 is 1.",
          "type": "integer"
        },
        "title": {
          "description": "Represents the title that will be used for instances of this dashboard template. This is exposed in the AppInsights user interface.",
          "type": "string",
          "pattern": "[a-zA-Z0-9-_ ]+"
        },
        "uuid": {
          "description": "The UUID version 4 used to identify a object.",
          "type": "string",
          "format": "uuid"
        },
        "widgetTemplates": {
          "description": "A list of UUID strings.",
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "example": {
        "description": "Visits",
        "fields": {
          "description": "Visits",
          "imageURL": "template02.png",
          "name": "Site Visitors"
        },
        "imageURL": "template02.png",
        "model": "base.template",
        "name": "Site Visitors",
        "serviceTypeId": 1,
        "title": "Example Dashboard",
        "uuid": "7f140fe8-8277-41f6-b0fc-ffcd93a37df7",
        "widgetTemplates": []
      }
    },
    {
      "example": {
        "description": "Visits",
        "fields": {
          "description": "Visits",
          "imageURL": "template02.png",
          "name": "Site Visitors"
        },
        "imageURL": "template02.png",
        "model": "base.template",
        "name": "Site Visitors",
        "serviceTypeId": 1,
        "streamParams": [],
        "title": "Example Dashboard",
        "uuid": "7f140fe8-8277-41f6-b0fc-ffcd93a37df7",
        "widgetTemplates": [
          "6753bf9d-22e9-43cf-a6f9-3f4254b862e5"
        ]
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/dashboards");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "description": "Visits",
  "fields": {
    "description": "Visits",
    "imageURL": "template02.png",
    "name": "Site Visitors"
  },
  "imageURL": "template02.png",
  "model": "base.template",
  "name": "Site Visitors",
  "serviceTypeId": 1,
  "streamParams": [],
  "title": "Example Dashboard",
  "uuid": "7f140fe8-8277-41f6-b0fc-ffcd93a37df7",
  "widgetTemplates": [
    "6753bf9d-22e9-43cf-a6f9-3f4254b862e5"
  ]
}

Example response

{
  "description": "Visits",
  "fields": {
    "description": "Visits",
    "imageURL": "template02.png",
    "name": "Site Visitors"
  },
  "imageURL": "template02.png",
  "model": "base.template",
  "name": "Site Visitors",
  "serviceTypeId": 1,
  "title": "Example Dashboard",
  "uuid": "7f140fe8-8277-41f6-b0fc-ffcd93a37df7",
  "widgetTemplates": []
}

POST/app/{appId}/templates/dashboards

Create a new dashboard template.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.

Body Parameters

DashboardTemplate object:

Property Type Description
description string

Not in v1. This may be used in the future.

imageURL string

Used as a image url for a preview image that shows what this template will look like.

model string

Used as a internal identifier. The only valid value is currently base.template.

name string

Used as an internal machine readable name for this template.

serviceTypeId integer

For internal use. The only valid value as of v1 is 1.

title string

Represents the title that will be used for instances of this dashboard template. This is exposed in the AppInsights user interface.

uuid string

The UUID version 4 used to identify a object.

widgetTemplates array of string

A list of UUID strings.

Responses

Status Meaning Description Definition
201 Created Indicates the dashboard template was created. DashboardTemplate
400 Bad Request When the provided details do not meet the dashboard template specifications, a 400 response is sent. ServiceErrorWithTag
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Datasets

Creates a new dataset with it's rows.

Example request

curl -X POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Represents a dataset.",
      "type": "object",
      "title": "DatasetSvcDataset",
      "properties": {
        "columns": {
          "description": "A list of column names. The length of the column list must match the length of each row.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "description": "The name of the dataset.",
          "type": "string"
        },
        "rows": {
          "description": "A list of row data that can be any format except an array or object. Each row must match the length of the columns list. The first item of each row is identified as the unique ID of that row.",
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ],
              "nullable": true
            }
          }
        }
      },
      "example": {
        "columns": [
          "stringColumn",
          "numberColumn",
          "floatColumn",
          "boolColumn"
        ],
        "name": "TestDataset",
        "rows": [
          [
            "a",
            123,
            99.99,
            false
          ],
          [
            "b",
            234,
            null,
            true
          ],
          [
            "a",
            345,
            null,
            true
          ]
        ]
      }
    },
    {
      "example": {
        "columns": [
          "stringColumn",
          "numberColumn",
          "floatColumn",
          "boolColumn"
        ],
        "name": "TestDataset",
        "rows": [
          [
            "a",
            123,
            99.99,
            false
          ],
          [
            "b",
            234,
            null,
            true
          ],
          [
            "a",
            345,
            null,
            true
          ]
        ]
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "columns": [
    "stringColumn",
    "numberColumn",
    "floatColumn",
    "boolColumn"
  ],
  "name": "TestDataset",
  "rows": [
    [
      "a",
      123,
      99.99,
      false
    ],
    [
      "b",
      234,
      null,
      true
    ],
    [
      "a",
      345,
      null,
      true
    ]
  ]
}

Example response

{
  "rows_added": 2,
  "rows_updated": 1
}

POST/app/{appId}/datasets/{userId}

Creates a new dataset with it's rows. If a dataset already exists, rows can be appended or replaced to that dataset by utilizing the clear flag. Rows can also be updated by posting a row with the same ID of an existing row. The ID of a row is identified to be the first item on all rows.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
clear query boolean false Used for clearing all existing rows for a dataset when true or appends to an existing list of rows for a dataset when false.
*userId path string(uuid) A parameter indicating what user ID to operate with.

Body Parameters

DatasetSvcDataset object:

Property Type Description
columns array of string

A list of column names. The length of the column list must match the length of each row.

name string

The name of the dataset.

rows array of array

A list of row data that can be any format except an array or object. Each row must match the length of the columns list. The first item of each row is identified as the unique ID of that row.

Responses

Status Meaning Description Definition
200 OK Indicates the dataset and rows for the dataset were created or updated. AddRows200
400 Bad Request When the provided details do not meet the datasetSvcDataset specifications, a 400 response is sent. ServiceError
500 Internal Server Error Indicates an internal error occurred. ServiceError

Delete an existing dataset with it's rows.

Example request

curl -X DELETE https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "success": true
}

DELETE/app/{appId}/datasets/{userId}/{name}

Delete an existing dataset with it's rows.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
*name path string The name of the dataset.
*userId path string(uuid) A parameter indicating what user ID to operate with.

Responses

Status Meaning Description Definition
200 OK Indicates the dataset and rows for the dataset were deleted. DeleteDataset200
400 Bad Request When the provided details do not meet the parameter specifications, a 400 response is sent. ServiceError
500 Internal Server Error Indicates an internal error occurred. ServiceError

List all datasets for a given source.

Example request

curl -X GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "datasets": [
    {
      "columns": [
        "col1"
      ],
      "dataset_id": "1239f5f4-c2f2-4bdb-9546-f3bfc44a67a9",
      "name": "noRows",
      "row_count": 0,
      "source_id": "8B0AB2D7-B04B-449B-BE64-BD2F178A7552",
      "target_id": "aa89a3e6-153c-45a1-bd38-4bea06ff58d4"
    },
    {
      "columns": [
        "name",
        "age",
        "is_pet_owner",
        "pet_name"
      ],
      "dataset_id": "1239f5f4-c2f2-4bdb-9546-f3bfc44a67a8",
      "name": "hasRows",
      "row_count": 2,
      "source_id": "8B0AB2D7-B04B-449B-BE64-BD2F178A7552",
      "target_id": "aa89a3e6-153c-45a1-bd38-4bea06ff58d4"
    }
  ]
}

GET/app/{appId}/datasets

List all datasets for a given source.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.

Responses

Status Meaning Description Definition
200 OK Indicates a successful list call. ListDatasets200
400 Bad Request When the provided details do not meet the datasetSvcDataset specifications, a 400 response is sent. ServiceError
500 Internal Server Error Indicates an internal error occurred. ServiceError

List a dataset's rows.

Example request

curl -X GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "rows": [
    [
      "fizzy-drink",
      1.99,
      false,
      null
    ],
    [
      "flat-drink",
      0.99,
      true,
      "glass"
    ]
  ]
}

GET/app/{appId}/datasets/{userId}/{name}/rows

Lists all rows for a specific dataset.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
*name path string The dataset name.
*userId path string(uuid) A parameter indicating what user ID to operate with.

Responses

Status Meaning Description Definition
200 OK Indicates success, the rows are returned. ListRows200
400 Bad Request When the provided details do not meet the datasetSvcDataset specifications, a 400 response is sent. ServiceError
500 Internal Server Error Indicates an internal error occurred. ServiceError

Updates rows for an existing dataset.

Example request

curl -X PUT https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Represents the request for updating rows.",
      "type": "object",
      "title": "DatasetSvcUpdateRows",
      "properties": {
        "rows": {
          "description": "A list of row data that can be any format except an array or object. Each row must match the length of the columns list. The first item of each row is identified as the unique ID of that row.",
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ],
              "nullable": true
            }
          }
        }
      },
      "example": {
        "columns": [
          "stringColumn",
          "numberColumn",
          "floatColumn",
          "boolColumn"
        ],
        "name": "TestDataset",
        "rows": [
          [
            "a",
            123,
            99.99,
            false
          ],
          [
            "b",
            234,
            null,
            true
          ],
          [
            "a",
            345,
            null,
            true
          ],
          [
            "c",
            456,
            99.99,
            true
          ]
        ]
      }
    },
    {
      "example": {
        "columns": [
          "stringColumn",
          "numberColumn",
          "floatColumn",
          "boolColumn"
        ],
        "name": "TestDataset",
        "rows": [
          [
            "a",
            123,
            99.99,
            false
          ],
          [
            "b",
            234,
            null,
            true
          ],
          [
            "a",
            345,
            null,
            true
          ],
          [
            "c",
            456,
            99.99,
            true
          ]
        ]
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/datasets/{userId}/{name}/rows");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "columns": [
    "stringColumn",
    "numberColumn",
    "floatColumn",
    "boolColumn"
  ],
  "name": "TestDataset",
  "rows": [
    [
      "a",
      123,
      99.99,
      false
    ],
    [
      "b",
      234,
      null,
      true
    ],
    [
      "a",
      345,
      null,
      true
    ],
    [
      "c",
      456,
      99.99,
      true
    ]
  ]
}

Example response

{
  "rows_added": 1,
  "rows_updated": 3
}

PUT/app/{appId}/datasets/{userId}/{name}/rows

Updates rows for an existing dataset. Rows are updated when the first item of the row matches another. This is identified to be the unique ID of a row and can be a string or id. If a row does not exist, it will be added.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
*name path string The name of the dataset.
*userId path string(uuid) A parameter indicating what user ID to operate with.

Body Parameters

DatasetSvcUpdateRows object:

Property Type Description
rows array of array

A list of row data that can be any format except an array or object. Each row must match the length of the columns list. The first item of each row is identified as the unique ID of that row.

Responses

Status Meaning Description Definition
200 OK Indicates all rows have been successfully updated. UpdateRows200
400 Bad Request When the provided details do not meet the datasetSvcUpdateRows specifications, a 400 response is sent. ServiceError
500 Internal Server Error Indicates an internal error occurred. ServiceError

Init

Create new dashboard from template.

Example request

curl -X POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/dashboard \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/dashboard HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/dashboard',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "collectionId": 1,
  "dashboardId": 2,
  "dashboardTemplateId": "3062ebff-9281-470e-a4a7-c38381b15e3b"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/dashboard',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/dashboard', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/dashboard',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/dashboard");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "collectionId": 1,
  "dashboardId": 2,
  "dashboardTemplateId": "3062ebff-9281-470e-a4a7-c38381b15e3b"
}

Example response

{
  "errorCode": "apiError",
  "errorDetail": "The orderId parameter must be a number.",
  "tag": "1495051362575:sgw-2240268717-53tbz:21:j2s24o4n:18441"
}

POST/app/{appId}/init/app/{appId}/dashboard

Attempts to enforce the set of widgets on a dashboard based on the input dashboard template, and it's associated widget templates.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.

Body Parameters

CreateDashboardRequest object:

Property Type Description
collectionId integer

The collection (folder) to put this dashboard into. Note: when excluded a folder will automatically be created named with the current date.

dashboardId integer

The dashboard to enforce the widgets for. Note: this assumes that the UI has either created a fresh dashboard, or has already cleared the target dashboard of widgets.

dashboardTemplateId string

The dashboard template to use as a template.

Responses

Status Meaning Description Definition
200 OK Indicates creation was successful. Note: no body is provided in this response, even though the code is 200.
400 Bad Request When the provided details do not meet the request specifications, a 400 response is sent. ServiceErrorWithTag
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Create new widget from template.

Example request

curl -X POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/widget \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/widget HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/widget',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "dashboardId": "1",
  "metric": {
    "dataset": "transactions",
    "uuid": "81c8954e-95c5-44bc-87e5-dc7c38db1bb4"
  },
  "widget": {}
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/widget',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/widget', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/widget',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/init/app/{appId}/widget");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "dashboardId": "1",
  "metric": {
    "dataset": "transactions",
    "uuid": "81c8954e-95c5-44bc-87e5-dc7c38db1bb4"
  },
  "widget": {}
}

Example response

{
  "errorCode": "apiError",
  "errorDetail": "The orderId parameter must be a number.",
  "tag": "1495051362575:sgw-2240268717-53tbz:21:j2s24o4n:18441"
}

POST/app/{appId}/init/app/{appId}/widget

Attempts to create a new widget from a widget template, on the targeted dashboard.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.

Body Parameters

CreateWidgetRequest object:

Property Type Description
dashboardId string

The dashboard to target for creating the widget.

metric undefined

A metric object as returned from the metric listing api, using a context=ui query parameter.

widget object

The details of the widget. This is the same details as the call being made to normally create a widget.

Responses

Status Meaning Description Definition
200 OK Indicates creation was successful. Note: the schema for the returned body is identical to the legacy widget creation output.
400 Bad Request When the provided details do not meet the request specifications, a 400 response is sent. ServiceErrorWithTag
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Metrics

Delete metric.

Example request

curl -X DELETE https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "errorCode": "internalError",
  "errorDetail": "Database connection is broken.",
  "tag": "1495051362575:sgw-2240268717-53tbz:21:j2s24o4n:18441"
}

DELETE/app/{appId}/templates/metrics/{uuid}

Delete a metric by id for your integration.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
*uuid path string(uuid) The ID of the metric to operate on.

Responses

Status Meaning Description Definition
204 No Content Indicates a successful delete. Note: this API does not return a 404. A non existent object is considered a successful delete.
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

List of metrics.

Example request

curl -X GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "dataset": "pagelines",
      "outputFormat": {
        "format": "LABEL",
        "label_args": {
          "col": "C"
        }
      },
      "transformTemplate": [
        {
          "operator": "RENAME_COLUMNS",
          "rename_args": {
            "rename": {
              "A": "B"
            }
          }
        },
        {
          "operator": "RENAME_COLUMNS",
          "rename_args": {
            "rename": {
              "B": "C"
            }
          }
        }
      ],
      "uuid": "1059fa46-eb5a-430f-aded-46bc2c257dce"
    }
  ],
  "page": {
    "number": 0,
    "size": 10,
    "totalElements": 1,
    "totalPages": 1
  }
}

GET/app/{appId}/templates/metrics

Get a list of metrics for your integration.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
page query integer 0 Used for pagination. Determines the page to start results from. 0 based index.
size query integer 10 Used for pagination. Determines the number of items per page.

Responses

Status Meaning Description Definition
200 OK Indicates a successful listing call. MetricResults
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Get metric.

Example request

curl -X GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics/{uuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "dataset": "pagelines",
  "outputFormat": {
    "format": "LABEL",
    "label_args": {
      "col": "C"
    }
  },
  "transformTemplate": [
    {
      "operator": "RENAME_COLUMNS",
      "rename_args": {
        "rename": {
          "A": "B"
        }
      }
    },
    {
      "operator": "RENAME_COLUMNS",
      "rename_args": {
        "rename": {
          "B": "C"
        }
      }
    }
  ],
  "uuid": "1059fa46-eb5a-430f-aded-46bc2c257dce"
}

GET/app/{appId}/templates/metrics/{uuid}

Get a metric by id for your integration.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
*uuid path string(uuid) The ID of the metric to operate on.

Responses

Status Meaning Description Definition
200 OK Indicates a successful fetch. Metric
404 Not Found Indicates the requested metric was not found. ServiceErrorWithTag
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Create metrics.

Example request

curl -X POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Represents a metric.",
      "type": "object",
      "title": "Metric",
      "properties": {
        "dataset": {
          "description": "The name of a dataset.",
          "type": "string"
        },
        "description": {
          "description": "A human readable string to describe this object.",
          "type": "string"
        },
        "name": {
          "description": "A human readable string for this object.",
          "type": "string"
        },
        "outputFormat": {
          "description": "The final output format for this metric. Note: each format value only supports one format arguments input. Each argument set is mutually exclusive.\n",
          "properties": {
            "format": {
              "type": "string",
              "enum": [
                "NUMBER",
                "LEADERBOARD",
                "TABLE",
                "TABLE_ROW",
                "MULTIBAR",
                "LABEL",
                "LIST",
                "IMAGE",
                "HTML",
                "TEXT_FEED",
                "GEO",
                "GALLERY",
                "XY_GRAPH"
              ]
            },
            "gallery_args": {
              "properties": {
                "img_url_col": {
                  "type": "string"
                },
                "msg_col": {
                  "type": "string"
                },
                "title_col": {
                  "type": "string"
                }
              }
            },
            "geo_args": {
              "properties": {
                "body_col": {
                  "type": "string"
                },
                "color_col": {
                  "type": "string"
                },
                "lat_col": {
                  "type": "string"
                },
                "lon_col": {
                  "type": "string"
                },
                "title_col": {
                  "type": "string"
                }
              }
            },
            "html_args": {
              "properties": {
                "col": {
                  "type": "string"
                }
              }
            },
            "image_args": {
              "properties": {
                "img_url_col": {
                  "type": "string"
                },
                "msg_col": {
                  "type": "string"
                },
                "title_col": {
                  "type": "string"
                }
              }
            },
            "label_args": {
              "properties": {
                "col": {
                  "type": "string"
                }
              }
            },
            "leaderboard_args": {
              "properties": {
                "name_col": {
                  "type": "string"
                },
                "value_col": {
                  "type": "string"
                }
              }
            },
            "list_args": {
              "properties": {
                "col": {
                  "type": "string"
                }
              }
            },
            "multibar_args": {
              "properties": {
                "cols": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "number_args": {
              "properties": {
                "number_col": {
                  "type": "string"
                },
                "prefix_col": {
                  "type": "string"
                },
                "suffix_col": {
                  "type": "string"
                },
                "ts_col": {
                  "type": "string"
                },
                "ts_label_col": {
                  "type": "string"
                }
              }
            },
            "table_args": {
              "properties": {
                "cols": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "table_row_args": {
              "properties": {
                "cols": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "text_feed_args": {
              "properties": {
                "date_col": {
                  "type": "string"
                },
                "img_url_col": {
                  "type": "string"
                },
                "msg_col": {
                  "type": "string"
                },
                "title_col": {
                  "type": "string"
                }
              }
            },
            "xy_graph_args": {
              "properties": {
                "x_col": {
                  "type": "string"
                },
                "y_col": {
                  "type": "string"
                }
              }
            }
          }
        },
        "transformTemplate": {
          "description": "A set of transformation steps.",
          "type": "array",
          "items": {
            "properties": {
              "filter_args": {
                "description": "Only supported when operator is FILTER_COLUMNS.",
                "properties": {
                  "columns": {
                    "type": "array",
                    "items": {}
                  }
                }
              },
              "operator": {
                "description": "Determines the operator type to use for this transform step. Note: Each operator type corresponds to a set of argument fields. Argument sets are mutually exlusive.\n",
                "type": "string",
                "enum": [
                  "FILTER_COLUMNS",
                  "RENAME_COLUMNS",
                  "SELECT_ROWS"
                ]
              },
              "rename_args": {
                "description": "Only supported when operator is RENAME_COLUMNS.",
                "properties": {
                  "rename": {
                    "description": "A map of (string, string) values mapping renames of columns."
                  }
                }
              },
              "select_args": {
                "description": "Only supported when operator is SELECT_ROWS.",
                "properties": {
                  "criteria": {
                    "properties": {}
                  }
                }
              }
            }
          }
        },
        "uuid": {
          "description": "The UUID version 4 used to identify a object.",
          "type": "string",
          "format": "uuid"
        }
      },
      "example": {
        "dataset": "pagelines",
        "outputFormat": {
          "format": "LABEL",
          "label_args": {
            "col": "C"
          }
        },
        "transformTemplate": [
          {
            "operator": "RENAME_COLUMNS",
            "rename_args": {
              "rename": {
                "A": "B"
              }
            }
          },
          {
            "operator": "RENAME_COLUMNS",
            "rename_args": {
              "rename": {
                "B": "C"
              }
            }
          }
        ],
        "uuid": "1059fa46-eb5a-430f-aded-46bc2c257dce"
      }
    },
    {
      "example": {
        "dataset": "pagelines",
        "outputFormat": {
          "format": "LABEL",
          "label_args": {
            "col": "C"
          }
        },
        "transformTemplate": [
          {
            "operator": "RENAME_COLUMNS",
            "rename_args": {
              "rename": {
                "A": "B"
              }
            }
          },
          {
            "operator": "RENAME_COLUMNS",
            "rename_args": {
              "rename": {
                "B": "C"
              }
            }
          }
        ],
        "uuid": "1059fa46-eb5a-430f-aded-46bc2c257dce"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/metrics");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "dataset": "pagelines",
  "outputFormat": {
    "format": "LABEL",
    "label_args": {
      "col": "C"
    }
  },
  "transformTemplate": [
    {
      "operator": "RENAME_COLUMNS",
      "rename_args": {
        "rename": {
          "A": "B"
        }
      }
    },
    {
      "operator": "RENAME_COLUMNS",
      "rename_args": {
        "rename": {
          "B": "C"
        }
      }
    }
  ],
  "uuid": "1059fa46-eb5a-430f-aded-46bc2c257dce"
}

Example response

{
  "dataset": "pagelines",
  "outputFormat": {
    "format": "LABEL",
    "label_args": {
      "col": "C"
    }
  },
  "transformTemplate": [
    {
      "operator": "RENAME_COLUMNS",
      "rename_args": {
        "rename": {
          "A": "B"
        }
      }
    },
    {
      "operator": "RENAME_COLUMNS",
      "rename_args": {
        "rename": {
          "B": "C"
        }
      }
    }
  ],
  "uuid": "1059fa46-eb5a-430f-aded-46bc2c257dce"
}

POST/app/{appId}/templates/metrics

Create a new metric for your integration.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.

Body Parameters

Metric object:

Property Type Description
dataset string

The name of a dataset.

description string

A human readable string to describe this object.

name string

A human readable string for this object.

outputFormat undefined

The final output format for this metric. Note: each format value only supports one format arguments input. Each argument set is mutually exclusive.

transformTemplate array of undefined

A set of transformation steps.

uuid string

The UUID version 4 used to identify a object.

Responses

Status Meaning Description Definition
201 Created Indicates the metric was created. Metric
400 Bad Request When the provided details do not meet the metric specifications, a 400 response is sent. ServiceErrorWithTag
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Provision

Provision a new appinsights connection.

Example request

curl -X POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/accounts \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/accounts HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/accounts',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "user": {
    "companyId": "5b1338e0-f6f4-4103-900f-2fbc5830f25e",
    "userId": "90bead93-f075-400d-9886-c54f0649f6f6"
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/accounts',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/accounts', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/accounts',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/accounts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "user": {
    "companyId": "5b1338e0-f6f4-4103-900f-2fbc5830f25e",
    "userId": "90bead93-f075-400d-9886-c54f0649f6f6"
  }
}

Example response

{
  "errorCode": "apiError",
  "errorDetail": "The orderId parameter must be a number.",
  "tag": "1495051362575:sgw-2240268717-53tbz:21:j2s24o4n:18441"
}

POST/app/{appId}/accounts

Provision a new appinsights connection providing a userId and companyId.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.

Body Parameters

ProvisionConnectionRequest object:

Property Type Description
user undefined

Responses

Status Meaning Description Definition
201 Created Indicates provisioning was successful.
400 Bad Request When the provided details do not meet the request specifications, a 400 response is sent. ServiceErrorWithTag
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Widgets

Delete widget template.

Example request

curl -X DELETE https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "errorCode": "apiError",
  "errorDetail": "The orderId parameter must be a number.",
  "tag": "1495051362575:sgw-2240268717-53tbz:21:j2s24o4n:18441"
}

DELETE/app/{appId}/templates/widgets/{uuid}

Delete a widget template by id.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
*uuid path string(uuid) The ID of the widget template to operate on.

Responses

Status Meaning Description Definition
204 No Content Indicates a successful delete. Note: this API does not return a 404. A non existent object is considered a successful delete.
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

List of widget templates.

Example request

curl -X GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "dataRetrieverTypeId": 50,
      "gridHeight": 4,
      "gridWidth": 5,
      "gridX": 5,
      "gridY": 0,
      "maxHeight": 12,
      "maxWidth": 48,
      "metric": "d8da3b53-69b7-4016-880d-77d4e4fef60b",
      "minHeight": 1,
      "minWidth": 2,
      "params": {},
      "uuid": "126b397e-ab62-42eb-a265-05c5fa0d0d31",
      "widgetTypeId": 14
    }
  ],
  "page": {
    "number": 0,
    "size": 10,
    "totalElements": 1,
    "totalPages": 1
  }
}

GET/app/{appId}/templates/widgets

Get a list of widget templates.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
page query integer 0 Used for pagination. Determines the page to start results from. 0 based index.
size query integer 10 Used for pagination. Determines the number of items per page.

Responses

Status Meaning Description Definition
200 OK Indicates a successful listing call. WidgetTemplateResults
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Get widget template.

Example request

curl -X GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets/{uuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "dataRetrieverTypeId": 7,
  "gridHeight": 4,
  "gridWidth": 5,
  "gridX": 5,
  "gridY": 0,
  "maxHeight": 12,
  "maxWidth": 12,
  "metric": "965a7af6-e31d-4316-bb1a-9f7dc200c875",
  "minHeight": 1,
  "minWidth": 2,
  "params": {},
  "uuid": "6753bf9d-22e9-43cf-a6f9-3f4254b862e5",
  "widgetTypeId": 14
}

GET/app/{appId}/templates/widgets/{uuid}

Get a widget template by id.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.
*uuid path string(uuid) The ID of the widget template to operate on.

Responses

Status Meaning Description Definition
200 OK Indicates a successful fetch. WidgetTemplate
404 Not Found Indicates the requested widget template was not found. ServiceErrorWithTag
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Create widget template.

Example request

curl -X POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Represents a widget-template.",
      "type": "object",
      "title": "WidgetTemplate",
      "properties": {
        "dataRetrieverTypeId": {
          "description": "Represents the internal retriever type used. The following is a list of the various data retriever types available:\n7 - Custom Number\n8 - Custom Text\n9 - Custom Leaderboard\n10 - Custom Geo\n20 - Custom List\n120 - Custom Image\n121 - Custom Label\n122 - Custom Graph\n174 - Custom Table\n247 - Custom HTML\n307 - Time\n312 - Gallery\n348 - Custom Multibar\nFor more details, please contact AppInsights.",
          "type": "integer"
        },
        "gridHeight": {
          "description": "The height in grid units for a widget instance created from this widget template.",
          "type": "integer"
        },
        "gridWidth": {
          "description": "The width in grid units for a widget instance created from this widget template.",
          "type": "integer"
        },
        "gridX": {
          "description": "The X grid coordinate for the location of a widget instance created from this widget template. Note: 0, 0 represents the top left corder of a dashboard.",
          "type": "integer"
        },
        "gridY": {
          "description": "The Y grid coordinate for the location of a widget instance created from this widget template. Note: 0, 0 represents the top left corder of a dashboard.",
          "type": "integer"
        },
        "maxHeight": {
          "description": "The maximum height in grid units of a widget instance created from this widget template.",
          "type": "integer"
        },
        "maxWidth": {
          "description": "The maximum width in grid units of a widget instance created from this widget template.",
          "type": "integer"
        },
        "metric": {
          "description": "A list of UUID strings.",
          "type": "string",
          "format": "uuid"
        },
        "minHeight": {
          "description": "The minimum height in grid units of a widget instance created from this widget template.",
          "type": "integer"
        },
        "minWidth": {
          "description": "The minimum width in grid units of a widget instance created from this widget template.",
          "type": "integer"
        },
        "params": {
          "description": "Provides parameters specific to the widget type. Please contact AppInsights for details on this property.",
          "type": "object",
          "example": {
            "param": {}
          }
        },
        "uuid": {
          "description": "The UUID version 4 used to identify a object.",
          "type": "string",
          "format": "uuid"
        },
        "widgetTypeId": {
          "description": "Represents the internal widget type to use. The following is a list of the various widget types available:\n1 - Label\n2 - Number\n3 - Horizontal Bar\n4 - Vertical Bar\n5 - Dial\n6 - USA Map\n7 - World Map\n8 - Text Feed\n9 - Leaderboard\n10 - List\n11 - Image\n12 - Stoplight\n13 - Line Graph\n14 - Sparkline\n15 - XY Graph\n16 - Bar Graph\n17 - Table\n18 - HTML\n19 - Pie Chart\n21 - World Maps\n22 - The time\n23 - Gallery Widget\n24 - Bar Graph\n25 - Custom HTML\n26 - Multi-bar Graph\nFor more details, please contact AppInsights.",
          "type": "integer"
        }
      },
      "example": {
        "dataRetrieverTypeId": 50,
        "gridHeight": 4,
        "gridWidth": 5,
        "gridX": 5,
        "gridY": 0,
        "maxHeight": 12,
        "maxWidth": 48,
        "metric": "965a7af6-e31d-4316-bb1a-9f7dc200c875",
        "minHeight": 1,
        "minWidth": 2,
        "params": {},
        "serviceTypeId": 10,
        "uuid": "6753bf9d-22e9-43cf-a6f9-3f4254b862e5",
        "widgetTypeId": 14
      }
    },
    {
      "example": {
        "dataRetrieverTypeId": 50,
        "gridHeight": 4,
        "gridWidth": 5,
        "gridX": 5,
        "gridY": 0,
        "maxHeight": 12,
        "maxWidth": 48,
        "metric": "965a7af6-e31d-4316-bb1a-9f7dc200c875",
        "minHeight": 1,
        "minWidth": 2,
        "params": {},
        "serviceTypeId": 10,
        "uuid": "6753bf9d-22e9-43cf-a6f9-3f4254b862e5",
        "widgetTypeId": 14
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/visualization/app/{appId}/templates/widgets");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "dataRetrieverTypeId": 50,
  "gridHeight": 4,
  "gridWidth": 5,
  "gridX": 5,
  "gridY": 0,
  "maxHeight": 12,
  "maxWidth": 48,
  "metric": "965a7af6-e31d-4316-bb1a-9f7dc200c875",
  "minHeight": 1,
  "minWidth": 2,
  "params": {},
  "serviceTypeId": 10,
  "uuid": "6753bf9d-22e9-43cf-a6f9-3f4254b862e5",
  "widgetTypeId": 14
}

Example response

{
  "dataRetrieverTypeId": 7,
  "gridHeight": 4,
  "gridWidth": 5,
  "gridX": 5,
  "gridY": 0,
  "maxHeight": 12,
  "maxWidth": 12,
  "metric": "965a7af6-e31d-4316-bb1a-9f7dc200c875",
  "minHeight": 1,
  "minWidth": 2,
  "params": {},
  "uuid": "6753bf9d-22e9-43cf-a6f9-3f4254b862e5",
  "widgetTypeId": 14
}

POST/app/{appId}/templates/widgets

Create a new widget template.

Parameters

Parameter Type Data Type Default Description
*appId path string(uuid) A parameter indicating what integration ID to operate with.

Body Parameters

WidgetTemplate object:

Property Type Description
dataRetrieverTypeId integer

Represents the internal retriever type used. The following is a list of the various data retriever types available:

7 - Custom Number

8 - Custom Text

9 - Custom Leaderboard

10 - Custom Geo

20 - Custom List

120 - Custom Image

121 - Custom Label

122 - Custom Graph

174 - Custom Table

247 - Custom HTML

307 - Time

312 - Gallery

348 - Custom Multibar

For more details, please contact AppInsights.

gridHeight integer

The height in grid units for a widget instance created from this widget template.

gridWidth integer

The width in grid units for a widget instance created from this widget template.

gridX integer

The X grid coordinate for the location of a widget instance created from this widget template. Note: 0, 0 represents the top left corder of a dashboard.

gridY integer

The Y grid coordinate for the location of a widget instance created from this widget template. Note: 0, 0 represents the top left corder of a dashboard.

maxHeight integer

The maximum height in grid units of a widget instance created from this widget template.

maxWidth integer

The maximum width in grid units of a widget instance created from this widget template.

metric string

A list of UUID strings.

minHeight integer

The minimum height in grid units of a widget instance created from this widget template.

minWidth integer

The minimum width in grid units of a widget instance created from this widget template.

params object

Provides parameters specific to the widget type. Please contact AppInsights for details on this property.

uuid string

The UUID version 4 used to identify a object.

widgetTypeId integer

Represents the internal widget type to use. The following is a list of the various widget types available:

1 - Label

2 - Number

3 - Horizontal Bar

4 - Vertical Bar

5 - Dial

6 - USA Map

7 - World Map

8 - Text Feed

9 - Leaderboard

10 - List

11 - Image

12 - Stoplight

13 - Line Graph

14 - Sparkline

15 - XY Graph

16 - Bar Graph

17 - Table

18 - HTML

19 - Pie Chart

21 - World Maps

22 - The time

23 - Gallery Widget

24 - Bar Graph

25 - Custom HTML

26 - Multi-bar Graph

For more details, please contact AppInsights.

Responses

Status Meaning Description Definition
201 Created Indicates the widget template was created. WidgetTemplate
400 Bad Request When the provided details do not meet the widget template specifications, a 400 response is sent. ServiceErrorWithTag
500 Internal Server Error Indicates a internal error occurred. ServiceErrorWithTag

Definitions

DatasetSvcAddRowsReply

{
  "rows_added": 2,
  "rows_updated": 1
}

Returns the number of successful rows added and rows updated for a given dataset.

Name Type Description
rows_added integer The total number of rows added.
rows_updated integer The total number of rows updated.

CollectionTemplate

{
  "dashboardTemplates": [
    "7f140fe8-8277-41f6-b0fc-ffcd93a37df7"
  ],
  "title": "Example Folder"
}

Represents a collection-template.

Name Type Description
dashboardTemplates array of string A list of UUID strings.
title string Represents the title that will be used for an instnace of this collection template. This is exposed in the AppInsights user interface.
uuid string The UUID version 4 used to identify a object.

CreateDashboardRequest

{
  "collectionId": 1,
  "dashboardId": 2,
  "dashboardTemplateId": "3062ebff-9281-470e-a4a7-c38381b15e3b"
}

Represent the request to create a dashboard

Name Type Description
collectionId integer The collection (folder) to put this dashboard into. Note: when excluded a folder will automatically be created named with the current date.
dashboardId integer The dashboard to enforce the widgets for. Note: this assumes that the UI has either created a fresh dashboard, or has already cleared the target dashboard of widgets.
dashboardTemplateId string The dashboard template to use as a template.

CreateWidgetRequest

{
  "dashboardId": "1",
  "metric": {
    "dataset": "transactions",
    "uuid": "81c8954e-95c5-44bc-87e5-dc7c38db1bb4"
  },
  "widget": {}
}

Represent the request to create a widget

Name Type Description
dashboardId string The dashboard to target for creating the widget.
metric undefined A metric object as returned from the metric listing api, using a context=ui query parameter.
widget object The details of the widget. This is the same details as the call being made to normally create a widget.

DashboardTemplate

{
  "description": "Visits",
  "fields": {
    "description": "Visits",
    "imageURL": "template02.png",
    "name": "Site Visitors"
  },
  "imageURL": "template02.png",
  "model": "base.template",
  "name": "Site Visitors",
  "serviceTypeId": 1,
  "title": "Example Dashboard",
  "uuid": "7f140fe8-8277-41f6-b0fc-ffcd93a37df7",
  "widgetTemplates": []
}

Represents a dashboard-template.

Name Type Description
description string Not in v1. This may be used in the future.
imageURL string Used as a image url for a preview image that shows what this template will look like.
model string Used as a internal identifier. The only valid value is currently base.template.
name string Used as an internal machine readable name for this template.
serviceTypeId integer For internal use. The only valid value as of v1 is 1.
title string Represents the title that will be used for instances of this dashboard template. This is exposed in the AppInsights user interface.
uuid string The UUID version 4 used to identify a object.
widgetTemplates array of string A list of UUID strings.

DatasetSvcDataset

{
  "columns": [
    "stringColumn",
    "numberColumn",
    "floatColumn",
    "boolColumn"
  ],
  "name": "TestDataset",
  "rows": [
    [
      "a",
      123,
      99.99,
      false
    ],
    [
      "b",
      234,
      null,
      true
    ],
    [
      "a",
      345,
      null,
      true
    ]
  ]
}

Represents a dataset.

Name Type Description
columns array of string A list of column names. The length of the column list must match the length of each row.
name string The name of the dataset.
rows array of array A list of row data that can be any format except an array or object. Each row must match the length of the columns list. The first item of each row is identified as the unique ID of that row.

DatasetSvcUpdateRows

{
  "columns": [
    "stringColumn",
    "numberColumn",
    "floatColumn",
    "boolColumn"
  ],
  "name": "TestDataset",
  "rows": [
    [
      "a",
      123,
      99.99,
      false
    ],
    [
      "b",
      234,
      null,
      true
    ],
    [
      "a",
      345,
      null,
      true
    ],
    [
      "c",
      456,
      99.99,
      true
    ]
  ]
}

Represents the request for updating rows.

Name Type Description
rows array of array A list of row data that can be any format except an array or object. Each row must match the length of the columns list. The first item of each row is identified as the unique ID of that row.

DatasetSvcDeleteReply

{
  "success": true
}

Represents a successful dataset and rows delete.

Name Type Description
success boolean True if the dataset was successfully deleted.

CollectionTemplateResults

{
  "content": [
    {
      "dashboardTemplates": [],
      "title": "Example Folder",
      "uuid": "64ebad8d-d42f-44fc-b89b-e103b98b6d5b"
    }
  ],
  "page": {
    "number": 0,
    "size": 10,
    "totalElements": 1,
    "totalPages": 1
  }
}

A object representing the results of querying collection-templates.

Name Type Description
content array of CollectionTemplate A list of results for the requested page.
page object Represents meta data information about the results being returned.

DatasetSvcListDatasetsReply

{
  "datasets": [
    {
      "columns": [
        "col1"
      ],
      "dataset_id": "1239f5f4-c2f2-4bdb-9546-f3bfc44a67a9",
      "name": "noRows",
      "row_count": 0,
      "source_id": "8B0AB2D7-B04B-449B-BE64-BD2F178A7552",
      "target_id": "aa89a3e6-153c-45a1-bd38-4bea06ff58d4"
    },
    {
      "columns": [
        "name",
        "age",
        "is_pet_owner",
        "pet_name"
      ],
      "dataset_id": "1239f5f4-c2f2-4bdb-9546-f3bfc44a67a8",
      "name": "hasRows",
      "row_count": 2,
      "source_id": "8B0AB2D7-B04B-449B-BE64-BD2F178A7552",
      "target_id": "aa89a3e6-153c-45a1-bd38-4bea06ff58d4"
    }
  ]
}

Returns a list of datasets.

Name Type Description
datasets array of datasetSvcListDataset The list of datasets.

DatasetSvcListRowsReply

{
  "rows": [
    [
      "fizzy-drink",
      1.99,
      false,
      null
    ],
    [
      "flat-drink",
      0.99,
      true,
      "glass"
    ]
  ]
}

Returns a list of datasets.

Name Type Description
rows array of array The list of rows.

Metric

{
  "dataset": "pagelines",
  "outputFormat": {
    "format": "LABEL",
    "label_args": {
      "col": "C"
    }
  },
  "transformTemplate": [
    {
      "operator": "RENAME_COLUMNS",
      "rename_args": {
        "rename": {
          "A": "B"
        }
      }
    },
    {
      "operator": "RENAME_COLUMNS",
      "rename_args": {
        "rename": {
          "B": "C"
        }
      }
    }
  ],
  "uuid": "1059fa46-eb5a-430f-aded-46bc2c257dce"
}

Represents a metric.

Name Type Description
dataset string The name of a dataset.
description string A human readable string to describe this object.
name string A human readable string for this object.
outputFormat undefined The final output format for this metric. Note: each format value only supports one format arguments input. Each argument set is mutually exclusive.
transformTemplate array of A set of transformation steps.
uuid string The UUID version 4 used to identify a object.

MetricResults

{
  "content": [
    {
      "dataset": "pagelines",
      "outputFormat": {
        "format": "LABEL",
        "label_args": {
          "col": "C"
        }
      },
      "transformTemplate": [
        {
          "operator": "RENAME_COLUMNS",
          "rename_args": {
            "rename": {
              "A": "B"
            }
          }
        },
        {
          "operator": "RENAME_COLUMNS",
          "rename_args": {
            "rename": {
              "B": "C"
            }
          }
        }
      ],
      "uuid": "1059fa46-eb5a-430f-aded-46bc2c257dce"
    }
  ],
  "page": {
    "number": 0,
    "size": 10,
    "totalElements": 1,
    "totalPages": 1
  }
}

A object representing the results of querying metrics.

Name Type Description
content array of metric A list of results for the requested page.
page object Represents meta data information about the results being returned.

ProvisionConnectionRequest

{
  "user": {
    "companyId": "5b1338e0-f6f4-4103-900f-2fbc5830f25e",
    "userId": "90bead93-f075-400d-9886-c54f0649f6f6"
  }
}

Represent a request to provision a new appinsights connection

Name Type Description
user undefined

ServiceError

{
  "error": "sourceId must be a valid uuid sourceId={sourceId}",
  "errorCode": "InvalidArgument"
}
Name Type Description
error string A description of why the error occurred.
errorCode string A code representing the http status code (InvalidArgument, Unknown, NotFound).

ServiceErrorWithTag

{
  "errorCode": "apiError",
  "errorDetail": "The orderId parameter must be a number.",
  "tag": "1495051362575:sgw-2240268717-53tbz:21:j2s24o4n:18441"
}
Name Type Description
errorCode string Status code returned by the server.
errorDetail undefined A string or object giving more details of why the error occurred.
tag string A string representing the internal tag for this request. This helps to debug when looking through error logs.

DatasetSvcUpdateRowsReply

{
  "rows_added": 1,
  "rows_updated": 3
}

Returns the number of successful rows added and rows updated for a given dataset.

Name Type Description
rows_added integer The total number of rows added.
rows_updated integer The total number of rows updated.

WidgetTemplate

{
  "dataRetrieverTypeId": 50,
  "gridHeight": 4,
  "gridWidth": 5,
  "gridX": 5,
  "gridY": 0,
  "maxHeight": 12,
  "maxWidth": 48,
  "metric": "965a7af6-e31d-4316-bb1a-9f7dc200c875",
  "minHeight": 1,
  "minWidth": 2,
  "params": {},
  "serviceTypeId": 10,
  "uuid": "6753bf9d-22e9-43cf-a6f9-3f4254b862e5",
  "widgetTypeId": 14
}

Represents a widget-template.

Name Type Description
dataRetrieverTypeId integer Represents the internal retriever type used. The following is a list of the various data retriever types available:
7 - Custom Number
8 - Custom Text
9 - Custom Leaderboard
10 - Custom Geo
20 - Custom List
120 - Custom Image
121 - Custom Label
122 - Custom Graph
174 - Custom Table
247 - Custom HTML
307 - Time
312 - Gallery
348 - Custom Multibar
For more details, please contact AppInsights.
gridHeight integer The height in grid units for a widget instance created from this widget template.
gridWidth integer The width in grid units for a widget instance created from this widget template.
gridX integer The X grid coordinate for the location of a widget instance created from this widget template. Note: 0, 0 represents the top left corder of a dashboard.
gridY integer The Y grid coordinate for the location of a widget instance created from this widget template. Note: 0, 0 represents the top left corder of a dashboard.
maxHeight integer The maximum height in grid units of a widget instance created from this widget template.
maxWidth integer The maximum width in grid units of a widget instance created from this widget template.
metric string A list of UUID strings.
minHeight integer The minimum height in grid units of a widget instance created from this widget template.
minWidth integer The minimum width in grid units of a widget instance created from this widget template.
params object Provides parameters specific to the widget type. Please contact AppInsights for details on this property.
uuid string The UUID version 4 used to identify a object.
widgetTypeId integer Represents the internal widget type to use. The following is a list of the various widget types available:
1 - Label
2 - Number
3 - Horizontal Bar
4 - Vertical Bar
5 - Dial
6 - USA Map
7 - World Map
8 - Text Feed
9 - Leaderboard
10 - List
11 - Image
12 - Stoplight
13 - Line Graph
14 - Sparkline
15 - XY Graph
16 - Bar Graph
17 - Table
18 - HTML
19 - Pie Chart
21 - World Maps
22 - The time
23 - Gallery Widget
24 - Bar Graph
25 - Custom HTML
26 - Multi-bar Graph
For more details, please contact AppInsights.

WidgetTemplateResults

{
  "content": [
    {
      "dataRetrieverTypeId": 50,
      "gridHeight": 4,
      "gridWidth": 5,
      "gridX": 5,
      "gridY": 0,
      "maxHeight": 12,
      "maxWidth": 48,
      "metric": "d8da3b53-69b7-4016-880d-77d4e4fef60b",
      "minHeight": 1,
      "minWidth": 2,
      "params": {},
      "uuid": "126b397e-ab62-42eb-a265-05c5fa0d0d31",
      "widgetTypeId": 14
    }
  ],
  "page": {
    "number": 0,
    "size": 10,
    "totalElements": 1,
    "totalPages": 1
  }
}

A object representing the results of querying widget-templates.

Name Type Description
content array of widget-template A list of results for the requested page.
page object Represents meta data information about the results being returned.