Private

Update a redirect if it exists or creates a new one for a given id

put/redirects/{id}

Request

  • Base URL
    /v1 (relative, and the document’s source URL is not known)
  • Auth
    API key in header Authorization

Path parameters

idstring required

Unique identifier for a redirect, represented as the base64 encoding of the from path

Example:a1b2c3d4e5f67890123456789abcdef0

Request body

fromstring
tostring

Example request

{
  "from": "/economy",
  "to": "/business"
}

Response

The updated redirect

fromstring
tostring
idstring

Unique identifier for a redirect, represented as the base64 encoding of the from path

Example response

{
  "from": "/economy",
  "to": "/business",
  "id": "a1b2c3d4e5f67890123456789abcdef0",
  "links": {
    "self": {
      "href": "https://api.beta.ons.gov.uk/v1/redirects/a1b2c3d4e5f67890123456789abcdef0",
      "id": "a1b2c3d4e5f67890123456789abcdef0"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.