GET /v1/sources/{id}/settings
A source's settings, admin token only. A source with no settings yet is off.
Auth. Send the token in the X-Ledger-Token header.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string: one of collectr | required |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | The source's settings | SourceSettings |
404 | Request rejected | Error |
429 | Too many requests from this client address. Wait the number of seconds in Retry-After, then try again. | Error |
Example response
{
"source": "collectr",
"enabled": true,
"config": {},
"updated_at": "2026-10-11T00:00:00Z"
}
Code samples
Set KEY to your own token first.
curl
curl \
-H X-Ledger-Token:$KEY \
"https://api.sasek.org/ledger/v1/sources/{id}/settings"
JavaScript
const res = await fetch("https://api.sasek.org/ledger/v1/sources/{id}/settings", {
headers: { "X-Ledger-Token": KEY },
});
const data = await res.json();
Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://api.sasek.org/ledger/v1/sources/{id}/settings",
method="GET",
headers={
"X-Ledger-Token": os.environ["KEY"],
},
)
with urllib.request.urlopen(request) as response:
print(json.load(response))