Move a directory.
Move this directory, with its subdirectories and documents, under another parent.
Document ids stay the same. The directory and its subdirectories receive new ids when
the subtree holds documents, because Galilea re-creates the tree at its new place;
the answer carries the new id in directory. An integration that stored directory
ids reads them again after a move.
This is the same operation the Galilea application performs when a folder is dragged
elsewhere. It sits next to the rename as a resource of its own rather than inside it,
because the move of a large folder is not atomic: documents are re-homed one by one,
and the answer reports whether all of them made it. partialFailure lists the items
left behind; repeating the call moves the rest.
Not movable: the tenant root, the personal directory of a user, and a directory into one of its own descendants.
Requires edit permission on the directory's current parent and on the destination.
apiKeyX-API-Key<token>API key issued in the Galilea settings.
directoryId*stringThe id of the directory to move, as returned by GET /directories.
uuidapplication/json- body
Request body of POST /directories/{directoryId}/relocation.
destination*stringThe directory that becomes the new parent.
uuidThe relocation was carried out; result says how completely.
application/json- response
Answer of POST /directories/{directoryId}/relocation. The move of a large folder re-homes its documents
one by one, so the answer says how completely it went rather than only that it was
accepted.
directory*stringThe id of the moved directory at its new place; a new id when the subtree held documents.
uuiddestination*stringuuidstatus*string- success: everything moved.
- partialFailure: the directory moved, some items inside did not;
failedItemsnames them. Repeating the call with the same body moves the rest. - failure: nothing moved.
"success""partialFailure""failure"failedItems?array<>Present for partialFailure: the documents and subdirectories that stayed behind.
curl -X POST "https://example.com/directories/5491d698-d876-4e72-bceb-f6259c10ce9c/relocation" \ -H "Content-Type: application/json" \ -d '{ "destination": "e3695881-69e3-4482-898e-7bc34f6364db" }'{ "directory": "5277859d-f92c-478c-acab-7680a97fea68", "destination": "5332a938-399a-405c-8866-445d97d52324", "status": "success", "failedItems": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "path": [ "string" ] } ]}