Rest API and Python API Documentation
At a Glance
- Find your deployment’s API address, generate access tokens, and authenticate requests.
- Set up the Python API package and explore endpoints for retrieving and modifying objects.
- Filter results by project and understand when to use 'clean_text' or 'clean_html'.
Before You Start
The Requirements Portal API follows its own conventions, and several of them differ from typical REST APIs. In particular:
-
Lists are read with
POST .../search/, not withGET. -
POSTto a bare collection path creates an object. It does not list. -
Some wrong request bodies return
200and change nothing. Always read back what you wrote.
The sections below explain each of these. If you write code with an AI assistant, give it the Requirements Portal API skill first: it contains the complete reference, including every one of these cases.
Accessing the API
Find Your API Address and Create a Token
-
In Requirements Portal, click the
icon at the top right, select Settings, then select User Tokens in the left-hand pane.
-
Note the API address shown on this page. It has the form
https://<workspace>-requirements.365.altium.com. -
Click the
button at the top of the page to generate a new token. Copy it now; you will need it in every request.
Tokens:
-
are valid for 3 months, after which you must generate a new one. Plan token rotation into any long-running integration.
-
work only on the Workspace that issued them.
-
act with the permissions of the user who created them (see Access and Permissions).
Authenticate Requests
Send the token in the Authorization header with the Bearer prefix, and send JSON:
bash
curl --request POST 'https://<workspace>-requirements.365.altium.com/rest/requirements/search/' \
--header 'Authorization: Bearer <your-token>' \
--header 'Content-Type: application/json' \
--data '{"size": 10, "includes": ["id", "identifier", "title"]}'
A request without the Bearer prefix returns 401.
To check which Requirements Portal build your Workspace runs, call GET https://<workspace>-requirements.365.altium.com/version.json. It needs no token. Include the build number when you contact support.
Access and Permissions
Every request is checked against the token owner's Altium 365 project access.
-
Objects in projects the user cannot access do not appear in search results. If
total_resultsis lower than you expect, check the user's project access first. -
A
403with"error_code": 65000means the user does not have permission for that action or project. -
A
503with"error": "A365PermissionsUnavailable"means permissions could not be checked at that moment. It is temporary: retry after a short wait.
How Requests Work
Reading Data: Search
json
POST /rest/requirements/search/
{
"includes": ["id", "identifier", "title", "text_clean"],
"query_filters": {"specification__project__id": 27},
"sort": ["identifier"],
"size": 500,
"page": 1
}
| Key | Purpose |
|---|---|
includes |
The fields to return. Keep it narrow for speed. |
query_filters |
Conditions, for example {"id__in": [1, 2, 3]} or {"title__icontains": "power"}. |
sort |
Field names; prefix with - for descending. |
size |
Results per page. Maximum 1000. Defaults to 10 if omitted. |
page |
Page number, starting at 1. |
Results are under data, with total_results and pages alongside. Keep requesting the next page until you have total_results rows.
To read a single object, search by id: {"query_filters": {"id": 151}}.
Filtering by project. Requirements are filtered by project through their specification:
json
{"query_filters": {"specification__project__id": 27}}
{"project": 27} returns 422. That error is useful: its message lists every valid filter key for the object, so you can send a deliberately wrong key to discover them.
Finding ids. There is no endpoint that lists projects. Read the project id from the Requirements Portal address bar (.../requirements/project/33/), or search specifications, which include their project:
json
POST /rest/requirements/specifications/search/
{"includes": ["id", "name", "project"], "size": 1000}
Related objects. Add "get__specification": true to return the full related object instead of its id. Use "filters__specification": {"includes": ["id", "name"]} to choose its fields.
Plain-text Fields
Requirement text, rationale and compliance comments are stored as rich text, with embedded references to values and other objects. To get plain text with those references resolved, add the matching _clean field to includes:
| Rich-text field | Plain-text field |
|---|---|
text |
text_clean |
rationale |
rationale_clean |
compliance_comment |
compliance_comment_clean |
V&V item description |
description_clean |
text : '...minimum resolution of <span class="quill-autocomplete" itemid="12936">...'
text_clean : '...minimum resolution of 0.5cm/pixel.'
Do not strip tags from text yourself: that deletes the referenced values.
Creating Data
POST to the object's collection path:
json
POST /rest/requirements/
{"specification": 3654, "identifier": "SYS-042", "text": "The system shall ..."}
Required for requirements: specification, identifier (unique within the specification) and text. To see every field and whether it is required or read-only, send OPTIONS to the same path.
Both create responses return 201, but the id is in a different place:
-
requirements return the object itself, with
idat the top level; -
V&V objects return
{"data": {...}, "message": "..."}, withidunderdata.
Read the id with body.get("data", body)["id"] to handle both.
Updating Data
Use bulk-update/ with a body keyed by object id:
json
PATCH /rest/requirements/bulk-update/
{"438": {"title": "New title"}, "439": {"state": 2}}
A list body ([{"id": 438, ...}]) is rejected.
Relationships, including requirement hierarchy, are not changed by bulk-update/. Use bulk-add-values/ and bulk-remove-values/:
json
POST /rest/requirements/bulk-add-values/
{"ids": [197], "field": "parents", "values": [196]}
This makes requirement 196 a parent of 197. Send the same body to bulk-remove-values/ to remove the link.
Custom Fields
Read definitions from data/custom-fields/search/ and values from data/custom-field-row/search/. Each value row links a custom_field to an object through referenced_object_id.
To write a value, create or update its row, one value per request:
json
POST /rest/data/custom-field-row/
{"custom_field": 1, "referenced_object_id": 196, "value": "High"}
json
PATCH /rest/data/custom-field-row/{row_id}/
{"value": "Medium"}
Each object can hold one row per custom field. Search for an existing row first and update it if one exists. Do not write custom values through the requirement's custom_values field: it accepts the request but does not fill the column.
Deleting Data
-
Requirements, requirement groups, specifications, specification folders and requirement types:
DELETE /rest/<object>/{id}/(returns204), orbulk-delete/. -
V&V objects: use
bulk-delete/. Single-objectDELETEis not available for them. -
Custom field values:
DELETE /rest/data/custom-field-row/{row_id}/.
bulk-delete/ takes a plain list of ids:
json
POST /rest/requirements/bulk-delete/
[441, 442]
Check total_results in the response: a wrongly shaped body also returns 200 and a success message, but deletes nothing. Deletions are permanent.
Files, values, matrices and components cannot be deleted through the API.
Large Writes
Bulk requests have a time limit of about 60 seconds, not an object limit. Send batches of about 50 objects. If a write request times out (504) or returns a connection error, it may still have completed: search for the objects before retrying, or you may create duplicates.
What You Can Work With
All paths are under /rest/. For full detail on every endpoint, see the Requirements Portal API skill or the API reference in Swagger (below).
| Area | Main paths | You can |
|---|---|---|
| Requirements | requirements/, requirements/specifications/, requirements/specifications/folders/, requirements/groups/, requirements/types/ |
search, create, update, delete, copy, import, read history, manage hierarchy and component links |
| Verification & validation | verification-and-validation/activities/, activity-runs/, items/, item-runs/, step-definition/, step-runs/, methods/, rules/ |
search, create, update, delete in bulk, manage links, change ownership |
| Verification status | requirements/verification-status/, requirements/verification-statuses/, requirements/compliance-statements/ |
read aggregated status and status options |
| Custom fields | data/custom-fields/, data/custom-field-options/, data/custom-field-row/ |
read definitions and options; read and write values |
| Files | files/, files/folders/, files/templates/, files/versions/ |
search, upload, download |
| Values | valis/, datevalis/, textvalis/, matrices/ |
search, create |
| Components | components/ |
search, create |
Downloading files. Request the download_url field from files/search/, then fetch that URL with a plain GET and no Authorization header.
Not available through the API: tags, users, requirement states as standalone objects, value recalculation (this happens in the Requirements Portal interface), templated document export, and in-product scripting. The export/ endpoints start a background job but do not return a file; use search/ and file downloads to get data out.
Requirements Portal does not run integrations or automation itself. Scripts and Requirements Bridges run on your own infrastructure, or in the automation layer of the tool you connect to.
API Reference (Swagger)
While signed in to Altium 365, open https://<workspace>.365.altium.com/swagger/ to browse every available endpoint. The reference needs a signed-in browser session: an API token alone cannot open it.
| Symptom | Cause | Fix |
|---|---|---|
401 |
Missing Bearer prefix, expired token, or token from another Workspace |
Use Authorization: Bearer <token>; regenerate if older than 3 months |
404 or 405 on GET /rest/requirements/ |
There are no GET list endpoints |
POST /rest/requirements/search/ |
| Empty objects appear after "listing" | POST to a collection path creates |
Use .../search/ |
| Only 10 results | size omitted |
Set size (up to 1000) and paginate |
400 on size: -1 |
No "fetch all" value | Paginate |
422 on a filter |
Field not searchable directly | Read the valid keys from the error; for project use specification__project__id |
200 but hierarchy unchanged |
bulk-update/ ignores relationships |
bulk-add-values/ / bulk-remove-values/ |
200 but custom column empty |
Written through custom_values |
Write data/custom-field-row/ |
| "Deleted 0 object(s) with success" | Wrong bulk-delete/ body |
Send a plain list of ids |
id is missing after create |
V&V responses wrap the object in data |
body.get("data", body)["id"] |
| Duplicates after a retry | A timed-out write had completed | Search before retrying; batch at about 50 |
503 A365PermissionsUnavailable |
Temporary permission check failure | Retry after a short wait |
Also avoid GET /rest/requirements/deleted/, which can time out on large Workspaces. To read single V&V objects, use search/ with an id filter.
Python Example
No Python package is required. The requests library is enough:
python
import requests
BASE = "https://<workspace>-requirements.365.altium.com/rest"
s = requests.Session()
s.headers.update({"Authorization": "Bearer <your-token>",
"Content-Type": "application/json"})
def search(obj, payload, page_size=500):
payload = {**payload, "size": min(page_size, 1000)}
rows, page = [], 1
while True:
r = s.post(f"{BASE}/{obj}/search/", json={**payload, "page": page})
r.raise_for_status()
body = r.json()
rows += body["data"]
if not body["data"] or len(rows) >= body["total_results"]:
return rows
page += 1
reqs = search("requirements", {
"includes": ["id", "identifier", "text_clean", "parents"],
"query_filters": {"specification__project__id": 27},
"sort": ["identifier"],
})
print(len(reqs), "requirements")
Build Faster with the Requirements Portal API Skill
If you write code with an AI coding assistant, give it the Requirements Portal API skill. It is a single reference file covering everything on this page in full detail: every endpoint, request and response shape, error, and known pitfall. With it, the assistant writes code that works against Requirements Portal the first time, instead of guessing at REST conventions the API does not follow.
Download the Requirements Portal API skill (SKILL.md)
How to use it:
-
Claude (claude.ai, desktop app or Claude Code): add it as a skill. It is used automatically whenever you work on Requirements Portal API code.
-
Other AI assistants: attach the file to your conversation or add it to your project's context or instructions.
The skill describes the API for the Requirements Portal build it was verified against. If your Workspace behaves differently, check your build at /version.json and let Altium Support know.
Common Questions
Can I connect Requirements Portal to DOORS, Jama Connect, Polarion, Codebeamer or another RMS?
Yes, through the API. Any system with an API can be connected through a Requirements Bridge built for your setup. There is no out-of-the-box connector, because every RMS setup has its own data schema, item types and lifecycle states. Altium offers reference integrations and Professional Services to help build one.
How do I find the right endpoint for an action?
Check the API reference in Swagger or give the API skill to your AI assistant. If you still cannot find it, contact Altium Support with your build number from /version.json.
Is there a rate limit?
No rate limit is currently enforced, but design integrations to pace their requests and to retry with backoff.
Can I get a token that does not expire?
Not at present. Tokens are valid for 3 months.

