RESTful API

Introduction

API Base URL

https://api.cmft.io/v1/

Basic Query Structure

https://api.cmft.io/v1/<repoName>/<endpoint>?key=<apiKey>

Example Document Structure

{
  "fields": {
    "title": "Roses are red"
  },
  "meta": {
    "id": "314159265358979323",
    "contentType": "poem",
    "repository": "314159265358979323",
    "revision": 1,
    "tags": [],
    "createdAt": "2018-01-01T00:00:00.000Z",
    "updatedAt": "2018-01-01T00:00:00.000Z"
  }
}

API Keys

The API Key is mandatory and can be included in the Authorization Header or the URL for GET requests. One key is always valid for the associated repository.

Creating API Keys

By default there will be an auto-generated API Key for your repository. However, you can always create additional keys.

  1. Navigate to the 'Settings' page and select the tab 'API Keys'.

  2. On the field below,

  3. Click the 'Create New Key'-Button.

Editing

The keys are generated by our API, therefore you can only change the name you use to describe a keys purpose.

  1. Navigate to the 'Settings' page and select the tab 'API Keys'.

  2. Click the 'Pencil'-Button when hovering a key in the list.

  3. Make your changes.

  4. Confirm by clicking the 'Checkmark'-Button

Revoking or Deleting

You can delete any additional API Keys.

  1. Navigate to the 'Settings' Page and select the tab 'API Keys'.

  2. Click the 'Pencil'-Button when hovering a key in the list.

  3. Click the 'Trashcan'-Button.

  4. Confirm.

Types of Keys

Currently there are just read-only keys. Once we've published the write API, we're going to offer different types of keys.

Usage

The API Key can be either included as Query Parameter in the URL or in the Authorization Header. However when making POST requests, the key must be provided in the Authorization Header.

Last updated