PUT /teams/{teamId}/tasks/{id}/cover
Define a capa da tarefa (mesma permissao do PATCH da tarefa - autor, admin do canal ou owner/admin do team)
- Access: Team member
- Service:
https://api-workspace.axuz.net
Accepted authentication
sessionCookie— Sessão plena Axuz (cookie de sessão da casa). Sessão restrita é 403 enrollment_required.bearerSession— JWT de acesso da sessão em `Authorization: Bearer`.
200 Task (com cover); 400; 403; 404; 413/422/503 (arquivo).
putTaskCoverHandler — PUT /teams/{t}/tasks/{id}/cover {file_id?, position?}.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
teamId | path | string | yes | |
id | path | string | yes |
Request body
application/json · Required
| Name | Type | Required | Description |
|---|---|---|---|
file_id | string<uuid> | no | |
position | integer | no |
{
"file_id": "00000000-0000-0000-0000-000000000000",
"position": 1
}Responses
200
tarefa atualizada (com cover)
| Name | Type | Required | Description |
|---|---|---|---|
cover | TaskCover | null | no | |
cover.file_id | string<uuid> | yes | |
cover.position | integer | yes | |
cover.content_url | string | yes |
400
corpo vazio/invalido ou position fora de 0..100
401
sem sessao
403
nao-membro, ou membro que nao pode editar a tarefa
404
tarefa invisivel/inexistente/de outro tenant
413
imagem acima de 10 MB
422
arquivo invalido
429
Limite de requisições excedido.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
500
Erro interno. Tente de novo com backoff; reporte o X-Request-Id.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
503
files_api indisponivel
Examples
"Try it" is turned off in this reference. Use the examples with your test credential.
curl
curl -sS -X PUT 'https://api-workspace.axuz.net/teams/TEAM_ID/tasks/ID/cover' \
-H "Authorization: Bearer $AXUZ_TOKEN" \
-H "Content-Type: application/json" \
-d '{"file_id":"00000000-0000-0000-0000-000000000000","position":1}'Node.js
const res = await fetch("https://api-workspace.axuz.net/teams/TEAM_ID/tasks/ID/cover", {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"file_id": "00000000-0000-0000-0000-000000000000",
"position": 1
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());Python
import os
import requests
res = requests.request(
"PUT",
"https://api-workspace.axuz.net/teams/TEAM_ID/tasks/ID/cover",
headers={
"Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
},
json={
"file_id": "00000000-0000-0000-0000-000000000000",
"position": 1,
},
timeout=30,
)
res.raise_for_status()
print(res.json())