Get Folder Public Link

get

/documents/api/1.2/publiclinks/folder/{folderId}

Return a list of the public links for a specified folder.

Request

Supported Media Types
Path Parameters
Back to Top

Response

Supported Media Types

200 Response

The request was fulfilled.

Body ()
Root Schema : FolderLinksResponse
Type: object
The response body includes information about public links defined for the specified folder.
Show Source
Nested Schema : items
Type: array
List of public links.
Show Source
Nested Schema : PublicLinkDefinition
Type: object
Public link information.
Show Source
Nested Schema : User
Type: object
User information
Show Source
Example Response (application/json)
{
    "count":"2",
    "id":"F4E111D0D0645CD368453C2BT0000000000100000001",
    "type":"folder",
    "errorCode":"0",
    "items":[
        {
            "linkID":"LF31C09DE51854DBBDA37A90T0000000000100000001",
            "linkName":"hasSecondLink",
            "assignedUsers":"@everybody",
            "role":"viewer",
            "type":"publiclink",
            "createdTime":"2015-06-02T19:30:37Z",
            "lastModifiedTime":"2015-06-02T19:30:37Z",
            "ownedBy":{
                "id":"U0EAA20910FAF3052ACB79E4T00000000001",
                "displayName":"User AA",
                "type":"user"
            }
        },
        {
            "linkID":"LF5E5F73A444FFB8924EF8ACT0000000000100000001",
            "linkName":"hasFirstLink",
            "assignedUsers":"@serviceinstance",
            "role":"contributor",
            "type":"publiclink",
            "createdTime":"2015-06-10T16:15:37Z",
            "lastModifiedTime":"2015-06-10T16:15:37Z",
            "ownedBy":{
                "id":"U0EAA20910FAF3052ACB79E4T00000000001",
                "displayName":"User AA",
                "type":"user"
            }
        }
    ]
}

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.

Back to Top

Examples

The following example returns information about public links defined for the specified folder.

GET .../publiclinks/folder/F4E111D0D0645CD368453C2BT0000000000100000001

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 200

JSON Response

{
    "count": "2",
    "errorCode": "0",
    "id": "F4E111D0D0645CD368453C2BT0000000000100000001",
    "type": "folder",
    "items": [
        {
            "type": "publiclink",
            "linkID": "LF31C09DE51854DBBDA37A90T0000000000100000001",
            "linkName": "hasSecondLink",
            "ownedBy": {
		            "displayName": "User AA",
		            "loginName": "userAALoginName",
		            "id": "U0EAA20910FAF3052ACB79E4T00000000001",
		            "type": "user"
            },
            "role": "viewer",
            "assignedUsers": "@everybody",
            "createdTime": "2015-06-02T19:30:37Z",
            "lastModifiedTime": "2015-06-02T19:30:37Z"
        },
        {
            "type": "publiclink",
            "linkID": "LF5E5F73A444FFB8924EF8ACT0000000000100000001",
            "linkName": "hasFirstLink",
            "ownedBy": {
		            "displayName": "User AA",
		            "loginName": "userAALoginName",
		            "id": "U0EAA20910FAF3052ACB79E4T00000000001",
		            "type": "user"
            },
            "role": "contributor",
            "assignedUsers": "@serviceinstance",
            "createdTime": "2015-06-10T16:15:37Z",
            "lastModifiedTime": "2015-06-10T16:15:37Z"
        }
    ]
}

Example 2

The following example returns succesfully, but the folder ID has no public links.

GET .../publiclinks/file/F2CD745706AEC8BD04260B2F45B3E9DD64907CA0D19F

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 200

JSON Response

{
    "count": "0",
    "errorCode": "0",
    "id": "F2CD745706AEC8BD04260B2F45B3E9DD64907CA0D19F",
    "type": "folder"
}

Example 3

The following example returns an error because the folder ID is invalid.

GET .../publiclinks/folder/FDDD745706AEC8BD04260B2F45B3E9DD64907CA0D19F

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 404

JSON Response

{
    "count": "0",
    "errorCode": "-16",
    "errorKey": "!csUnableToRetrieveSharedLinkInfo!csSecurityValidationFailed!csFldDoesNotExist,FDDD745706AEC8BD04260B2F45B3E9DD64907CA0D19F!csUnprivilegedSystemError",
    "errorMessage": "Failed to retrieve shared link information. Security validation failed. 'FDDD745706AEC8BD04260B2F45B3E9DD64907CA0D19F' does not exist. The error was caused by an internally generated issue. The error has been logged.",
    "errorType": "folder",
    "id": "FDDD745706AEC8BD04260B2F45B3E9DD64907CA0D19F",
    "title": "Failed to retrieve shared link information. Security validation failed. 'FDDD745706AEC8BD04260B2F45B3E9DD64907CA0D19F' does not exist. The error was caused by an internally generated issue. The error has been logged.",
    "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Back to Top