Getting Started · RKX API Studio 1.0.0
Request a saved endpoint
Create and save the GET endpoint articles with Posts as its source and ID / Title as its fields. Replace example.com with your site. The plugin’s default namespace is rkx-api-studio/v1. The -i option includes pagination and cache headers.
curl -i 'https://example.com/wp-json/rkx-api-studio/v1/articles?page=1'Read the response
The body is a JSON array, not an envelope. For a test post with ID 42 and title Hello, these two mapped fields produce the illustrative shape below. Actual values depend on your content and selected fields. X-WP-Total and X-WP-TotalPages report totals.
[
{ "id": 42, "title": "Hello" }
]Use JavaScript
Public data can be requested with fetch. Cross-origin behavior also depends on WordPress and your hosting configuration. For protected integrations, make the request from your backend and store credentials there.
const response = await fetch('https://example.com/wp-json/rkx-api-studio/v1/articles?page=1');
if (!response.ok) throw new Error(`API request failed: ${response.status}`);
const articles = await response.json();
console.log(articles);Related guides
Filtering, sorting and pagination