Request log
What this token has been doing. Useful when a call failed hours ago and nobody kept the response.
The object#
| Field | Type | Description |
|---|---|---|
| requestid | string(36) | The X-Request-Id we returned. Quote it when you report a problem. |
| method | string(10) | |
| route | string(255) | The matched route PATTERN, never the URI you sent. Ids and query values are deliberately not recorded. |
| httpstatus | integer | |
| errorcode | string(40) | Empty when the request succeeded. |
| durationms | integer | Server time, not round trip. |
| bytesin | integer | |
| bytesout | integer | |
| entrydate | string |
Endpoints#
GET/requestlog
200
Read this token's own request log.
Every request this token made, newest first, so "it returned a 422 and I did not keep the body" is answerable without asking us.
Two limits worth knowing before you rely on it. Logging is off unless it is switched on for the token, and only the last 100 requests are kept - it is a recent-history window for debugging, not an audit trail. If you need one of those, record the X-Request-Id on your own side as you go.
A token only ever sees its own requests. There is no way to read another token's, including one belonging to the same user in the same company.
Requires scope setup:read.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| httpstatus | query | integer | Only this HTTP status, e.g. 422. Named to match the field it filters. |
| failed | query | string | Pass true for everything that was not a 2xx. |
| route | query | string | Substring match on the route pattern, e.g. invoices. |
| method | query | string | One HTTP verb. |
| page | query | integer | 1-based. |
| perpage | query | integer | Default 50, maximum 200 - though only the last 100 requests are kept, so a larger page cannot return more. |
curl \ 'https://acme.nolapro.com/!/api/v2/requestlog' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/requestlog'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.get( "https://acme.nolapro.com/!/api/v2/requestlog", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/requestlog', { method: 'GET', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var res = await http.GetAsync( "https://acme.nolapro.com/!/api/v2/requestlog"); res.EnsureSuccessStatusCode();