Custom routes under prc-api/v3 for the panel, report, and mismatch tools.
Base path: /wp-json/prc-api/v3/
Auth summary
| Access | Routes |
|---|---|
edit_posts | Panel get/unattach |
edit_posts + edit_post on target | Mismatch find |
edit_posts + edit_post + upload_files | Mismatch import |
| Public | Report get |
Panel
GET /attachments-panel/get/{post_id}
Permission: edit_posts
Returns attached media: id, title, type, filename, editLink, attachmentLink, url, alt, caption.
POST /attachments-panel/unattach/{attachment_id}
Permission: edit_posts
Sets post_parent to 0.
Report
GET /attachments-report/get/{post_id}
Permission: public (return true)
Query parameters
-
mime_typestring -
Mime filter such as image or all.
-
include_childrenboolean -
Include attachments from child posts (up to 25).
No fields match this filter.
Response: { postTitle, attachments[] } with metadata fields including alt, caption, mimeType, url, thumbnails, dimensions, and owner.
Image mismatch
POST /image-mismatch/find
Permission: edit_posts and edit_post on post_id
Request body
-
post_idnumber required -
Post that owns the block.
-
urlurl -
Image URL to resolve.
-
filenamestring -
Filename search fallback.
No fields match this filter.
Resolves via attachment_url_to_postid, then filename search on _wp_attached_file. Returns { filename, matches[] } (panel-shaped payloads, capped).
POST /image-mismatch/import
Permission: edit_posts, edit_post on post_id, and upload_files
Request body
-
post_idnumber required -
Parent post for the sideload.
-
urlurl required -
Allowlisted host URL to download.
No fields match this filter.
Sideloads with download_url → media_handle_sideload, parented to the post. Returns { success, attachment }.
/wp-json/prc-api/v3/attachments-panel/get/123
Accept application/json
[
{
"id": 456,
"title": "Chart",
"filename": "chart.png",
"url": "https://example.org/chart.png"
}
]