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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
teamId | path | string | yes | |
id | path | string | yes |
Request body
application/json · Required
| Name | Type | Required | Description |
|---|---|---|---|
name | string | no | |
parent_id | string | no |
{
"name": "string",
"parent_id": "string"
}Responses
200
Atualizado
| Name | Type | Required | Description |
|---|---|---|---|
id | string<uuid> | yes | |
team_id | string<uuid> | null | yes | |
parent_id | string<uuid> | null | no | |
name | string | yes | |
created_by | string<uuid> | yes | |
created_at | string<date-time> | yes |
400
Payload/params inválidos
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes | Chave/slug do erro |
message | string | no |
401
Sem credencial valida
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
404
Recurso ausente
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes | Chave/slug do erro |
message | string | no |
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 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())