Shows details of a container.
Parameter |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
containerSha |
Mandatory |
string |
Specify the SHA value of a specific container in the user’s scope. |
API request
curl -X GET
"<qualys_base_url>/csapi/v1.3/containers/fe23f264e3dd2b5ebca5a5a9accdf5e4ac0d3ba3144bf097f6c5ba69e00d5fed" --header "Authorization: Bearer <token>"
Response
{
"portMapping": [
{
"protocol": "tcp",
"port": 5000,
"hostIp": "0.0.0.0",
"hostPort": 5000
}
],
"imageId": "5c4008a25e05",
"created": "1615380901000",
"updated": "1615440716646",
"label": null,
"uuid": "2866748c-acf2-3d09-8384-8ab0ed522048",
"sha": "fe23f264e3dd2b5ebca5a5a9accdf5e4ac0d3ba3144bf097f6c5ba69e00d5fed",
"privileged": false,
"path": "/entrypoint.sh",
"imageSha": "5c438a25e0565faf88dd3f060a8d7688f8c41c539a3ee9c693b05f08a12ebf9",
"macAddress": "02:42:ac:11:00:02",
"customerUuid": "74d66479-27e6-73bf-8033-34037f109fc9",
"ipv4": "10.10.10.10",
"ipv6": null,
"name": "registry",
"host": {
"sensorUuid": "07ef65f6-472e-4d4c-9383-591b551f87ab",
"hostname": "cloudagent",
"ipAddress": "10.11.11.11",
"uuid": "1fcg95c1-f881-4574-a452-febc3f55809a",
"lastUpdated": "2021-03-10T12:56:01.213Z"
},
"state": "STOPPED",
"imageUuid": "bfbd86f3-e99a-32da-b73d-5d1c0cb77eaa",
"containerId": "fe14f222e3dd",
"stateChanged": "1615440815994",
"services": null,
"users": null,
"operatingSystem": null,
"lastVmScanDate": "1615440815994",
"source": "GENERAL",
"isInstrumented": null,
"environment": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"arguments": [
"/etc/docker/registry/config.yml"
],
"command": "/etc/docker/registry/config.yml",
"drift": null,
"vulnerabilities": null,
"softwares": null,
"isDrift": false,
"isRoot": true,
"lastComplianceScanned": null,
"cluster": {
"type": "kubernetes",
"version": "v1.1.1",
"project": "k8s-project",
"node": {
"name": "k8s-node",
"isMaster": true
},
"pod": {
"name": "pod-name",
"uuid": "63225d4f-bf0c-3488-8144-89c7d03dfacf",
"namespace": "cs",
"label": [
{
"key": "com.docker.compose.container-number",
"value": "1"
},
{
"key": "com.docker.compose.service",
"value": "lb"
}
]
"controllers": [
{
"uuid": "a3145d4f-bf0c-3488-8144-89c7d03dfacf",
"name": "deployment-name",
"type": "DEPLOYMENT"
},
{
"uuid": "b3145d4f-bf0c-3488-8144-89c7d03dfacf",
"name": "replicaset-name",
"type": "REPLICASET"
}
]
}
}
}
This sample includes container details for AWS Fargate so you’ll see a source value of “SERVERLESS_FARGATE” and AWS ECS cloudProvider fields in the response.
API request
curl -X GET
"<qualys_base_url>/csapi/v1.3/containers/5079803f66a6a00fd55287cd77c7607410fd5165f313c4a54498cd5837c2d5ac" --header "Authorization: Bearer <token>"
Response
{
"portMapping": null,
"imageId": "ebd01beff0e7",
"created": "1660256877142",
"updated": "1660257084484",
"label": null,
"uuid": "21662534-e505-313d-94a6-2a3b3992a036",
"sha": "5079803f66a6a00fd55287cd77c7607410fd5165f313c4a54498cd5837c2d5ac",
"privileged": false,
"path": null,
"imageSha": "ebd01beff0e701dc070895cc46ade1052bfec831e61bd80bc9ab380f81f9bd85",
"macAddress": null,
"customerUuid": "d6a209da-dbb4-6498-8048-dedd2f60b406",
"ipv4": null,
"ipv6": null,
"name": "testnoshell",
"host": null,
"hostArchitecture": null,
"state": "RUNNING",
"imageUuid": "3c1e4763-3bc6-372d-98f9-2c0d6b58cae8",
"containerId": "5079803f66a6",
"stateChanged": "1660256887633",
"services": null,
"users": null,
"operatingSystem": null,
"lastScanned": null,
"source": "SERVERLESS_FARGATE",
"isInstrumented": null,
"environment": null,
"arguments": null,
"command": null,
"drift": null,
"vulnerabilities": [],
"softwares": null,
"isDrift": false,
"isRoot": null,
"lastComplianceScanned": "null",
"cluster": null,
"cloudProvider": {
"aws.ecs.container.subnetId": "subnet-01fbf23a45b6cc789",
"aws.ecs.clusterName": "my-cluster",
"aws.ecs.container.macAddress": "02:bf:3e:45:67:8e",
"aws.ecs.region.code": "ca-central-1",
"aws.ecs.container.id": "03ddea45-6e78-90b1-23bb-ec45c67e89ea",
"aws.ecs.accountId": "123456789012"
}
}
Was this topic helpful?