Device control policies
Device control policies is the Falcon Device Control Policy collection for
this CID. Paths are under /policy/…. Combined device-control endpoints,
clone_id on create, add-rule-group / remove-rule-group, default
settings, classes patch, and deprecated v1 create/get/update are not
implemented. iOS and Android platform_name are not implemented.
This collection is not CrowdStrike production. It does not call Falcon cloud.
RPC field notes: DeviceControlPoliciesService. 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: Bearerwithdevice-control-policies:readfor query, get, and membersdevice-control-policies:writefor create, patch, delete, actions, and precedence
A session cookie bypasses OAuth scopes. Seed client cs-local-hosts
(hosts:read only) cannot query device control policies (403). There is
no seeded client with device-control-policies:read — use the console
cookie, or a client you created with that scope.
HTTP paths
| Method | Path | Use |
|---|---|---|
GET | /policy/queries/device-control/v1 | Query ids. Query: filter, limit, offset, sort (name.asc / name.desc / precedence.asc). Empty filter returns all ids. |
GET | /policy/entities/device-control/v2?ids= | Get policies. Missing id → 200 with only found resources. |
POST | /policy/entities/device-control/v2 | Create. Body { "name", "description", "platform_name" }. Optional settings. Empty name → 400. Unknown platform_name → 400. Success 201. Starts enabled false. |
PATCH | /policy/entities/device-control/v2 | Update. Body { "id", "name", "description", "settings" }. Does not change enabled — use actions. |
DELETE | /policy/entities/device-control/v1?ids= | Delete policies. |
GET | /policy/queries/device-control-members/v1?id= | Member device_ids (union of hosts in assigned groups). |
POST | /policy/entities/device-control-actions/v1?action_name= | enable, disable, add-host-group, or remove-host-group. Body { "ids": ["dc-windows"], "group_id": "hg-linux" } at the top level. group_id is required for add/remove. Other action_name → 400. Unknown group → 400. Duplicate add is 200 (no-op). |
POST | /policy/entities/device-control-precedence/v1 | Body { "ids" } ordered. 400 if the set is not exactly all policies. |
Allowed FQL properties: name, platform_name, enabled (match is
lowercase). Unknown property or invalid filter → 400.
platform_name must be Windows, Linux, or Mac. Mac is accepted; this
clone has no seeded Mac hosts.
Policy JSON: id, name, description, platform_name, enabled,
precedence, settings (id + value.enabled), groups (assigned host
group ids). Create ids are dc- plus 16 hex. Omitted settings on
create uses the seed default { "id": "USB", "value": { "enabled": true } }.
Deprecated GET / POST / PATCH /policy/entities/device-control/v1
are not implemented. Default-settings and classes patch endpoints are
not implemented.
Seed policies
id | name | platform_name | enabled | precedence | groups |
|---|---|---|---|---|---|
dc-windows | Windows device control | Windows | true | 1 | hg-windows |
dc-linux | Linux device control | Linux | true | 2 | hg-linux |
Members of dc-windows include aid-win-01. Members of dc-linux
include aid-lin-01.
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 device control policies (cookie)
Empty filter returns at least the two seed ids, including dc-windows.
platform_name:'Windows' returns Windows rows:
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/policy/queries/device-control/v1?filter=platform_name:%27Windows%27&sort=name.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/policy/queries/device-control/v1?filter=not-fql'
Get device control policies (cookie)
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/policy/entities/device-control/v2?ids=dc-windows,dc-linux'
Each resource includes groups (assigned host group ids).
Create (cookie)
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{"name":"Lab device control","description":"lab","platform_name":"Windows"}' \
http://127.0.0.1:8088/policy/entities/device-control/v2
Success is 201. The new id is in resources. enabled is false.
Empty name → 400. clone_id is ignored — it is not implemented.
Patch (cookie)
curl -sS -X PATCH -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{"id":"dc-linux","name":"Linux device control","description":"Linux endpoints"}' \
http://127.0.0.1:8088/policy/entities/device-control/v2
Delete (cookie)
curl -sS -X DELETE -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/policy/entities/device-control/v1?ids=<policy-id>'
Members (cookie)
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/policy/queries/device-control-members/v1?id=dc-linux'
Enable, disable, and host groups (cookie)
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{"ids":["<policy-id>"]}' \
'http://127.0.0.1:8088/policy/entities/device-control-actions/v1?action_name=enable'
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{"ids":["<policy-id>"],"group_id":"hg-linux"}' \
'http://127.0.0.1:8088/policy/entities/device-control-actions/v1?action_name=add-host-group'
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{"ids":["<policy-id>"],"group_id":"hg-linux"}' \
'http://127.0.0.1:8088/policy/entities/device-control-actions/v1?action_name=remove-host-group'
add-rule-group and remove-rule-group are not implemented
(action_name → 400). Combined endpoints, default settings, classes
patch, and deprecated v1 create/get/update are not implemented.
Precedence (cookie)
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{"ids":["dc-windows","dc-linux"]}' \
http://127.0.0.1:8088/policy/entities/device-control-precedence/v1
Create, patch, delete, actions, and precedence need
device-control-policies:write (or a session). A token with only
device-control-policies:read → 403 on those methods.
Query (Bearer)
TOKEN='<access_token from a client with device-control-policies:read>'
curl -sS -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/policy/queries/device-control/v1'
device-control-policies:read → 200. A token without that scope
(including hosts:read only) → 403. Missing or revoked token →
401.
OAuth2 mint/revoke: OAuth2. Accessible scopes: API clients.