Overview
DDM's built-in external sources fetch documents from SharePoint, Google Drive, OneDrive, FTP or an HTTP interface. Some systems have no built-in connector: a PIM, an ERP, a DMS, your own application. For those there is the integration API. It is an HTTP/JSON interface that your developers, or the developers of the other system, call themselves.
It works in two directions:
| Direction | What another system does | Typical use |
|---|---|---|
| Push | Sends documents to DDM, and creates, changes and deletes them along with their categories, tags and titles | A PIM pushes every data sheet as a PDF after each release |
| Consume | Reads documents, categories and files from DDM | A script copies all released price lists to the website every night |
/api/cmws/v1 with your old keys – see Moving from CMWS.The basics
- Address:
https://<your CMS address>/api/ext/v1. Settings › API access shows the exact address and has a copy button. - Format: JSON. Files are uploaded as
multipart/form-data. - Authentication: with an API key, sent as
Authorization: Bearer ddm_…. See Authentication. - Permissions: a key acts as one person in your organisation and has exactly that person's permissions. It can see and change exactly what that person can see and change in the CMS.
- Reference: the complete description is an OpenAPI document. You can import it into Postman, Insomnia or a client generator.
A first request
curl https://ddm.example.com/api/ext/v1/documents?limit=5 \
-H "Authorization: Bearer $DDM_API_KEY"
const response = await fetch('https://ddm.example.com/api/ext/v1/documents?limit=5', {
headers: { Authorization: `Bearer ${process.env.DDM_API_KEY}` }
})
const { data, nextCursor } = await response.json()
import os, requests
response = requests.get(
"https://ddm.example.com/api/ext/v1/documents",
params={"limit": 5},
headers={"Authorization": f"Bearer {os.environ['DDM_API_KEY']}"},
)
page = response.json()
$headers = @{ Authorization = "Bearer $env:DDM_API_KEY" }
Invoke-RestMethod -Uri "https://ddm.example.com/api/ext/v1/documents?limit=5" -Headers $headers
Connector or API?
| Built-in connector | Integration API | |
|---|---|---|
| Who does the work | DDM fetches on a schedule | The other system calls DDM |
| Setup | Settings only | Somebody writes the calls |
| When a change arrives | At the next sync | As soon as the other system sends it |
| Taking content out of DDM | – | Yes |
If DDM already has a connector for your system, use the connector. Use the API when there is none, when changes have to arrive immediately, or when content has to go from DDM into another system.
Stability
Within v1, changes are only additions: new endpoints, new optional fields, new fields in responses. Existing fields keep their names and meaning. A program should ignore fields it does not know. A breaking change would come as v2, running alongside v1. All changes are listed in the changelog.