File Manager Rename File
PATCH /v1/file-manager/files/{document_id}
This operation can change data. Use resources you control.
Request fields
| Field | Location | Type | Required |
|---|---|---|---|
document_id | path | string | Required |
api_key_id | body | string | null | Optional |
api_key_name | body | string | null | Optional |
file_name | body | string | Required |
Examples
Use the environment settings from Quickstart. Replace sample resource IDs with your own. The examples show the required request shape.
import { MaxClient } from "@elmax/api";
const max = new MaxClient({
baseURL: process.env.MAX_API_URL,
apiKey: process.env.MAX_API_KEY,
});
const result = await max.api.patchV1FileManagerFilesDocumentId({
"path": {
"document_id": "doc_example"
},
"body": {
"file_name": "example"
}
});
console.log(result);import os
from elmax_ai import MaxClient
with MaxClient(base_url=os.environ["MAX_API_URL"], api_key=os.environ["MAX_API_KEY"]) as max:
result = max.api.patch_v1_file_manager_files_document_id(**{'path': {'document_id': 'doc_example'}, 'body': {'file_name': 'example'}})
print(result)