Get license key logs
Added in v1.0
GET
https://api.example.com/api/keys/{id}/logs
Requires authentication:
X-API-Key: YOUR_API_KEY
Returns the 100 most recent license logs in an array.
Path parameters
-
idinteger requiredExample:1
Responses
- 200Success
- 404License key not found
- 404No logs found for this license key.
Request
curl -X GET 'https://api.example.com/api/keys/1/logs' \
-H 'X-API-Key: YOUR_API_KEY'
const response = await fetch('https://api.example.com/api/keys/1/logs', {
method: 'GET',
headers: {
'X-API-Key': 'YOUR_API_KEY',
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.get(
"https://api.example.com/api/keys/1/logs",
headers={
"X-API-Key": "YOUR_API_KEY",
},
)
print(response.json())
<?php
$ch = curl_init('https://api.example.com/api/keys/1/logs');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: YOUR_API_KEY',
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);
Response
Success
[
{
"id": 1,
"key": 2,
"timeAt": "1788648761000",
"ip": "192.168.1.10",
"details": "",
"status": "AUTHORISED"
}
]
License key not found
{
"msg": "The specified license key was not found."
}
No logs found for this license key.
{
"msg": "No logs found for this license key."
}