Hosts
Hosts is the Falcon Hosts collection for this CID. Paths are under
/devices/…. Deprecated host-hide and devices-actions RPCs are not
implemented.
This collection is not CrowdStrike production. It does not call Falcon cloud.
RPC field notes: HostsService. REST schemas: API reference. Filter syntax: FQL.
These curls use Host: crowdstrike-api.localhost against Compose
Traefik on :8088. If the hostname already resolves to Traefik, you can
omit the Host header and call http://crowdstrike-api.localhost instead.
Auth
Every call needs a console session or a Bearer token:
- Cookie
cs_consolefromCreateSession(POST /identity/entities/sessions/v1) Authorization: Bearerwithhosts:readfor query and get
A session cookie bypasses OAuth scopes. Seed client cs-local-hosts /
cs-local-hosts-secret has hosts:read and can query devices. That token
cannot query or PATCH alerts.
HTTP paths
| Method | Path | Use |
|---|---|---|
GET | /devices/queries/devices/v1 | Query ids. Query: filter, limit, offset, sort (hostname.asc / status.desc). Empty filter returns all ids. |
GET | /devices/entities/devices/v2?ids= | Get devices. Missing id → 200 with only found resources. |
Allowed FQL properties: hostname, status, platform_name. Unknown
property or invalid filter → 400.
Device JSON: device_id, hostname, platform_name, status,
last_seen.
Seed devices
device_id | hostname | platform_name | status |
|---|---|---|---|
aid-win-01 | win-dc-01 | Windows | normal |
aid-win-02 | win-lap-02 | Windows | normal |
aid-lin-01 | lin-app-01 | Linux | normal |
aid-lin-02 | lin-build-02 | Linux | contained |
Session cookie
curl -sS -c cookies.txt -H 'Host: crowdstrike-api.localhost' \
-H 'Content-Type: application/json' \
-d '{"email":"[email protected]","password":"FalconLocal!1","cloud":"us-1"}' \
http://127.0.0.1:8088/identity/entities/sessions/v1
Query devices (cookie)
Empty filter returns at least the four seed ids, including aid-win-01.
hostname:'win*' returns only the Windows hosts:
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/devices/queries/devices/v1?filter=hostname:%27win*%27&sort=hostname.asc'
Invalid FQL is 400:
curl -sS -o /dev/null -w '%{http_code}\n' \
-H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/devices/queries/devices/v1?filter=not-fql'
Get devices (cookie)
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/devices/entities/devices/v2?ids=aid-win-01,aid-lin-02'
Query devices (Bearer)
TOKEN='<access_token from POST /oauth2/token with cs-local-hosts>'
curl -sS -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/devices/queries/devices/v1'
hosts:read → 200. A token without that scope → 403. Missing or
revoked token → 401.
OAuth2 mint/revoke: OAuth2.