Fetch a List of PODs
Provides a list of PODs in your account.
Input ParametersInput Parameters
|
Parameter |
Mandatory/Optional |
Data Type |
Description |
|---|---|---|---|
| query | Optional | string/integer/boolean | Filter the K8s pods list by providing a query using Qualys syntax. |
| pageNumber | Mandatory | integer | Specify the number of pages to be displayed. Valid values: 1, or 2, or 3, or...n Default value: 1 |
| pageSize | Mandatory | integer | Specify the number of entries to be displayed on a page. Default value: 50 |
| sort | Optional | string/integer | Specify the Qualys token value to sort the response. Valid value: created:desc |
Sample: Fetch a List of PODs in your accountSample: Fetch a List of PODs in your account
API request
curl -X GET
"<qualys_base_url>/csapi/v1.3/k8sResource/pod?query=name%3A%20%2245019-cronjob-29141680-vln2r%22&pageNumber=1&pageSize=50&sort=updatedAt%3Adesc"
"Authorization: Bearer <token>"
Response JSON
{
"data": [
{
"uuid": "74daeecc-8a04-4df2-9d37-096465eb6ed4",
"customerUuid": "be09b4e1-6db4-6062-81d4-e5ff9972ce20",
"clusterUid": "0db3cf6d-4318-4c32-9d71-b6cbe8954055",
"sensorUuid": "b3ba7b8c-2eac-2c50-1ca5-533471e78e75",
"name": "45019-cronjob-29141680-vln2r",
"labels": [
"batch.kubernetes.io/job-name:45019-cronjob-29141680",
"controller-uid:a77655c6-ecb8-48c0-b9cd-9c202caf25a4",
"job-name:45019-cronjob-29141680",
"batch.kubernetes.io/controller-uid:a77655c6-ecb8-48c0-b9cd-9c202caf25a4"
],
"annotations": [
"cni.projectcalico.org/podIP:192.168.160.208/32",
"cni.projectcalico.org/containerID:518e9fa2ceab2a8a43431029a53ee524d0d7d57b1fd96332399086716f283981",
"cni.projectcalico.org/podIPs:192.168.160.208/32"
],
"updatedAt": "1748501060655",
"deletedAt": null,
"resourceVersion": 3206729,
"namespace": "kspm",
"startedAt": "1748500800000",
"status": "ERROR",
"containers": [
"containerd://946459a8ed6b95544bcfd208b8f18657967d89f971680bcd11b9cb9f327e6c2c"
],
"securityContext": null
}
],
"count": 1,
"groups": {},
"aggs": null
}