Table of Contents

Function

The RedirectUpdate task updates the data of a redirect. For example, the target address (target), mode or the backup target addresses (backup) can be changed.

Description

The structure for RedirectUpdate is similar to that of RedirectCreate. The values "source" and "type" must not be changed during the update. The value "type" cannot be changed because URLs are usually not valid email addresses and email addresses are usually not valid URLs.

Route: PUT /redirect/{source}

Request
{
    "source": "example.com",
    "target": "example-target.com/test",
    "type": "DOMAIN",
    "mode": "HTTP"
}
Response
{
    "stid": "20190701-app2-dev-15314",
    "status": {
        "code": "S0502",
        "text": "Redirect has been updated successfully.",
        "type": "SUCCESS"
    },
    "object": {
        "type": "Redirect",
        "summary": 1
    },
    "object": {
        "type": "Redirect",
        "value": "example.com",
        "data": {
            "created": "2014-10-24T09:43:47.000+0200",
            "updated": "2017-11-17T17:35:21.000+0100",
            "source": "example.com",
            "target": "example-target.com/test",
            "type": "DOMAIN",
            "mode": "HTTP",
            "domain": "example.com"
        }
    }
}

Task code: 0502
Uses Redirect object

Domain redirect update

Request
<request>
	<auth>
		<user>customer</user>
		<password>password</password>
		<context>4</context>
	</auth>
	<task>
		<code>0502</code>
		<redirect>
			<type>domain</type>
			<mode>frame</mode>
			<title>New title</title>
			<source>www.source-example.com</source>
			<target>www.target-domain.de/somewhere</target>
			<backup>www.target-example-backup.com/somewhere/else</backup>
		</redirect>
	</task>
</request>
Response
<response>
	<result>
		<status>
			<code>S0502</code>
			<text>Redirect has been updated successfully.</text>
			<type>success</type>
		</status>
	</result>
</response>

Email redirect update (single)

Request
<request>
	<auth>
		<user>customer</user>
		<password>password</password>
		<context>4</context>
	</auth>
	<task>
		<code>0502</code>
		<redirect>
			<type>email</type>
			<mode>single</mode>
			<source>source@email-address.de</source>
			<target>new_target@email-address.net</target>
		</redirect>
	</task>
</request>
Response
<response>
	<result>
		<status>
			<code>S0502</code>
			<text>Redirect has been updated successfully.</text>
			<type>success</type>
		</status>
	</result>
</response>