Contents
On this page
List FAQ Authors - Plugixa FAQ
GET /plugixa-faq/v1/faqs/authors
List the WordPress users who created at least one FAQ, for use with filter[author] on List FAQs.
Any signed-in user with the plugixa_faq_manage capability or WordPress’s edit_posts (Contributors and up, by default).
Request
GET https://your-site.example/wp-json/plugixa-faq/v1/faqs/authors
Responses
200 OK. data is the list of authors, by display name.
{
"success": true,
"message": "",
"data": [
{
"id": "1",
"name": "Jordan Smith"
},
{
"id": "7",
"name": "Sam Lee"
}
]
}
| Field | Type | Meaning |
|---|---|---|
data[].id |
string |
WordPress user id |
data[].name |
string |
Display name |
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-faq/v1/faqs/authors" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-faq/v1/faqs/authors');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-faq/v1/faqs/authors', {
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share