Axuz Developers

PATCH /teams/{teamId}/files/folders/{id}

Renomear e/ou mover folder

  • Access: Signed in
  • Service: https://files-api.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`.

Omitido → não altera; string vazia em parent_id → move pra raiz; UUID → move sob esse parent. Cycle check rejeita mover pasta sob própria descendente (400 cannot move folder under its own descendant).

Parameters

NameInTypeRequiredDescription
teamIdpathstringyes
idpathstringyes

Request body

application/json · Required

NameTypeRequiredDescription
namestringno
parent_idstringno
{
  "name": "string",
  "parent_id": "string"
}

Responses

200

Atualizado

NameTypeRequiredDescription
idstring<uuid>yes
team_idstring<uuid> | nullyes
parent_idstring<uuid> | nullno
namestringyes
created_bystring<uuid>yes
created_atstring<date-time>yes

400

Payload/params inválidos

NameTypeRequiredDescription
errorstringyes

Chave/slug do erro

messagestringno

401

Sem credencial valida

NameTypeRequiredDescription
errorstringyes

404

Recurso ausente

NameTypeRequiredDescription
errorstringyes

Chave/slug do erro

messagestringno

429

Limite de requisições excedido.

NameTypeRequiredDescription
errorstringyes

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 PATCH 'https://files-api.axuz.net/teams/TEAM_ID/files/folders/ID' \
  -H "Authorization: Bearer $AXUZ_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","parent_id":"string"}'

Node.js

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