Free plan available. Set up in minutes with the collectors you already use. Start free
Logthread

Guide

HTTP pull sources: any JSON API, on a schedule

An HTTP pull source calls one of your JSON APIs on a schedule, takes values out of each response, and stores them as log records in your workspace. You can then search those records, chart them, put them in a table panel and alert on them, just like your logs. Pari and AI agents can read them too.

Use it for numbers that live behind an API rather than in your logs:

  • costs and bills from your cloud and CDN providers;
  • revenue, payouts and credits from your billing system;
  • a profit-and-loss table from your finance service;
  • a KPI or status endpoint of your own.

Set one up#

Go to Integrations, choose HTTP API (JSON), and work through these steps. Only admins can add a source.

  1. Request. Enter the URL, and choose GET or POST. The URL must use HTTPS.
  2. You can add headers, such as Accept: application/json.
  3. For POST, you can add a JSON body.
  4. Authentication. Choose how the API expects its credentials:
  5. API key in a header: the header's name, such as X-API-Key or AccessKey, then the key.
  6. Bearer token: sent as Authorization: Bearer <token>.
  7. Username and password: HTTP basic authentication.
  8. OAuth2 client credentials: the token URL, the client id and scope, then the client secret. For Azure, the token URL is https://login.microsoftonline.com/<tenant id>/oauth2/v2.0/token and the scope is https://management.azure.com/.default.

The key, token or secret is stored encrypted. It is never shown again, never logged, and never sent anywhere except to that API. If you later change the API's host or the way the key is sent, you must enter the key again. Headers whose names look like credentials (X-API-Key, X-Auth-Key, and similar) belong in this step, not in the request headers. Use a read-only key where the provider offers one, limited to the data this source reads. An account-wide key can change or delete things, and the source never needs that.

  1. Time window. If the API takes a date range, choose a window and put placeholders in the URL, body or header values.
  2. Pages. If the API returns its results over several pages, choose how it pages.
  3. Preview. Logthread calls the API once and stores nothing. It shows:
  4. the response;
  5. the lists it found in the response;
  6. suggested fields, with their types and sample values;
  7. suggested time and id fields.

Choose Use these to fill in the mapping, then adjust it. The preview shows the rows exactly as they will be stored, and points out any value that could not be converted.

  1. Save. The first poll runs within a minute.

You can also set a source up from an AI agent with preview_http_source and create_http_source (MCP).

Time windows#

WindowCovers
NoneNo date range is sent.
Since the last pollFrom the end of the last successful poll to now. A new source starts one interval back, at most 24 hours. After an outage it starts at most 7 days back.
The last N hoursFrom N hours ago to now (1 to 744 hours).
YesterdayThe whole previous day in your chosen time zone.
Month to dateFrom the first day of this month in your time zone to now.

These placeholders are filled in from the window:

PlaceholderExample
{from}, {to}2026-11-01T00:00:00.000Z (UTC)
{from_date}, {to_date}2026-11-01 (in your time zone; {to_date} is the last day the window covers)
{from_unix}, {to_unix}seconds since 1970
{from_ms}, {to_ms}milliseconds since 1970

In the URL, values are URL-encoded. To send a literal brace, write {{ or }}.

Example: https://api.example.com/v1/costs?from={from_date}&to={to_date} with Month to date in Asia/Kolkata.

Pages#

PagingHow it works
Next-page linkThe next page's URL is read from a field in the response, such as $.next, or from the Link header. It must be on the same host.
CursorA cursor is read from the response (for example $.next_cursor) and sent back as a query parameter, or as a body field for POST.
Page numberA query parameter (for example page) counts up from 1 until a page has no records.

A poll reads at most 20 pages (5 by default). If there are more, the source's status says so.

Mapping a response to records#

Paths use JSONPath (RFC 9535).

SettingMeaning
RecordsWhere the list of records is, for example $.lines[*]. Leave it empty to store the whole response as one record.
FieldsFor each value: a field name, a path inside the record (for example $.amount) and a type (text, number, whole number or true/false).
TimeOptional: the record's own date or time (RFC 3339, YYYY-MM-DD, or seconds or milliseconds since 1970). Without it, a record takes the time of the poll.
IdOptional: a value that identifies the record, used to skip repeats.
Fixed attributesValues added to every record, for example report = pnl.
MessageThe record's text, with field names in braces, for example {line}: {amount_inr} INR.
ServiceThe service name the records are stored under.

Field names use lower-case letters, digits, _ and ., and must start with a letter.

Snapshots or history.

  • Snapshots: without a time or id, every poll stores a fresh set of records, one snapshot per poll. To show the latest value, use latest:

`` service:finance | stats latest(amount_inr) by line ``

  • History: with a time or id, a record that was already stored with the same values is not stored again, and a record whose value changed is stored again. So re-reading "month to date" every hour stores only what changed. To show each day's latest value:

`` service:billing | stats latest(cost) by day, line ``

Every poll is recorded#

Each poll also stores one record under service http-pull. It carries:

  • http_pull.source;
  • http_pull.source_id;
  • http_pull.outcome: ok, http_error, auth_failed, timeout, unreachable, refused, parse_error, too_large or mapping_error;
  • http.response.status_code;
  • http_pull.duration_ms;
  • http_pull.records.

The source's page shows its last poll, the window it read, and any error with what to do about it.

After a failed poll the source waits before trying again:

  • Refused credentials: 1 hour.
  • Rate limited: 15 minutes, or what the API asks.
  • Other errors: 10 minutes.

A failing source is listed on Home. The source's page offers two alerts, already filled in:

  • Failing: a poll did not succeed.
  • Stale: no successful poll in three intervals. This alert is offered when three intervals fit in a day.

Limits and safety#

  • Address: HTTPS only. Logthread refuses an address on a private network, a loopback address, a link-local address or a cloud metadata address. It checks this when you save, again before every request, and again on every next-page link and token request. Redirects are not followed.
  • Response: at most 5 MB per response and 20 MB per poll, and it must be JSON. At most 2,000 records per poll. With Since the last poll, a poll that hits a limit continues from where it stopped next time.
  • Time: each request has its own timeout, and a whole poll stops after 2 minutes.
  • Mapping: at most 50 fields per record and 20 fixed attributes.
  • Requests: a timeout of 1–30 seconds per request. A timeout, a connection error, a 5xx or a 429 is retried up to twice.
  • Schedule: every 5 minutes to every 24 hours. One poll of a source runs at a time.
  • Preview: 20 previews per minute per workspace.
  • Usage: records count toward your ingest usage like any other data.
  • Audit: creating, changing, testing and removing a source is recorded in the audit log, with the host, the authentication type and the number of fields. The audit log never records a secret or a header value.
  • Count: a source counts as one of the workspace's 10 integrations.