Retrieving one or all HTTP Redirect services 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/ GET — Retrieves one or all HTTP Redirect services on the zone/node indicated.
HTTP Action — GET
URIs:
Get one HTTP Redirect — https://api.dynect.net/REST/HTTPRedirect/<zone>/<fqdn>/
Get all HTTP Redirect — https://api.dynect.net/REST/HTTPRedirect/<zone>/
|
Arguments:
Get one HTTP Redirect — No Arguments.
Get all HTTP Redirect services:
- string
detail — A boolean indicating whether or not to return the full details or a list of service resources.
Valid values:
Y – The details of each service are specified.
N – The list of service resources is returned. Default.
|
Response:
Get one HTTP Redirect — 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.
Get all HTTP Redirect services — array — Individual HTTP Redirect service resources.
|
SOAP Syntax
Click to view all SOAP Commands |
GetOneHTTPRedirect — Retrieves one HTTP Redirect service from the zone/node indicated.
GetHTTPRedirects — Retrieves all HTTP Redirect services from the zone indicated.
|
Arguments:
GetOneHTTPRedirect —
- 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.
GetHTTPRedirects —
- string
token — Required. The session identifier.
- string
zone — Required. Name of zone where the service will exist.
|
Response:
GetOneHTTPRedirect — 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.
GetHTTPRedirects — Click for More Info
- array
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 (GetOneHTTPRedirect) — Click for More Info
{
'fqdn' => 'www.example.com',
'token' => 'asdlkfjasl23j4879afa',
'zone' => 'example.com',
}
|
Example Request (GetHTTPRedirects) — Click for More Info
{
'zone' => 'example.com',
'token' => 'asdlj34ot879834cdzjklfK',
}
|
DNS API Knowledge Base