Platform - Runners

Get runners

Retrieves an overview of all runners.

Request

GET /api/v1/platform/infrastructure/runners

Query parameters

Name Type Required Description

q

string

N

An optional query to filter runners by. Maps to an Elasticsearch query_string query.

Responses

200
(RunnerOverview) An overview of all runners.
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/platform/infrastructure/runners \
-u $CLOUD_USER:$CLOUD_KEY

Search runners

Retrieves runners that match a given query.

Request

POST /api/v1/platform/infrastructure/runners/_search

Request body

(SearchRequest) The optional search request to execute. If not supplied then all runners are matched.

Responses

200
(RunnerOverview) An overview of runners that matched the given search query.
400
(BasicFailedReply) The search request failed. (code: runners.search_failed)
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPOST {{hostname}}/api/v1/platform/infrastructure/runners/_search \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "from" : 0,
   "query" : {
      "bool" : {
         "filter" : [
            null
         ],
         "minimum_should_match" : 0,
         "must" : [
            null
         ],
         "must_not" : [
            null
         ],
         "should" : [
            null
         ]
      },
      "exists" : {
         "field" : "string"
      },
      "match" : {
         "some_property" : {
            "analyzer" : "string",
            "minimum_should_match" : 0,
            "operator" : "string",
            "query" : "string"
         }
      },
      "match_all" : {},
      "match_none" : {},
      "nested" : {
         "path" : "string",
         "query" : null,
         "score_mode" : "string"
      },
      "prefix" : {
         "some_property" : {
            "boost" : 0.1,
            "value" : "string"
         }
      },
      "query_string" : {
         "allow_leading_wildcard" : true,
         "analyzer" : "string",
         "default_field" : "string",
         "default_operator" : "string",
         "query" : "string"
      },
      "range" : {
         "some_property" : {
            "boost" : 0.1,
            "format" : "string",
            "gt" : {},
            "gte" : {},
            "lt" : {},
            "lte" : {},
            "time_zone" : "string"
         }
      },
      "term" : {
         "some_property" : {
            "value" : {}
         }
      }
   },
   "size" : 0,
   "sort" : [
      "string"
   ]
}
'

Delete runner

Delete a runner by id.

Request

DELETE /api/v1/platform/infrastructure/runners/{runner_id}

Path parameters

Name Type Required Description

runner_id

string

Y

The identifier for the runner

Responses

200
(EmptyResponse) The runner specified by {runner_id} was deleted.
400
(BasicFailedReply) The runner specified by {runner_id} could not be deleted. (code: runners.runner_deletion_failed)
404
(BasicFailedReply) The runner specified by {runner_id} cannot be found. (code: runners.runner_not_found)
449
(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XDELETE {{hostname}}/api/v1/platform/infrastructure/runners/{runner_id} \
-u $CLOUD_USER:$CLOUD_KEY

Get runner

Retrieves a runner by id.

Request

GET /api/v1/platform/infrastructure/runners/{runner_id}

Path parameters

Name Type Required Description

runner_id

string

Y

The identifier for the runner

Responses

200
(RunnerInfo) The information for the runner specified by {runner_id}.
404
(BasicFailedReply) Unable to find the {runner_id} specified runner. Edit your request, then try again. (code: runners.runner_not_found)
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/platform/infrastructure/runners/{runner_id} \
-u $CLOUD_USER:$CLOUD_KEY

Resynchronize runner

Immediately resynchronizes the search index and cache for the selected runner.

Request

POST /api/v1/platform/infrastructure/runners/{runner_id}/_resync

Path parameters

Name Type Required Description

runner_id

string

Y

The identifier for the runner

Responses

200
(EmptyResponse) The runner resync operation executed successfully
449
(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)
500
(BasicFailedReply) The runner resync operation failed for runner {runner_id}. (code: runners.resync_failed)
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPOST {{hostname}}/api/v1/platform/infrastructure/runners/{runner_id}/_resync \
-u $CLOUD_USER:$CLOUD_KEY

Set runner roles

Set runner roles.

Request

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

Path parameters

Name Type Required Description

runner_id

string

Y

The identifier for the runner

Query parameters

Name Type Required Description

bless

boolean

N

Assigns the runner to the roles.

Request body

(RunnerRolesInfo) (required) The roles for the runner that you want to apply.

Responses

200
(RunnerRolesInfo) The roles for the {runner_id} specified runner are assigned.
400
(BasicFailedReply) There was an error while assigning the roles for the {runner_id} specified runner. Try your request again. (code: runners.runner_set_roles_failed)
404
(BasicFailedReply) Unable to find the {runner_id} specified runner. Edit your request, then try again. (code: runners.runner_not_found)
449
(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPUT {{hostname}}/api/v1/platform/infrastructure/runners/{runner_id}/roles \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "roles" : [
      {
         "role_name" : "string"
      }
   ]
}
'