Contents
List Content Types - Plugixa Permalink Manager
GET /plugixa-permalink-manager/v1/uris/types
List the post types and taxonomies the plugin manages, with how many items each has. Use the kind and type values with List Addresses.
Needs the plugixa_permalink_manager_view capability.
Request
GET https://your-site.example/wp-json/plugixa-permalink-manager/v1/uris/types
Responses
200 OK. data is every managed content type.
{
"success": true,
"data": [
{
"kind": "post",
"type": "post",
"label": "Posts",
"count": 24
},
{
"kind": "post",
"type": "page",
"label": "Pages",
"count": 9
},
{
"kind": "post",
"type": "product",
"label": "Products",
"count": 18
},
{
"kind": "term",
"type": "category",
"label": "Categories",
"count": 6
},
{
"kind": "term",
"type": "product_cat",
"label": "Product categories",
"count": 5
}
]
}
| Field | Type | Meaning |
|---|---|---|
data[].kind |
string |
post for a post type, term for a taxonomy |
data[].type |
string |
The post type or taxonomy name |
data[].label |
string |
Its plural label |
data[].count |
integer |
Posts that are published, private, draft, pending or scheduled; for a taxonomy, every term including empty ones |
Only types that have an admin screen and are not turned off in Content settings are listed.
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-permalink-manager/v1/uris/types" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-permalink-manager/v1/uris/types');
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 auth = 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`);
const response = await fetch('https://your-site.example/wp-json/plugixa-permalink-manager/v1/uris/types', {
headers: { 'Authorization': auth },
});
const { data } = await response.json();
Quick Links
Share