K8s pod count
Kubernetes pod counts is the
Kubernetes-pod-count collection for this CID —
ReadPodCount (PEP 8 read_pod_counts) and
PostAggregatesPods (PEP 8 post_aggregates_pods). The GET path is
GET /container-security/aggregates/pods/count/v1. The POST path is
POST /container-security/aggregates/pods/v1.
Remaining Kubernetes Protection mutations /
Image assessment policies / remaining cloud are not implemented (not yet). ReadClusterCombinedV2
is not implemented. This is not
Kubernetes combined pods ReadPodCombined
(/container-security/combined/pods/v1):
K8s pods. This is not
Kubernetes pod counts by date ReadPodsByDateRangeCount
(/container-security/aggregates/pods/count-by-date/v1):
K8s pod dates. This is not
Kubernetes node counts ReadNodeCount
(/container-security/aggregates/nodes/count/v1):
K8s node count. This is not
Kubernetes container counts ReadContainerCount
(/container-security/aggregates/containers/count/v1):
K8s container count. This is not
the HelloService template sample (GET /api/hello).
This collection is not CrowdStrike production. It does not call Falcon cloud. It is not CrowdStrike Falcon Container Image cloud.
RPC field notes:
ContainerImagesService.
REST schemas: API reference. Filter syntax: FQL.
Kubernetes pod counts does use FQL (unlike Kubernetes
clusters and combined cloud clusters). POST uses JSON
type, field, and optional filter. Extra unused body keys are
ignored.
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: Bearerwithfalcon-container-image:read(GET) orfalcon-container-image:write(POST)
A session cookie bypasses OAuth scopes. Seed client cs-local-hosts
(hosts:read only) cannot list pod counts or run aggregates (403).
falcon-container-image:read can list pod counts and
cannot POST (403). ReadPodCount stays
falcon-container-image:read. Unit tests use a client named
cs-local-cimg with falcon-container-image:read; that client can
list pod counts and cannot POST (403). Unit tests use a client
named cs-local-cimgw with falcon-container-image:write; that client
can POST. It is not in the production seed. There is no seeded
production client with falcon-container-image:read or
falcon-container-image:write — use the console cookie, or a client
you created with that scope. Missing or revoked token → 401. These
RPCs do not use kubernetes-protection:read.
HTTP paths
| Method | Path | Use |
|---|---|---|
GET | /container-security/aggregates/pods/count/v1 | List Kubernetes pod counts. Query: filter, limit, offset. |
POST | /container-security/aggregates/pods/v1 | Run a terms aggregate. JSON: type, field, optional filter. |
Empty filter returns every pod-count row in this CID. Allowed FQL
properties: label, cid. Unknown
property or invalid filter → 400. limit and offset must be ≥ 0
else 400. Omitted limit defaults to 100 (capped at 200).
Empty sort is ignored. Default sort is label.asc.
POST JSON { "type": "terms", "field": "label" } with optional
filter. Empty filter returns both seed rows (label ASC:
all count 2 then lab-eks-1 count 1).
filter label:'lab-eks-1' returns lab-eks-1 (count 1).
Empty field defaults to label. Missing type → 400
"type is required". Empty JSON object is missing type → 400.
type other than terms → 400. field other than label
(after default) → 400. Unknown FQL property → 400. Extra unused
body keys are ignored. falcon-container-image:read on POST → 403.
JSON is DESIGN snake_case flattened fields (three fields this
slice): label, count, cid. This is not SOURCE PascalCase
{count,label} without cid.
This is not Kubernetes combined pods
ReadPodCombined, Kubernetes pod counts by date
ReadPodsByDateRangeCount, Kubernetes node counts
ReadNodeCount, Kubernetes container counts
ReadContainerCount, or the HelloService template.
Kubernetes combined pods uses
/container-security/combined/pods/v1:
K8s pods. Kubernetes pod counts by date uses
/container-security/aggregates/pods/count-by-date/v1:
K8s pod dates. Kubernetes
node counts uses
/container-security/aggregates/nodes/count/v1:
K8s node count. Kubernetes
container counts uses
/container-security/aggregates/containers/count/v1:
K8s container count. Remaining
Kubernetes Protection mutations / Image assessment policies / remaining cloud are not
implemented (not yet).
Seed pod counts
label | count |
|---|---|
all | 2 |
lab-eks-1 | 1 |
cid is cid-local-1. Empty GET returns both (label ASC:
all then lab-eks-1). filter=label:'lab-eks-1' returns
lab-eks-1 (count 1). filter=label:'all' returns
all (count 2). POST { "type": "terms", "field": "label" }
returns both seed rows. POST with filter label:'lab-eks-1'
returns lab-eks-1 (count 1).
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
List pod counts (cookie)
Empty GET returns at least the two seed labels, including
all then lab-eks-1:
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/container-security/aggregates/pods/count/v1'
filter=label:'lab-eks-1' returns lab-eks-1 (count 1):
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/container-security/aggregates/pods/count/v1?filter=label:%27lab-eks-1%27'
Unknown FQL property 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/container-security/aggregates/pods/count/v1?filter=bogus:%27x%27'
No cookie and no Bearer is 401:
curl -sS -o /dev/null -w '%{http_code}\n' \
-H 'Host: crowdstrike-api.localhost' \
'http://127.0.0.1:8088/container-security/aggregates/pods/count/v1'
cs-local-hosts (hosts:read only, missing
falcon-container-image:read) is 403:
TOKEN='<access_token from cs-local-hosts>'
curl -sS -o /dev/null -w '%{http_code}\n' \
-H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/container-security/aggregates/pods/count/v1'
Run aggregate (cookie)
POST { "type": "terms", "field": "label" } returns both seed rows
(all count 2, lab-eks-1 count 1). Success is 200:
curl -sS -X POST -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{"type":"terms","field":"label"}' \
'http://127.0.0.1:8088/container-security/aggregates/pods/v1'
filter label:'lab-eks-1' returns lab-eks-1 (count 1):
curl -sS -X POST -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d "{\"type\":\"terms\",\"field\":\"label\",\"filter\":\"label:'lab-eks-1'\"}" \
'http://127.0.0.1:8088/container-security/aggregates/pods/v1'
Missing type is 400:
curl -sS -o /dev/null -w '%{http_code}\n' \
-X POST -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{}' \
'http://127.0.0.1:8088/container-security/aggregates/pods/v1'
cs-local-cimg (falcon-container-image:read) is 403 on POST:
TOKEN='<access_token from cs-local-cimg>'
curl -sS -o /dev/null -w '%{http_code}\n' \
-X POST -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
-H 'Content-Type: application/json' \
-d '{"type":"terms","field":"label"}' \
'http://127.0.0.1:8088/container-security/aggregates/pods/v1'
Remaining Kubernetes Protection mutations /
Image assessment policies / remaining cloud are not implemented (not yet). Kubernetes combined
pods is a separate collection:
K8s pods. Kubernetes pod dates is a
separate collection:
K8s pod dates. Kubernetes node
count is a separate collection:
K8s node count. Kubernetes container
count is a separate collection:
K8s container count. This is not
the HelloService template (GET /api/hello).
List (Bearer)
TOKEN='<access_token from a client with falcon-container-image:read>'
curl -sS -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/container-security/aggregates/pods/count/v1'
falcon-container-image:read → 200 (including unit-test client
cs-local-cimg). A token without that scope (including hosts:read
only, e.g. cs-local-hosts) → 403. Missing or revoked token →
401. ReadPodCount stays falcon-container-image:read. This RPC
does not use kubernetes-protection:read.
Run aggregate (Bearer)
TOKEN='<access_token from a client with falcon-container-image:write>'
curl -sS -X POST -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
-H 'Content-Type: application/json' \
-d '{"type":"terms","field":"label"}' \
'http://127.0.0.1:8088/container-security/aggregates/pods/v1'
falcon-container-image:write → 200 on POST (including unit-test
client cs-local-cimgw). A token without that scope (including
hosts:read only, e.g. cs-local-hosts, or
falcon-container-image:read, e.g. cs-local-cimg) → 403. Missing
or revoked token → 401. There is no seeded production client with
falcon-container-image:write — use the console cookie, or a client
you created with that scope.
OAuth2 mint/revoke: OAuth2. Accessible scopes: API clients.