Skip to main content

addFavorites

BooleanWrapper addFavorites(BaseBatchRequestDto)

POST /api/2.0/files/favorites

Add favorite files and folders

Marks the listed files and folders as favorites for the calling account. The favorite list is personal: nothing changes for other members, and the entries stay where they are stored. Read access to each item is enough, so a room member with view-only rights and a guest may call it. Items the caller cannot read, ids that do not exist and encrypted files of a private room are skipped without a word, and the answer is true even when nothing was marked, so read the outcome back from GET api/2.0/files/@favorites instead of trusting it. Numeric ids address entries stored in the portal itself, string ids entries on a connected third-party account, and both kinds may be sent in one request. The call is mutating but safe to repeat: an item already marked stays listed once. An entry moved to the Trash keeps its mark and is left out of the listing until it is restored. returnSingleOperation arrives with the shared body and does nothing here. Use DELETE api/2.0/files/favorites to undo, or GET api/2.0/files/favorites/{fileId} for a single file.

Parameters​

NameInTypeDescriptionNotes
BaseBatchRequestDtobodyBaseBatchRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200Always true: the request was understood, which does not mean that anything was markedBooleanWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read, or a third-party identifier refers to a storage account that is not connected--
403Marking favorites is refused for the caller--
404A third-party identifier names a storage type the portal does not know--
500An id is a number that is not a 32-bit integer, or a third-party identifier carries a storage account number beyond the 32-bit range--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

BooleanWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json