Endpoints

All Documents

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

This endpoint provides all documents of a repository.

Path Parameters

NameTypeDescription

repoName

string

The API identifier of the repository

documents

string

The endpoint to query all documents

Headers

NameTypeDescription

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

NameTypeDescription

documents

string

The documents slug

documentId

string

The Id for a document

Headers

NameTypeDescription

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

NameTypeDescription

alias

string

The alias slug

myAliasName

string

The name of the alias (API Id)

Headers

NameTypeDescription

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

NameTypeDescription

repoName

string

The API identifier of the repository

collectionName

string

The API ID for a Collection

Headers

NameTypeDescription

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:

Collections

Single Asset

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

Path Parameters

NameTypeDescription

assets

string

The assets endpoint

assetId

string

The Id for an asset

Headers

NameTypeDescription

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