REST API

Table of Contents

The plugin registers its routes in the visual-portfolio/v1 namespace, so a full path reads /wp-json/visual-portfolio/v1/get_layouts/. Most routes serve the block editor and require a logged-in user with the capability named below.

Routes

RouteMethodPermissionPurpose
/get_layouts/GETedit postsSaved Layouts, as id, title and edit_url
/update_layout/POSTedit the layoutSave the options of a Saved Layout
/get_filter_items/POSTedit contentFilter terms for the editor
/get_max_pages/GET, POSTedit postsPage count of a query
/update_gallery_items_count_notice_state/POSTmanage optionsDismiss the large-gallery notice

Pro routes

RouteMethodPermissionPurpose
/album-images/post/{id} and /album-images/term/{id} with a taxonomy parameterGETpublicAlbum images beyond the lazy-load threshold, 1 to 100 per page
vpf/v1/proofing/{id}/selectionsGET, POSTpublic, with a page nonceProofing selections. POST is limited to 10 per minute per visitor

Responses

A successful call returns success: true together with a response field. A failed one returns error: true, an error_code and a response, with HTTP status 401.

Was this page helpful?