Create Folder Applink

post

/documents/api/1.1/applinks/folder/{folderId}

Create an applink for a specified folder and a specified user.

You can grant the specified user any standard role except manager or owner:

  • Viewer: Viewers can look at files and folders, but can't change things.
  • Downloader: Downloaders can also download files and save them to their own computers.
  • Contributor: Contributors can also modify files, update files, upload new files, and delete files.

Note:

To create an applink, the requester must have admin privileges for the folder. That is, the requester must be the owner or have the manager role.

Request

Supported Media Types
  • application/json
  • application/xml
Path Parameters
folderId
Type: string
Required: true

Globally unique identifier (GUID) for the folder.

Body Parameter

The request body defines the details of the create applink request. Bold indicates a required value.

Root Schema : ApplinkBody

The request body defines the details of the create applink request. Bold indicates a required value.

Example application/json

{
    "assignedUser":"U0EAA20910FAF3052ACB79E4T00000000001",
    "role":"manager",
    "userLocale":"Dansk",
    "userTimeZone":"Canada/Pacific"
}

Response

Supported Media Types
  • application/json
  • application/xml
200 Response

The request was fulfilled.

Body
The response body includes information about the applink.
Root Schema : ApplinkResponse
The response body includes information about the applink.
Example application/json

{
    "appLinkID":"LFwi1u1E9vZC_3pQhK5C4qxigAC4o1eUuMnv3dZbo6_OiaZx-yte-xIrxWdDJCA_jEgfVHe1At-26KX-M9mi9BaI7B0UX3Gx-QufREHWcHakby0_V9n8_C1pT7P_CKYlSqFU0rudQ8Q81M67-3fLffMA==",
    "accessToken":"_qVnD42Et8KwZrBUqveiqn1sw-RLpfZQdIPPi_fd17-gt60FP6-IuCApyLFw32EL",
    "refreshToken":"ctOCKm4mtpayp__jUlQsfdFEd52vSn2Pd4QxOTcSZ1Wch0f9JP7EFSaXmDLKZdql",
    "appLinkUrl":"http://www.example.com/documents/embed/link/app/LFwi1u1E9vZC_3pQhK5C4qxigAC4o1eUuMnv3dZbo6_OiaZx-yte-xIrxWdDJCA_jEgfVHe1At-26KX-M9mi9BaI7B0UX3Gx-QufREHWcHakby0_V9n8_C1pT7P_CKYlSqFU0rudQ8Q81M67-3fLffMA==/folder/F3399E673E5B93B3774531E7T0000000000100000001",
    "role":"viewer",
    "id":"F3399E673E5B93B3774531E7T0000000000100000001",
    "type":"applink",
    "errorCode":"0"
}
400 Response

Request parameters are not formatted correctly.

403 Response

Forbidden if the user does not have read permission.

404 Response

Folder ID is not found.

Examples

The following example grants viewer-level access (the default) to the specified user for the specified folder.

POST .../applinks/folder/F3399E673E5B93B3774531E7T0000000000100000001

Request Header

None.

Request Body

{
    "assignedUser": "U0EAA20910FAF3052ACB79E4T00000000001",
    "userLocale": "Japanese"
}

HTTP Status Code

HTTP_STATUS = 200

JSON Response

{
    "accessToken": "_qVnD42Et8KwZrBUqveiqn1sw-RLpfZQdIPPi_fd17-gt60FP6-IuCApyLFw32EL",
    "appLinkID": "LFwi1u1E9vZC_3pQhK5C4qxigAC4o1eUuMnv3dZbo6_OiaZx-yte-xIrxWdDJCA_jEgfVHe1At-26KX-M9mi9BaI7B0UX3Gx-QufREHWcHakby0_V9n8_C1pT7P_CKYlSqFU0rudQ8Q81M67-3fLffMA==",
    "appLinkUrl": "http://www.example.com/documents/embed/link/app/LFwi1u1E9vZC_3pQhK5C4qxigAC4o1eUuMnv3dZbo6_OiaZx-yte-xIrxWdDJCA_jEgfVHe1At-26KX-M9mi9BaI7B0UX3Gx-QufREHWcHakby0_V9n8_C1pT7P_CKYlSqFU0rudQ8Q81M67-3fLffMA==/folder/F3399E673E5B93B3774531E7T0000000000100000001",
    "errorCode": "0",
    "id": "F3399E673E5B93B3774531E7T0000000000100000001",
    "refreshToken": "ctOCKm4mtpayp__jUlQsfdFEd52vSn2Pd4QxOTcSZ1Wch0f9JP7EFSaXmDLKZdql",
    "role": "viewer",
    "type": "applink"
}