Contents
List Import Sources - Plugixa Permalink Manager
GET /plugixa-permalink-manager/v1/import
List the plugins this site can import from, whether their data is there, and how much of it there is.
Needs the plugixa_permalink_manager_import_export capability.
Request
GET https://your-site.example/wp-json/plugixa-permalink-manager/v1/import
Responses
200 OK.
{
"success": true,
"data": {
"sources": [
{
"id": "pmp",
"name": "Permalink Manager",
"present": true,
"active": false,
"counts": {
"addresses": 42,
"redirects": 7,
"external": 0,
"structures": 3,
"modes": 5
}
},
{
"id": "custom-permalinks",
"name": "Custom Permalinks",
"present": false,
"active": false,
"counts": {
"addresses": 0
}
}
],
"serving": true
}
}
| Field | Type | Meaning |
|---|---|---|
data.sources[].id |
string |
The source, to use with Start Import |
data.sources[].name |
string |
The plugin’s name |
data.sources[].present |
boolean |
Whether its data is on the site, even with the plugin removed |
data.sources[].active |
boolean |
Whether the plugin is running. Always false for the SEO plugins |
data.sources[].counts |
object |
What would be imported. Permalink Manager: addresses, redirects, external, structures, modes. Custom Permalinks: addresses. SEO plugins: redirects, and patterns (pattern redirects, which are not imported) |
data.serving |
boolean |
Whether this plugin is serving its addresses now. When it is not, an import does not keep the old addresses as redirects |
The Pro build adds rank-math, yoast and seopress.
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-permalink-manager/v1/import" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-permalink-manager/v1/import');
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/import', {
headers: { 'Authorization': auth },
});
const { data } = await response.json();
Quick Links
Share