POST /teams/{teamId}/tasks/{id}/mirrors
Cria a tarefa-espelho em outro board
- 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`.
Cria uma tarefa NOVA em board_id (copia inicial de titulo, descricao, prazo, prioridade e status da origem) e a junta ao grupo da origem; o grupo e criado se ainda nao existir. column_id opcional (default: primeira coluna do board). sync_fields so vale ao CRIAR o grupo; com o grupo ja existente, envie-o por PATCH /mirror-groups/{id} (422 se vier junto).
422 quando: board_id nao esta acessivel NESTE team (outro team ou inexistente ou fora do alcance: mesma resposta, sem oraculo); column_id nao e do board; board sem colunas; grupo cheio (10); o board ja tem membro neste grupo.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
teamId | path | string | yes | |
id | path | string | yes | No servico o segmento e |
Request body
application/json · Required
| Name | Type | Required | Description |
|---|---|---|---|
board_id | string<uuid> | yes | |
column_id | string<uuid> | null | no | |
sync_fields | array<string> | no |
{
"board_id": "00000000-0000-0000-0000-000000000000",
"column_id": "00000000-0000-0000-0000-000000000000",
"sync_fields": [
"status"
]
}Responses
201
Espelho criado.
| Name | Type | Required | Description |
|---|---|---|---|
group | MirrorGroup | yes | |
group.id | string<uuid> | yes | |
group.sync_fields | array<string> | yes | |
group.max_members | integer | yes | |
group.members | array<oneOf> | yes | |
task | object | yes | A tarefa-espelho criada (mesmo shape de |
400
Erro no formato do servico.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
401
Erro no formato do servico.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
403
Erro no formato do servico.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
404
Erro no formato do servico.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
409
(grupo mudou na corrida)
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
422
Erro no formato do servico.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
429
Rate limit.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes | |
retry_after | integer | no |
500
. Efeito: gate + 1 tx + 2 SELECT. Fluxo: "espelhar em outro board" na UI
| 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/mirrors' \
-H "Authorization: Bearer $AXUZ_TOKEN" \
-H "Content-Type: application/json" \
-d '{"board_id":"00000000-0000-0000-0000-000000000000","column_id":"00000000-0000-0000-0000-000000000000","sync_fields":["status"]}'Node.js
const res = await fetch("https://api-workspace.axuz.net/teams/TEAM_ID/tasks/ID/mirrors", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"board_id": "00000000-0000-0000-0000-000000000000",
"column_id": "00000000-0000-0000-0000-000000000000",
"sync_fields": [
"status"
]
}),
});
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/mirrors",
headers={
"Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
},
json={
"board_id": "00000000-0000-0000-0000-000000000000",
"column_id": "00000000-0000-0000-0000-000000000000",
"sync_fields": [
"status",
],
},
timeout=30,
)
res.raise_for_status()
print(res.json())