Skip to content
  • Auto
  • Light
  • Dark

Update

Rollback to Agent Version
client.agents.versions.update(stringpathUuid, VersionUpdateParams { body_uuid, version_hash } body?, RequestOptionsoptions?): VersionUpdateResponse { audit_header, version_hash }
put/v2/gen-ai/agents/{uuid}/versions

To update to a specific agent version, send a PUT request to /v2/gen-ai/agents/{uuid}/versions.

ParametersExpand Collapse
pathUuid: string
body: VersionUpdateParams { body_uuid, version_hash }
body_uuid?: string

Agent unique identifier

version_hash?: string

Unique identifier

ReturnsExpand Collapse
VersionUpdateResponse { audit_header, version_hash }
audit_header?: AuditHeader { actor_id, actor_ip, actor_uuid, 4 more }

An alternative way to provide auth information. for internal use only.

actor_id?: string
actor_ip?: string
actor_uuid?: string
context_urn?: string
origin_application?: string
user_id?: string
user_uuid?: string
version_hash?: string

Unique identifier

Rollback to Agent Version
import Gradient from '@digitalocean/gradient';

const client = new Gradient();

const version = await client.agents.versions.update('"123e4567-e89b-12d3-a456-426614174000"');

console.log(version.audit_header);
{
  "audit_header": {
    "actor_id": "12345",
    "actor_ip": "example string",
    "actor_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "context_urn": "example string",
    "origin_application": "example string",
    "user_id": "12345",
    "user_uuid": "123e4567-e89b-12d3-a456-426614174000"
  },
  "version_hash": "example string"
}
Returns Examples
{
  "audit_header": {
    "actor_id": "12345",
    "actor_ip": "example string",
    "actor_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "context_urn": "example string",
    "origin_application": "example string",
    "user_id": "12345",
    "user_uuid": "123e4567-e89b-12d3-a456-426614174000"
  },
  "version_hash": "example string"
}