Contents
List Testimonial Authors - Plugixa Testimonial
GET /plugixatestimonial/v1/testimonials/authors
List the WordPress users who created at least one testimonial, for an author filter.
Any signed-in user with the plugixa_testimonial_edit capability or WordPress’s edit_posts (Contributors and up, by default).
Request
GET https://your-site.example/wp-json/plugixatestimonial/v1/testimonials/authors
Responses
200 OK. data is the list of authors, by name.
{
"success": true,
"message": "",
"data": [
{
"id": "1",
"name": "Jordan Smith"
},
{
"id": "4",
"name": "Maria Lopez"
}
]
}
| Field | Type | Meaning |
|---|---|---|
data[].id |
string |
WordPress user id, usable as filter[author] |
data[].name |
string |
Display name |
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixatestimonial/v1/testimonials/authors" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixatestimonial/v1/testimonials/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/plugixatestimonial/v1/testimonials/authors', {
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share