curl --request GET \
--url https://api.scoutworks.app/api/v1/nodes/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scoutworks.app/api/v1/nodes/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.scoutworks.app/api/v1/nodes/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tier": "group",
"metric": "member_count",
"section": "all",
"day": "2023-12-25",
"value": 0,
"ownValue": 0,
"stale": true,
"asOf": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0
}List the nightly totals for your area
One row per figure for your own node and for each group or node below it that shares data with you, from one night’s build (day, the latest by default). Each row carries the groupId it counts, its parentId that night, and asOf. Narrow to one of them with childId. By default each row is a total (section all); ask for a section’s part with section. Counts are exact, section counts included. Built each night. A group that stops sharing with you, or moves to another district, leaves these rows at once and your totals at the next build, within 24 hours.
curl --request GET \
--url https://api.scoutworks.app/api/v1/nodes/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scoutworks.app/api/v1/nodes/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.scoutworks.app/api/v1/nodes/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tier": "group",
"metric": "member_count",
"section": "all",
"day": "2023-12-25",
"value": 0,
"ownValue": 0,
"stale": true,
"asOf": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0
}Authorizations
A group API key, sent as Authorization: Bearer sw_live_…. Keys from staging and the demo start sw_test_ instead. A group admin creates keys in Settings → Integrations → API keys.
Query Parameters
Opaque. Pass the nextCursor of the previous page, with the same filters, to get the next one. Do not build or parse it.
1 - 512Page size, 1 to 200. Defaults to 50.
1 <= x <= 200Only this group or node below yours. It must share data with you; any other id answers 404.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Only this figure.
member_count, waiting_count, net_growth_12m, young_people_count The night to read, YYYY-MM-DD (UTC). Defaults to the latest night your own node was built.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Which section’s rows. Defaults to all, the totals: one row per node, figure and night. A section (cubs) gives that section’s rows only. any gives every row, the totals and each section. A row’s value already includes everything below it, so to total a set of rows add their ownValue, or read your own node’s value. Adding value across nodes counts a young person twice.
all, squirrels, beavers, cubs, scouts, explorers, network, unassigned, any