Rename
Update the display name of a document attached to a slot. Renames are rejected on cancelled slots. Renaming to the same name is a no-op (no history event recorded). Returns the updated document.
Authentication is token based. You can issue a token for your API request from the 'API' section of the settings menu. The token MUST be sent in a Authorization header with each request.
Example of authenticated request
$ curl -X GET -H "Authorization: Token <your token>" "https://api.dashdoc.eu/api/v4/"
The slug identifier of the site
The unique identifier of the slot
The unique identifier of the document
The new display name (1 to 255 characters, trimmed).
Document renamed successfully
Unique identifier for the document
Unique identifier of the slot the document is attached to
Display name of the document
URL of the uploaded file
File size in bytes
Upload timestamp in ISO 8601 format
Bad request. The slot_cancelled state error is returned with its
named code under non_field_errors. Structural input errors
(missing name, blank name, name over 255 chars) return the
umbrella shape: non_field_errors with code: ["invalid_input"]
and one detail entry per offending field, formatted as
"<dotted-loc>: <message>" (e.g. "name: Field required").
Site, slot or document not found.
Last updated
Was this helpful?