REST API
Data exchangeThe video is narrated in German; you can switch on subtitles in the player. Playing the video connects to YouTube (Google). More in the privacy policy · Watch on YouTube
The REST API v1 opens ETRM to your own programs: write test results back from test automation, mirror requirements into another tool, create a baseline before a release or include metrics in a project report.
Requirement: subscription
The REST API requires the ETRM API add-on, which you book in addition to your own active Single or Team subscription. It applies to your account; members of a Team group book it with their own Single subscription. Without both subscriptions, the API responds with status 403 and the error code subscription_required. Your keys are kept and become valid again as soon as the subscriptions are active.
Creating an access key
- Open Account → API access.
- Enter a name, for example “test automation”, and decide whether the key may write.
- Copy the displayed key immediately. It is shown only this once; ETRM does not store the key itself, only a check value (hash).
A key acts with your rights in the groups: it sees the same projects and may do the same as you in the user interface. Without write permission it can only read. You revoke keys that are no longer needed or were passed on by mistake on the same page; they lose access immediately.
What the API can do
| Area | read | write |
|---|---|---|
| Projects | list, configuration (types, attributes with values, link types), modules | – |
| Artifacts | list with filters (type, module, tag, full text, attributes, changed since), single with links | create (also in a module below a heading), change, move to trash |
| Tags | project list, tags of an artifact, filter in the artifact list | add to artifacts (also to several at once), remove, delete unused ones (group admins only; baselines and history keep the names) |
| Links | list with filters (type, artifact, suspect) | create, delete, clear suspicion |
| Modules | outline with numbers, heading and position | insert existing artifacts, move them, remove them from the module |
| Baselines | list, state, comparison with another baseline or the current state | create |
| Metrics | as in the dashboard | – |
All changes via the API go through the same checks as in the user interface: required attributes, allowed values and link types, history and suspect links. When changing, you send the version (rev) you have read; if someone has changed the artifact in the meantime, the API responds with status 409 and the current state instead of overwriting other people's changes. The same applies to a module's outline with the structure state, which the API returns as an ETag and which you send back with If-Match.
If you send a very large number of requests in a short time, the API responds with status 429 and the error code rate_limited. The Retry-After header states the number of seconds after which you can try again, so spread automated requests evenly.
Example
curl -H "Authorization: Bearer etrm_…" \
"<ETRM address>/api/v1/projects/<id>/artifacts/?type=systemanforderung&attr.status=freigegeben"
The project ID is the same as in the address bar of the project overview; artifacts are addressed by their number (#12 → 12).
The complete description of all endpoints with examples and the exact address can be found in the API documentation.