ListURLForwardings
ListURLForwardings returns a pagenated list of URL forwarding entries for a domain.
Endpoint: GET /v4/domains/{domainName}/url/forwarding
Parameters:
domainName
(path parameters)
string
DomainName is the domain to list URL forwarding entries for.
perPage
int32
Per Page is the number of records to return per request. Per Page defaults to 1,000.
page
int32
Page is which page to return.
Response:
urlForwarding
URLForwarding is the list of URL forwarding entries.
nextPage
int32
NextPage is the identifier for the next page of results. It is only populated if there is another page of results after the current page.
lastPage
int32
LastPage is the identifier for the final page of results. It is only populated if there is another page of results after the current page.
Example:
curl -u 'username:token' 'https://api.dev.name.com/v4/domains/example.org/url/forwarding'
{ "urlForwarding": [ { "domainName": "example.org" } ] }
GetURLForwarding
GetURLForwarding returns an URL forwarding entry.
Endpoint: GET /v4/domains/{domainName}/url/forwarding/{host}
Parameters:
domainName
(path parameters)
string
DomainName is the domain to list URL forwarding entry for.
host
(path parameters)
string
Host is the part of the domain name before the domain. i.e. www is the host for www.example.org.
Response:
domainName
(read only)
string
DomainName is the domain part of the hostname to forward.
host
string
Host is the entirety of the hostname. i.e. www.example.org
forwardsTo
string
ForwardsTo is the URL this host will be forwarded to.
type
string
Type is the type of forwarding. Valid types are: Masked - This retains the original domain in the address bar and will not reveal or display the actual destination URL. If you are forwarding knowledgebase.ninja to Name.com, the address bar will say knowledgebase.ninja. This is sometimes called iframe forwarding. And: Redirect - This does not retain the original domain in the address bar, so the user will see it change and realize they were forwarded from the URL they originally entered. If you are forwarding knowledgebase.ninja to Name.com, the address bar will say Name.com. This is also called 301 forwarding.
title
string
Title is the title for the html page to use if the type is masked. Values are ignored for types other then "masked".
meta
string
Meta is the meta tags to add to the html page if the type is masked. ex: "meta name='keywords' content='fish, denver, platte'". Values are ignored for types other then "masked".
Example:
curl -u 'username:token' 'https://api.dev.name.com/v4/domains/example.org/url/forwarding/www'
{ "domainName": "example.org", "host": "www.example.org", "forwardsTo": "https://www.example.net", "type": "redirect" }
CreateURLForwarding
CreateURLForwarding creates an URL forwarding entry. If this is the first URL forwarding entry, it may modify the A records for the domain accordingly.
Endpoint: POST /v4/domains/{domainName}/url/forwarding
Parameters:
domainName
(path parameters)
string
DomainName is the domain part of the hostname to forward.
host
(required)
string
Host is the entirety of the hostname. i.e. www.example.org
forwardsTo
(required)
string
ForwardsTo is the URL this host will be forwarded to.
type
string
Type is the type of forwarding. Valid types are: Masked - This retains the original domain in the address bar and will not reveal or display the actual destination URL. If you are forwarding knowledgebase.ninja to Name.com, the address bar will say knowledgebase.ninja. This is sometimes called iframe forwarding. And: Redirect - This does not retain the original domain in the address bar, so the user will see it change and realize they were forwarded from the URL they originally entered. If you are forwarding knowledgebase.ninja to Name.com, the address bar will say Name.com. This is also called 301 forwarding.
title
string
Title is the title for the html page to use if the type is masked. Values are ignored for types other then "masked".
meta
string
Meta is the meta tags to add to the html page if the type is masked. ex: "meta name='keywords' content='fish, denver, platte'". Values are ignored for types other then "masked".
Response:
domainName
(read only)
string
DomainName is the domain part of the hostname to forward.
host
string
Host is the entirety of the hostname. i.e. www.example.org
forwardsTo
string
ForwardsTo is the URL this host will be forwarded to.
type
string
Type is the type of forwarding. Valid types are: Masked - This retains the original domain in the address bar and will not reveal or display the actual destination URL. If you are forwarding knowledgebase.ninja to Name.com, the address bar will say knowledgebase.ninja. This is sometimes called iframe forwarding. And: Redirect - This does not retain the original domain in the address bar, so the user will see it change and realize they were forwarded from the URL they originally entered. If you are forwarding knowledgebase.ninja to Name.com, the address bar will say Name.com. This is also called 301 forwarding.
title
string
Title is the title for the html page to use if the type is masked. Values are ignored for types other then "masked".
meta
string
Meta is the meta tags to add to the html page if the type is masked. ex: "meta name='keywords' content='fish, denver, platte'". Values are ignored for types other then "masked".
Example:
curl -u 'username:token' 'https://api.dev.name.com/v4/domains/example.org/url/forwarding' -X POST -H 'Content-Type: application/json' --data '{"host":"www.example.org","forwardsTo":"https:\/\/www.example.net","type":"redirect"}'
{ "domainName": "example.org", "host": "www.example.org", "forwardsTo": "https://www.example.net", "type": "redirect" }
UpdateURLForwarding
UpdateURLForwarding updates which URL the host is being forwarded to.
Endpoint: PUT /v4/domains/{domainName}/url/forwarding/{host}
Parameters:
domainName
(path parameters)
string
DomainName is the domain part of the hostname to forward.
host
(path parameters)
string
Host is the entirety of the hostname. i.e. www.example.org
forwardsTo
(required)
string
ForwardsTo is the URL this host will be forwarded to.
type
string
Type is the type of forwarding. Valid types are: Masked - This retains the original domain in the address bar and will not reveal or display the actual destination URL. If you are forwarding knowledgebase.ninja to Name.com, the address bar will say knowledgebase.ninja. This is sometimes called iframe forwarding. And: Redirect - This does not retain the original domain in the address bar, so the user will see it change and realize they were forwarded from the URL they originally entered. If you are forwarding knowledgebase.ninja to Name.com, the address bar will say Name.com. This is also called 301 forwarding.
title
string
Title is the title for the html page to use if the type is masked. Values are ignored for types other then "masked".
meta
string
Meta is the meta tags to add to the html page if the type is masked. ex: "meta name='keywords' content='fish, denver, platte'". Values are ignored for types other then "masked".
Response:
domainName
(read only)
string
DomainName is the domain part of the hostname to forward.
host
string
Host is the entirety of the hostname. i.e. www.example.org
forwardsTo
string
ForwardsTo is the URL this host will be forwarded to.
type
string
Type is the type of forwarding. Valid types are: Masked - This retains the original domain in the address bar and will not reveal or display the actual destination URL. If you are forwarding knowledgebase.ninja to Name.com, the address bar will say knowledgebase.ninja. This is sometimes called iframe forwarding. And: Redirect - This does not retain the original domain in the address bar, so the user will see it change and realize they were forwarded from the URL they originally entered. If you are forwarding knowledgebase.ninja to Name.com, the address bar will say Name.com. This is also called 301 forwarding.
title
string
Title is the title for the html page to use if the type is masked. Values are ignored for types other then "masked".
meta
string
Meta is the meta tags to add to the html page if the type is masked. ex: "meta name='keywords' content='fish, denver, platte'". Values are ignored for types other then "masked".
Example:
curl -u 'username:token' 'https://api.dev.name.com/v4/domains/example.org/url/forwarding/www.example.org' -X PUT -H 'Content-Type: application/json' --data '{"forwardsTo":"https:\/\/www.example.net","type":"redirect"}'
{ "domainName": "example.org", "host": "www.example.org", "forwardsTo": "https://www.example.net", "type": "redirect" }
DeleteURLForwarding
DeleteURLForwarding deletes the URL forwarding entry.
Endpoint: DELETE /v4/domains/{domainName}/url/forwarding/{host}
Parameters:
domainName
(path parameters)
string
DomainName is the domain to delete the URL forwardind entry from.
host
(path parameters)
string
Host is the part of the domain name before the domain. i.e. www is the host for www.example.org.
Response:
Empty response.
Example:
curl -u 'username:token' 'https://api.dev.name.com/v4/domains/example.org/url/forwarding/www' -X DELETE
{}