Skip to main content
Infrastructure/Agents

BatchUpdateLabels

Apply batch label add, remove, or replace operations across a set of selected agents

POST/api/v1/agent/labels/batch

Operation ID

BatchUpdateLabels

Since

1.0.0

Execution Mode

Synchronous

Auth Context

Auth Required

Auth Context

Send these values as request headers when calling this API.

AuthorizationstringRequired

Bearer Token

X-Tenant-IDstring

X-Tenant-ID

Request Inputs

application/json

Body Fields

  • selector
    ObjectRequired

    Selector for this resource

    • uuids
      List

      Uuids for this resource

      Example: item1,item2

    • type
      String

      Filter agents by type

      Example: log

    • region
      String

      Filter agents by deployment region

      Example: us-east-1

    • labelMatch
      LinkedHashMap

      Label matching criteria for agent selection

      Example: (nested object)

  • operation
    StringRequired

    Label operation to perform: add, remove, or replace

    Example: add

  • labels
    LinkedHashMapRequired

    Key-value labels attached to this resource

    Example: (nested object)

  • dryRun
    BooleanRequired

    If true, simulate the operation without applying changes

    Example: false

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • affectedCount
    Integer

    Number of agents whose labels were updated

    Example: 42

  • affectedUuids
    List

    Affected uuids

    Example: item1,item2

  • dryRun
    Boolean

    Whether this was a dry run without actual changes

    Example: false

  • errors
    List

    Errors for this resource

    Example: (nested array)

    • agentUuid
      String

      UUID of the agent where the label operation failed

      Example: agent-abc123-def456

    • error
      String

      Description of the error that occurred

      Example: agent not found