/redirect
const url = 'https://api.quantcdn.io/v1/redirect';const options = { method: 'POST', headers: { 'Quant-Customer': 'example', 'Quant-Project': 'example', 'Quant-Token': '<Quant-Token>', 'Content-Type': 'application/json' }, body: '{"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}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”The customer account name
The project machine name
Request Bodyrequired
Section titled “Request Bodyrequired”object
The redirect from URL
The destination URL
The HTTP code to send with the redirect
Example
301If the redirect is published
User defined timestamp for this content item
Metadata stored with this revision
object
The author user id
The author name
The author email
A revision log message
Custom field 1
Custom field 2
Tag for the source of this revision
List of transitions
A transition definition (e.g. for scheduled publish)
object
The transition state (e.g. ‘published’)
The date from which the transition applies
Responses
Section titled “Responses”Okay
object
The file MD5
The type of asset
Content length of the asset
The revision number
Unix timestamp
If the underlying file for this revision has been deleted
The time the file was deleted
List of transitions
A transition definition (e.g. for scheduled publish)
object
The transition state (e.g. ‘published’)
The date from which the transition applies
Metadata stored with this revision
object
The author user id
The author name
The author email
A revision log message
Custom field 1
Custom field 2
Tag for the source of this revision
The HTTP code
Example
301The redirecrt from URL
Noop
