[GET] - API Usage

  • Updated

Use the API Usage endpoint to retrieve usage data associated with your API key.  

Endpoint

GET https://api.insideview.com/api/v1/admin/usage

Request

HTTP Headers

Header Name Type Required Description
accessToken String Yes Valid access token.
See Authentication and Authorization Overview for more details.
Accept String No Selects the response's content type.  
Valid values are application/json and application/xml (default).

Query Parameters

Parameter Name Type Required Description
period String Yes Period type
Possible values: day, month or year
start String Yes Period start date. The expected format depends on the period parameter value:
  • day: YYYY-MM-DD
  • Month: YYYY-MM
  • Year: YYYY
Ex: 20014-09-01, 2014-09, 2014
end String Yes Period end date. The expected format depends on the period parameter value:
  • day: YYYY-MM-DD
  • Month: YYYY-MM
  • Year: YYYY
Ex: 20014-09-30, 2014-10, 2015 

 

Responses

HTTP 200

Returns either a JSON or XML data structure depending on the request Accept header. 

Name type Description
accountId String Your client ID
period String Chosen period for the call
start String Period start date
end String Period end date
usageForAccount Array Array of usage data
usageForAccount  api String API unique name (see below)
usageForAccount  transactions Integer Number of transactions for the API
usageForAccount  date String period
creditsForAccount Array Array credit allocation and usage
Note: contains only one element for the current allocation period.  This will be enhanced in a future version to contain the period type and period for past and current periods.
creditsForAccount  allocatedCredits Integer Number of API credits allocated for the current allocation period
creditsForAccount  consumedCredits Integer Number of API credits consumed in the current allocation period.
Note: this is informational only and may not account for API calls made in a 5 minutes period window prior to this response generation.
bulkJobReferenceUrl String "https://api.insideview.com/api/v1/admin/jobs"

List of API unique names

API unique name
DATA_COMPANY_SEARCH
DATA_COMPANY_FETCH
DATA_CONTACT_SEARCH 
DATA_CONTCT_FETCH
ENRICH_ENRICH 
TARGET_CONTACT_LOOKUP 
TARGET_NEW_CONTACT_GET

 

Type: application/json

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "/",
  "type": "object",
  "properties": {
    "accountName": {
      "id": "accountName",
      "type": "string"
    },
    "accountId": {
      "id": "accountId",
      "type": "string"
    },
    "period": {
      "id": "period",
      "type": "string"
    },
    "start": {
      "id": "start",
      "type": "string"
    },
    "end": {
      "id": "end",
      "type": "string"
    },
    "usageForAccount": {
      "id": "usageForAccount",
      "type": "array",
      "items": {
        "id": "0",
        "type": "object",
        "properties": {
          "api": {
            "id": "api",
            "type": "string"
          },
          "transactions": {
            "id": "transactions",
            "type": "integer"
          },
          "date": {
            "id": "date",
            "type": "string"
          }
        }
      }
    },
    "creditsForAccount": {
      "id": "creditsForAccount",
      "type": "array",
      "items": {
        "id": "0",
        "type": "object",
        "properties": {
          "allocatedCredits": {
            "id": "allocatedCredits",
            "type": "integer"
          },
          "consumedCredits": {
            "id": "consumedCredits",
            "type": "integer"
          }
        }
      }
    },
    "bulkJobReferenceUrl": {
      "id": "bulkJobReferenceUrl",
      "type": "string"
    }
  }
}

Example

{
  "accountName": "INTERNAL-Automation",
  "accountId": "o8o7ajl7htaqk8fah7bc",
  "period": "month",
  "start": "2015-02",
  "end": "2015-05",
  "usageForAccount": [
    {
      "api": "DATA_COMPANY_GET",
      "transactions": 215,
      "date": "2015-03"
    },
    {
      "api": "TARGET_CONTACT_LOOKUP",
      "transactions": 21,
      "date": "2015-03"
    },
    {
      "api": "NEWS_COUNT",
      "transactions": 3,
      "date": "2015-03"
    },
    {
      "api": "TARGET_NEW_CONTACT_GET",
      "transactions": 34,
      "date": "2015-03"
    },
    {
      "api": "TARGET_COMPANY_SEARCH_FETCH",
      "transactions": 18,
      "date": "2015-03"
    },
    {
      "api": "ENRICH_ENRICH",
      "transactions": 187,
      "date": "2015-03"
    },
    {
      "api": "TARGET_COMPANY_SEARCH",
      "transactions": 101,
      "date": "2015-03"
    },
    {
      "api": "NEWS_FETCH",
      "transactions": 3,
      "date": "2015-03"
    },
    {
      "api": "DATA_CONTACT_SEARCH",
      "transactions": 15,
      "date": "2015-03"
    },
    {
      "api": "TARGET_COMPANY_SEARCH_COUNT",
      "transactions": 5,
      "date": "2015-03"
    },
    {
      "api": "DATA_CONTACT_GET",
      "transactions": 57,
      "date": "2015-03"
    },
    {
      "api": "TARGET_CONTACT_SEARCH_LIST_BUILD",
      "transactions": 19,
      "date": "2015-03"
    },
    {
      "api": "DATA_COMPANY_SEARCH",
      "transactions": 35,
      "date": "2015-03"
    },
    {
      "api": "TARGET_CONTACT_SEARCH_COUNT_LIST_BUILD",
      "transactions": 69,
      "date": "2015-04"
    },
    {
      "api": "NEWS_FETCH",
      "transactions": 28,
      "date": "2015-04"
    },
    {
      "api": "TARGET_CONTACT_SEARCH_LIST_BUILD",
      "transactions": 330,
      "date": "2015-04"
    },
    {
      "api": "DATA_CONTACT_SEARCH",
      "transactions": 30,
      "date": "2015-04"
    },
    {
      "api": "TARGET_COMPANY_SEARCH_FETCH",
      "transactions": 27,
      "date": "2015-04"
    },
    {
      "api": "TARGET_COMPANY_SEARCH_COUNT",
      "transactions": 25,
      "date": "2015-04"
    },
    {
      "api": "TARGET_COMPANY_SEARCH",
      "transactions": 461,
      "date": "2015-04"
    },
    {
      "api": "NEWS_COUNT",
      "transactions": 2,
      "date": "2015-04"
    },
    {
      "api": "TARGET_CONTACT_LOOKUP",
      "transactions": 88,
      "date": "2015-04"
    },
    {
      "api": "DATA_COMPANY_GET",
      "transactions": 149,
      "date": "2015-04"
    },
    {
      "api": "TARGET_NEW_CONTACT_GET",
      "transactions": 23,
      "date": "2015-04"
    },
    {
      "api": "DATA_CONTACT_GET",
      "transactions": 3247,
      "date": "2015-04"
    },
    {
      "api": "ENRICH_ENRICH",
      "transactions": 98,
      "date": "2015-04"
    },
    {
      "api": "DATA_COMPANY_SEARCH",
      "transactions": 36,
      "date": "2015-04"
    },
    {
      "api": "DATA_CONTACT_GET",
      "transactions": 16,
      "date": "2015-05"
    },
    {
      "api": "DATA_COMPANY_GET",
      "transactions": 174,
      "date": "2015-05"
    },
    {
      "api": "TARGET_CONTACT_SEARCH_LIST_BUILD",
      "transactions": 3,
      "date": "2015-05"
    },
    {
      "api": "DATA_PERSON_SEARCH",
      "transactions": 3,
      "date": "2015-05"
    },
    {
      "api": "TARGET_COMPANY_SEARCH",
      "transactions": 23,
      "date": "2015-05"
    },
    {
      "api": "DATA_COMPANY_SEARCH",
      "transactions": 16,
      "date": "2015-05"
    },
    {
      "api": "DATA_CONTACT_SEARCH",
      "transactions": 20,
      "date": "2015-05"
    },
    {
      "api": "TARGET_COMPANY_SEARCH_FETCH",
      "transactions": 1,
      "date": "2015-05"
    },
    {
      "api": "ENRICH_ENRICH",
      "transactions": 1557,
      "date": "2015-05",
      "details": [
        {
          "type": "matchRate",
          "value": "74.0"
        }
      ]
    },
    {
      "api": "NEWS_COUNT",
      "transactions": 5,
      "date": "2015-05"
    },
    {
      "api": "TARGET_CONTACT_LOOKUP",
      "transactions": 1,
      "date": "2015-05"
    },
    {
      "api": "NEWS_FETCH",
      "transactions": 10,
      "date": "2015-05"
    },
    {
      "api": "TARGET_NEW_CONTACT_GET",
      "transactions": 1,
      "date": "2015-05"
    },
    {
      "api": "DATA_PERSON_GET",
      "transactions": 9,
      "date": "2015-05"
    }
  ],
  "creditsForAccount": [
    {
      "allocatedCredits": 99999,
      "consumedCredits": 13987
    }
  ],
  "bulkJobReferenceUrl": "https://api.dev.insideview.com/api/v1/admin/jobs"
}

Type: application/xml

Schema

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">

	<xs:element name="accountUsage" type="AccountUsageDTO" />

	<xs:complexType name="AccountUsageDTO">
		<xs:sequence>
			<xs:element name="accountId" type="xs:string" />
			<xs:element name="accountName" type="xs:string" />
			<xs:element name="bulkJobReferenceUrl" type="xs:string" />
			<xs:element name="creditsForAccount" maxOccurs="1">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="allocatedCredits" type="xs:int"
							maxOccurs="1" />
						<xs:element name="consumedCredits" type="xs:int"
							maxOccurs="1" />
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="end" type="xs:string" />
			<xs:element name="period" type="xs:string" />
			<xs:element name="start" type="xs:string" />
			<xs:element name="subscriptionJobsReferenceUrl" type="xs:string" />
			<xs:element name="usage" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="api" type="xs:string" maxOccurs="1" />
						<xs:element name="date" type="xs:string" maxOccurs="1" />
						<xs:element name="transactions" type="xs:int"
							maxOccurs="1" />
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<accountUsage>
    <accountId>o8o7ajl7htaqk8fah7bc</accountId>
    <accountName>INTERNAL-Automation1</accountName>
    <bulkJobReferenceUrl>https://api.dev.insideview.com/api/v1/admin/jobs</bulkJobReferenceUrl>
    <creditsForAccount>
        <allocatedCredits>99999</allocatedCredits>
        <consumedCredits>2815</consumedCredits>
    </creditsForAccount>
    <end>2017</end>
    <period>year</period>
    <start>2016</start>
    <subscriptionJobsReferenceUrl>https://api.dev.insideview.com/api/v1/subscription/jobs</subscriptionJobsReferenceUrl>
    <usage>
        <api>DATA_COMPANY_GET</api>
        <date>2016</date>
        <transactions>73</transactions>
    </usage>
    <usage>
        <api>TARGET_CONTACT_SEARCH_COUNT_LIST_BUILD</api>
        <date>2016</date>
        <transactions>1</transactions>
    </usage>
    <usage>
        <api>DATA_PERSON_SEARCH</api>
        <date>2016</date>
        <transactions>4</transactions>
    </usage>
    <usage>
        <api>DATA_PERSON_GET</api>
        <date>2016</date>
        <transactions>1</transactions>
    </usage>
    <usage>
        <api>FAMILY_TREE</api>
        <date>2016</date>
        <transactions>8</transactions>
    </usage>
    <usage>
        <api>DATA_COMPANY_NEWS_GET</api>
        <date>2016</date>
        <transactions>8</transactions>
    </usage>
    <usage>
        <api>DATA_CONTACT_NEWS_GET</api>
        <date>2016</date>
        <transactions>10</transactions>
    </usage>
    <usage>
        <api>COMPANY_LOGOS</api>
        <date>2016</date>
        <transactions>60</transactions>
    </usage>
    <usage>
        <api>INSIGHTS_NEWS_SEARCH</api>
        <date>2016</date>
        <transactions>540</transactions>
    </usage>
    <usage>
        <api>INSIGHTS_NEWS_FETCH</api>
        <date>2016</date>
        <transactions>15</transactions>
    </usage>
    <usage>
        <api>TARGET_CONTACT_SEARCH_LIST_BUILD</api>
        <date>2016</date>
        <transactions>3</transactions>
    </usage>
    <usage>
        <api>TARGET_COMPANY_SEARCH_COUNT</api>
        <date>2016</date>
        <transactions>1</transactions>
    </usage>
    <usage>
        <api>DATA_COMPANY_SEARCH</api>
        <date>2016</date>
        <transactions>29</transactions>
    </usage>
    <usage>
        <api>DATA_CONTACT_GET</api>
        <date>2016</date>
        <transactions>12</transactions>
    </usage>
    <usage>
        <api>DATA_CONTACT_SEARCH</api>
        <date>2016</date>
        <transactions>4</transactions>
    </usage>
    <usage>
        <api>ENRICH_ENRICH</api>
        <date>2016</date>
        <details>
            <usageDetail>
                <type>matchRate</type>
                <value>87.0</value>
            </usageDetail>
        </details>
        <transactions>9023</transactions>
    </usage>
    <usage>
        <api>TARGET_NEW_CONTACT_GET</api>
        <date>2016</date>
        <transactions>3</transactions>
    </usage>
    <usage>
        <api>TARGET_CONTACT_LOOKUP</api>
        <date>2016</date>
        <transactions>4</transactions>
    </usage>
    <usage>
        <api>NEWS_FETCH</api>
        <date>2016</date>
        <transactions>420</transactions>
    </usage>
    <usage>
        <api>TARGET_COMPANY_SEARCH_FETCH</api>
        <date>2016</date>
        <transactions>2</transactions>
    </usage>
    <usage>
        <api>TARGET_COMPANY_SEARCH</api>
        <date>2016</date>
        <transactions>3</transactions>
    </usage>
    <usage>
        <api>TECH_PROFILE_FETCH</api>
        <date>2016</date>
        <transactions>20</transactions>
    </usage>
</accountUsage>

HTTP 400

An HTTP 400 error code is caused by one or several not being validated.

The possible error codes are 400-701, 400-702, 400-705, 400-706.

For details on the errors, see API Error Codes.

HTTP 401

Unauthorized Error - Cannot use API's without setting a valid accessToken in header.

For details on the errors, see API Error Codes.

HTTP 429

Request is throttled.

For details on the errors, see API Error Codes.