Redirects and Vanity URLs for Confluence

Config

deleteConfig

Deletes the current config and generates a new one.

Replaces the current configuration with an empty one


/config

Usage and SDK Samples

curl -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/config"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConfigApi;

import java.io.File;
import java.util.*;

public class ConfigApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ConfigApi apiInstance = new ConfigApi();
        try {
            rootConfiguration result = apiInstance.deleteConfig();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConfigApi#deleteConfig");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ConfigApi;

public class ConfigApiExample {

    public static void main(String[] args) {
        ConfigApi apiInstance = new ConfigApi();
        try {
            rootConfiguration result = apiInstance.deleteConfig();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConfigApi#deleteConfig");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];


ConfigApi *apiInstance = [[ConfigApi alloc] init];

// Deletes the current config and generates a new one.
[apiInstance deleteConfigWithCompletionHandler: 
              ^(rootConfiguration output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.ConfigApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteConfig(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteConfigExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ConfigApi();

            try
            {
                // Deletes the current config and generates a new one.
                rootConfiguration result = apiInstance.deleteConfig();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConfigApi.deleteConfig: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\ConfigApi();

try {
    $result = $api_instance->deleteConfig();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfigApi->deleteConfig: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConfigApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ConfigApi->new();

eval { 
    my $result = $api_instance->deleteConfig();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConfigApi->deleteConfig: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ConfigApi()

try: 
    # Deletes the current config and generates a new one.
    api_response = api_instance.delete_config()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConfigApi->deleteConfig: %s\n" % e)

Parameters

Responses

Status: 200 - New config response

Status: default - unexpected error


getConfig

Returns the current configuration

Returns the root configuration object and the url mappings


/config

Usage and SDK Samples

curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/config"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConfigApi;

import java.io.File;
import java.util.*;

public class ConfigApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ConfigApi apiInstance = new ConfigApi();
        try {
            rootConfiguration result = apiInstance.getConfig();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConfigApi#getConfig");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ConfigApi;

public class ConfigApiExample {

    public static void main(String[] args) {
        ConfigApi apiInstance = new ConfigApi();
        try {
            rootConfiguration result = apiInstance.getConfig();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConfigApi#getConfig");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];


ConfigApi *apiInstance = [[ConfigApi alloc] init];

// Returns the current configuration
[apiInstance getConfigWithCompletionHandler: 
              ^(rootConfiguration output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.ConfigApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getConfig(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getConfigExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ConfigApi();

            try
            {
                // Returns the current configuration
                rootConfiguration result = apiInstance.getConfig();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConfigApi.getConfig: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\ConfigApi();

try {
    $result = $api_instance->getConfig();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfigApi->getConfig: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConfigApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ConfigApi->new();

eval { 
    my $result = $api_instance->getConfig();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConfigApi->getConfig: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ConfigApi()

try: 
    # Returns the current configuration
    api_response = api_instance.get_config()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConfigApi->getConfig: %s\n" % e)

Parameters

Responses

Status: 200 - Config response

Status: default - unexpected error


patchConfig

Changes part of the rootConfiguration.

Changes a non-url-mapping part of the rootConfiguration. This should be used to change admin-only options


/config

Usage and SDK Samples

curl -X PATCH -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/config"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConfigApi;

import java.io.File;
import java.util.*;

public class ConfigApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ConfigApi apiInstance = new ConfigApi();
        RootConfigurationPatch config = ; // RootConfigurationPatch | an object with only the key-value-pairs that should be replaced
        try {
            rootConfiguration result = apiInstance.patchConfig(config);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConfigApi#patchConfig");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ConfigApi;

public class ConfigApiExample {

    public static void main(String[] args) {
        ConfigApi apiInstance = new ConfigApi();
        RootConfigurationPatch config = ; // RootConfigurationPatch | an object with only the key-value-pairs that should be replaced
        try {
            rootConfiguration result = apiInstance.patchConfig(config);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConfigApi#patchConfig");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

RootConfigurationPatch *config = ; // an object with only the key-value-pairs that should be replaced

ConfigApi *apiInstance = [[ConfigApi alloc] init];

// Changes part of the rootConfiguration.
[apiInstance patchConfigWith:config
              completionHandler: ^(rootConfiguration output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.ConfigApi()

var config = ; // {RootConfigurationPatch} an object with only the key-value-pairs that should be replaced


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchConfig(config, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class patchConfigExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ConfigApi();
            var config = new RootConfigurationPatch(); // RootConfigurationPatch | an object with only the key-value-pairs that should be replaced

            try
            {
                // Changes part of the rootConfiguration.
                rootConfiguration result = apiInstance.patchConfig(config);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConfigApi.patchConfig: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\ConfigApi();
$config = ; // RootConfigurationPatch | an object with only the key-value-pairs that should be replaced

try {
    $result = $api_instance->patchConfig($config);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfigApi->patchConfig: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConfigApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ConfigApi->new();
my $config = WWW::SwaggerClient::Object::RootConfigurationPatch->new(); # RootConfigurationPatch | an object with only the key-value-pairs that should be replaced

eval { 
    my $result = $api_instance->patchConfig(config => $config);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConfigApi->patchConfig: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ConfigApi()
config =  # RootConfigurationPatch | an object with only the key-value-pairs that should be replaced

try: 
    # Changes part of the rootConfiguration.
    api_response = api_instance.patch_config(config)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConfigApi->patchConfig: %s\n" % e)

Parameters

Body parameters
Name Description
config *

Responses

Status: 200 - Patched config response

Status: default - unexpected error


putConfig

Replaces the current configuration with the given one

Replaces the current configuration in the database with the given one. This is an expensive operation, so only use it for e.g. restoring a backup or similar


/config

Usage and SDK Samples

curl -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/config"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConfigApi;

import java.io.File;
import java.util.*;

public class ConfigApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        ConfigApi apiInstance = new ConfigApi();
        RootConfiguration config = ; // RootConfiguration | the new configuration to set in the database
        try {
            rootConfiguration result = apiInstance.putConfig(config);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConfigApi#putConfig");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ConfigApi;

public class ConfigApiExample {

    public static void main(String[] args) {
        ConfigApi apiInstance = new ConfigApi();
        RootConfiguration config = ; // RootConfiguration | the new configuration to set in the database
        try {
            rootConfiguration result = apiInstance.putConfig(config);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConfigApi#putConfig");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

RootConfiguration *config = ; // the new configuration to set in the database

ConfigApi *apiInstance = [[ConfigApi alloc] init];

// Replaces the current configuration with the given one
[apiInstance putConfigWith:config
              completionHandler: ^(rootConfiguration output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.ConfigApi()

var config = ; // {RootConfiguration} the new configuration to set in the database


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.putConfig(config, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class putConfigExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new ConfigApi();
            var config = new RootConfiguration(); // RootConfiguration | the new configuration to set in the database

            try
            {
                // Replaces the current configuration with the given one
                rootConfiguration result = apiInstance.putConfig(config);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConfigApi.putConfig: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\ConfigApi();
$config = ; // RootConfiguration | the new configuration to set in the database

try {
    $result = $api_instance->putConfig($config);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfigApi->putConfig: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConfigApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::ConfigApi->new();
my $config = WWW::SwaggerClient::Object::RootConfiguration->new(); # RootConfiguration | the new configuration to set in the database

eval { 
    my $result = $api_instance->putConfig(config => $config);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConfigApi->putConfig: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.ConfigApi()
config =  # RootConfiguration | the new configuration to set in the database

try: 
    # Replaces the current configuration with the given one
    api_response = api_instance.put_config(config)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConfigApi->putConfig: %s\n" % e)

Parameters

Body parameters
Name Description
config *

Responses

Status: 200 - The new configuration

Status: default - unexpected error


Helpers

getFrontendDto

Returns an object with information for the front-end

Returns all information required for displaying the front-end


/frontenddto

Usage and SDK Samples

curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/frontenddto"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HelpersApi;

import java.io.File;
import java.util.*;

public class HelpersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        HelpersApi apiInstance = new HelpersApi();
        try {
            frontendDto result = apiInstance.getFrontendDto();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HelpersApi#getFrontendDto");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.HelpersApi;

public class HelpersApiExample {

    public static void main(String[] args) {
        HelpersApi apiInstance = new HelpersApi();
        try {
            frontendDto result = apiInstance.getFrontendDto();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HelpersApi#getFrontendDto");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];


HelpersApi *apiInstance = [[HelpersApi alloc] init];

// Returns an object with information for the front-end
[apiInstance getFrontendDtoWithCompletionHandler: 
              ^(frontendDto output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.HelpersApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFrontendDto(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFrontendDtoExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new HelpersApi();

            try
            {
                // Returns an object with information for the front-end
                frontendDto result = apiInstance.getFrontendDto();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HelpersApi.getFrontendDto: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\HelpersApi();

try {
    $result = $api_instance->getFrontendDto();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HelpersApi->getFrontendDto: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::HelpersApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::HelpersApi->new();

eval { 
    my $result = $api_instance->getFrontendDto();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling HelpersApi->getFrontendDto: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.HelpersApi()

try: 
    # Returns an object with information for the front-end
    api_response = api_instance.get_frontend_dto()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HelpersApi->getFrontendDto: %s\n" % e)

Parameters

Responses

Status: 200 - Front-end DTO response

Status: default - unexpected error


getLicenseStatus

Returns the app's current license status

Returns the current license status object


/licensestatus

Usage and SDK Samples

curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/licensestatus"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HelpersApi;

import java.io.File;
import java.util.*;

public class HelpersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        HelpersApi apiInstance = new HelpersApi();
        try {
            licenseStatus result = apiInstance.getLicenseStatus();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HelpersApi#getLicenseStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.HelpersApi;

public class HelpersApiExample {

    public static void main(String[] args) {
        HelpersApi apiInstance = new HelpersApi();
        try {
            licenseStatus result = apiInstance.getLicenseStatus();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HelpersApi#getLicenseStatus");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];


HelpersApi *apiInstance = [[HelpersApi alloc] init];

// Returns the app's current license status
[apiInstance getLicenseStatusWithCompletionHandler: 
              ^(licenseStatus output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.HelpersApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLicenseStatus(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLicenseStatusExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new HelpersApi();

            try
            {
                // Returns the app's current license status
                licenseStatus result = apiInstance.getLicenseStatus();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HelpersApi.getLicenseStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\HelpersApi();

try {
    $result = $api_instance->getLicenseStatus();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HelpersApi->getLicenseStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::HelpersApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::HelpersApi->new();

eval { 
    my $result = $api_instance->getLicenseStatus();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling HelpersApi->getLicenseStatus: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.HelpersApi()

try: 
    # Returns the app's current license status
    api_response = api_instance.get_license_status()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HelpersApi->getLicenseStatus: %s\n" % e)

Parameters

Responses

Status: 200 - License status response

Status: default - unexpected error


getTinyUrlTitleByPageId

Returns the page title for an encoded page ID

Returns the page title for a tinyURL-encoded page ID, e.g. if your tiny URL is /x/abcd, then abcd is the encoded page ID


/tinyurltitle/{id}

Usage and SDK Samples

curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/tinyurltitle/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HelpersApi;

import java.io.File;
import java.util.*;

public class HelpersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        HelpersApi apiInstance = new HelpersApi();
        String id = id_example; // String | tinyURL-encoded page ID
        try {
            inline_response_200 result = apiInstance.getTinyUrlTitleByPageId(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HelpersApi#getTinyUrlTitleByPageId");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.HelpersApi;

public class HelpersApiExample {

    public static void main(String[] args) {
        HelpersApi apiInstance = new HelpersApi();
        String id = id_example; // String | tinyURL-encoded page ID
        try {
            inline_response_200 result = apiInstance.getTinyUrlTitleByPageId(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HelpersApi#getTinyUrlTitleByPageId");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

String *id = id_example; // tinyURL-encoded page ID

HelpersApi *apiInstance = [[HelpersApi alloc] init];

// Returns the page title for an encoded page ID
[apiInstance getTinyUrlTitleByPageIdWith:id
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.HelpersApi()

var id = id_example; // {String} tinyURL-encoded page ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTinyUrlTitleByPageId(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTinyUrlTitleByPageIdExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new HelpersApi();
            var id = id_example;  // String | tinyURL-encoded page ID

            try
            {
                // Returns the page title for an encoded page ID
                inline_response_200 result = apiInstance.getTinyUrlTitleByPageId(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HelpersApi.getTinyUrlTitleByPageId: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\HelpersApi();
$id = id_example; // String | tinyURL-encoded page ID

try {
    $result = $api_instance->getTinyUrlTitleByPageId($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HelpersApi->getTinyUrlTitleByPageId: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::HelpersApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::HelpersApi->new();
my $id = id_example; # String | tinyURL-encoded page ID

eval { 
    my $result = $api_instance->getTinyUrlTitleByPageId(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling HelpersApi->getTinyUrlTitleByPageId: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.HelpersApi()
id = id_example # String | tinyURL-encoded page ID

try: 
    # Returns the page title for an encoded page ID
    api_response = api_instance.get_tiny_url_title_by_page_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HelpersApi->getTinyUrlTitleByPageId: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
tinyURL-encoded page ID
Required

Responses

Status: 200 - Page title response

Status: default - unexpected error


URLMappings

deleteUrlMappingById

Deletes a single URL mapping

Deletes a single URL mapping based on the ID supplied


/config/urlmappings/{id}

Usage and SDK Samples

curl -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/config/urlmappings/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.URLMappingsApi;

import java.io.File;
import java.util.*;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        URLMappingsApi apiInstance = new URLMappingsApi();
        Integer id = 56; // Integer | ID of URL mapping to delete
        try {
            apiInstance.deleteUrlMappingById(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#deleteUrlMappingById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.URLMappingsApi;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        URLMappingsApi apiInstance = new URLMappingsApi();
        Integer id = 56; // Integer | ID of URL mapping to delete
        try {
            apiInstance.deleteUrlMappingById(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#deleteUrlMappingById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

Integer *id = 56; // ID of URL mapping to delete

URLMappingsApi *apiInstance = [[URLMappingsApi alloc] init];

// Deletes a single URL mapping
[apiInstance deleteUrlMappingByIdWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.URLMappingsApi()

var id = 56; // {Integer} ID of URL mapping to delete


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteUrlMappingById(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteUrlMappingByIdExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new URLMappingsApi();
            var id = 56;  // Integer | ID of URL mapping to delete

            try
            {
                // Deletes a single URL mapping
                apiInstance.deleteUrlMappingById(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling URLMappingsApi.deleteUrlMappingById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\URLMappingsApi();
$id = 56; // Integer | ID of URL mapping to delete

try {
    $api_instance->deleteUrlMappingById($id);
} catch (Exception $e) {
    echo 'Exception when calling URLMappingsApi->deleteUrlMappingById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::URLMappingsApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::URLMappingsApi->new();
my $id = 56; # Integer | ID of URL mapping to delete

eval { 
    $api_instance->deleteUrlMappingById(id => $id);
};
if ($@) {
    warn "Exception when calling URLMappingsApi->deleteUrlMappingById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.URLMappingsApi()
id = 56 # Integer | ID of URL mapping to delete

try: 
    # Deletes a single URL mapping
    api_instance.delete_url_mapping_by_id(id)
except ApiException as e:
    print("Exception when calling URLMappingsApi->deleteUrlMappingById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Integer (int32)
ID of URL mapping to delete
Required

Responses

Status: 204 - pet deleted

Status: default - unexpected error


getUrlMappingAccessEventsById

Returns the access events for a given URL mapping

Returns all recorded access events for a given URL mapping. Note that access events are only recorded if the corresponding option in the root configuration is set to true.


/config/urlmappings/{id}/accessevents

Usage and SDK Samples

curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/config/urlmappings/{id}/accessevents"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.URLMappingsApi;

import java.io.File;
import java.util.*;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        URLMappingsApi apiInstance = new URLMappingsApi();
        Integer id = 56; // Integer | ID of URL mapping to retrieve access events for
        try {
            array[accessEvent] result = apiInstance.getUrlMappingAccessEventsById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#getUrlMappingAccessEventsById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.URLMappingsApi;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        URLMappingsApi apiInstance = new URLMappingsApi();
        Integer id = 56; // Integer | ID of URL mapping to retrieve access events for
        try {
            array[accessEvent] result = apiInstance.getUrlMappingAccessEventsById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#getUrlMappingAccessEventsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

Integer *id = 56; // ID of URL mapping to retrieve access events for

URLMappingsApi *apiInstance = [[URLMappingsApi alloc] init];

// Returns the access events for a given URL mapping
[apiInstance getUrlMappingAccessEventsByIdWith:id
              completionHandler: ^(array[accessEvent] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.URLMappingsApi()

var id = 56; // {Integer} ID of URL mapping to retrieve access events for


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUrlMappingAccessEventsById(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUrlMappingAccessEventsByIdExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new URLMappingsApi();
            var id = 56;  // Integer | ID of URL mapping to retrieve access events for

            try
            {
                // Returns the access events for a given URL mapping
                array[accessEvent] result = apiInstance.getUrlMappingAccessEventsById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling URLMappingsApi.getUrlMappingAccessEventsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\URLMappingsApi();
$id = 56; // Integer | ID of URL mapping to retrieve access events for

try {
    $result = $api_instance->getUrlMappingAccessEventsById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling URLMappingsApi->getUrlMappingAccessEventsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::URLMappingsApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::URLMappingsApi->new();
my $id = 56; # Integer | ID of URL mapping to retrieve access events for

eval { 
    my $result = $api_instance->getUrlMappingAccessEventsById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling URLMappingsApi->getUrlMappingAccessEventsById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.URLMappingsApi()
id = 56 # Integer | ID of URL mapping to retrieve access events for

try: 
    # Returns the access events for a given URL mapping
    api_response = api_instance.get_url_mapping_access_events_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling URLMappingsApi->getUrlMappingAccessEventsById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Integer (int32)
ID of URL mapping to retrieve access events for
Required

Responses

Status: 200 - Access events response

Status: default - unexpected error


getUrlMappingById

Returns a single URL mapping

Returns a single URL mapping based on its ID


/config/urlmappings/{id}

Usage and SDK Samples

curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/config/urlmappings/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.URLMappingsApi;

import java.io.File;
import java.util.*;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        URLMappingsApi apiInstance = new URLMappingsApi();
        Integer id = 56; // Integer | ID of urlMapping to fetch
        try {
            urlMapping result = apiInstance.getUrlMappingById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#getUrlMappingById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.URLMappingsApi;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        URLMappingsApi apiInstance = new URLMappingsApi();
        Integer id = 56; // Integer | ID of urlMapping to fetch
        try {
            urlMapping result = apiInstance.getUrlMappingById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#getUrlMappingById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

Integer *id = 56; // ID of urlMapping to fetch

URLMappingsApi *apiInstance = [[URLMappingsApi alloc] init];

// Returns a single URL mapping
[apiInstance getUrlMappingByIdWith:id
              completionHandler: ^(urlMapping output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.URLMappingsApi()

var id = 56; // {Integer} ID of urlMapping to fetch


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUrlMappingById(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUrlMappingByIdExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new URLMappingsApi();
            var id = 56;  // Integer | ID of urlMapping to fetch

            try
            {
                // Returns a single URL mapping
                urlMapping result = apiInstance.getUrlMappingById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling URLMappingsApi.getUrlMappingById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\URLMappingsApi();
$id = 56; // Integer | ID of urlMapping to fetch

try {
    $result = $api_instance->getUrlMappingById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling URLMappingsApi->getUrlMappingById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::URLMappingsApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::URLMappingsApi->new();
my $id = 56; # Integer | ID of urlMapping to fetch

eval { 
    my $result = $api_instance->getUrlMappingById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling URLMappingsApi->getUrlMappingById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.URLMappingsApi()
id = 56 # Integer | ID of urlMapping to fetch

try: 
    # Returns a single URL mapping
    api_response = api_instance.get_url_mapping_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling URLMappingsApi->getUrlMappingById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Integer (int32)
ID of urlMapping to fetch
Required

Responses

Status: 200 - URL mapping response

Status: default - unexpected error


getUrlMappings

Retrieves all or filtered URL mappings

Retrieves all URL mappings. You can also provide filters to only retrieve the matching mappings


/config/urlmappings

Usage and SDK Samples

curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/config/urlmappings?shortUrl=&longUrl="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.URLMappingsApi;

import java.io.File;
import java.util.*;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        URLMappingsApi apiInstance = new URLMappingsApi();
        String shortUrl = shortUrl_example; // String | Optional, if results should be filtered by shortUrl. Will look for exact matches.
        String longUrl = longUrl_example; // String | Optional, if results should be filtered by longUrl. Will look for exact matches.
        try {
            array[urlMapping] result = apiInstance.getUrlMappings(shortUrl, longUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#getUrlMappings");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.URLMappingsApi;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        URLMappingsApi apiInstance = new URLMappingsApi();
        String shortUrl = shortUrl_example; // String | Optional, if results should be filtered by shortUrl. Will look for exact matches.
        String longUrl = longUrl_example; // String | Optional, if results should be filtered by longUrl. Will look for exact matches.
        try {
            array[urlMapping] result = apiInstance.getUrlMappings(shortUrl, longUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#getUrlMappings");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

String *shortUrl = shortUrl_example; // Optional, if results should be filtered by shortUrl. Will look for exact matches. (optional)
String *longUrl = longUrl_example; // Optional, if results should be filtered by longUrl. Will look for exact matches. (optional)

URLMappingsApi *apiInstance = [[URLMappingsApi alloc] init];

// Retrieves all or filtered URL mappings
[apiInstance getUrlMappingsWith:shortUrl
    longUrl:longUrl
              completionHandler: ^(array[urlMapping] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.URLMappingsApi()

var opts = { 
  'shortUrl': shortUrl_example, // {String} Optional, if results should be filtered by shortUrl. Will look for exact matches.
  'longUrl': longUrl_example // {String} Optional, if results should be filtered by longUrl. Will look for exact matches.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUrlMappings(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUrlMappingsExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new URLMappingsApi();
            var shortUrl = shortUrl_example;  // String | Optional, if results should be filtered by shortUrl. Will look for exact matches. (optional) 
            var longUrl = longUrl_example;  // String | Optional, if results should be filtered by longUrl. Will look for exact matches. (optional) 

            try
            {
                // Retrieves all or filtered URL mappings
                array[urlMapping] result = apiInstance.getUrlMappings(shortUrl, longUrl);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling URLMappingsApi.getUrlMappings: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\URLMappingsApi();
$shortUrl = shortUrl_example; // String | Optional, if results should be filtered by shortUrl. Will look for exact matches.
$longUrl = longUrl_example; // String | Optional, if results should be filtered by longUrl. Will look for exact matches.

try {
    $result = $api_instance->getUrlMappings($shortUrl, $longUrl);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling URLMappingsApi->getUrlMappings: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::URLMappingsApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::URLMappingsApi->new();
my $shortUrl = shortUrl_example; # String | Optional, if results should be filtered by shortUrl. Will look for exact matches.
my $longUrl = longUrl_example; # String | Optional, if results should be filtered by longUrl. Will look for exact matches.

eval { 
    my $result = $api_instance->getUrlMappings(shortUrl => $shortUrl, longUrl => $longUrl);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling URLMappingsApi->getUrlMappings: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.URLMappingsApi()
shortUrl = shortUrl_example # String | Optional, if results should be filtered by shortUrl. Will look for exact matches. (optional)
longUrl = longUrl_example # String | Optional, if results should be filtered by longUrl. Will look for exact matches. (optional)

try: 
    # Retrieves all or filtered URL mappings
    api_response = api_instance.get_url_mappings(shortUrl=shortUrl, longUrl=longUrl)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling URLMappingsApi->getUrlMappings: %s\n" % e)

Parameters

Query parameters
Name Description
shortUrl
String
Optional, if results should be filtered by shortUrl. Will look for exact matches.
longUrl
String
Optional, if results should be filtered by longUrl. Will look for exact matches.

Responses

Status: 200 - URL mappings response


patchUrlMappingById

Patches a single URL mapping

Modifies some fields of a single URL mapping based on its ID with the one given in the request. Use this operation instead of PUT if possible


/config/urlmappings/{id}

Usage and SDK Samples

curl -X PATCH -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/config/urlmappings/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.URLMappingsApi;

import java.io.File;
import java.util.*;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        URLMappingsApi apiInstance = new URLMappingsApi();
        Integer id = 56; // Integer | ID of urlMapping to fetch
        UrlMappingPatch urlMapping = ; // UrlMappingPatch | Sparse URL mapping to replace the existing one with
        try {
            urlMapping result = apiInstance.patchUrlMappingById(id, urlMapping);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#patchUrlMappingById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.URLMappingsApi;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        URLMappingsApi apiInstance = new URLMappingsApi();
        Integer id = 56; // Integer | ID of urlMapping to fetch
        UrlMappingPatch urlMapping = ; // UrlMappingPatch | Sparse URL mapping to replace the existing one with
        try {
            urlMapping result = apiInstance.patchUrlMappingById(id, urlMapping);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#patchUrlMappingById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

Integer *id = 56; // ID of urlMapping to fetch
UrlMappingPatch *urlMapping = ; // Sparse URL mapping to replace the existing one with

URLMappingsApi *apiInstance = [[URLMappingsApi alloc] init];

// Patches a single URL mapping
[apiInstance patchUrlMappingByIdWith:id
    urlMapping:urlMapping
              completionHandler: ^(urlMapping output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.URLMappingsApi()

var id = 56; // {Integer} ID of urlMapping to fetch

var urlMapping = ; // {UrlMappingPatch} Sparse URL mapping to replace the existing one with


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchUrlMappingById(id, urlMapping, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class patchUrlMappingByIdExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new URLMappingsApi();
            var id = 56;  // Integer | ID of urlMapping to fetch
            var urlMapping = new UrlMappingPatch(); // UrlMappingPatch | Sparse URL mapping to replace the existing one with

            try
            {
                // Patches a single URL mapping
                urlMapping result = apiInstance.patchUrlMappingById(id, urlMapping);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling URLMappingsApi.patchUrlMappingById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\URLMappingsApi();
$id = 56; // Integer | ID of urlMapping to fetch
$urlMapping = ; // UrlMappingPatch | Sparse URL mapping to replace the existing one with

try {
    $result = $api_instance->patchUrlMappingById($id, $urlMapping);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling URLMappingsApi->patchUrlMappingById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::URLMappingsApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::URLMappingsApi->new();
my $id = 56; # Integer | ID of urlMapping to fetch
my $urlMapping = WWW::SwaggerClient::Object::UrlMappingPatch->new(); # UrlMappingPatch | Sparse URL mapping to replace the existing one with

eval { 
    my $result = $api_instance->patchUrlMappingById(id => $id, urlMapping => $urlMapping);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling URLMappingsApi->patchUrlMappingById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.URLMappingsApi()
id = 56 # Integer | ID of urlMapping to fetch
urlMapping =  # UrlMappingPatch | Sparse URL mapping to replace the existing one with

try: 
    # Patches a single URL mapping
    api_response = api_instance.patch_url_mapping_by_id(id, urlMapping)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling URLMappingsApi->patchUrlMappingById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Integer (int32)
ID of urlMapping to fetch
Required
Body parameters
Name Description
urlMapping *

Responses

Status: 200 - URL mapping response

Status: default - unexpected error


postUrlMapping

Creates a new URL mapping.

Creates a new URL mapping. Short URL must be unique.


/config/urlmappings

Usage and SDK Samples

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/config/urlmappings"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.URLMappingsApi;

import java.io.File;
import java.util.*;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        URLMappingsApi apiInstance = new URLMappingsApi();
        UrlMappingFromUser urlMapping = ; // UrlMappingFromUser | New URL mapping to create
        try {
            urlMapping result = apiInstance.postUrlMapping(urlMapping);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#postUrlMapping");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.URLMappingsApi;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        URLMappingsApi apiInstance = new URLMappingsApi();
        UrlMappingFromUser urlMapping = ; // UrlMappingFromUser | New URL mapping to create
        try {
            urlMapping result = apiInstance.postUrlMapping(urlMapping);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#postUrlMapping");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

UrlMappingFromUser *urlMapping = ; // New URL mapping to create

URLMappingsApi *apiInstance = [[URLMappingsApi alloc] init];

// Creates a new URL mapping.
[apiInstance postUrlMappingWith:urlMapping
              completionHandler: ^(urlMapping output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.URLMappingsApi()

var urlMapping = ; // {UrlMappingFromUser} New URL mapping to create


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postUrlMapping(urlMapping, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postUrlMappingExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new URLMappingsApi();
            var urlMapping = new UrlMappingFromUser(); // UrlMappingFromUser | New URL mapping to create

            try
            {
                // Creates a new URL mapping.
                urlMapping result = apiInstance.postUrlMapping(urlMapping);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling URLMappingsApi.postUrlMapping: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\URLMappingsApi();
$urlMapping = ; // UrlMappingFromUser | New URL mapping to create

try {
    $result = $api_instance->postUrlMapping($urlMapping);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling URLMappingsApi->postUrlMapping: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::URLMappingsApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::URLMappingsApi->new();
my $urlMapping = WWW::SwaggerClient::Object::UrlMappingFromUser->new(); # UrlMappingFromUser | New URL mapping to create

eval { 
    my $result = $api_instance->postUrlMapping(urlMapping => $urlMapping);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling URLMappingsApi->postUrlMapping: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.URLMappingsApi()
urlMapping =  # UrlMappingFromUser | New URL mapping to create

try: 
    # Creates a new URL mapping.
    api_response = api_instance.post_url_mapping(urlMapping)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling URLMappingsApi->postUrlMapping: %s\n" % e)

Parameters

Body parameters
Name Description
urlMapping *

Responses

Status: 200 - New URL mapping created response

Status: default - unexpected error


putUrlMappingById

Replaces a single URL mapping with the given one

Replaces a single URL mapping based on its ID with the one given in the request. This operation is only little more resource intensive than PATCH, but it's okay to use this one.


/config/urlmappings/{id}

Usage and SDK Samples

curl -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://yourconfluence.com/rest/vanityurl-admin/1.0/config/urlmappings/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.URLMappingsApi;

import java.io.File;
import java.util.*;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        URLMappingsApi apiInstance = new URLMappingsApi();
        Integer id = 56; // Integer | ID of urlMapping to fetch
        UrlMappingFromUser urlMapping = ; // UrlMappingFromUser | URL mapping to replace the existing one with
        try {
            urlMapping result = apiInstance.putUrlMappingById(id, urlMapping);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#putUrlMappingById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.URLMappingsApi;

public class URLMappingsApiExample {

    public static void main(String[] args) {
        URLMappingsApi apiInstance = new URLMappingsApi();
        Integer id = 56; // Integer | ID of urlMapping to fetch
        UrlMappingFromUser urlMapping = ; // UrlMappingFromUser | URL mapping to replace the existing one with
        try {
            urlMapping result = apiInstance.putUrlMappingById(id, urlMapping);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLMappingsApi#putUrlMappingById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

Integer *id = 56; // ID of urlMapping to fetch
UrlMappingFromUser *urlMapping = ; // URL mapping to replace the existing one with

URLMappingsApi *apiInstance = [[URLMappingsApi alloc] init];

// Replaces a single URL mapping with the given one
[apiInstance putUrlMappingByIdWith:id
    urlMapping:urlMapping
              completionHandler: ^(urlMapping output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RedirectsAndVanityUrLsForConfluence = require('redirects_and_vanity_ur_ls_for_confluence');
var defaultClient = RedirectsAndVanityUrLsForConfluence.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new RedirectsAndVanityUrLsForConfluence.URLMappingsApi()

var id = 56; // {Integer} ID of urlMapping to fetch

var urlMapping = ; // {UrlMappingFromUser} URL mapping to replace the existing one with


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.putUrlMappingById(id, urlMapping, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class putUrlMappingByIdExample
    {
        public void main()
        {
            
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new URLMappingsApi();
            var id = 56;  // Integer | ID of urlMapping to fetch
            var urlMapping = new UrlMappingFromUser(); // UrlMappingFromUser | URL mapping to replace the existing one with

            try
            {
                // Replaces a single URL mapping with the given one
                urlMapping result = apiInstance.putUrlMappingById(id, urlMapping);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling URLMappingsApi.putUrlMappingById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\Api\URLMappingsApi();
$id = 56; // Integer | ID of urlMapping to fetch
$urlMapping = ; // UrlMappingFromUser | URL mapping to replace the existing one with

try {
    $result = $api_instance->putUrlMappingById($id, $urlMapping);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling URLMappingsApi->putUrlMappingById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::URLMappingsApi;

# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::URLMappingsApi->new();
my $id = 56; # Integer | ID of urlMapping to fetch
my $urlMapping = WWW::SwaggerClient::Object::UrlMappingFromUser->new(); # UrlMappingFromUser | URL mapping to replace the existing one with

eval { 
    my $result = $api_instance->putUrlMappingById(id => $id, urlMapping => $urlMapping);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling URLMappingsApi->putUrlMappingById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.URLMappingsApi()
id = 56 # Integer | ID of urlMapping to fetch
urlMapping =  # UrlMappingFromUser | URL mapping to replace the existing one with

try: 
    # Replaces a single URL mapping with the given one
    api_response = api_instance.put_url_mapping_by_id(id, urlMapping)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling URLMappingsApi->putUrlMappingById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Integer (int32)
ID of urlMapping to fetch
Required
Body parameters
Name Description
urlMapping *

Responses

Status: 200 - URL mapping response

Status: default - unexpected error


Generated 2017-11-08T14:20:22.602Z