DX API workbench
Open it from the rail (DX API workbench). It uses your Connect to Pega session.
- Cases: create a case of a type (or load its create view), open a case by ID, and work its assignments.
- Data views: query any data page (columns, filter like
pyStatusWork=Open; Amount>5, paging, metadata, count). You can then insert the rows as a data table, list or chart bound to that data page. The component stays bound: live in Run in Pega, in published templates and in exports. - API explorer: call any of the 67 catalogued endpoints with path parameters, an If-Match eTag and a JSON body. Each response shows the status, eTag, headers and timing, and there is a copy-as-cURL button. Every endpoint has notes on how Pega answers it.
Pega DX API behaviours worth knowing
- Case types:
GET casetypes/{ID}andGET cases/{ID}/historyanswer 404. The create form iscasetypes/{ID}/actions/Create(read-only) or the first assignment afterPOST cases. History is the data viewD_pyWorkHistorywithCaseInstanceKey. - Pulse: posts need the case key in
context. AcontextIDfield is silently ignored. The feed answers{ entryCount, messages }. Only the poster may delete a message. - Participants: add, update and remove need If-Match. The participant ID is the role ID. The list is in
data.content.pyParticipants. - Stages:
stages/nextis a POST. - Recalculate: takes
calculations: { fields, whens }and only works for calculated properties (others give 500). - Navigation steps: use the step IDs from
uiResources.navigation. - Attachments: a File attachment downloads as base64 text.
- Stale or missing eTags: these can come back as 403
Pega_API_021/Pega_API_020or 400ifMatchHeader, not only as 409/412. The studio explains these as a stale eTag. - Locks: a locked case answers 423 (
Pega_API_031). The studio says it is open in another session and the lock will time out.
Data records
Saving a data record through a savable data page is not PATCH data_views/{ID}: that answers 405 on 26.1, even
for a savable page. Constellation does this instead:
POST data_views/{ID}/views/{viewID}with{ dataViewParameters: { pyGUID } }opens the record in a view (e.g.pyEdit).PATCH data/{ID}with{ data: { pyGUID, ...changes }, pageInstructions: [] }saves it.POST data/{ID},PUT data/{ID}andDELETE data/{ID}?dataViewParameters=...create, replace and delete.
DxApi has openDataObject, updateDataObject, createDataObject and deleteDataObject.
Pega sends no eTag for data records. An operator without edit rights on the data class gets 500 "lockInfo is null".