POST /teams/{teamId}/flowcharts/clone-from-share
Serve POST /teams/{teamId}/flowcharts/clone-from-share — user autenticado (qualquer team onde ele é membro) copia um flowchart compartilh...
- Access: Team member
- Service:
https://api-flow.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`.
Serve POST /teams/{teamId}/flowcharts/clone-from-share — user autenticado (qualquer team onde ele é membro) copia um flowchart compartilhado por link pra sua conta no team escolhido (o {teamId} do path, que a middleware upstream já validou membership).
Motivo (F5.2 aprovado): "se eu compartilhar um link pra alguém logado na axuz, deve dar opção de criar cópia na conta dele". Design: endpoint auth'd sob /teams/{teamId} (piso §14 — só logado, e caller já é validado no team via middleware), evita implementar checagem manual de membership dentro do handler. Share link é público-by-design; quem tem link já pode ler o doc — clonar é o mesmo poder, formalizado como propriedade no team do destinatário.
Entradas: URL {teamId} (target), body {token} (share do source), JWT.
Retorno: 201 Flowchart (novo id no target_team_id). 400 body inválido, 401 sem JWT, 404 token inválido/revogado/gone.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
teamId | path | string | yes |
Request body
Corpo JSON. O schema detalhado deste endpoint ainda não está tipado na spec; veja a descrição da operação.
application/json
| Name | Type | Required | Description |
|---|---|---|---|
(corpo) | object | no |
{}Responses
201
Flowchart (novo id no target_team_id)
400
Body inválido, 401 sem JWT, 404 token inválido/revogado/gone
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
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 |
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-flow.axuz.net/teams/TEAM_ID/flowcharts/clone-from-share' \
-H "Authorization: Bearer $AXUZ_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Node.js
const res = await fetch("https://api-flow.axuz.net/teams/TEAM_ID/flowcharts/clone-from-share", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
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-flow.axuz.net/teams/TEAM_ID/flowcharts/clone-from-share",
headers={
"Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
},
json={},
timeout=30,
)
res.raise_for_status()
print(res.json())