POST /teams/{teamId}/tasks/{id}/group-assignments
Atribui um grupo (membros viram marcados). Idempotente (200 se ja atribuido)
- 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`.
201 (novo) ou 200 (já atribuído) GroupAssignment; 400; 404 (tarefa ou grupo inexistente/de outro team); 422 (grupo vazio). Marca os membros que alcançam o canal. Onde: painel de responsáveis da tarefa.
postTaskGroupAssignmentHandler — POST /teams/{t}/tasks/{id}/group-assignments.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
teamId | path | string | yes | |
id | path | string | yes |
Request body
application/json · Required
| Name | Type | Required | Description |
|---|---|---|---|
group_id | string<uuid> | yes | |
mode | string | no | enum: |
{
"group_id": "00000000-0000-0000-0000-000000000000",
"mode": "shared"
}Responses
200
ja estava atribuido
201
atribuido
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string<uuid> | yes | |
group_id | string<uuid> | yes | |
mode | string | yes | enum: |
claimed_by | string<uuid> | null | yes | responsavel efetivo |
claimed_at | string<date-time> | null | yes | |
marked_user_ids | array<string<uuid>> | yes | usuarios hoje marcados por este grupo |
released_user_ids | array<string<uuid>> | no | so no claim exclusive - quem foi liberado |
assigned_by | string<uuid> | yes | |
assigned_at | string<date-time> | yes |
400
invalido
401
Sem credencial valida
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
403
Sem permissao (nao e owner/admin; token sem escopo; token de integracao em rota nao permitida)
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
404
tarefa invisivel ou grupo inexistente/de outro team
422
grupo sem membros (group has no members)
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 |
Examples
"Try it" is turned off in this reference. Use the examples with your test credential.
curl
curl -sS -X POST 'https://api-workspace.axuz.net/teams/TEAM_ID/tasks/ID/group-assignments' \
-H "Authorization: Bearer $AXUZ_TOKEN" \
-H "Content-Type: application/json" \
-d '{"group_id":"00000000-0000-0000-0000-000000000000","mode":"shared"}'Node.js
const res = await fetch("https://api-workspace.axuz.net/teams/TEAM_ID/tasks/ID/group-assignments", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"group_id": "00000000-0000-0000-0000-000000000000",
"mode": "shared"
}),
});
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(
"POST",
"https://api-workspace.axuz.net/teams/TEAM_ID/tasks/ID/group-assignments",
headers={
"Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
},
json={
"group_id": "00000000-0000-0000-0000-000000000000",
"mode": "shared",
},
timeout=30,
)
res.raise_for_status()
print(res.json())