Set runner roles

PUT /platform/infrastructure/runners/{runner_id}/roles

Set runner roles.

Path parameters

  • runner_id string Required

    The identifier for the runner

Query parameters

  • bless boolean

    Assigns the runner to the roles.

application/json

Body Required

The roles for the runner that you want to apply.

  • roles array[object] Required

    List of roles

    Information about a runner role.

    Hide roles attribute Show roles attribute object
    • role_name string Required

      Name of the role

Responses

  • 200 application/json

    The roles for the {runner_id} specified runner are assigned.

    Hide response attribute Show response attribute object
    • roles array[object] Required

      List of roles

      Information about a runner role.

      Hide roles attribute Show roles attribute object
      • role_name string Required

        Name of the role

  • 400 application/json

    There was an error while assigning the roles for the {runner_id} specified runner. Try your request again. (code: runners.runner_set_roles_failed)

    Hide headers attribute Show headers attribute
    • x-cloud-error-codes string

      The error codes associated with the response

      Value is runners.runner_set_roles_failed.

    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

  • 404 application/json

    Unable to find the {runner_id} specified runner. Edit your request, then try again. (code: runners.runner_not_found)

    Hide headers attribute Show headers attribute
    • x-cloud-error-codes string

      The error codes associated with the response

      Value is runners.runner_not_found.

    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

PUT /platform/infrastructure/runners/{runner_id}/roles
curl \
 --request PUT 'https://{{hostname}}/api/v1/platform/infrastructure/runners/{runner_id}/roles' \
 --user "username:password" \
 --header "Content-Type: application/json" \
 --data '{"roles":[{"role_name":"string"}]}'