mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(coderd): use new data model for task delete (#20334)
Updates coder/internal#976
This commit is contained in:
Generated
+12
-12
@@ -84,19 +84,19 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X GET http://coder-server:8080/api/v2/api/experimental/tasks/{user}/{id} \
|
||||
curl -X GET http://coder-server:8080/api/v2/api/experimental/tasks/{user}/{task} \
|
||||
-H 'Accept: */*' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`GET /api/experimental/tasks/{user}/{id}`
|
||||
`GET /api/experimental/tasks/{user}/{task}`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
|--------|------|--------------|----------|-------------------------------------------------------|
|
||||
| `user` | path | string | true | Username, user ID, or 'me' for the authenticated user |
|
||||
| `id` | path | string(uuid) | true | Task ID |
|
||||
| `task` | path | string(uuid) | true | Task ID |
|
||||
|
||||
### Example responses
|
||||
|
||||
@@ -116,18 +116,18 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X DELETE http://coder-server:8080/api/v2/api/experimental/tasks/{user}/{id} \
|
||||
curl -X DELETE http://coder-server:8080/api/v2/api/experimental/tasks/{user}/{task} \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`DELETE /api/experimental/tasks/{user}/{id}`
|
||||
`DELETE /api/experimental/tasks/{user}/{task}`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
|--------|------|--------------|----------|-------------------------------------------------------|
|
||||
| `user` | path | string | true | Username, user ID, or 'me' for the authenticated user |
|
||||
| `id` | path | string(uuid) | true | Task ID |
|
||||
| `task` | path | string(uuid) | true | Task ID |
|
||||
|
||||
### Responses
|
||||
|
||||
@@ -143,19 +143,19 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X GET http://coder-server:8080/api/v2/api/experimental/tasks/{user}/{id}/logs \
|
||||
curl -X GET http://coder-server:8080/api/v2/api/experimental/tasks/{user}/{task}/logs \
|
||||
-H 'Accept: */*' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`GET /api/experimental/tasks/{user}/{id}/logs`
|
||||
`GET /api/experimental/tasks/{user}/{task}/logs`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
|--------|------|--------------|----------|-------------------------------------------------------|
|
||||
| `user` | path | string | true | Username, user ID, or 'me' for the authenticated user |
|
||||
| `id` | path | string(uuid) | true | Task ID |
|
||||
| `task` | path | string(uuid) | true | Task ID |
|
||||
|
||||
### Example responses
|
||||
|
||||
@@ -175,12 +175,12 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X POST http://coder-server:8080/api/v2/api/experimental/tasks/{user}/{id}/send \
|
||||
curl -X POST http://coder-server:8080/api/v2/api/experimental/tasks/{user}/{task}/send \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`POST /api/experimental/tasks/{user}/{id}/send`
|
||||
`POST /api/experimental/tasks/{user}/{task}/send`
|
||||
|
||||
> Body parameter
|
||||
|
||||
@@ -195,7 +195,7 @@ curl -X POST http://coder-server:8080/api/v2/api/experimental/tasks/{user}/{id}/
|
||||
| Name | In | Type | Required | Description |
|
||||
|--------|------|----------------------------------------------------------------|----------|-------------------------------------------------------|
|
||||
| `user` | path | string | true | Username, user ID, or 'me' for the authenticated user |
|
||||
| `id` | path | string(uuid) | true | Task ID |
|
||||
| `task` | path | string(uuid) | true | Task ID |
|
||||
| `body` | body | [codersdk.TaskSendRequest](schemas.md#codersdktasksendrequest) | true | Task input request |
|
||||
|
||||
### Responses
|
||||
|
||||
Reference in New Issue
Block a user