You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/agent/v3/tokens.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ To create an agent token for a cluster using the Buildkite interface:
49
49
50
50
To [create an agent token](/docs/apis/rest-api/clusters#agent-tokens-create-a-token) using the [REST API](/docs/apis/rest-api), run the following example `curl` command:
51
51
52
-
```curl
52
+
```bash
53
53
curl -H "Authorization: Bearer $TOKEN" \
54
54
-X POST "https://api.buildkite.com/v2/organizations/{org.slug}/clusters/{cluster.id}/tokens" \
55
55
-H "Content-Type: application/json" \
@@ -153,7 +153,7 @@ To update a cluster's agent token using the Buildkite interface:
153
153
154
154
To [update an agent token](/docs/apis/rest-api/clusters#agent-tokens-update-a-token) using the [REST API](/docs/apis/rest-api), run the following example `curl` command:
155
155
156
-
```curl
156
+
```bash
157
157
curl -H "Authorization: Bearer $TOKEN" \
158
158
-X PUT "https://api.buildkite.com/v2/organizations/{org.slug}/clusters/{cluster.id}/tokens/{id}" \
159
159
-H "Content-Type: application/json" \
@@ -253,7 +253,7 @@ To revoke a cluster's agent token using the Buildkite interface:
253
253
254
254
To [revoke an agent token](/docs/apis/rest-api/clusters#agent-tokens-revoke-a-token) using the [REST API](/docs/apis/rest-api), run the following example `curl` command:
Copy file name to clipboardExpand all lines: pages/apis/descriptions/_rest_agent_token_id.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
8
8
* By running the [List tokens](/docs/apis/rest-api/clusters#agent-tokens-list-tokens) REST API query and obtain this value from the `id` in the response associated with the description of your token (specified by the `description` value in the response). For example:
Copy file name to clipboardExpand all lines: pages/apis/descriptions/_rest_cluster_id.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
7
7
* By running the [List clusters](/docs/apis/rest-api/clusters#clusters-list-clusters) REST API query and obtain this value from the `id` in the response associated with the name of your target cluster (specified by the `name` value in the response). For example:
Copy file name to clipboardExpand all lines: pages/apis/descriptions/_rest_cluster_id_body.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
7
7
* By running the [List clusters](/docs/apis/rest-api/clusters#clusters-list-clusters) REST API query and obtain this value from the `id` in the response associated with the name of your target cluster (specified by the `name` value in the response). For example:
Copy file name to clipboardExpand all lines: pages/apis/descriptions/_rest_org_slug.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@
4
4
5
5
* By running the [List organizations](/docs/apis/rest-api/organizations#list-organizations) REST API query to obtain this value from `slug` in the response. For example:
Some API endpoints accept query string parameters which are added to the end of the URL. For example, the [builds listing APIs](/docs/api/builds#list-all-builds) can be filtered by `state` using the following `curl` command:
-X GET "https://api.buildkite.com/v2/organizations/my-org/pipelines/my-pipeline/builds?state=passed"
30
30
```
31
31
32
32
## Request body properties
33
33
34
34
Some API requests accept JSON request bodies for specifying data. For example, the [build create API](/docs/api/builds#create-a-build) can be passed the required properties using the following `curl` command:
35
35
36
-
```
37
-
curl -X POST "https://api.buildkite.com/v2/organizations/my-org/pipelines/my-pipeline/builds" \
36
+
```bash
37
+
curl -H "Authorization: Bearer $TOKEN" \
38
+
-X POST "https://api.buildkite.com/v2/organizations/my-org/pipelines/my-pipeline/builds" \
38
39
-H "Content-Type: application/json" \
39
40
-d '{
40
41
"key": "value"
@@ -45,25 +46,26 @@ The data encoding is assumed to be `application/json`. Unless explicitly stated
45
46
46
47
## Authentication
47
48
48
-
You can authenticate with the Buildkite API using access tokens.
49
+
You can authenticate with the Buildkite API using access tokens, represented by the value `$TOKEN` throughout this documentation.
49
50
50
51
API access tokens allow to call the API without using your username and password. They can be created on your <ahref="<%= url_helpers.user_access_tokens_url %>"rel="nofollow">API access tokens</a> page, limited to individual organizations and permissions, and revoked at any time from the web interface [or the REST API](/docs/apis/rest-api/access-token#revoke-the-current-token).
51
52
52
53
To authenticate using a token, set the <code>Authorization</code> HTTP header to the word <code>Bearer</code>, followed by a space, followed by the access token. For example:
> Access using basic HTTP authentication is no longer available.
60
+
Access using basic HTTP authentication is not supported.
60
61
61
62
## Pagination
62
63
63
64
For endpoints which support pagination, the pagination information can be found in the `Link` HTTP response header containing zero or more of `next`, `prev`, `first` and `last`.
0 commit comments