API Usage Report — Filter by Date & Product
Download your API usage report filtered by date range and product. Track call volumes, success rates, and spending across endpoints.
curl -X GET "https://production.deepvue.tech/v1/client/usage-report?generate_excel=true&since_date=example_string&until_date=example_string" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
-H "x-api-key: YOUR_API_KEY"
import requests
import json
url = "https://production.deepvue.tech/v1/client/usage-report?generate_excel=true&since_date=example_string&until_date=example_string"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)",
"x-api-key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://production.deepvue.tech/v1/client/usage-report?generate_excel=true&since_date=example_string&until_date=example_string", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)",
"x-api-key": "YOUR_API_KEY"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://production.deepvue.tech/v1/client/usage-report?generate_excel=true&since_date=example_string&until_date=example_string", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (JWT)")
req.Header.Set("x-api-key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://production.deepvue.tech/v1/client/usage-report?generate_excel=true&since_date=example_string&until_date=example_string')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (JWT)'
request['x-api-key'] = 'YOUR_API_KEY'
response = http.request(request)
puts response.body
{
"code": 200,
"timestamp": 1748417711157,
"transaction_id": "5a936bcee02d4b7a974db19a4cd1185e",
"sub_code": "SUCCESS",
"message": "User usage report generated successfully",
"data": {
"file_url": "https://deepvue-tech.s3.ap-south-1.amazonaws.com/client/usage-report/9147835.xlsx",
"usage_data": [
{
"Transaction Id": "9cb1fa27-c768-430c-9aa3-c13c477a1b0b",
"Timestamp(UTC)": "2024-05-11T23:33:32.092089+00:00",
"Product Id": "PAN-Plus",
"Status": 200,
"Message": "Invalid Pan Number.",
"Charge": 2.95
},
{
"Transaction Id": "fd93b66e-74e1-4150-8e0f-5b8f78a3a010",
"Timestamp(UTC)": "2024-05-11T22:25:48.586394+00:00",
"Product Id": "PAN-Plus",
"Status": 200,
"Message": "Pan Verified Successfully.",
"Charge": 2.95
},
{
"Transaction Id": "15d46c64-41fe-4938-8510-2aa87fba7694",
"Timestamp(UTC)": "2024-05-11T22:25:07.844149+00:00",
"Product Id": "PAN-Plus",
"Status": 200,
"Message": "Pan Verified Successfully.",
"Charge": 2.95
}
]
}
}
{
"code": 400,
"timestamp": 1748417890825,
"transaction_id": "994e6daf937c4137950368b72003ee5e",
"sub_code": "FAILED",
"message": "Date range too long. The maximum allowed date range is 7 days."
}
{
"detail": "Inactive client_id"
}
{
"detail": "Not authenticated"
}
{
"detail": "Incorrect client_id or client_secret"
}
{
"detail": "Internal Server Error"
}
/v1/client/usage-report
ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .
The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token (JWT). ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .
API Key for authentication. The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
Query Parameters
Responses
Overview
This API enables you to generate and retrieve detailed usage reports documenting all API transactions associated with your account. The report captures comprehensive transaction data including transaction identifiers, timestamps, product names, response statuses, result messages, and associated charges for each API call made within a specified timeframe.
The API supports dual response formats -- you can return usage data directly as JSON objects or generate downloadable Excel files via the generate_excel parameter for offline analysis and record-keeping.
The maximum allowed date range is 7 days. Requests exceeding this window are rejected with a 400 error.
Last updated 4 weeks ago
Built with Documentation.AI