POST /v3/publishing-events/{publishing_event_id}/progress-updates
1 min
POST
https://api.cmp.optimizely.com/v3/publishing-events/{publishing_event_id}/progress-updates
Path Parameters
- publishing_event_idstringrequiredExampleDescription
Body Parameters
- bodyPublishingEventProgressUpdateCreateRequestrequiredDescription
- levelstring<info | error>ExampleDescriptionDefaultinfoAllowedinfoerror
- messagestringrequiredExampleDescriptionMin Length1Max Length500
Responses
204
400
- ErrorExample
{ "message": "Unsupported arguments: a,b,c" }Description- messagestringrequiredExampleDescription
- errorsmap<string, string>Description
401
- ErrorExample
{ "message": "Unauthorized" }Description- messagestringrequiredExampleDescription
- errorsmap<string, string>Description
403
- ErrorExample
{ "message": "You do not have the permission to perform this operation" }Description- messagestringrequiredExampleDescription
- errorsmap<string, string>Description
404
- ErrorExample
{ "message": "Resource not found" }Description- messagestringrequiredExampleDescription
- errorsmap<string, string>Description
curl
curl --request POST \
--url https://api.cmp.optimizely.com/v3/publishing-events/{publishing_event_id}/progress-updates \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"level": "info",
"message": "All assets are ready. Waiting for the destination to confirm publishing."
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"level": "info",
"message": "All assets are ready. Waiting for the destination to confirm publishing."
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cmp.optimizely.com/v3/publishing-events/{publishing_event_id}/progress-updates", 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/publishing-events/{publishing_event_id}/progress-updates")
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"
request.body = JSON.dump({
"level": "info",
"message": "All assets are ready. Waiting for the destination to confirm publishing."
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.cmp.optimizely.com/v3/publishing-events/{publishing_event_id}/progress-updates"
payload = json.dumps({
"level": "info",
"message": "All assets are ready. Waiting for the destination to confirm publishing."
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
204
// Progress update posted
400
// Client error
{
"message": "Not found",
"errors": ""
}401
// Authorization error
{
"message": "Not found",
"errors": ""
}403
// Permission error
{
"message": "Not found",
"errors": ""
}404
// Not found error
{
"message": "Not found",
"errors": ""
}