[GET] - API Usage

Follow

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

The parameters should be sent as x-www-form-urlencoded 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

application/json Example

{
"accountId":"vi8rl491h7ouu0v6io",
"period":"day",
"start":"2014-09-01",
"end":"2014-09-30",
"usageForAccount":[
{
"api":"DATA_COMPANY_SEARCH",
"transactions":2,
"date":"2014-09-24"
},
{
"api":"DATA_CONTACT_SEARCH",
"transactions":1,
"date":"2014-09-24"
},
{
"api":"ENRICH_ENRICH",
"transactions":1,
"date":"2014-09-24"
},
{
"api":"DATA_COMPANY_SEARCH",
"transactions":9,
"date":"2014-09-25"
},
{
"api":"ENRICH_ENRICH",
"transactions":13,
"date":"2014-09-29"
}
],
"creditsForAccount":[
{
"allocatedCredits":10000,
"consumedCredits":3865
}
],
"bulkJobReferenceUrl": "https://api.insideview.com/api/v1/admin/jobs"
}

application/xml Example

<?xml version="1.0" encoding="UTF-8"?>
<accountUsage>
<accountId>vi8rl491h7ouu0v6io</accountId>
<bulkJobReferenceUrl>https://api.insideview.com/api/v1/admin/jobs</bulkJobReferenceUrl>
<creditsForAccount>
<allocatedCredits>10000</allocatedCredits>
<consumedCredits>3865</consumedCredits>
</creditsForAccount>
<end>2014-09-30</end>
<period>day</period>
<start>2014-09-01</start>
<usage>
<api>DATA_COMPANY_SEARCH</api>
<date>2014-09-24</date>
<transactions>2</transactions>
</usage>
<usage>
<api>DATA_CONTACT_SEARCH</api>
<date>2014-09-24</date>
<transactions>1</transactions>
</usage>
<usage>
<api>ENRICH_ENRICH</api>
<date>2014-09-24</date>
<transactions>1</transactions>
</usage>
<usage>
<api>DATA_COMPANY_SEARCH</api>
<date>2014-09-25</date>
<transactions>9</transactions>
</usage>
<usage>
<api>ENRICH_ENRICH</api>
<date>2014-09-29</date>
<transactions>13</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.

See API Error Codes article for more details.

HTTP 401

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

See API Error Codes article for more details.

HTTP 429

Request is throttled.

See API Error Codes article for more details.

Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk