POST /structured-content/content-types/{content_type_id}/managed-migrations/{job_id}/start
1 min
POST
https://api.cmp.optimizely.com/v3/structured-content/content-types/{content_type_id}/managed-migrations/{job_id}/start
Path Parameters
- content_type_idstringrequiredDescription
- job_idstringrequiredDescription
Responses
200
- SCContentTypeManagedMigrationStartResponseExample
{ "started": true, "job_id": "sample_job_id" }- startedbooleanDescription
- job_idstringDescription
400
- HTTPExceptionExample
{ "detail": "No Job found for job_id: {job_id} and instance_id: {instance_id} with status not_started or error" }- detailstringDescription
404
- HTTPExceptionExample
{ "message": "No Job found for job_id: {job_id} and instance_id: {instance_id}." }- detailstringDescription
curl
curl --request POST \
--url https://api.cmp.optimizely.com/v3/structured-content/content-types/{content_type_id}/managed-migrations/{job_id}/start \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.cmp.optimizely.com/v3/structured-content/content-types/{content_type_id}/managed-migrations/{job_id}/start", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.cmp.optimizely.com/v3/structured-content/content-types/{content_type_id}/managed-migrations/{job_id}/start")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.cmp.optimizely.com/v3/structured-content/content-types/{content_type_id}/managed-migrations/{job_id}/start"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successful response with started=true
{
"started": false,
"job_id": ""
}400
// Error response when job found by job_id but job status is invalid (status not in [error or not_started])
{
"detail": ""
}404
// Error response when no job found by job_id with status not_started, error
{
"detail": ""
}