Integrations - Huddle/huddle-apis GitHub Wiki

Summary

The integrations endpoint is used to retrieve information about available integrations on a folder or document. Which integrations are available depends on the account and, if applicable, the type of the document.

We support the following integrations;

Office Online

Document Integrations

Document integrations can be used to view or edit a document using a third party client. The link to this endpoint is advertised on the document response with the @rel value integrations.

Example

Request

GET .../files/integrations/document/123 HTTP/1.1
Accept: application/vnd.huddle.data+json

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+json
{
    "officeOnline": {
        "links": [
            { 
                "rel": "integrations",
                "href": "..."
            }
        ],
        "disabledReasons": []
    }
}

Response - Other (no body)

Status Code Reason
401 Invalid authorization token
404 Document not found

Error Codes - DisabledReasons

These string values are returned to indicate the reason(s) that an specific integration is not available.

Code Reason
ACCOUNT_SETTING_DISABLED -
WORKSPACE_SETTING_DISABLED (or DOC_LIB_SETTING_DISABLED) Workspace setting disabled

Folder Integrations

Folder integrations can be used to determine which integrations are available. The link to this endpoint is advertised on the folder response with the @rel value integrations.

It will return a list of integrations that are available. This is currently only Microsoft Office Online.

If a user can edit the folder, the response contains document template integrations links with a @rel value create for every available mime type.

Example

Request

GET .../files/integrations/folder/123 HTTP/1.1
Accept: application/vnd.huddle.data+json

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+json
{
    "documentTemplates": {
        "links": [{
            "rel": "create",
            "type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
            "href": "..."
        }, {
            "rel": "create",
            "type": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
            "href": "..."
        }, {
            "rel": "create",
            "type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
            "href": "..."
        }]
    },
    "officeOnline": {
        "enabled": true,
        "disabledReasons": []
    }
}

Response - Other (no body)

Status Code Reason
401 Invalid authorization token
404 Folder not found