APImetrics

The APImetrics Developer Hub

Welcome to the APImetrics developer hub. You'll find comprehensive guides and documentation to help you start working with APImetrics as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

Call Object

Description of the JSON that describes an API Call

 

The API Call object defines the HTTP request that we make from a Deployment. The request can have an Authentication Setting and Authentication Token applied to it.
Example object:

{
  "access": {
    "org": false, 
    "stats": false, 
    "results": false, 
    "settings": false
  }, 
  "meta": {
    "domain": "httpbin.org", 
    "description": null, 
    "created": "2015-09-18T23:29:39.534120Z", 
    "tags": [], 
    "accept": null, 
    "last_update": "2015-09-18T23:29:39.534173Z", 
    "content_type": null, 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "name": "Minimal API test name"
  }, 
  "request": {
    "body": null, 
    "parameters": [], 
    "url": "http://httpbin.org/get", 
    "auth_id": null, 
    "headers": [], 
    "token_id": null, 
    "method": "GET"
  }, 
}
Name
Description
Required?

meta

See below

Y

access

See below

N

request

See below

Y

meta

Name
Description
Required?

name

Name of call for your reference

Yes

description

Description of call for your reference

No

tags

List of tags for the call for your reference

No

owner

ID of owner of Call

No - readonly

access

Name
Description
Required?

settings

Is the call shared with the APImetrics community?

N

results

Is the call's results shared with the APImetrics community?

N

stats

Is the call's stats shared with the APImetrics community?

N

org

Can other users in your organization view the API Call and it's stats and results?

N

request

Name
Description
Required?

method

HTTP method to use

Y

url

URL to call

Y

parameters

List of request parameters to append to call

N

headers

List of headers to include in call

N

body

Content of POST or PUT call

N

auth_id

ID of authentication settings to use

N

token_id

ID of token to use with authentication settings

N

Suggest Edits

List API Calls

Use this API to get your API Calls

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/calls/
curl --request GET \
  --url https://client.apimetrics.io/api/2/calls/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/calls/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/calls/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/calls/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/calls/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "next_cursor": "ClgKKQoEbmFtZRIhGh9UZXN0IDIwMTUtMDktMTQgMjA6MjE6MDcuNzk1ODAxEidqDGRldn52aWF0ZXN0c3IXCxIKVGVzdFNldHVwMhiAgICAoN25CwwYACAA", 
    "more": false
  }, 
  "results": [
    {
      "access": {
        "org": false, 
        "stats": false, 
        "results": false, 
        "settings": false
      }, 
      "meta": {
        "domain": "httpbin.org", 
        "description": null, 
        "created": "2015-09-17T02:24:14.864564Z", 
        "tags": [
          "test", 
          "foo", 
          "raspberries"
        ], 
        "accept": null, 
        "last_update": "2015-09-17T02:24:15.679353Z", 
        "content_type": null, 
        "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
        "name": "API test name"
      }, 
      "request": {
        "body": null, 
        "parameters": [
          {
            "value": "foo", 
            "key": "test"
          }, 
          {
            "value": "1", 
            "key": "raspberries"
          }
        ], 
        "url": "http://httpbin.org/get", 
        "auth_id": null, 
        "headers": [
          {
            "value": "bar", 
            "key": "X-Testing"
          }, 
          {
            "value": "2", 
            "key": "X-Raspberry"
          }
        ], 
        "token_id": null, 
        "method": "GET"
      }, 
      "id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDuwgM"
    }, 
		... list of API Calls ...
  ]
}
 

Use this API to list the API Calls your account.

import APImetrics

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
cursor = None
more = False
while more:
	resp = apimetrics.list_calls(cursor=cursor, limit=200)
	more = resp['meta']['more']
  cursor = resp['meta']['cursor']
  for result in resp['results']
  	print result['name']
Suggest Edits

List API Calls by Authentication

List all Calls that use a specific Authentication Setting.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/calls/auth/auth_id/
curl --request GET \
  --url https://client.apimetrics.io/api/2/calls/auth/auth_id/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/calls/auth/auth_id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/calls/auth/auth_id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/calls/auth/auth_id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/calls/auth/auth_id/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "next_cursor": "ClgKKQoEbmFtZRIhGh9UZXN0IDIwMTUtMDktMTQgMjA6MjE6MDcuNzk1ODAxEidqDGRldn52aWF0ZXN0c3IXCxIKVGVzdFNldHVwMhiAgICAoN25CwwYACAA", 
    "more": false
  }, 
  "results": [
    {
      "access": {
        "org": false, 
        "stats": false, 
        "results": false, 
        "settings": false
      }, 
      "meta": {
        "domain": "httpbin.org", 
        "description": null, 
        "created": "2015-09-17T02:24:14.864564Z", 
        "tags": [
          "test", 
          "foo", 
          "raspberries"
        ], 
        "accept": null, 
        "last_update": "2015-09-17T02:24:15.679353Z", 
        "content_type": null, 
        "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
        "name": "API test name"
      }, 
      "request": {
        "body": null, 
        "parameters": [
          {
            "value": "foo", 
            "key": "test"
          }, 
          {
            "value": "1", 
            "key": "raspberries"
          }
        ], 
        "url": "http://httpbin.org/get", 
        "auth_id": null, 
        "headers": [
          {
            "value": "bar", 
            "key": "X-Testing"
          }, 
          {
            "value": "2", 
            "key": "X-Raspberry"
          }
        ], 
        "token_id": null, 
        "method": "GET"
      }, 
      "id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDuwgM"
    }, 
		... list of API Calls ...
  ]
}

Path Params

auth_id
string
required

The ID of the authentication setting

 

Use this API to list the API Calls your account.

import APImetrics

obj_id = 'SOME_AUTH_ID'

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
cursor = None
more = False
while more:
	resp = apimetrics.list_calls_by_auth(obj_id, cursor=cursor, limit=200)
	more = resp['meta']['more']
  cursor = resp['meta']['cursor']
  for result in resp['results']
  	print result['name']
Suggest Edits

Create new API Call

Use this API to create a new API Call in your account.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://client.apimetrics.io/api/2/calls/
{
    "meta": {
        "name": "Minimal API test name"
    },
    "request": {
        "method": "get",
        "url": "http://httpbin.org/get"
    }
}
A binary file was returned

You couldn't be authenticated

{
  "access": {
    "org": false, 
    "stats": false, 
    "results": false, 
    "settings": false
  }, 
  "meta": {
    "domain": "httpbin.org", 
    "description": null, 
    "created": "2015-09-18T23:29:39.534120Z", 
    "tags": [], 
    "accept": null, 
    "last_update": "2015-09-18T23:29:39.534173Z", 
    "content_type": null, 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "name": "Minimal API test name"
  }, 
  "request": {
    "body": null, 
    "parameters": [], 
    "url": "http://httpbin.org/get", 
    "auth_id": null, 
    "headers": [], 
    "token_id": null, 
    "method": "GET"
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
}
 

Use this API to create a new API Call in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
with open('create.json') as handle:
  data = json.loads(handle.read())
  resp = apimetrics.create_call(data)
  print result['id']
Suggest Edits

Get an existing API Call

Use this API to get an existing API Call.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/calls/id/
curl --request GET \
  --url https://client.apimetrics.io/api/2/calls/id/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/calls/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/calls/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/calls/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/calls/id/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "access": {
    "org": false, 
    "stats": false, 
    "results": false, 
    "settings": false
  }, 
  "meta": {
    "domain": "httpbin.org", 
    "description": null, 
    "created": "2015-09-18T23:29:39.534120Z", 
    "tags": [
      "test", 
      "foo", 
      "raspberries"
    ], 
    "accept": null, 
    "last_update": "2015-09-18T23:29:39.948891Z", 
    "content_type": null, 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "name": "API test name"
  }, 
  "request": {
    "body": null, 
    "parameters": [], 
    "url": "http://httpbin.org/get", 
    "auth_id": null, 
    "headers": [
      {
        "value": "bar", 
        "key": "X-Testing"
      }, 
      {
        "value": "2", 
        "key": "X-Raspberry"
      }
    ], 
    "token_id": null, 
    "method": "GET"
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of API Call you're updating

 

The JSON schema for the output is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.get_call(obj_id)
print result['id']
Suggest Edits

Update an existing API Call

Use this API to update an Authentication Setting.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://client.apimetrics.io/api/2/calls/id/
{
    "request": {
        "parameters": [
            { "key": "testing", "value": "bar" },
            { "key": "raspberry", "value": "2" }
        ]
    }
}
A binary file was returned

You couldn't be authenticated

{
  "access": {
    "org": false, 
    "stats": false, 
    "results": false, 
    "settings": false
  }, 
  "meta": {
    "domain": "httpbin.org", 
    "description": null, 
    "created": "2015-09-18T23:29:39.534120Z", 
    "tags": [
      "test", 
      "foo", 
      "raspberries"
    ], 
    "accept": null, 
    "last_update": "2015-09-18T23:29:39.948891Z", 
    "content_type": null, 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "name": "API test name"
  }, 
  "request": {
    "body": null, 
    "parameters": [], 
    "url": "http://httpbin.org/get", 
    "auth_id": null, 
    "headers": [
      {
        "value": "bar", 
        "key": "X-Testing"
      }, 
      {
        "value": "2", 
        "key": "X-Raspberry"
      }
    ], 
    "token_id": null, 
    "method": "GET"
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of API Call you're updating

 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
with open('update.json') as handle:
  data = json.loads(handle.read())
  resp = apimetrics.update_call(obj_id, data)
  print result['id']
Suggest Edits

Delete an API Call

Use this API to get an existing API Call.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://client.apimetrics.io/api/2/calls/id/
curl --request DELETE \
  --url https://client.apimetrics.io/api/2/calls/id/
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://client.apimetrics.io/api/2/calls/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/calls/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://client.apimetrics.io/api/2/calls/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/calls/id/"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "status": "OK"
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of API Call you're updating

 

The JSON schema for the output is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.delete_call(obj_id)
print result['id']
Suggest Edits

Trigger an API Call to run

Use this API to run an API Call.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://client.apimetrics.io/api/2/calls/id/run
{
    "location_id": "",
    "context": {
        "foo": 1234,
        "bar": "%%RESULT_ID%%",
        "datum": "%%DATETIME%%"
    }
}
A binary file was returned

You couldn't be authenticated

{
    "call_id": "agxkZXZ-dmlhdGVzdHNyGgsSDVRlc3RSdW5SZXN1bHQYgICAgKCvlwoM",
    "result_id": "agxkZXZ-dmlhdGVzdHNyFAsSB1Rlc3RSdW4YgICAgKCPnwoM",
    "location_id": "",
    "context": {
        "FOO": 1234,
        "BAR": "%%RESULT_ID%%",
        "DATUM": "%%DATETIME%%"
    }
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of API Call you're updating

Body Params

location_id
string

Location ID of test agent that will make the request

context
mixed type

Dictionary of variable names and their values

 

The JSON schema for the output is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.run_call(obj_id, {})
print result['result_id']
Suggest Edits

Stat object

 

Statistics are generated each time an API Call is made. Statistics are generated per call per location. Aggregated statistics are also generated for the hour, day, week, month and year (all based upon UTC).
Example:

{
  "meta": {
    "kind": "MONTH", 
    "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDxwgM", 
    "type": "ALL", 
    "time": "2015-10-01T00:00:00Z", 
    "location_id": "", 
    "name": "API test name"
  }, 
  "stat": {
    "avg_latency": 383.5, 
    "max_latency": 749, 
    "time": "2015-10-01T00:00:00Z", 
    "count": 20
  }
}

Data available for all results:

Name
Type
Description

time

Datetime

Normalized time for the period you requested.

count

Integer

Number of API calls made in period.

max_latency

Integer

Slowest API Call made in period, in ms.

avg_latency

Float

Average latency for the API Calls for the period specified.

Extra data available for results that passed (i.e., when type is set to COMPLETE).

Name
Type
Description

time

Datetime

Normalized time for the period you requested.

count

Integer

Number of API calls made in period.

max_latency

Integer

Slowest API Call made in period, in ms.

min_latency

Integer

Fastest API Call made in period, in ms.

avg_latency

Float

Average latency for the API Calls for the period specified.

standard_deviation

Float

Standard deviation of API Call latencies for the period.

skewness

Float

Skewness of API Call latencies for the period.

Data available when requesting raw data, i.e. kind = RAW.

Name
Type
Description

time

Datetime

Time that the API Call was made.

latency

Integer

Length of time, in ms, that the API Call took to make.

http_code

Integer

HTTP response code returned.

content_length

Integer

Size, in bytes, of the response.

Suggest Edits

Get the Stats for an API Call for a specific time period

Use this API to get stats for an hour, day, week or month.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/calls/id/
curl --request GET \
  --url https://client.apimetrics.io/api/2/calls/id/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/calls/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/calls/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/calls/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/calls/id/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "kind": "MONTH", 
    "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDxwgM", 
    "type": "ALL", 
    "time": "2015-10-01T00:00:00Z", 
    "location_id": "", 
    "name": "API test name"
  }, 
  "stat": {
    "avg_latency": 383.5, 
    "max_latency": 749, 
    "time": "2015-10-01T00:00:00Z", 
    "count": 20
  }
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of API Call you're updating

Query Params

kind
string

Granularity of data required, one of DAY, WEEK, MONTH, YEAR.

time
date

ISO formatted date string for the period you wish to view.

type
string

Return stats for all calls in the time period specified which had this result.

location_id
string

Location where the API Call was made.

 

The JSON schema for the output is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.run_call(obj_id, {})
print result['result_id']
Suggest Edits

List Stats from before a date for an API Call

Use this API to extract the statistics for a period of time.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/calls/id/stats/before
curl --request GET \
  --url https://client.apimetrics.io/api/2/calls/id/stats/before
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/calls/id/stats/before' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/calls/id/stats/before")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/calls/id/stats/before");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/calls/id/stats/before"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "kind": "MONTH", 
    "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDxwgM", 
    "type": "ALL", 
    "max_time": "2015-10-01T00:00:00Z", 
    "next_cursor": null, 
    "location_id": "", 
    "name": "API test name", 
    "more": false, 
    "min_time": "2015-10-01T00:00:00Z"
  }, 
  "stats": [
    {
      "avg_latency": 383.5, 
      "max_latency": 749, 
      "time": "2015-10-01T00:00:00Z", 
      "count": 20
    },
    ...
  ]
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of API Call you're updating

Query Params

kind
string

Granularity of data required, one of DAY, WEEK, MONTH, YEAR.

time
date

ISO formatted date string for the end of the period you wish to view.

type
string

Return stats for all calls in the time period specified which had this result.

location_id
string

Location where the API Call was made.

limit
int32

Maximum number of results to return

 

The JSON schema for the output is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.run_call(obj_id, {})
print result['result_id']
Suggest Edits

List Stats since a date for an API Call

Use this API to extract the statistics for a period of time.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/calls/id/stats/since
curl --request GET \
  --url https://client.apimetrics.io/api/2/calls/id/stats/since
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/calls/id/stats/since' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/calls/id/stats/since")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/calls/id/stats/since");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/calls/id/stats/since"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "kind": "MONTH", 
    "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDxwgM", 
    "type": "ALL", 
    "max_time": "2015-10-01T00:00:00Z", 
    "next_cursor": null, 
    "location_id": "", 
    "name": "API test name", 
    "more": false, 
    "min_time": "2015-10-01T00:00:00Z"
  }, 
  "stats": [
    {
      "avg_latency": 383.5, 
      "max_latency": 749, 
      "time": "2015-10-01T00:00:00Z", 
      "count": 20
    },
    ...
  ]
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of API Call you're updating

Query Params

kind
string

Granularity of data required, one of DAY, WEEK, MONTH, YEAR.

time
date

ISO formatted date string for the start of the period you wish to view.

type
string

Return stats for all calls in the time period specified which had this result.

location_id
string

Location where the API Call was made.

limit
int32

Maximum number of results to return

 

The JSON schema for the output is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.run_call(obj_id, {})
print result['result_id']
Suggest Edits

Auth Object

This describes the format of the JSON object for the /auth calls

 

Authentication Settings define the, for example, OAuth settings required to successfully make an API Call.
Example:

    {
    	"access": {
        "keys": false, 
        "org_keys": false, 
        "org_settings": false, 
        "settings": false
      }, 
      "keys": {
        "client_secret": null, 
        "client_id": null
      }, 
      "meta": {
        "domain": "httpbin.org", 
        "description": null, 
        "created": "2015-09-14T23:19:52.888168Z", 
        "documentation": {
          "keys": null, 
          "docs": null, 
          "apps": null, 
          "provider": null
        }, 
        "last_update": "2015-09-14T23:19:52.888175Z", 
        "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
        "tags": [], 
        "name": "Minimal Auth Settings name"
      }, 
      "id": "agxkZXZ-dmlhdGVzdHNyGgsSDVNlcnZpY2VDb25maWcYgICAgKDdjQgM", 
      "settings": {
        "auth_type": "NONE", 
        "custom_variables": {}
      }
    }
Name
Description
required?

meta

See section below

Yes

access

See section below

No

settings

See section below

Yes

keys

See section below

No

meta

Name
Description
required?

name

Name for your reference

Yes

tags

List of tags for your reference

No

description

Description for your reference

No

owner

ID of owner

No - read only

domain

hostname for URLs that use this authentication

No

documentation

See below

No

meta.documentation

Name
Description
required?

keys

Link to developer keys page in site

No

docs

Link to developer docs for site

No

apps

Link to developer app creation page for site

No

provider

Link to homepage of site

No

access

Name
Description
Required?

settings

Are the settings shared with the APImetrics Community?

No

keys

Are the client id and secret shared with the APImetrics Community?

No

org_settings

Are the settings shared with your organization?

No

org_keys

Are the client id and secret shared with your organization?

No

settings

Name
Description
Required

auth_type

Kind of authentication, one of:
"MANUAL", "BASIC", "OAUTH1", "OAUTH2", "NONE", "OAUTH2_JWS", "OAUTH2_JWT", "AMAZON"

Yes

custom_variables

Dictionary of custom variables for use in API calls

No

...

Other keys may be added depending on the Authentication Type.

No

{
  "access": {
    "keys": false, 
    "org_keys": false, 
    "org_settings": false, 
    "settings": false
  }, 
  "keys": {
    "client_secret": null, 
    "client_id": null
  }, 
  "meta": {
    "domain": "httpbin.org", 
    "description": null, 
    "documentation": {
      "keys": null, 
      "docs": null, 
      "apps": null, 
      "provider": null
    }, 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "tags": [], 
    "name": "Auth Settings update"
  }, 
  "settings": {
    "auth_type": "OAUTH2_JWT", 
    "authorize_url": "http://httpbin.org/get", 
    "custom_variables": {}
  }
}
Suggest Edits

List Authentication Settings

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/auth/
curl --request GET \
  --url https://client.apimetrics.io/api/2/auth/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/auth/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/auth/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/auth/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/auth/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "next_cursor": "ClgKKQoEbmFtZRIhGh9UZXN0IDIwMTUtMDktMTQgMjA6MjE6MDcuNzk1ODAxEidqDGRldn52aWF0ZXN0c3IXCxIKVGVzdFNldHVwMhiAgICAoN25CwwYACAA", 
    "more": false
  }, 
  "results": [
    {
    	"access": {
        "keys": false, 
        "org_keys": false, 
        "org_settings": false, 
        "settings": false
      }, 
      "keys": {
        "client_secret": null, 
        "client_id": null
      }, 
      "meta": {
        "domain": "httpbin.org", 
        "description": null, 
        "created": "2015-09-14T23:19:52.888168Z", 
        "documentation": {
          "keys": null, 
          "docs": null, 
          "apps": null, 
          "provider": null
        }, 
        "last_update": "2015-09-14T23:19:52.888175Z", 
        "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
        "tags": [], 
        "name": "Minimal Auth Settings name"
      }, 
      "id": "agxkZXZ-dmlhdGVzdHNyGgsSDVNlcnZpY2VDb25maWcYgICAgKDdjQgM", 
      "settings": {
        "auth_type": "NONE", 
        "custom_variables": {}
      }
    },
		... list of authentication settings ..
  ]
}
 

Use this API to list the Authentication Settings in your account.

import APImetrics

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
cursor = None
more = False
while more:
	resp = apimetrics.list_auth(cursor=cursor, limit=200)
	more = resp['meta']['more']
  cursor = resp['meta']['cursor']
  for result in resp['results']
  	print result['name']
Suggest Edits

Create new Authentication Settings

Use this API to create a new Authentication Setting.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://client.apimetrics.io/api/2/workflows/
{
    "meta": {
        "name": "Minimal Auth Settings name",
        "domain": "httpbin.org"
    },
    "settings": {
        "auth_type": "NONE"
    }
}
A binary file was returned

You couldn't be authenticated

{
  "access": {
    "keys": false, 
    "org_keys": false, 
    "org_settings": false, 
    "settings": false
  }, 
  "keys": {
    "client_secret": null, 
    "client_id": null
  }, 
  "meta": {
    "domain": "httpbin.org", 
    "description": null, 
    "created": "2015-09-18T23:29:43.632611Z", 
    "documentation": {
      "keys": null, 
      "docs": null, 
      "apps": null, 
      "provider": null
    }, 
    "last_update": "2015-09-18T23:29:43.632626Z", 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "tags": [], 
    "name": "Minimal Auth Settings name"
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyGgsSDVNlcnZpY2VDb25maWcYgICAgKDLmgsM", 
  "settings": {
    "auth_type": "NONE", 
    "custom_variables": {}
  }
}
 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
with open('create.json') as handle:
  data = json.loads(handle.read())
  resp = apimetrics.create_workflow(data)
  print result['id']
Suggest Edits

Get an existing Authentication Setting

Use this API to get an existing Authentication Setting.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/auth/id/
curl --request GET \
  --url https://client.apimetrics.io/api/2/auth/id/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/auth/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/auth/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/auth/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/auth/id/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "access": {
    "keys": false, 
    "org_keys": false, 
    "org_settings": false, 
    "settings": false
  }, 
  "keys": {
    "client_secret": null, 
    "client_id": null
  }, 
  "meta": {
    "domain": "httpbin.org", 
    "description": null, 
    "created": "2015-09-18T23:29:43.632611Z", 
    "documentation": {
      "keys": null, 
      "docs": null, 
      "apps": null, 
      "provider": null
    }, 
    "last_update": "2015-09-18T23:29:43.632626Z", 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "tags": [], 
    "name": "Minimal Auth Settings name"
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyGgsSDVNlcnZpY2VDb25maWcYgICAgKDLmgsM", 
  "settings": {
    "auth_type": "NONE", 
    "custom_variables": {}
  }
}
{
  "error_msg": "meta: 'domain' is a required property", 
  "error": 400
}

Path Params

id
string
required

ID string of authentication string you're updating

 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.get_auth(obj_id)
print result['name']
Suggest Edits

Update an existing Authentication Setting

Use this API to update an Authentication Setting.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://client.apimetrics.io/api/2/auth/id/
{
    "meta": {
        "name": "Auth Settings update",
        "domain": "httpbin.org"
    },
    "settings": {
        "auth_type": "OAUTH2_JWT",
        "custom_variables": {
            "foo": "bar",
            "api": 1,
            "access_token": "asfasdfasdfasdfasdfa"
        },
        "authorize_url": "http://httpbin.org/get"
    }
}
A binary file was returned

You couldn't be authenticated

{
  "access": {
    "keys": false, 
    "org_keys": false, 
    "org_settings": false, 
    "settings": false
  }, 
  "keys": {
    "client_secret": null, 
    "client_id": null
  }, 
  "meta": {
    "domain": "httpbin.org", 
    "description": null, 
    "created": "2015-09-18T23:29:43.632611Z", 
    "documentation": {
      "keys": null, 
      "docs": null, 
      "apps": null, 
      "provider": null
    }, 
    "last_update": "2015-09-18T23:29:43.632626Z", 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "tags": [], 
    "name": "Minimal Auth Settings name"
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyGgsSDVNlcnZpY2VDb25maWcYgICAgKDLmgsM", 
  "settings": {
    "auth_type": "NONE", 
    "custom_variables": {}
  }
}
{
  "error_msg": "meta: 'domain' is a required property", 
  "error": 400
}

Path Params

id
string
required

ID string of authentication string you're updating

 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
with open('update.json') as handle:
  data = json.loads(handle.read())
  resp = apimetrics.update_auth(obj_id, data)
  print result['id']
Suggest Edits

Delete an Authentication Setting

Use this API to delete an existing Authentication Setting.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://client.apimetrics.io/api/2/auth/id/
curl --request DELETE \
  --url https://client.apimetrics.io/api/2/auth/id/
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://client.apimetrics.io/api/2/auth/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/auth/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://client.apimetrics.io/api/2/auth/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/auth/id/"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "status": "OK"
}
{
  "error_msg": "meta: 'domain' is a required property", 
  "error": 400
}

Path Params

id
string
required

ID string of authentication string you're updating

 
import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.delete_auth(obj_id)
print result['name']
Suggest Edits

Token Object

JSON object that describes an authentication Token

 

Some Authentication schemes generate a token. This object stores that information. An Authentication Setting can have many Tokens.

Name
Description
Required?

meta

See below

Y

token

See below

N

api_response

Object containing the response of the API call that created this token (for JSON APIs)

N

meta

Name
Description
Required?

name

Name of token, for your reference.

Y

owner

ID of the owner

N - read only

domain

Hostname of the site for the authentication (e.g. client.apimetrics.com)

N - read only

auth_id

ID for the authentication settings

Y

token

Name
Description
Required?

expire_time

Time the token expires

N

Suggest Edits

List Auth Tokens

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/tokens/
curl --request GET \
  --url https://client.apimetrics.io/api/2/tokens/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/tokens/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/tokens/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/tokens/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/tokens/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "next_cursor": "ClgKKQoEbmFtZRIhGh9UZXN0IDIwMTUtMDktMTQgMjA6MjE6MDcuNzk1ODAxEidqDGRldn52aWF0ZXN0c3IXCxIKVGVzdFNldHVwMhiAgICAoN25CwwYACAA", 
    "more": false
  }, 
  "results": [
    {
      "token": {
        "access_token": "CAACTZAarW6x0BAJFQZBZBAxdqowKveYoecDJsXCVNZCK7IAWYXj24BjwkiD4Fuc0LnKRgb2rqMVLotKP1MajEpFWTYH1guESOQZBxR1fZCk0lRbWytcZBOgwqZCWoGbtLu1sIfqjM04HJifNQpYV0KrIARdcY5ZCoXc7G5ZACqGEoaTsWYWNVJWgdoRUZBla6JJ2qb1oNpJjO82hSzapcYh0ItT", 
        "expire_time": "2015-04-26T00:11:23.792631Z", 
        "grant_type": "authorization_code", 
        "expires_in": 5182406
      }, 
      "meta": {
        "auth_type": "OAUTH2", 
        "domain": "graph.facebook.com", 
        "name": "Auth noscope test", 
        "created": "2015-02-25T00:38:07.792714Z", 
        "last_update": "2015-05-01T20:02:45.458279Z", 
        "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
        "auth_id": "agxkZXZ-dmlhdGVzdHNyGgsSDVNlcnZpY2VDb25maWcYgICAgIDQuwkM"
      }, 
      "id": "agxkZXZ-dmlhdGVzdHNyFgsSCUF1dGhUb2tlbhiAgICAgL7BCAw", 
      "api_response": {
        "access_token": "CAACTZAarW6x0BAJFQZBZBAxdqowKveYoecDJsXCVNZCK7IAWYXj24BjwkiD4Fuc0LnKRgb2rqMVLotKP1MajEpFWTYH1guESOQZBxR1fZCk0lRbWytcZBOgwqZCWoGbtLu1sIfqjM04HJifNQpYV0KrIARdcY5ZCoXc7G5ZACqGEoaTsWYWNVJWgdoRUZBla6JJ2qb1oNpJjO82hSzapcYh0ItT", 
        "expires": "5182406"
      }
    }, 
    ... list of Workflows ...
  ]
}
 

Use this API to list the Tokens in your account.

import APImetrics

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
cursor = None
more = False
while more:
	resp = apimetrics.list_tokens(cursor=cursor, limit=200)
	more = resp['meta']['more']
  cursor = resp['meta']['cursor']
  for result in resp['results']
  	print result['name']
Suggest Edits

Create a new Auth Token

Use this API to create a new Token for an Authentication Setting.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://client.apimetrics.io/api/2/tokens/
{
    "meta": {
        "auth_id": "agxkZXZ-dmlhdGVzdHNyGgsSDVNlcnZpY2VDb25maWcYgICAgKDLmgsM",
        "name": "Minimal token name"
    }
}
A binary file was returned

You couldn't be authenticated

{
  "token": {
    "expire_time": null
  }, 
  "meta": {
    "auth_type": "OAUTH2_JWT", 
    "domain": "httpbin.org", 
    "name": "Minimal token name", 
    "created": "2015-09-18T23:29:46.314197Z", 
    "last_update": "2015-09-18T23:29:46.314204Z", 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "auth_id": "agxkZXZ-dmlhdGVzdHNyGgsSDVNlcnZpY2VDb25maWcYgICAgKDLmgsM"
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFgsSCUF1dGhUb2tlbhiAgICAoMvaCAw"
}
 

Use this API to create a new Token in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
with open('create.json') as handle:
  data = json.loads(handle.read())
  resp = apimetrics.create_token(data)
  print result['id']
Suggest Edits

Get all Auth Tokens for an Authentication Setting

List tokens by Authentication ID.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/tokens/auth/auth_id/
curl --request GET \
  --url https://client.apimetrics.io/api/2/tokens/auth/auth_id/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/tokens/auth/auth_id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/tokens/auth/auth_id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/tokens/auth/auth_id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/tokens/auth/auth_id/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "next_cursor": "ClgKKQoEbmFtZRIhGh9UZXN0IDIwMTUtMDktMTQgMjA6MjE6MDcuNzk1ODAxEidqDGRldn52aWF0ZXN0c3IXCxIKVGVzdFNldHVwMhiAgICAoN25CwwYACAA", 
    "more": false
  }, 
  "results": [
    {
      "token": {
        "access_token": "CAACTZAarW6x0BAJFQZBZBAxdqowKveYoecDJsXCVNZCK7IAWYXj24BjwkiD4Fuc0LnKRgb2rqMVLotKP1MajEpFWTYH1guESOQZBxR1fZCk0lRbWytcZBOgwqZCWoGbtLu1sIfqjM04HJifNQpYV0KrIARdcY5ZCoXc7G5ZACqGEoaTsWYWNVJWgdoRUZBla6JJ2qb1oNpJjO82hSzapcYh0ItT", 
        "expire_time": "2015-04-26T00:11:23.792631Z", 
        "grant_type": "authorization_code", 
        "expires_in": 5182406
      }, 
      "meta": {
        "auth_type": "OAUTH2", 
        "domain": "graph.facebook.com", 
        "name": "Auth noscope test", 
        "created": "2015-02-25T00:38:07.792714Z", 
        "last_update": "2015-05-01T20:02:45.458279Z", 
        "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
        "auth_id": "agxkZXZ-dmlhdGVzdHNyGgsSDVNlcnZpY2VDb25maWcYgICAgIDQuwkM"
      }, 
      "id": "agxkZXZ-dmlhdGVzdHNyFgsSCUF1dGhUb2tlbhiAgICAgL7BCAw", 
      "api_response": {
        "access_token": "CAACTZAarW6x0BAJFQZBZBAxdqowKveYoecDJsXCVNZCK7IAWYXj24BjwkiD4Fuc0LnKRgb2rqMVLotKP1MajEpFWTYH1guESOQZBxR1fZCk0lRbWytcZBOgwqZCWoGbtLu1sIfqjM04HJifNQpYV0KrIARdcY5ZCoXc7G5ZACqGEoaTsWYWNVJWgdoRUZBla6JJ2qb1oNpJjO82hSzapcYh0ItT", 
        "expires": "5182406"
      }
    }, 
    ... list of Workflows ...
  ]
}

Path Params

auth_id
string
required

ID of the Authentication Settings

 

Use this API to list the Tokens in your account.

import APImetrics

obj_id = 'SOME_AUTH_ID'

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
cursor = None
more = False
while more:
	resp = apimetrics.list_tokens_by_auth(obj_id, cursor=cursor, limit=200)
	more = resp['meta']['more']
  cursor = resp['meta']['cursor']
  for result in resp['results']
  	print result['name']
Suggest Edits

Get an existing Auth Token

Use this API to get an exising authentication Token.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/tokens/id/
curl --request GET \
  --url https://client.apimetrics.io/api/2/tokens/id/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/tokens/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/tokens/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/tokens/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/tokens/id/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "token": {
    "access_token": "pb1tKMspuoCa5EuJ6AlkWT87wg2-FsXzcCy-YYtAp-vArkR7PmfBqB0Z1V6_uC2eMB1Y", 
    "expire_time": "2015-03-05T20:29:20.361820Z", 
    "grant_type": "client_credentials", 
    "expires_in": 1800
  }, 
  "meta": {
    "auth_type": "OAUTH2_JWT", 
    "domain": "httpbin.org", 
    "name": "Minimal token name", 
    "created": "2015-09-18T23:29:46.314197Z", 
    "last_update": "2015-09-18T23:29:46.486363Z", 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "auth_id": "agxkZXZ-dmlhdGVzdHNyGgsSDVNlcnZpY2VDb25maWcYgICAgKDLmgsM"
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFgsSCUF1dGhUb2tlbhiAgICAoMvaCAw", 
  "api_response": {
    "org": true, 
    "public": true
  }
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of Token you're updating

 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.get_token(obj_id)
print resp['id']
Suggest Edits

Update an Auth Token

Use this API to update an authentication Token.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://client.apimetrics.io/api/2/tokens/id/
{
    "meta": {
        "auth_id": "agxkZXZ-dmlhdGVzdHNyGgsSDVNlcnZpY2VDb25maWcYgICAgKDLmgsM",
        "name": "Minimal token name"
    }, 
    "token": {
        "expire_time": "2015-03-05T20:29:20.361820Z", 
        "grant_type": "client_credentials", 
        "expires_in": 1800, 
        "access_token": "pb1tKMspuoCa5EuJ6AlkWT87wg2-FsXzcCy-YYtAp-vArkR7PmfBqB0Z1V6_uC2eMB1Y"
    }
}
A binary file was returned

You couldn't be authenticated

{
  "token": {
    "access_token": "pb1tKMspuoCa5EuJ6AlkWT87wg2-FsXzcCy-YYtAp-vArkR7PmfBqB0Z1V6_uC2eMB1Y", 
    "expire_time": "2015-03-05T20:29:20.361820Z", 
    "grant_type": "client_credentials", 
    "expires_in": 1800
  }, 
  "meta": {
    "auth_type": "OAUTH2_JWT", 
    "domain": "httpbin.org", 
    "name": "Minimal token name", 
    "created": "2015-09-18T23:29:46.314197Z", 
    "last_update": "2015-09-18T23:29:46.486363Z", 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "auth_id": "agxkZXZ-dmlhdGVzdHNyGgsSDVNlcnZpY2VDb25maWcYgICAgKDLmgsM"
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFgsSCUF1dGhUb2tlbhiAgICAoMvaCAw", 
  "api_response": {
    "org": true, 
    "public": true
  }
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of Token you're updating

 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
with open('update.json') as handle:
  data = json.loads(handle.read())
  resp = apimetrics.update_token(obj_id, data)
  print result['id']
Suggest Edits

Delete an Auth Token

Use this API to get an exising authentication Token.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://client.apimetrics.io/api/2/tokens/id/
curl --request DELETE \
  --url https://client.apimetrics.io/api/2/tokens/id/
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://client.apimetrics.io/api/2/tokens/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/tokens/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://client.apimetrics.io/api/2/tokens/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/tokens/id/"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "status": "OK"
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of Token you're updating

 
import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.delete_token(obj_id)
print resp['status']
Suggest Edits

Deployment Object

Description of the JSON representing a Deployment

 

A Deployment defines a schedule for how often and from where an API Call (or Workflow) is made.

Name
Description
Required?

meta

See below

N

deployment

See below

Y

meta

Name
Description
Required?

owner

Owner of deployment

N - read only

deployment

Name
Description
Required?

target_id

ID of API Call or Workflow that is deployed?

Y

location_id

ID of Location to be deployed at.

Y

frequency

Frequency to make call in minutes.

Y

run_delay

How many seconds after trigger time to actually make call.

N

between_calls_delay

How many seconds to wait in-between calls for a Workflow.

N

Suggest Edits

List all Deployments

Show all your deployments

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/deployments/
curl --request GET \
  --url https://client.apimetrics.io/api/2/deployments/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/deployments/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/deployments/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/deployments/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/deployments/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "next_cursor": "ClgKKQoEbmFtZRIhGh9UZXN0IDIwMTUtMDktMTQgMjA6MjE6MDcuNzk1ODAxEidqDGRldn52aWF0ZXN0c3IXCxIKVGVzdFNldHVwMhiAgICAoN25CwwYACAA", 
    "more": false
  }, 
  "results": [
    {
      "meta": {
        "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
        "last_update": "2015-09-15T00:21:10.364834Z", 
        "created": "2015-09-15T00:21:10.364821Z"
      }, 
      "id": "agxkZXZ-dmlhdGVzdHNyFwsSCkRlcGxveW1lbnQYgICAgKDdgwgM", 
      "deployment": {
        "location_id": "", 
        "run_delay": 0, 
        "frequency": 12, 
        "target_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDd_QsM", 
        "between_calls_delay": 0
      }
    }, 
		... list of Deployments ...
  ]
}
 

Use this API to list the Deployments in your account.

import APImetrics

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
cursor = None
more = False
while more:
	resp = apimetrics.list_deployments(cursor=cursor, limit=200)
	more = resp['meta']['more']
  cursor = resp['meta']['cursor']
  for result in resp['results']
  	print result['name']
Suggest Edits

Create a new Deployment

Use this API to create a new Deployment for an API Call or Workflow.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://client.apimetrics.io/api/2/deployments/
{
    "deployment": {
        "target_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM", 
        "frequency": 12,
        "location_id": ""
    }
}
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "last_update": "2015-09-18T23:29:41.079995Z", 
    "created": "2015-09-18T23:29:41.079989Z"
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFwsSCkRlcGxveW1lbnQYgICAgKDLmggM", 
  "deployment": {
    "location_id": "", 
    "run_delay": 0, 
    "frequency": 12, 
    "target_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM", 
    "between_calls_delay": 0
  }
}
 

Use this API to create a new Deployment in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
with open('create.json') as handle:
  data = json.loads(handle.read())
  resp = apimetrics.create_deployment(data)
  print result['id']
Suggest Edits

Get all Deployments for an API Call

List Deployments for a specific API Call

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/deployments/call/call_id/
curl --request GET \
  --url https://client.apimetrics.io/api/2/deployments/call/call_id/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/deployments/call/call_id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/deployments/call/call_id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/deployments/call/call_id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/deployments/call/call_id/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "next_cursor": "ClgKKQoEbmFtZRIhGh9UZXN0IDIwMTUtMDktMTQgMjA6MjE6MDcuNzk1ODAxEidqDGRldn52aWF0ZXN0c3IXCxIKVGVzdFNldHVwMhiAgICAoN25CwwYACAA", 
    "more": false
  }, 
  "results": [
    {
      "meta": {
        "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
        "last_update": "2015-09-15T00:21:10.364834Z", 
        "created": "2015-09-15T00:21:10.364821Z"
      }, 
      "id": "agxkZXZ-dmlhdGVzdHNyFwsSCkRlcGxveW1lbnQYgICAgKDdgwgM", 
      "deployment": {
        "location_id": "", 
        "run_delay": 0, 
        "frequency": 12, 
        "target_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDd_QsM", 
        "between_calls_delay": 0
      }
    }, 
		... list of Deployments ...
  ]
}

Path Params

call_id
string
required

ID of the API Call

 

Use this API to list the Deployments in your account.

import APImetrics

obj_id = 'SOME_CALL_ID'

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
cursor = None
more = False
while more:
	resp = apimetrics.list_deployments_by_call(obj_id, cursor=cursor, limit=200)
	more = resp['meta']['more']
  cursor = resp['meta']['cursor']
  for result in resp['results']
  	print result['name']
Suggest Edits

Get all Deployments for a Workflow

List Deployments for a specific API Call

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/deployments/workflow/workflow_id/
curl --request GET \
  --url https://client.apimetrics.io/api/2/deployments/workflow/workflow_id/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/deployments/workflow/workflow_id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/deployments/workflow/workflow_id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/deployments/workflow/workflow_id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/deployments/workflow/workflow_id/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "next_cursor": "ClgKKQoEbmFtZRIhGh9UZXN0IDIwMTUtMDktMTQgMjA6MjE6MDcuNzk1ODAxEidqDGRldn52aWF0ZXN0c3IXCxIKVGVzdFNldHVwMhiAgICAoN25CwwYACAA", 
    "more": false
  }, 
  "results": [
    {
      "meta": {
        "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
        "last_update": "2015-09-15T00:21:10.364834Z", 
        "created": "2015-09-15T00:21:10.364821Z"
      }, 
      "id": "agxkZXZ-dmlhdGVzdHNyFwsSCkRlcGxveW1lbnQYgICAgKDdgwgM", 
      "deployment": {
        "location_id": "", 
        "run_delay": 0, 
        "frequency": 12, 
        "target_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDd_QsM", 
        "between_calls_delay": 0
      }
    }, 
		... list of Deployments ...
  ]
}

Path Params

workflow_id
string
required

ID of the Workflow

 

Use this API to list the Deployments in your account.

import APImetrics

obj_id = 'SOME_WORKFLOW_ID'

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
cursor = None
more = False
while more:
	resp = apimetrics.list_deployments_by_workflow(obj_id, cursor=cursor, limit=200)
	more = resp['meta']['more']
  cursor = resp['meta']['cursor']
  for result in resp['results']
  	print result['name']
Suggest Edits

Get an existing Deployment

Use this API to get an existing Deployment.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/deployments/id/
curl --request GET \
  --url https://client.apimetrics.io/api/2/deployments/id/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/deployments/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/deployments/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/deployments/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/deployments/id/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "last_update": "2015-09-18T23:29:41.079995Z", 
    "created": "2015-09-18T23:29:41.079989Z"
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFwsSCkRlcGxveW1lbnQYgICAgKDLmggM", 
  "deployment": {
    "location_id": "", 
    "run_delay": 0, 
    "frequency": 12, 
    "target_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM", 
    "between_calls_delay": 0
  }
}
{
  "error_msg": "deployment.frequency: 7 is not one of [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60, 120, 180, 240, 360, 480, 720, 1440]", 
  "error": 400
}

Path Params

id
string
required

ID string of Deployment you're updating

 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.get_deployment(obj_id)
print resp['id']
Suggest Edits

Update an existing Deployment

Use this API to update an Authentication Setting.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://client.apimetrics.io/api/2/deployments/id/
{
    "deployment": {
        "target_id": "__PARENT_ID__", 
        "frequency": 15,
        "location_id": ""
    }
}
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "last_update": "2015-09-18T23:29:41.079995Z", 
    "created": "2015-09-18T23:29:41.079989Z"
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFwsSCkRlcGxveW1lbnQYgICAgKDLmggM", 
  "deployment": {
    "location_id": "", 
    "run_delay": 0, 
    "frequency": 12, 
    "target_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM", 
    "between_calls_delay": 0
  }
}
{
  "error_msg": "deployment.frequency: 7 is not one of [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60, 120, 180, 240, 360, 480, 720, 1440]", 
  "error": 400
}

Path Params

id
string
required

ID string of Deployment you're updating

 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
with open('update.json') as handle:
  data = json.loads(handle.read())
  resp = apimetrics.update_deployment(obj_id, data)
  print result['id']
Suggest Edits

Delete a Deployment

Use this API to delete an existing Deployment.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://client.apimetrics.io/api/2/deployments/id/
curl --request DELETE \
  --url https://client.apimetrics.io/api/2/deployments/id/
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://client.apimetrics.io/api/2/deployments/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/deployments/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://client.apimetrics.io/api/2/deployments/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/deployments/id/"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "status": "OK"
}
{
  "error_msg": "deployment.frequency: 7 is not one of [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60, 120, 180, 240, 360, 480, 720, 1440]", 
  "error": 400
}

Path Params

id
string
required

ID string of Deployment you're updating

 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.delete_deployment(obj_id)
print resp['id']
Suggest Edits

Report Object

JSON object that describes a Report

 

Reports are groups of API Calls and Locations. We use them to show statistics on the specific time. This object defines how they are configured.

Name
Description
Required?

meta

See below

Y

access

See below

N

report

See below

Y

meta

Name
Description
Required?

name

Name of call for your reference

Yes

description

Description of call for your reference

No

tags

List of tags for the call for your reference

No

owner

ID of owner of Report

No - readonly

access

Name
Description
Required?

public

Is the report with the APImetrics community?

N

org

Is the report shared with the your Organization?

N

groups

The section "groups" is a list of the following objects:

Name
Description
Required?

name

Group Name

Y

rows

See below

N

rows

The section "rows" is a list of the following objects:

Name
Description
Required?

call_id

ID of the API Call you want to see the stats for.

Y

location_id

ID of the deployed Location you want to see the stats for.

Y

Suggest Edits

List all Reports

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/reports/
curl --request GET \
  --url https://client.apimetrics.io/api/2/reports/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/reports/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/reports/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/reports/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/reports/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "next_cursor": "ClgKKQoEbmFtZRIhGh9UZXN0IDIwMTUtMDktMTQgMjA6MjE6MDcuNzk1ODAxEidqDGRldn52aWF0ZXN0c3IXCxIKVGVzdFNldHVwMhiAgICAoN25CwwYACAA", 
    "more": false
  }, 
  "results": [
    {
      "access": {
        "org": false, 
        "public": false
      }, 
      "meta": {
        "name": "Minimal Report name", 
        "created": "2015-09-17T00:27:52.565683Z", 
        "tags": [], 
        "last_update": "2015-09-17T00:27:52.853092Z", 
        "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
        "description": null
      }, 
      "id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RSZXBvcnQYgICAgKDDjQoM", 
      "groups": [
        {
          "rows": [
            {
              "location_id": "", 
              "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDjQgM"
            }, 
            {
              "location_id": "", 
              "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDjQgM"
            }
          ], 
          "name": "Group Name"
        }, 
        {
          "rows": [
            {
              "location_id": "", 
              "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDjQgM"
            }, 
            {
              "location_id": "", 
              "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDjQgM"
            }, 
            {
              "location_id": "", 
              "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDjQgM"
            }
          ], 
          "name": "Group Name 2"
        }
      ]
    }, 
		... list of Reports ...
  ]
}
 

Use this API to list the Reports in your account.

import APImetrics

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
cursor = None
more = False
while more:
	resp = apimetrics.list_reports(cursor=cursor, limit=200)
	more = resp['meta']['more']
  cursor = resp['meta']['cursor']
  for result in resp['results']
  	print result['name']
Suggest Edits

Create a new Report

Use this API to create a new Report.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://client.apimetrics.io/api/2/reports/
{
    "meta": {
        "name": "Minimal Report name"
    }
}
A binary file was returned

You couldn't be authenticated

{
  "access": {
    "org": false, 
    "public": false
  }, 
  "meta": {
    "name": "Minimal Report name", 
    "created": "2015-09-18T23:29:41.915605Z", 
    "tags": [], 
    "last_update": "2015-09-18T23:29:41.915617Z", 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "description": null
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RSZXBvcnQYgICAgKDLmgoM", 
  "groups": []
}
 

Use this API to create a new Deployment in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
with open('create.json') as handle:
  data = json.loads(handle.read())
  resp = apimetrics.create_report(data)
  print result['id']
Suggest Edits

Get an existing Report

Use this API to get an existing Report.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/reports/id/
curl --request GET \
  --url https://client.apimetrics.io/api/2/reports/id/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/reports/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/reports/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/reports/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/reports/id/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "access": {
    "org": false, 
    "public": false
  }, 
  "meta": {
    "name": "Minimal Report name bad create", 
    "created": "2015-09-18T23:29:41.915605Z", 
    "tags": [], 
    "last_update": "2015-09-18T23:29:42.091896Z", 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "description": null
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RSZXBvcnQYgICAgKDLmgoM", 
  "groups": [
    {
      "rows": [
        {
          "location_id": "", 
          "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
        }, 
        {
          "location_id": "", 
          "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
        }
      ], 
      "name": "Group Name"
    }, 
    {
      "rows": [
        {
          "location_id": "", 
          "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
        }, 
        {
          "location_id": "", 
          "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
        }, 
        {
          "location_id": "", 
          "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
        }
      ], 
      "name": "Group Name 2"
    }
  ]
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of Report you're updating

 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.get_report(obj_id, data)
print resp['id']
Suggest Edits

Update an existing Report

Use this API to get an existing Report.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://client.apimetrics.io/api/2/reports/id/
{
    "meta": {
        "name": "Minimal Report name bad create"
    },
    "groups": [
        {
            "name": "Group Name",
            "rows": [
                {
                    "call_id": "__PARENT_ID__",
                    "location_id": ""
                },
                {
                    "call_id": "__PARENT_ID__",
                    "location_id": ""
                }
            ]
        },
        {
            "name": "Group Name 2",
            "rows": [
                {
                    "call_id": "__PARENT_ID__",
                    "location_id": ""
                },
                {
                    "call_id": "__PARENT_ID__",
                    "location_id": ""
                },
                {
                    "call_id": "__PARENT_ID__",
                    "location_id": ""
                }
            ]
        }
    ]
}
A binary file was returned

You couldn't be authenticated

{
  "access": {
    "org": false, 
    "public": false
  }, 
  "meta": {
    "name": "Minimal Report name bad create", 
    "created": "2015-09-18T23:29:41.915605Z", 
    "tags": [], 
    "last_update": "2015-09-18T23:29:42.091896Z", 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "description": null
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RSZXBvcnQYgICAgKDLmgoM", 
  "groups": [
    {
      "rows": [
        {
          "location_id": "", 
          "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
        }, 
        {
          "location_id": "", 
          "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
        }
      ], 
      "name": "Group Name"
    }, 
    {
      "rows": [
        {
          "location_id": "", 
          "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
        }, 
        {
          "location_id": "", 
          "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
        }, 
        {
          "location_id": "", 
          "call_id": "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
        }
      ], 
      "name": "Group Name 2"
    }
  ]
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of Report you're updating

 
import APImetrics
import json

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
with open('update.json') as handle:
  data = json.loads(handle.read())
  resp = apimetrics.update_report(obj_id, data)
  print resp['id']
Suggest Edits

Delete a Report

Use this API to delete an existing Report.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://client.apimetrics.io/api/2/reports/id/
curl --request DELETE \
  --url https://client.apimetrics.io/api/2/reports/id/
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://client.apimetrics.io/api/2/reports/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/reports/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://client.apimetrics.io/api/2/reports/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/reports/id/"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "status": "OK"
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of Report you're updating

 
import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.delete_report(obj_id, data)
print resp['id']
Suggest Edits

Workflow Object

JSON object that describes a Workflow

 

Workflows are a list of API Calls that are called one after each other.

Name
Description
Required?

meta

See below

Y

access

See below

N

workflow

See below

Y

meta

Name
Description
Required?

name

Name of call for your reference

Yes

description

Description of call for your reference

No

tags

List of tags for the call for your reference

No

owner

ID of owner of Call

No - readonly

access

Name
Description
Required?

public

Is the workflow shared with the APImetrics community?

N

org

Is the workflow shared with your organization?

N

workflow

Name
Description
Required?

call_ids

List of API Call IDs, in order you want them called?

N

stop_on_failure

Should the workflow stop if we get an error response from one of the APIs?

N

handle_cookies

Should cookies be handled and passed between API calls?

N

Suggest Edits

List all Workflows

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/workflows/
curl --request GET \
  --url https://client.apimetrics.io/api/2/workflows/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/workflows/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/workflows/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/workflows/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/workflows/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "meta": {
    "next_cursor": "ClgKKQoEbmFtZRIhGh9UZXN0IDIwMTUtMDktMTQgMjA6MjE6MDcuNzk1ODAxEidqDGRldn52aWF0ZXN0c3IXCxIKVGVzdFNldHVwMhiAgICAoN25CwwYACAA", 
    "more": false
  }, 
  "results": [
    {
      "access": {
        "org": false, 
        "public": false
      }, 
      "meta": {
        "name": "Minimal Workflow name change", 
        "created": "2015-09-16T23:29:26.146584Z", 
        "tags": [], 
        "last_update": "2015-09-16T23:29:26.605248Z", 
        "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
        "description": null
      }, 
      "id": "agxkZXZ-dmlhdGVzdHNyFAsSB1Rlc3RSdW4YgICAgKDD-QsM", 
      "workflow": {
        "handle_cookies": true, 
        "call_ids": [
          "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDD-QkM", 
          "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDD-QkM"
        ], 
        "stop_on_failure": true
      }
    }
		... list of Workflows ...
  ]
}
 

Use this API to list the Workflows in your account.

import APImetrics

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
cursor = None
more = False
while more:
	resp = apimetrics.list_workflows(cursor=cursor, limit=200)
	more = resp['meta']['more']
  cursor = resp['meta']['cursor']
  for result in resp['results']
  	print result['name']
Suggest Edits

Create a new Workflow

Use this API to create a new Workflow

 

Header Auth

 Authentication is required for this endpoint.
posthttps://client.apimetrics.io/api/2/workflows/
{
    "meta": {
        "name": "Minimal Workflow name"
    }
}
A binary file was returned

You couldn't be authenticated

{
  "access": {
    "org": false, 
    "public": false
  }, 
  "meta": {
    "name": "Minimal Workflow name", 
    "created": "2015-09-18T23:29:42.648485Z", 
    "tags": [], 
    "last_update": "2015-09-18T23:29:42.648492Z", 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "description": null
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFAsSB1Rlc3RSdW4YgICAgKDLmgkM", 
  "workflow": {
    "handle_cookies": false, 
    "call_ids": [], 
    "stop_on_failure": true
  }
}
 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
with open('create.json') as handle:
  data = json.loads(handle.read())
  resp = apimetrics.create_workflow(data)
  print result['id']
Suggest Edits

Get an existing Workflow

Use this API to get an existing Workflow.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://client.apimetrics.io/api/2/workflows/id/
curl --request GET \
  --url https://client.apimetrics.io/api/2/workflows/id/
var request = require("request");

var options = { method: 'GET',
  url: 'https://client.apimetrics.io/api/2/workflows/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/workflows/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://client.apimetrics.io/api/2/workflows/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/workflows/id/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "access": {
    "org": false, 
    "public": false
  }, 
  "meta": {
    "name": "Minimal Workflow name change", 
    "created": "2015-09-18T23:29:42.648485Z", 
    "tags": [], 
    "last_update": "2015-09-18T23:29:42.887049Z", 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "description": null
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFAsSB1Rlc3RSdW4YgICAgKDLmgkM", 
  "workflow": {
    "handle_cookies": true, 
    "call_ids": [
      "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM", 
      "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
    ], 
    "stop_on_failure": true
  }
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of Workflow you're updating

 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.get_workflow(obj_id)
print resp['id']
Suggest Edits

Create a new Workflow

Use this API to update an authentication Token.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://client.apimetrics.io/api/2/workflows/id/
{
    "workflow": {
        "call_ids": [
            "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM",
            "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
        ],
        "handle_cookies": true
    }
}
A binary file was returned

You couldn't be authenticated

{
  "access": {
    "org": false, 
    "public": false
  }, 
  "meta": {
    "name": "Minimal Workflow name change", 
    "created": "2015-09-18T23:29:42.648485Z", 
    "tags": [], 
    "last_update": "2015-09-18T23:29:42.887049Z", 
    "owner": "agxkZXZ-dmlhdGVzdHNyEQsSBFVzZXIYgICAgICAgAoM", 
    "description": null
  }, 
  "id": "agxkZXZ-dmlhdGVzdHNyFAsSB1Rlc3RSdW4YgICAgKDLmgkM", 
  "workflow": {
    "handle_cookies": true, 
    "call_ids": [
      "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM", 
      "agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDL6gsM"
    ], 
    "stop_on_failure": true
  }
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of Workflow you're updating

 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
with open('update.json') as handle:
  data = json.loads(handle.read())
  resp = apimetrics.update_workflow(obj_id, data)
  print result['id']
Suggest Edits

Delete a Workflow

Use this API to delete an existing Workflow.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://client.apimetrics.io/api/2/workflows/id/
curl --request DELETE \
  --url https://client.apimetrics.io/api/2/workflows/id/
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://client.apimetrics.io/api/2/workflows/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://client.apimetrics.io/api/2/workflows/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://client.apimetrics.io/api/2/workflows/id/");

xhr.send(data);
import requests

url = "https://client.apimetrics.io/api/2/workflows/id/"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "status": "OK"
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of Workflow you're updating

 

Use this API to create a new Workflow in your account. The JSON schema for the input is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.delete_workflow(obj_id)
print resp['status']
Suggest Edits

Trigger a Workflow to run now

Use this API to run a Workflow.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://client.apimetrics.io/api/2/workflows/id/
{
    "location_id": "",
    "context": {
        "foo": 1234,
        "bar": "%%RESULT_ID%%",
        "datum": "%%DATETIME%%"
    }
}
A binary file was returned

You couldn't be authenticated

{
    "workflow_id": "agxkZXZ-dmlhdGVzdHNyGgsSDVRlc3RSdW5SZXN1bHQYgICAgKCvlwoM",
    "workflow_result_id": "agxkZXZ-dmlhdGVzdHNyFAsSB1Rlc3RSdW4YgICAgKCPnwoM",
    "location_id": "",
    "context": {
        "FOO": 1234,
        "BAR": "%%RESULT_ID%%",
        "DATUM": "%%DATETIME%%"
    }
}
{
  "error_msg": "Additional properties are not allowed (u'id' was unexpected)", 
  "error": 400
}

Path Params

id
string
required

ID string of API Call you're updating

Body Params

location_id
string

Location ID of test agent that will make the request

context
mixed type

Dictionary of variable names and their values

 

The JSON schema for the output is available at ./schema.json

import APImetrics

obj_id = "ID_OF_OBJECT"

apimetrics = APImetrics.APImetricsAPI(apimetrics_key="your_api_key")
resp = apimetrics.run_workflow(obj_id, {})
print result['result_id']