Skip to main content
Infrastructure/Agents

ApplyLabelTemplate

Apply a label template to a selection of agents with optional dry run support

POST/api/v1/agent/label-templates/{id}/apply

Operation ID

ApplyLabelTemplate

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

Path Parameters

  • id
    StringRequired

    UUID of the label template to apply

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)

  • dryRun
    BooleanRequired

    If true, simulate the operation without persisting changes

    Example: false

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • affectedCount
    Integer

    Number of agents that received the template labels

    Example: 30

  • affectedUuids
    List

    Affected uuids

    Example: item1,item2

  • dryRun
    Boolean

    Whether this was a dry run without actual persistence

    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