Axuz Developers

POST /me/files/{fileID}/share-links

Criar share-link pessoal (Fase 139)

  • Acesso: Login
  • Serviço: https://files-api.axuz.net

Autenticação aceita

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

— POST /me/files/{fileID}/share-links. Cria share link pra file do drive pessoal (team_id NULL). Mesma mecânica de team share, mas audit vai só pra stdout (não há team_id pra audit_events). Efeito: SELECT + INSERT + log.

Parâmetros

NomeEmTipoObrigatórioDescrição
fileIDpathstringsim

Corpo da requisição

application/json · Obrigatório

NomeTipoObrigatórioDescrição
passwordstringnão
allow_downloadbooleannão
expires_in_hoursintegernão
{
  "password": "string",
  "allow_download": false,
  "expires_in_hours": 1
}

Respostas

201

Criado

NomeTipoObrigatórioDescrição
idstring<uuid>sim
team_idstring<uuid> | nullnão

NULL em drive pessoal.

file_idstring<uuid>sim
tokenstringsim

Opaco (32B base64url ≈ 43 chars) OU UUID legacy. Vazio quando token_redacted=true.

token_redactedbooleannão

W-012 S-2 — true quando a listagem omitiu o token por o caller não ser quem criou o link.

has_passwordbooleansim
allow_downloadbooleansim
access_countintegersim
last_access_atstring<date-time> | nullnão
expires_atstring<date-time> | nullnão
created_bystring<uuid>sim
created_atstring<date-time>sim
revoked_atstring<date-time> | nullnão
public_urlstringnão

URL público completa resolvida server-side (host share.axuz.club ou similar).

401

Sem credencial valida

NomeTipoObrigatórioDescrição
errorstringsim

429

Limite de requisições excedido.

NomeTipoObrigatórioDescrição
errorstringsim

500

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

NomeTipoObrigatórioDescrição
errorstringsim

Exemplos

O "Try it" está desligado nesta referência. Use os exemplos com a sua credencial de teste.

curl

curl -sS -X POST 'https://files-api.axuz.net/me/files/FILE_ID/share-links' \
  -H "Authorization: Bearer $AXUZ_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"password":"string","allow_download":false,"expires_in_hours":1}'

Node.js

const res = await fetch("https://files-api.axuz.net/me/files/FILE_ID/share-links", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "password": "string",
    "allow_download": false,
    "expires_in_hours": 1
  }),
});
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://files-api.axuz.net/me/files/FILE_ID/share-links",
    headers={
        "Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
    },
    json={
        "password": "string",
        "allow_download": False,
        "expires_in_hours": 1,
    },
    timeout=30,
)
res.raise_for_status()
print(res.json())