setFolderPrimaryExternalLink
FileShareWrapper setFolderPrimaryExternalLink(id, FolderLinkRequest)
PUT /api/2.0/files/folder/{id}/links
Set the folder external link
Creates an external link to a folder or a room, or changes or revokes an existing one, and answers with the link as it now stands. linkId decides which: an identifier that is not yet in use, the empty one included, creates a link, while the identifier of an existing link rewrites it, so the whole set of parameters is applied every time and a field left out is reset rather than kept. access carries the rights the link grants, and access set to the value that denies everything revokes the link instead - the answer is then empty, and a revoked primary link is not recreated by a later read. title names the link for the people who manage it, expirationDate limits its lifetime and is ignored when it lies in the past, password asks visitors for a secret, denyDownload leaves them with viewing only, internal admits signed-in members alone, and primary=true makes it the primary link of the folder. The caller needs the right to manage the links of the room, which its manager and a portal administrator acting as room manager have; anyone else is refused and an unknown folder is answered as not found. The call is mutating.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| id | path | Integer (int32) | The folder or room the link belongs to. | [required] [example: 1] |
| FolderLinkRequest | body | FolderLinkRequest | The link and the way it is to be shaped. | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The link as it now stands, or nothing when it was revoked | FileShareWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 400 | The title or password is longer than 255 characters, the password does not meet the portal password policy, or expirationDate lies more than 10 years ahead | - | - |
| 403 | The caller may not manage the links of this folder, the access level is not available for links to this folder, the link limit is reached, or the admin's restriction on external links forbids the change | - | - |
| 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 |
|---|---|---|---|---|
| id | path | String | The folder or room the link belongs to. | [required] [example: sbox-42] |
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: application/json
- Accept: application/json