Skip to content

Logs

GET https://api.echovalue.dev/token/logs

Returns a list of recent API calls made with your token. Logs have a TTL of 7 days and are deleted within 24 hours after expiration.

Request headers:

HeaderDescription
x-tokenYour API token

Query parameters:

ParameterTypeDescriptionDefault
nintegerNumber of log entries to retrieve. Min: 1.5

Response: 200 — JSON object.

{
"logs": [
{
"id": "jd9kImh8U4In3odfNeKf",
"method": "GET",
"path": "/default/mykey",
"error": "Key Not Found",
"timestamp": "2023-12-07T12:14:16.124481Z",
"expiration": "2023-12-14T12:14:16.12448Z",
"cost": 1,
"balance": 97
}
],
"n": 1
}
FieldTypeDescription
nintegerNumber of entries actually returned
logsarrayArray of log entries

Log entry fields:

FieldTypeDescription
idstringUnique log entry ID
methodstringHTTP method used (GET, POST, DELETE)
pathstringAPI path called
errorstringError message, if any (omitted on success)
timestampstring (ISO 8601)When the request was made
expirationstring (ISO 8601)When this log entry expires (7 days after creation)
costintegerCredits deducted for that request
balanceintegerWallet balance after that request

HTTP status codes:

StatusMeaning
200Logs returned
401Invalid token
402Insufficient credits
Terminal window
curl 'https://api.echovalue.dev/token/logs?n=5' \
-H 'x-token: mytoken'