Endpoints

All Documents

GET https://api.cmft.io/v1/<repoName>/documents

This endpoint provides all documents of a repository.

Path Parameters

Name
Type
Description

repoName

string

The API identifier of the repository

documents

string

The endpoint to query all documents

Headers

Name
Type
Description

Authorization

string

Provide the API Key in the Authorization Header. For GET requests it can be provided as path parameter.

Single Document

GET https://api.cmft.io/v1/<repoName>/documents/<documentId>

Path Parameters

Name
Type
Description

documents

string

The documents slug

documentId

string

The Id for a document

Headers

Name
Type
Description

Authorization

string

Provide the API Key in the Authorization Header. For GET requests it can be provided as path parameter.

Single Document Alias

GET https://api.comft.io/v1/<repoName>/alias/<myAliasName>

You can create an alias for a single document by linking it in the Content Tree. Once an alias is created, it is possible to switch out the document that's connected to that alias.

Path Parameters

Name
Type
Description

alias

string

The alias slug

myAliasName

string

The name of the alias (API Id)

Headers

Name
Type
Description

Authorization

string

Provide the API Key in the Authorization Header. For GET requests it can be provided as path parameter.

Document Collections

GET https://api.cmft.io/v1/<repoName>/collections/<collectionName>

Path Parameters

Name
Type
Description

repoName

string

The API identifier of the repository

collectionName

string

The API ID for a Collection

Headers

Name
Type
Description

Authorization

string

Provide the API Key in the Authorization Header. For GET requests it can be provided as path parameter.

Document Collections work almost the same as the All Documents endpoint. The key difference is, that collections come a predefined set of documents, matching certain characteristics. These filters can be set in the Comfortable Web Application.

For more info on Collections, see the following page:

Single Asset

GET https://api.cmft.io/v1/<repoName>/assets/<assetId>

Path Parameters

Name
Type
Description

assets

string

The assets endpoint

assetId

string

The Id for an asset

Headers

Name
Type
Description

Authorization

string

Provide the API Key in the Authorization Header. For GET requests it can be provided as path parameter.

When querying documents, addembedAssets=true as URL parameter or as a query option to include assets by default. This eliminates the need to perform single asset queries and reduces the number of API calls. See Example

Last updated