How to Update a Robot Account in Vultr Container Registry

Updated on March 20, 2025

A robot account in the Vultr Container Registry automates access control for repositories. Updating a robot account lets you change its description, adjust its expiration duration, manage permissions, and enable or disable access. This ensures that the account stays aligned with security and operational needs, eliminating the need to create a new robot account.

Follow this guide to update a robot account in your container registry on your Vultr account using the Vultr API.

  1. Send a GET request to the List Container Registries endpoint and note the target registry's ID and name.

    console
    $ curl "https://api.vultr.com/v2/registries" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a GET request to the List Robots endpoint to list all the available robots and note the target robot's name.

    console
    $ curl "https://api.vultr.com/v2/registry/{registry-id}/robots" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    

    [!Note] Robot account names contain special characters like $ and +, which must be URL-encoded before making API requests to prevent errors. You can either manually replace $ with %24 and + with %2B in the endpoint or export the robot name as a variable, avoiding the need for manual encoding.

  3. Send a PUT request to the Update Robot endpoint to update target robot details.

    console
    $ curl "https://api.vultr.com/v2/registry/{registry-id}/robot/{robot-name}" \
        -X PUT \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        --data '{
            "description" : "{description}",
            "disable" : false,
            "duration" : 3600,
            "permissions": [
                {
                    "kind": "{level}",
                    "namespace": "{registry-name}",
                    "access": [
                        {
                            "action": "{action-type}",
                            "resource": "{resource-type}",
                            "effect": "{allow-or-deny}"
                        }
                    ]
                }
            ]
        }'
    

Comments

No comments yet.