Axuz Developers

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

NameInTypeRequiredDescription
teamIdpathstringyes
idpathstringyes

No servico o segmento e {id}; o nome aqui e so descritivo.

Request body

application/json · Required

NameTypeRequiredDescription
other_task_idstring<uuid>yes
sourcestringno

enum: "self", "other"

sync_fieldsarray<string>no
{
  "other_task_id": "00000000-0000-0000-0000-000000000000",
  "source": "self",
  "sync_fields": [
    "status"
  ]
}

Responses

201

Vinculadas.

NameTypeRequiredDescription
groupMirrorGroupyes
group.idstring<uuid>yes
group.sync_fieldsarray<string>yes
group.max_membersintegeryes
group.membersarray<oneOf>yes

400

Erro no formato do servico.

NameTypeRequiredDescription
errorstringyes

401

Erro no formato do servico.

NameTypeRequiredDescription
errorstringyes

403

Erro no formato do servico.

NameTypeRequiredDescription
errorstringyes

404

Erro no formato do servico.

NameTypeRequiredDescription
errorstringyes

409

Erro no formato do servico.

NameTypeRequiredDescription
errorstringyes

422

Erro no formato do servico.

NameTypeRequiredDescription
errorstringyes

429

Rate limit.

NameTypeRequiredDescription
errorstringyes
retry_afterintegerno

500

. Efeito: gates + 1 tx + 1 SELECT. Fluxo: "ligar a tarefa existente" na UI

NameTypeRequiredDescription
errorstringyes

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())