Skip to content

/redirect

POST
/redirect
curl --request POST \
--url https://api.quantcdn.io/v1/redirect \
--header 'Content-Type: application/json' \
--header 'Quant-Customer: example' \
--header 'Quant-Project: example' \
--header 'Quant-Token: <Quant-Token>' \
--data '{ "url": "example", "redirect_url": "example", "redirect_http_code": 301, "published": true, "content_timestamp": 1, "info": { "author_user": "example", "author_name": "example", "author_email": "example", "log": "example", "custom_1": "example", "custom_2": "example", "source": "example" }, "transitions": [ { "state": "published", "date_timestamp": 1 } ] }'

Create a redirect

Quant-Customer
required
string

The customer account name

Quant-Project
required
string

The project machine name

Media typeapplication/json
object
url
required

The redirect from URL

string
redirect_url
required

The destination URL

string
redirect_http_code
required

The HTTP code to send with the redirect

integer
Example
301
published
required

If the redirect is published

boolean
content_timestamp

User defined timestamp for this content item

integer
info

Metadata stored with this revision

object
author_user

The author user id

string
<= 128 characters
author_name

The author name

string
<= 128 characters
author_email

The author email

string
<= 255 characters
log

A revision log message

string
<= 255 characters
custom_1

Custom field 1

string
<= 255 characters
custom_2

Custom field 2

string
<= 255 characters
source

Tag for the source of this revision

string
<= 50 characters
transitions

List of transitions

Array<object>

A transition definition (e.g. for scheduled publish)

object
state

The transition state (e.g. ‘published’)

string
Allowed values: published unpublished
date_timestamp

The date from which the transition applies

integer

Okay

Media type*/*
object
md5

The file MD5

string
type

The type of asset

string
byte_length

Content length of the asset

integer
revision_number

The revision number

integer
date_timestamp

Unix timestamp

integer
deleted

If the underlying file for this revision has been deleted

boolean
deleted_timestamp

The time the file was deleted

integer
transitions

List of transitions

Array<object>

A transition definition (e.g. for scheduled publish)

object
state

The transition state (e.g. ‘published’)

string
Allowed values: published unpublished
date_timestamp

The date from which the transition applies

integer
info

Metadata stored with this revision

object
author_user

The author user id

string
<= 128 characters
author_name

The author name

string
<= 128 characters
author_email

The author email

string
<= 255 characters
log

A revision log message

string
<= 255 characters
custom_1

Custom field 1

string
<= 255 characters
custom_2

Custom field 2

string
<= 255 characters
source

Tag for the source of this revision

string
<= 50 characters
redirect_http_code

The HTTP code

integer
Example
301
highest_revision_number
string
url

The redirecrt from URL

string

Noop