mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
feat(coderd): add endpoint to list provisioner daemons (#16028)
Updates #15190 Updates #15084 Supersedes #15940
This commit is contained in:
committed by
GitHub
parent
d7809ecf3f
commit
071bb26018
Generated
+104
@@ -0,0 +1,104 @@
|
||||
# Provisioning
|
||||
|
||||
## Get provisioner daemons
|
||||
|
||||
### Code samples
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/provisionerdaemons \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`GET /organizations/{organization}/provisionerdaemons`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
|----------------|-------|--------------|----------|------------------------------------------------------------------------------------|
|
||||
| `organization` | path | string(uuid) | true | Organization ID |
|
||||
| `tags` | query | object | false | Provisioner tags to filter by (JSON of the form {'tag1':'value1','tag2':'value2'}) |
|
||||
|
||||
### Example responses
|
||||
|
||||
> 200 Response
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"api_version": "string",
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"current_job": {
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"status": "pending"
|
||||
},
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5",
|
||||
"key_name": "string",
|
||||
"last_seen_at": "2019-08-24T14:15:22Z",
|
||||
"name": "string",
|
||||
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
|
||||
"previous_job": {
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"status": "pending"
|
||||
},
|
||||
"provisioners": [
|
||||
"string"
|
||||
],
|
||||
"status": "offline",
|
||||
"tags": {
|
||||
"property1": "string",
|
||||
"property2": "string"
|
||||
},
|
||||
"version": "string"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
|--------|---------------------------------------------------------|-------------|-----------------------------------------------------------------------------|
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.ProvisionerDaemon](schemas.md#codersdkprovisionerdaemon) |
|
||||
|
||||
<h3 id="get-provisioner-daemons-responseschema">Response Schema</h3>
|
||||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|---------------------|--------------------------------------------------------------------------------|----------|--------------|------------------|
|
||||
| `[array item]` | array | false | | |
|
||||
| `» api_version` | string | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» current_job` | [codersdk.ProvisionerDaemonJob](schemas.md#codersdkprovisionerdaemonjob) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» status` | [codersdk.ProvisionerJobStatus](schemas.md#codersdkprovisionerjobstatus) | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» key_id` | string(uuid) | false | | |
|
||||
| `» key_name` | string | false | | Optional fields. |
|
||||
| `» last_seen_at` | string(date-time) | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» organization_id` | string(uuid) | false | | |
|
||||
| `» previous_job` | [codersdk.ProvisionerDaemonJob](schemas.md#codersdkprovisionerdaemonjob) | false | | |
|
||||
| `» provisioners` | array | false | | |
|
||||
| `» status` | [codersdk.ProvisionerDaemonStatus](schemas.md#codersdkprovisionerdaemonstatus) | false | | |
|
||||
| `» tags` | object | false | | |
|
||||
| `»» [any property]` | string | false | | |
|
||||
| `» version` | string | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Property | Value |
|
||||
|----------|-------------|
|
||||
| `status` | `pending` |
|
||||
| `status` | `running` |
|
||||
| `status` | `succeeded` |
|
||||
| `status` | `canceling` |
|
||||
| `status` | `canceled` |
|
||||
| `status` | `failed` |
|
||||
| `status` | `offline` |
|
||||
| `status` | `idle` |
|
||||
| `status` | `busy` |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
Reference in New Issue
Block a user