REST API
WP-PFManagement exposes a REST surface under /wp-json/pfw-management/v1/ on YOUR WordPress install. Same authentication model as the other plugins (cookie + nonce for browser, Application Password for external).
Capability matrix:
pfm_view_records— read.pfm_create_records— POST records.pfm_edit_records— PATCH records.pfm_delete_records— DELETE records.pfm_manage_entities— create / alter / delete entity schemas.
Entities
GET /entities— list entity slugs + their display names + counts.GET /entities/{slug}— full entity definition (schema + form + lists + capabilities).POST /entities— create.PATCH /entities/{slug}— update (Reconciler dry-run included in response).DELETE /entities/{slug}— delete (FK-protected;?force=trueto bypass).
Records (per-entity)
GET /records/{entity} — list, with filtering and paging.
Query parameters:
| Param | Type | Description |
|---|---|---|
eql | string | EQL filter, URL-encoded |
sort | string | field:asc or field:desc, comma-separate multiple |
fields | string | Comma-separate to include only these (sparse fieldsets) |
per_page | int | Max 200 |
page | int | 1-based |
include | string | Comma-separate relation field names to deep-load |
Response:
{
"status": "ok",
"data": {
"items": [ {...record...}, {...record...} ],
"total": 1234,
"page": 1,
"per_page": 50
}
}
GET /records/{entity}/{uuid} — single record by UUID. POST /records/{entity} — create. Body is the field map. PATCH /records/{entity}/{uuid} — partial update. DELETE /records/{entity}/{uuid} — delete a record.
Bulk operations
POST /records/{entity}/_bulk — body is an array of operations:
[
{ "op": "create", "fields": { ... } },
{ "op": "update", "uuid": "...", "fields": { "status": "Customer" } },
{ "op": "delete", "uuid": "..." }
]
Up to 100 operations per call. Returns per-operation status so partial successes are surfaced.
Schema introspection
GET /entities/{slug}/schema — JSON Schema of the entity. Use this to auto-generate UIs in your own frontends, or to validate payloads client-side before sending them.