Skip to content

📈 Get usage metrics for a company

Request

Get detailed usage metrics for a company within a specified period.

Security
APIKeyHeader
Query
periodstring(UsagePeriod)

Period for usage metrics

Default:"monthly"
Enum:"daily""weekly""monthly""yearly"
start_datestring or null(Start Date)
Any of:

Start date for custom period

string (date)
end_datestring or null(End Date)
Any of:

End date for custom period

string (date)
Headers
X-PDP-Client-Idstring(X-Pdp-Client-Id)required

ID of the PDP Client for which the operation is performed

Examples:
Sandbox client
client_abc123
curl -i -X GET \
  'https://pdp.seqino.dev/api/usage/metrics?period=daily&start_date=2019-08-24&end_date=2019-08-24' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'X-PDP-Client-Id: client_abc123'

Responses

Successful Response

Bodyapplication/json
company_idstring(Company Id)required
periodstring(UsagePeriod)required
Enum:"daily""weekly""monthly""yearly"
start_datestring, (date)(Start Date)required
end_datestring, (date)(End Date)required
total_api_callsinteger, >= 0(Total Api Calls)required

Total number of API calls

total_successful_callsinteger, >= 0(Total Successful Calls)required

Total successful API calls

total_failed_callsinteger, >= 0(Total Failed Calls)required

Total failed API calls

success_ratenumber, [ 0 .. 100 ](Success Rate)required

Success rate percentage

endpoint_usageArray of objects(Endpoint Usage)required

Usage breakdown by endpoint

generated_atstring, (date-time)(Generated At)
Response
{ "company_id": "string", "period": "daily", "start_date": "2019-08-24", "end_date": "2019-08-24", "total_api_calls": 0, "total_successful_calls": 0, "total_failed_calls": 0, "success_rate": 100, "endpoint_usage": [ {} ], "generated_at": "2019-08-24T14:15:22Z" }