Axuz Developers

POST /teams/{teamId}/tasks/{id}/external-assignees

Atribui a task a uma pessoa externa

  • 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`.

Maximo de 25 externos ativos por task (422 too many external assignees). Emite o evento task.external_assignee.added.

Parameters

NameInTypeRequiredDescription
teamIdpathstringyes
idpathstringyes

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

Request body

application/json · Required

NameTypeRequiredDescription
namestringyes

Apos trim; contado em caracteres.

organizationstring | nullno
show_on_publicbooleanno
{
  "name": "string",
  "organization": "string",
  "show_on_public": true
}

Responses

201

Criado.

NameTypeRequiredDescription
idstring<uuid>yes
task_idstring<uuid>yes
namestringyes
organizationstring | nullyes
show_on_publicbooleanyes
created_bystring<uuid>yes
created_atstring<date-time>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

422

Erro no formato do servico.

NameTypeRequiredDescription
errorstringyes

429

Rate limit.

NameTypeRequiredDescription
errorstringyes
retry_afterintegeryes

500

Erro interno. Tente de novo com backoff; reporte o X-Request-Id.

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/external-assignees' \
  -H "Authorization: Bearer $AXUZ_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","organization":"string","show_on_public":true}'

Node.js

const res = await fetch("https://api-workspace.axuz.net/teams/TEAM_ID/tasks/ID/external-assignees", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "string",
    "organization": "string",
    "show_on_public": true
  }),
});
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/external-assignees",
    headers={
        "Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
    },
    json={
        "name": "string",
        "organization": "string",
        "show_on_public": True,
    },
    timeout=30,
)
res.raise_for_status()
print(res.json())