Get API consumption metrics for the integration over a date range
Base URL
https://api.isnotai.com
Available Regions
2 regions
Query Parameters
startDate
string(date-time)
Inclusive lower bound, ISO-8601 date. Defaults to 30 days before endDate.
endDate
string(date-time)
Inclusive upper bound, ISO-8601 date. Defaults to today (UTC).
metric
string
Optional metric filter. One of: ApiCalls, Events, Sessions, StorageBytes, BotAnalyses (case-insensitive).
Responses
200
application/json
Payload of UsageResponse
400
application/json
Payload of ErrorEnvelope
401
application/json
Payload of ErrorEnvelope
curl --request GET \
--url https://api.isnotai.com/v1/usage \
--header 'Authorization: Bearer aik_v1_YOUR_API_KEY'
import requests
url = "https://api.isnotai.com/v1/usage"
headers = {"Authorization": "Bearer aik_v1_YOUR_API_KEY"}
response = requests.get(url, headers=headers)
print(response.json())
const fetch = require('node-fetch');
const url = 'https://api.isnotai.com/v1/usage';
const options = {method: 'GET', headers: {Authorization: 'Bearer aik_v1_YOUR_API_KEY'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.isnotai.com/v1/usage"),
Headers =
{
{ "Authorization", "Bearer aik_v1_YOUR_API_KEY" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
Sent to the API as Authorization: Bearer aik_v1_.... Held only in this tab's input element; re-enter on each browser tab. The docs site never receives or stores it.
{
"startDate": "string",
"endDate": "string",
"data": [
{
"period": "string",
"metricType": "string",
"value": 0
}
],
"totals": {}
}
{
"error": {
"code": "string",
"message": "string",
"details": {}
}
}
{
"error": {
"code": "string",
"message": "string",
"details": {}
}
}