RESTful API
https://api.cmft.io/v1/
URL
CURL
JavaScript
https://api.cmft.io/v1/<repoName>/<endpoint>?key=<apiKey>
curl 'https://api.cmft.io/v1/<repoName>/<endpoint>' \
-H 'Authorization: <apiKey>'
window.fetch('https://api.cmft.io/v1/<repoName>/<endpoint>', {
method: 'get',
headers: {
'Content-Type': 'application/json',
'Authorization': '<apiKey>'
}
})
.then(function (response) { return response.json() })
.then(function (data) {
console.log(data)
})
{
"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"
}
}
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.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.
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
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.
Currently there are just
read-only
keys. Once we've published the write API, we're going to offer different types of keys.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 modified 4yr ago