setFolderOrder
FolderWrapper setFolderOrder(folderId, OrderRequestDto)
PUT /api/2.0/files/folder/{folderId}/order
Set folder order
Puts a folder at a given position among the entries of its parent and answers with the folder, its order reporting where it now stands. Positions count from 1, and the entry that held the wanted position, together with everything after it, is shifted to make room, so the numbering of the parent stays without gaps; a position beyond the end places the folder last. The value may also be sent as a dotted path, as in 1.2.3, in which case only its last segment is read. Ordering is what the manual arrangement of a room is built on, and it only means something in rooms whose contents are indexed - elsewhere the value is stored and ignored. The caller needs edit access to the folder, which room managers and content creators have, and a member without it is refused, while a folder that does not exist is answered as not found. The call is mutating and idempotent. To move several entries in one go use PUT api/2.0/files/order.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| folderId | path | Integer (int32) | The folder to move. | [required] [example: 1] |
| OrderRequestDto | body | OrderRequestDto | The position the folder is to take. | [optional] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The folder with the position it now holds | FolderWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 400 | The request body cannot be read, or order is below 1 or is neither a number nor a dotted path ending in one | - | - |
| 403 | The caller may not reorder this folder | - | - |
| 404 | The folder does not exist | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 500 | Internal Server Error. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
Third-party storage
For a file or folder in a connected third-party storage the identifier is a string such as sbox-42, and the call differs in these parts only:
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| folderId | path | String | The folder to move. | [required] [example: sbox-42] |
Return type: ThirdPartyFolderWrapper
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: application/json
- Accept: application/json