POST /teams/{teamId}/tasks/{id}/mirrors/link
Vincula duas tarefas JA existentes como espelhos
- 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`.
source escolhe de quem saem os valores iniciais dos campos sincronizados (self = esta tarefa, other = other_task_id); eles sao propagados aos demais membros no ato.
409: as duas ja sao espelhas entre si; ou ambas ja estao em grupos diferentes (fusao de grupos nao existe na v1). Se so uma tem grupo, a outra entra nele. 422: other_task_id nao acessivel neste team (cross-team, inexistente ou fora do alcance), mesma tarefa, mesmo board, grupo cheio.
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 |
|---|---|---|---|
other_task_id | string<uuid> | yes | |
source | string | no | enum: |
sync_fields | array<string> | no |
{
"other_task_id": "00000000-0000-0000-0000-000000000000",
"source": "self",
"sync_fields": [
"status"
]
}Responses
201
Vinculadas.
| 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 |
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
Erro no formato do servico.
| 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: gates + 1 tx + 1 SELECT. Fluxo: "ligar a tarefa existente" 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/link' \
-H "Authorization: Bearer $AXUZ_TOKEN" \
-H "Content-Type: application/json" \
-d '{"other_task_id":"00000000-0000-0000-0000-000000000000","source":"self","sync_fields":["status"]}'Node.js
const res = await fetch("https://api-workspace.axuz.net/teams/TEAM_ID/tasks/ID/mirrors/link", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"other_task_id": "00000000-0000-0000-0000-000000000000",
"source": "self",
"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/link",
headers={
"Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
},
json={
"other_task_id": "00000000-0000-0000-0000-000000000000",
"source": "self",
"sync_fields": [
"status",
],
},
timeout=30,
)
res.raise_for_status()
print(res.json())