Pull Docker images on a target

Pull Docker images on a target

POST api/v2/jobs/rvc '{"method":"docker.pull","params":{"images":["<image>"]},"hostnames":["<node_hostname>"]}'

Starts a SC//Reliantâ„¢ Virtual Controller (RVC) job to pull a list of Docker images on one or more targets. RVC uses the /opt/reliant/bin/docker-image.sh script on the node if it is available, and otherwise falls back to the standard docker pull command. Images that are already present and valid are not downloaded again. The available targets are a node, node group, or saved filter. The response will indicate that the RVC job is created and is scheduled to run. You can use the job ID from the response to retrieve the job status and the payload.

Note: This method runs in the background. The job finishes as soon as the operation starts, and its payload only confirms that the operation was started. To confirm that the operation completed, run docker.images after the operation finishes, or check the RVC log on the node. For more information, see Troubleshooting RVC jobs.

In order to perform this action, the following conditions must be met:

  • Must have the Remote Job Execution feature turned on at the site level.
  • The user must have the following capabilities:
    • Create and Update a RVC job
    • Call Docker state altering methods

Request syntax

post api/v2/jobs/rvc '{"method":"docker.pull","params":{"images":["<image>"]},"hostnames":["<node_hostname>"]}'

Request parameters

The request accepts the following data in JSON format.

ParameterTypeDescriptionRequired
methodStringThe RVC action to start. This value is specified as a combination of the RVC module and method. For example, to pull Docker images you would specify the docker module and the pull method combined as docker.pull.Yes
paramsObjectThe parameters for the method. For the supported parameters, see Method parameters.Yes
hostnamesString arrayThe list of node hostnames on which to run the RVC job.Dependent. Only if no node group or saved filter is provided.
node_group_nameStringThe name of the node group on which to run the RVC job. The RVC job will run on all nodes that are members of the node group.Dependent. Only if no hostnames or saved filter is provided.
node_group_idIntegerThe ID of the node group on which to run the RVC job. The RVC job will run on all nodes that are members of the node group.Dependent. Only if no hostnames or saved filter is provided.
saved_filter_nameStringThe name of the saved filter on which to run the RVC job. The RVC job will run on all nodes that match the saved filter.Dependent. Only if no hostnames or node group is provided.
saved_filter_idIntegerThe ID of the saved filter on which to run the RVC job. The RVC job will run on all nodes that match the saved filter.Dependent. Only if no hostnames or node group is provided.

Method parameters

The params object accepts the following parameters.

ParameterTypeDescriptionRequiredDefault value
imagesString arrayThe Docker images to pull.Yes-
strictBooleanIf true, only the docker-image.sh script is used, and the operation fails if the script is not available.Nofalse
verboseBooleanEnables verbose logging output.Notrue
pruneBooleanIf true, removes Docker images that are not in images after pulling.Nofalse
retriesIntegerThe number of pull attempts if a download fails.No3
max_waitIntegerThe maximum random wait time, in seconds, before the pull starts.No0
sleep_between_pullsIntegerThe wait time, in seconds, between pulling each image.No10
stage_imagesBooleanWhether to download (stage) the images in the images list. The script checks each image, skips images that are already present and valid, and pulls the rest, retrying up to retries times. If false, no images are pulled, which is useful with prune to only remove images that are not in the list. Only applies when the docker-image.sh script is used.Notrue
notify_uriStringA URI to which RVC sends progress messages for the operation, including a final message with its exit code.Nonull

Response syntax

When the hostnames request parameter is used, the following response syntax is received.

{
    "id": integer,
    "type": "RVC3",
    "status": "string",
    "message": "string",
    "trigged_by": "string",
    "parameters": {
        "method": "docker.pull",
        "params": {
            "images": [
                "<image>"
            ]
        },
        "update_rpm": boolean,
        "hostnames": [
            "string"
        ]
    },
    "time_started": "timestamp"
}

Response parameters

If the action is successful, an HTTP 200 response is returned. The following data is returned in JSON format.

FieldTypeDescription
idIntegerThe ID of the RVC job.
typeStringThe type of RVC job. For RVC jobs, it is RVC3.
statusStringThe status of the job.
messageStringThis field is reserved for internal use.
trigged_byStringThe username of the person who initiated the job.
parametersObjectThe request parameters indicating the method, method parameters, and the hostnames, node groups, or saved filters the RVC job ran on.
time_startedTimestampThe timestamp indicating when the job started. The timestamp is given in ISO 8601 UTC datetime format.

Errors

For a list of potential errors, see Troubleshooting RVC jobs and Common errors.

Examples

Example 1: Pull a Docker image on a node.

This example pulls the image nginx:latest on the node with hostname sit0001red0.

ruby api.rb <customer_code> POST api/v2/jobs/rvc '{"method":"docker.pull","params":{"images":["nginx:latest"]},"hostnames":["sit0001red0"]}'

Response

{
  "id": 1781992,
  "type": "RVC3",
  "status": "pending",
  "message": null,
  "trigged_by": "test.user",
  "parameters": {
    "method": "docker.pull",
    "params": {
      "images": [
        "nginx:latest"
      ]
    },
    "update_rpm": true,
    "hostnames": [
      "sit0001red0"
    ]
  },
  "time_started": "2026-10-11T21:24:01Z"
}

Example 2: Retrieving the payload from the RVC job.

This example retrieves the payload from RVC job ID 1781992.

ruby api.rb <customer_code> GET "api/jobs/1781992?include_payload=true"

Response

{
  "id": 1781992,
  "type": "RVC3",
  "status": "finished",
  "message": null,
  "trigged_by": "test.user",
  "success_nodes_count": 1,
  "failed_nodes_count": 0,
  "total_nodes_count": 1,
  "parameters": {
    "method": "docker.pull",
    "params": {
      "images": [
        "nginx:latest"
      ]
    },
    "hostnames": [
      "sit0001red0"
    ],
    "update_rpm": true
  },
  "time_started": "2026-10-11T21:24:01Z",
  "time_finished": "2026-10-11T21:24:01Z",
  "payload": {
    "sit0001red0": [
      {
        "result": "Pulling docker images...",
        "timestamp": 1791753841
      }
    ]
  }
}