Skip to content

Latest commit

 

History

History
1433 lines (990 loc) · 46.8 KB

WordpressApi.md

File metadata and controls

1433 lines (990 loc) · 46.8 KB

Upmind\EnhanceSdk\WordpressApi

All URIs are relative to http://localhost, except if the operation defines another base path.

Method HTTP request Description
createWordpressUser() POST /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/users Create website WordPress user
deleteWordpressPlugin() DELETE /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/plugins/{plugin} Delete website WordPress plugin
deleteWordpressUser() DELETE /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/users/{user_id} Delete WordPress user
getDefaultWpSsoUser() GET /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/users/default
getWordPressSiteurl() GET /v2/apps/{app_id}/wordpress/url Fetches the site URL for a WordPress installation
getWordpressAppVersion() GET /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/version Get WordPress version
getWordpressConfig() GET /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/wp-config/{wp_option} Get the WP config value for a given option
getWordpressInstallations() GET /orgs/{org_id}/websites/{website_id}/apps/wordpress Trigger discovery of WP installations
getWordpressLatestVersion() GET /utils/wordpress/latest Get WordPress latest available version
getWordpressPlugins() GET /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/plugins Get website WordPress plugins
getWordpressSettings() GET /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress Get Wordpress application settings
getWordpressThemes() GET /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/themes Get website WordPress themes
getWordpressUserSsoUrl() GET /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/users/{user_id}/sso Get SSO URL for a WP user
getWordpressUsers() GET /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/users
installWordpressPlugin() POST /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/plugins Install a plugin
setDefaultWpSsoUser() PUT /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/users/default Set WP user as the default SSO user for that website.
setWordPressSiteurl() PUT /v2/apps/{app_id}/wordpress/url Sets the site URL for a WordPress installation
setWordpressConfig() PUT /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/wp-config Set a single value of a wp-config.php entry.
updateWordpressAppVersion() PATCH /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/version Update website WP app to specific version or latest
updateWordpressPluginSettings() PATCH /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/plugins/{plugin} Updates website WordPress plugin settings
updateWordpressPluginToLatest() PATCH /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/plugins/{plugin}/version Updates website WordPress plugin to latest version
updateWordpressSettings() PATCH /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress Update Wordpress app settings
updateWordpressUser() PATCH /orgs/{org_id}/websites/{website_id}/apps/{app_id}/wordpress/users/{user_id} Update WordPress user

createWordpressUser()

createWordpressUser($org_id, $website_id, $app_id, $new_wp_user)

Create website WordPress user

Creates a new user in this wordpress app. The created user is independent from Enhance logins--it only concerns the wordpress app (which much like Enhance is its own webapp). Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$new_wp_user = new \Upmind\EnhanceSdk\Model\NewWpUser(); // \Upmind\EnhanceSdk\Model\NewWpUser

try {
    $apiInstance->createWordpressUser($org_id, $website_id, $app_id, $new_wp_user);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->createWordpressUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
new_wp_user \Upmind\EnhanceSdk\Model\NewWpUser

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteWordpressPlugin()

deleteWordpressPlugin($org_id, $website_id, $app_id, $plugin)

Delete website WordPress plugin

Deletes the specified wordpress plugin. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$plugin = 'plugin_example'; // string | The name of the wordpress plugin (not file name!).

try {
    $apiInstance->deleteWordpressPlugin($org_id, $website_id, $app_id, $plugin);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->deleteWordpressPlugin: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
plugin string The name of the wordpress plugin (not file name!).

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteWordpressUser()

deleteWordpressUser($org_id, $website_id, $app_id, $user_id)

Delete WordPress user

Deletes an existing user in this wordpress app. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$user_id = 56; // int | The id of the wordpress user.

try {
    $apiInstance->deleteWordpressUser($org_id, $website_id, $app_id, $user_id);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->deleteWordpressUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
user_id int The id of the wordpress user.

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getDefaultWpSsoUser()

getDefaultWpSsoUser($org_id, $website_id, $app_id): \Upmind\EnhanceSdk\Model\WpUser

Return previously set default Wordpress SSO user. If WP users exist but none were set to be default, returns 404. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.

try {
    $result = $apiInstance->getDefaultWpSsoUser($org_id, $website_id, $app_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->getDefaultWpSsoUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.

Return type

\Upmind\EnhanceSdk\Model\WpUser

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWordPressSiteurl()

getWordPressSiteurl($app_id): string

Fetches the site URL for a WordPress installation

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$app_id = 'app_id_example'; // string | The id of the app.

try {
    $result = $apiInstance->getWordPressSiteurl($app_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->getWordPressSiteurl: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
app_id string The id of the app.

Return type

string

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWordpressAppVersion()

getWordpressAppVersion($org_id, $website_id, $app_id): \Upmind\EnhanceSdk\Model\GetWordpressAppVersion200Response

Get WordPress version

Fetches the WordPress version of a running installation in real time.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.

try {
    $result = $apiInstance->getWordpressAppVersion($org_id, $website_id, $app_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->getWordpressAppVersion: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.

Return type

\Upmind\EnhanceSdk\Model\GetWordpressAppVersion200Response

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWordpressConfig()

getWordpressConfig($org_id, $website_id, $app_id, $wp_option): \Upmind\EnhanceSdk\Model\WordpressConfig

Get the WP config value for a given option

Returns the value of a wp-config.php entry.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: sessionCookie
$config = Upmind\EnhanceSdk\Configuration::getDefaultConfiguration()->setApiKey('id0', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Upmind\EnhanceSdk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('id0', 'Bearer');

// Configure Bearer authorization: bearerAuth
$config = Upmind\EnhanceSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$wp_option = 'wp_option_example'; // string | The wordpress config option.

try {
    $result = $apiInstance->getWordpressConfig($org_id, $website_id, $app_id, $wp_option);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->getWordpressConfig: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
wp_option string The wordpress config option.

Return type

\Upmind\EnhanceSdk\Model\WordpressConfig

Authorization

sessionCookie, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWordpressInstallations()

getWordpressInstallations($org_id, $website_id): \Upmind\EnhanceSdk\Model\WpInstallation[]

Trigger discovery of WP installations

WP installations that were made manually (aside from invoking) orchd APIs aren't immediately discovered by orchd. Invoking this endpoint triggers the discovery and adds installation info to the database.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.

try {
    $result = $apiInstance->getWordpressInstallations($org_id, $website_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->getWordpressInstallations: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.

Return type

\Upmind\EnhanceSdk\Model\WpInstallation[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWordpressLatestVersion()

getWordpressLatestVersion(): \Upmind\EnhanceSdk\Model\WpLatestVersion

Get WordPress latest available version

Returns the latest available WordPress version as published by the WordPress APIs.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->getWordpressLatestVersion();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->getWordpressLatestVersion: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Upmind\EnhanceSdk\Model\WpLatestVersion

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWordpressPlugins()

getWordpressPlugins($org_id, $website_id, $app_id, $refresh_cache): \Upmind\EnhanceSdk\Model\WpPluginsFullListing

Get website WordPress plugins

Returns the plugins installed on wordpress. This is a separate endpoint as it is takes longer to return than the rest of the application endpoints. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$refresh_cache = True; // bool | If set to true, it will bypass internal caching.

try {
    $result = $apiInstance->getWordpressPlugins($org_id, $website_id, $app_id, $refresh_cache);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->getWordpressPlugins: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
refresh_cache bool If set to true, it will bypass internal caching. [optional]

Return type

\Upmind\EnhanceSdk\Model\WpPluginsFullListing

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWordpressSettings()

getWordpressSettings($org_id, $website_id, $app_id): \Upmind\EnhanceSdk\Model\WpSettings

Get Wordpress application settings

Queries an existing Wordpress application's settings. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.

try {
    $result = $apiInstance->getWordpressSettings($org_id, $website_id, $app_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->getWordpressSettings: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.

Return type

\Upmind\EnhanceSdk\Model\WpSettings

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWordpressThemes()

getWordpressThemes($org_id, $website_id, $app_id, $refresh_cache): \Upmind\EnhanceSdk\Model\WpThemesFullListing

Get website WordPress themes

Returns the themes installed on website's WordPress. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$refresh_cache = True; // bool | If set to true, it will bypass internal caching.

try {
    $result = $apiInstance->getWordpressThemes($org_id, $website_id, $app_id, $refresh_cache);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->getWordpressThemes: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
refresh_cache bool If set to true, it will bypass internal caching. [optional]

Return type

\Upmind\EnhanceSdk\Model\WpThemesFullListing

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWordpressUserSsoUrl()

getWordpressUserSsoUrl($org_id, $website_id, $app_id, $user_id, $should_redirect): string

Get SSO URL for a WP user

Session holder must have write access to the website

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$user_id = 56; // int | The id of the wordpress user.
$should_redirect = True; // bool | If set to true, the endpoint will send a 307 redirect to the SSO URL.

try {
    $result = $apiInstance->getWordpressUserSsoUrl($org_id, $website_id, $app_id, $user_id, $should_redirect);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->getWordpressUserSsoUrl: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
user_id int The id of the wordpress user.
should_redirect bool If set to true, the endpoint will send a 307 redirect to the SSO URL. [optional]

Return type

string

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWordpressUsers()

getWordpressUsers($org_id, $website_id, $app_id): \Upmind\EnhanceSdk\Model\WpUsersFullListing

Returns the users of this wordpress app. This is a separate endpoint as it is takes longer to return than most other endpoints. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.

try {
    $result = $apiInstance->getWordpressUsers($org_id, $website_id, $app_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->getWordpressUsers: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.

Return type

\Upmind\EnhanceSdk\Model\WpUsersFullListing

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

installWordpressPlugin()

installWordpressPlugin($org_id, $website_id, $app_id, $install_wp_plugin, $refresh_cache)

Install a plugin

Adds a specific plugin to a WordPress installation. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$install_wp_plugin = new \Upmind\EnhanceSdk\Model\InstallWpPlugin(); // \Upmind\EnhanceSdk\Model\InstallWpPlugin
$refresh_cache = True; // bool | If set to true, it will bypass internal caching.

try {
    $apiInstance->installWordpressPlugin($org_id, $website_id, $app_id, $install_wp_plugin, $refresh_cache);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->installWordpressPlugin: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
install_wp_plugin \Upmind\EnhanceSdk\Model\InstallWpPlugin
refresh_cache bool If set to true, it will bypass internal caching. [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setDefaultWpSsoUser()

setDefaultWpSsoUser($org_id, $website_id, $app_id, $body)

Set WP user as the default SSO user for that website.

Idempotently set WP user as the default SSO user for that website. User needs to exist. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$body = 3.4; // float

try {
    $apiInstance->setDefaultWpSsoUser($org_id, $website_id, $app_id, $body);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->setDefaultWpSsoUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
body float

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setWordPressSiteurl()

setWordPressSiteurl($app_id, $body)

Sets the site URL for a WordPress installation

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$app_id = 'app_id_example'; // string | The id of the app.
$body = 'body_example'; // string

try {
    $apiInstance->setWordPressSiteurl($app_id, $body);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->setWordPressSiteurl: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
app_id string The id of the app.
body string

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setWordpressConfig()

setWordpressConfig($org_id, $website_id, $app_id, $wordpress_config)

Set a single value of a wp-config.php entry.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: sessionCookie
$config = Upmind\EnhanceSdk\Configuration::getDefaultConfiguration()->setApiKey('id0', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Upmind\EnhanceSdk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('id0', 'Bearer');

// Configure Bearer authorization: bearerAuth
$config = Upmind\EnhanceSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$wordpress_config = new \Upmind\EnhanceSdk\Model\WordpressConfig(); // \Upmind\EnhanceSdk\Model\WordpressConfig

try {
    $apiInstance->setWordpressConfig($org_id, $website_id, $app_id, $wordpress_config);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->setWordpressConfig: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
wordpress_config \Upmind\EnhanceSdk\Model\WordpressConfig

Return type

void (empty response body)

Authorization

sessionCookie, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateWordpressAppVersion()

updateWordpressAppVersion($org_id, $website_id, $app_id, $update_wp_app_to_version)

Update website WP app to specific version or latest

Updates an existing website Wordpress application's version to given version (defaults to latest). If the installation is already on its latest version, returns 200 without doing any work. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$update_wp_app_to_version = new \Upmind\EnhanceSdk\Model\UpdateWpAppToVersion(); // \Upmind\EnhanceSdk\Model\UpdateWpAppToVersion

try {
    $apiInstance->updateWordpressAppVersion($org_id, $website_id, $app_id, $update_wp_app_to_version);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->updateWordpressAppVersion: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
update_wp_app_to_version \Upmind\EnhanceSdk\Model\UpdateWpAppToVersion [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateWordpressPluginSettings()

updateWordpressPluginSettings($org_id, $website_id, $app_id, $plugin, $update_wp_plugin)

Updates website WordPress plugin settings

Updates the settings for a WP plugin, such as whether the plugin should be active. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$plugin = 'plugin_example'; // string | The name of the wordpress plugin (not file name!).
$update_wp_plugin = new \Upmind\EnhanceSdk\Model\UpdateWpPlugin(); // \Upmind\EnhanceSdk\Model\UpdateWpPlugin

try {
    $apiInstance->updateWordpressPluginSettings($org_id, $website_id, $app_id, $plugin, $update_wp_plugin);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->updateWordpressPluginSettings: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
plugin string The name of the wordpress plugin (not file name!).
update_wp_plugin \Upmind\EnhanceSdk\Model\UpdateWpPlugin

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateWordpressPluginToLatest()

updateWordpressPluginToLatest($org_id, $website_id, $app_id, $plugin)

Updates website WordPress plugin to latest version

Updates the specified wordpress plugin to its latest version. Does nothing if the plugin is already latest. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$plugin = 'plugin_example'; // string | The name of the wordpress plugin (not file name!).

try {
    $apiInstance->updateWordpressPluginToLatest($org_id, $website_id, $app_id, $plugin);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->updateWordpressPluginToLatest: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
plugin string The name of the wordpress plugin (not file name!).

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateWordpressSettings()

updateWordpressSettings($org_id, $website_id, $app_id, $update_wp_settings)

Update Wordpress app settings

Updates an existing website WP application's settings. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$update_wp_settings = new \Upmind\EnhanceSdk\Model\UpdateWpSettings(); // \Upmind\EnhanceSdk\Model\UpdateWpSettings

try {
    $apiInstance->updateWordpressSettings($org_id, $website_id, $app_id, $update_wp_settings);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->updateWordpressSettings: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
update_wp_settings \Upmind\EnhanceSdk\Model\UpdateWpSettings

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateWordpressUser()

updateWordpressUser($org_id, $website_id, $app_id, $user_id, $update_wp_user)

Update WordPress user

Updates an existing user in this wordpress app. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Upmind\EnhanceSdk\Api\WordpressApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$app_id = 'app_id_example'; // string | The id of the app.
$user_id = 56; // int | The id of the wordpress user.
$update_wp_user = new \Upmind\EnhanceSdk\Model\UpdateWpUser(); // \Upmind\EnhanceSdk\Model\UpdateWpUser

try {
    $apiInstance->updateWordpressUser($org_id, $website_id, $app_id, $user_id, $update_wp_user);
} catch (Exception $e) {
    echo 'Exception when calling WordpressApi->updateWordpressUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
app_id string The id of the app.
user_id int The id of the wordpress user.
update_wp_user \Upmind\EnhanceSdk\Model\UpdateWpUser

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]