Skip to main content
POST
/
entry
/
getAvailableName
curl -X POST https://app.drime.cloud/api/v1/entry/getAvailableName \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "report.pdf",
    "parentId": null,
    "workspaceId": 0
  }'
{
  "name": "report (1).pdf"
}

Overview

When a file with the same name already exists, this endpoint suggests an alternative filename by appending a counter (e.g., “file.txt” becomes “file (1).txt”).

Request Body

name
string
required
Original filename that needs an alternative
parentId
integer
Parent folder ID where the file will be uploaded. Use null for root.
workspaceId
integer
Workspace ID

Response

name
string
Suggested alternative filename with counter
curl -X POST https://app.drime.cloud/api/v1/entry/getAvailableName \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "report.pdf",
    "parentId": null,
    "workspaceId": 0
  }'
{
  "name": "report (1).pdf"
}
Use this in conjunction with /uploads/validate to handle duplicate files gracefully.