Updating an existing HTTP Redirect service in the API requires specific syntax depending on whether you are using REST or SOAP. Use this table to find the syntax for your command.
Understanding How The API Works »
REST Syntax
Click to view all REST Resources |
/REST/HTTPRedirect/ PUT — Updates an existing HTTP Redirect service on the zone/node indicated.
HTTP Action — PUT
URI — https://api.dynect.net/REST/HTTPRedirect/<zone>/<fqdn>/
|
Arguments — Click for More Info
- string
code — Required. HTTP response code to return for redirection.
Valid values:
301 – Permanent redirect
302 – Temporary redirect
- string
keep_uri — Required. A flag indicating whether the redirection should include the originally requested URI.
Valid values:
Y
N
- string
url — Required. The target URL where the client is sent. Must begin with either http:// or https://.
|
Response — Click for More Info
- string
code — HTTP response code to return for redirection.
Valid values:
301 – Permanent redirect
302 – Temporary redirect
- string
fqdn — Fully qualified domain name of a node in the zone.
- string
keep_uri — A flag indicating whether the redirection should include the originally requested URI.
Valid values:
Y
N
- string
url — The target URL where the client is sent. Must begin with either http:// or https://.
- string
zone — Name of the zone.
|
SOAP Syntax
Click to view all SOAP Commands |
UpdateHTTPRedirect — Updates an existing HTTP Redirect service at the zone/node indicated.
|
Arguments — Click for More Info
- string
url — Required. The target URL where the client is sent. Must begin with either http:// or https://.
- string
code — Required. HTTP response code to return for redirection.
Valid values:
301 – Permanent redirect
302 – Temporary redirect
- string
keep_uri — Required. A boolean indicating whether the redirection should include the originally requested URI.
Valid values:
Y
N
- string
fqdn — Required. Name of node where service will exist.
- string
token — Required. The session identifier.
- string
zone — Required. Name of zone where the service will exist.
|
Response — Click for More Info
- hash
data
- string
url — The target URL where the client is sent. Must begin with either http:// or https://.
- string
code — HTTP response code to return for redirection.
Valid values:
301 – Permanent redirect
302 – Temporary redirect
- string
keep_uri — A flag indicating whether the redirection should include the originally requested URI.
Valid values:
Y
N
- string
fqdn — Fully qualified domain name of a node in the zone.
- string
zone — Name of the zone.
|
Example Request — Click for More Info
{
'url' => 'http://example.net',
'code' => '301',
'keep_uri' => 'y',
'fqdn' => 'www.example.com',
'token' => 'asdlkfjasl23j4879afa',
'zone' => 'example.com',
}
|
DNS API Knowledge Base