DocumentLibraryTags - Huddle/huddle-apis GitHub Wiki

Summary

This API allows users to see all the tags on the documents in that workspace. There is also an option to see all the tags in a workspace starting with the specific letters. You can obtain a link for this resource from the folder get.

Operations

Retrieving document library tags

Issue a GET request to the workspace-tags URI from the workspace element of a Folder resource or a Document resource.

Example (JSON)

Request

GET /files/workspaces/1234/folders/root/tags HTTP/1.1
Accept: application/vnd.huddle.data+json
Authorization: OAuth2 frootymcnooty/vonbootycherooty

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+json
{
    "links": [
        { "rel": "self", "href": "..." },
        { "rel": "parent", "href": "..." }
    ],
    "tags" : ["tag1", "my tag"]
}

Example (XML)

Request

GET /files/workspaces/1234/folders/root/tags HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+xml
<documentLibraryTags>
    <links>
        <link rel="self" href="..." />
        <link rel="parent" href="..." />
    </links>
    <tags>
        <tag>tag1<tag>
        <tag>my tag<tag>
    </tags>
</documentLibraryTags>

Link relations

Name Description Methods
self The current URI of the document library tags GET
parent The URI of the document library to which these settings pertain GET

Retrieving document library tags with a prefix

Issue a GET request to the workspace-tags URI from the workspace element of a Folder resource or a Document resource with a prefix of my.

Example (JSON)

Request

GET /files/workspaces/1234/folders/root/tags?q=my HTTP/1.1
Accept: application/vnd.huddle.data+json
Authorization: OAuth2 frootymcnooty/vonbootycherooty

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+json
{
    "links": [
        { "rel": "self", "href": "..." },
        { "rel": "parent", "href": "..." }
    ],
    "tags" : [
        { "text" : "my tag"},
        { "text" : "my tag 2"},
    ]
}

Example (XML)

Request

GET /files/workspaces/1234/folders/root/tags?q=my HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+xml
<workspaceTags>
    <links>
        <link rel="self" href="..." />
        <link rel="parent" href="..." />
    </links>
    <tags>    
        <tag text="doms tag" />
        <tag text="doms tag 1" />
    </tags>
</workspaceTags>

Schema

start |= documentLibrarySettings

documentLibrarySettings = element h:documentLibrarySettings {
    element h:links {
        link *
    },
    element h: tags {
        tag *
    }
}
⚠️ **GitHub.com Fallback** ⚠️