Skip to content

Project

Projects live at /api/projects and are shared by every product, so they need no product of their own. Tasks need the Project product (pmo); creating and updating them needs pmo:task:create and pmo:task:update. Full details: Project API.

Task endpoints are RPC procedures: always POST, with the input wrapped as {"json": {...}} and the result in the json field of the answer.

Recipe: create a task from an issue in another tool

Terminal window
PROJECT_ID=$(curl -s "$OPEX/api/projects?search=Portal&pageSize=1" -H "X-API-Key: $OPEX_API_KEY" \
| jq -r '.items[0].id')
curl -s -X POST "$OPEX/api/pmo/rpc/tasks/create" \
-H "X-API-Key: $OPEX_API_KEY" -H "content-type: application/json" \
-d "{\"json\":{\"projectId\":\"$PROJECT_ID\",\"name\":\"Upgrade PostgreSQL to 17\",\"priority\":\"high\"}}" \
| jq '{json: {id: .json.id, sequence_id: .json.sequence_id, name: .json.name, priority: .json.priority, state: .json.state.name}}'
{
"json": {
"id": "955b3a41-eead-4283-b46a-3f3ceb4c9ccb",
"sequence_id": 1,
"name": "Upgrade PostgreSQL to 17",
"priority": "high",
"state": "Todo"
}
}

The task starts in the project’s default state. sequence_id is its number within the project. Dates (start_date, target_date) are epoch milliseconds, and description_html takes HTML.

Recipe: list the high-priority tasks of a project

Terminal window
curl -s -X POST "$OPEX/api/pmo/rpc/tasks/list" \
-H "X-API-Key: $OPEX_API_KEY" -H "content-type: application/json" \
-d "{\"json\":{\"projectId\":\"$PROJECT_ID\",\"priority\":\"high\",\"pageSize\":5}}" \
| jq '{json: {total: .json.total, items: [.json.items[] | {sequence_id, name, priority}]}}'
{
"json": {
"total": 1,
"items": [{ "sequence_id": 1, "name": "Upgrade PostgreSQL to 17", "priority": "high" }]
}
}

To change a task, send only the fields that change to tasks/update with projectId and taskId, for example {"json":{"projectId":"…","taskId":"…","priority":"urgent"}}. A task that does not exist answers:

{ "json": { "defined": false, "code": "NOT_FOUND", "status": 404, "message": "not_found" } }