/api/2.0/fo/auth/docker/
[POST]
Create, update, list and delete Docker records for compliance scans (using PC). This record is used to authenticate to a Docker daemon (version 1.9 to 1.12) running on a Linux host.
Requirement - Unix authentication is required so you’ll also need a Unix record for the asset running the docker.
Parameter |
Description |
action={action} |
(Required) Specify create, update, delete (using POST) or list (using GET or POST). See List Auth Records for type |
echo_request={0|1} |
(Optional) Specify 1 to view (echo) input parameters in the XML output. By default these are not included. |
ids={value} |
(Required to update or delete record) Record IDs to update/delete. Specify record IDs and/or ID ranges (for example, 1359-1407). Multiple entries are comma separated. |
title={value} |
(Required to create record) The record title. |
comments={value} |
(Optional) User defined comments. |
Docker |
|
docker_deamon_conf_file= {value} |
(Optional to create or update record) Location of the configuration file for the docker daemon. |
docker_command={value} |
(Optional) The docker command to connect to a local docker daemon. |
Target Hosts |
|
ips={value} |
(Required to create record) IPs to be added to your docker record. |
add_ips={value} |
(Optional and valid only to update record) IPs to be added to an existing record. You may enter a combination of IPs and IP ranges. Multiple entries are comma separated. |
remove_ips={value} |
(Optional and valid to update record) IPs to be removed from your record. You may enter a combination of IPs and ranges. Multiple entries are comma separated. |
network_id={value} |
(Optional to create or update record, and valid when the networks feature is enabled) The network ID for the record. |
API request
curl -u "USERNAME:PASSWORD" -H "X-Requested-With: curl demo" -d "action=create&title=docker_sample&ips=10.10.30.159&docker_deamon_conf_file=/etc/docker/daemon.json&docker_command=/usr/bin/docker&echo_request=1" "https://qualysapi.qualys.com/api/2.0/fo/auth/docker/"
XML output
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM "https://qualysapi.qualys.com/api/2.0/batch_return.dtd">
<BATCH_RETURN>
<REQUEST>
<DATETIME>2018-03-09T06:09:46Z</DATETIME>
<USER_LOGIN>username</USER_LOGIN>
<RESOURCE>https://qualysapi.qualys.com/api/2.0/fo/auth/docker/</RESOURCE>
<PARAM_LIST>
<PARAM>
<KEY>action</KEY>
<VALUE>create</VALUE>
</PARAM>
<PARAM>
<KEY>title</KEY>
<VALUE>docker_sample</VALUE>
</PARAM>
<PARAM>
<KEY>ips</KEY>
<VALUE>10.10.30.159</VALUE>
</PARAM>
<PARAM>
<KEY>docker_deamon_conf_file</KEY>
<VALUE>/etc/docker/daemon.json</VALUE>
</PARAM>
<PARAM>
<KEY>docker_command</KEY>
<VALUE>/usr/bin/docker</VALUE>
</PARAM>
<PARAM>
<KEY>echo_request</KEY>
<VALUE>1</VALUE>
</PARAM>
</PARAM_LIST>
</REQUEST>
<RESPONSE>
<DATETIME>2018-03-09T06:09:46Z</DATETIME>
<BATCH_LIST>
<BATCH>
<TEXT>Successfully Created</TEXT>
<ID_SET>
<ID>72685</ID>
</ID_SET>
</BATCH>
</BATCH_LIST>
</RESPONSE>
</BATCH_RETURN>
<platform API server>/api/2.0/batch_return.dtd
<platform API server>/api/2.0/fo/auth/docker/auth_docker_list_output.dtd