Write-backs
Acknowledge write-backs
Report which leased write-backs applied and which failed.
POST
/
api
/
v1
/
writebacks
/
ack
Acknowledge applied or failed write-backs
curl --request POST \
--url https://app.elastly.io/api/v1/writebacks/ack \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"results": [
{
"id": "<string>",
"ok": true,
"error": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({results: [{id: '<string>', ok: true, error: '<string>'}]})
};
fetch('https://app.elastly.io/api/v1/writebacks/ack', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.elastly.io/api/v1/writebacks/ack"
payload = { "results": [
{
"id": "<string>",
"ok": True,
"error": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.elastly.io/api/v1/writebacks/ack",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'results' => [
[
'id' => '<string>',
'ok' => true,
'error' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://app.elastly.io/api/v1/writebacks/ack")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"results\": [\n {\n \"id\": \"<string>\",\n \"ok\": true,\n \"error\": \"<string>\"\n }\n ]\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.elastly.io/api/v1/writebacks/ack"
payload := strings.NewReader("{\n \"results\": [\n {\n \"id\": \"<string>\",\n \"ok\": true,\n \"error\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"applied": 0,
"failed": 0,
"expired": 0
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}Acking closes out real write-back tasks. An ack sent after the lease expired is counted as expired
and never applied. The interactive playground is turned off here so a docs page can never close out
live work.
Authorizations
Elastly API key. Scopes: erp (price serving), connector (ingest + write-backs), storefront.
Body
application/json
Required array length:
1 - 500 elementsShow child attributes
Show child attributes
Was this page helpful?
⌘I
Acknowledge applied or failed write-backs
curl --request POST \
--url https://app.elastly.io/api/v1/writebacks/ack \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"results": [
{
"id": "<string>",
"ok": true,
"error": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({results: [{id: '<string>', ok: true, error: '<string>'}]})
};
fetch('https://app.elastly.io/api/v1/writebacks/ack', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.elastly.io/api/v1/writebacks/ack"
payload = { "results": [
{
"id": "<string>",
"ok": True,
"error": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.elastly.io/api/v1/writebacks/ack",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'results' => [
[
'id' => '<string>',
'ok' => true,
'error' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://app.elastly.io/api/v1/writebacks/ack")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"results\": [\n {\n \"id\": \"<string>\",\n \"ok\": true,\n \"error\": \"<string>\"\n }\n ]\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.elastly.io/api/v1/writebacks/ack"
payload := strings.NewReader("{\n \"results\": [\n {\n \"id\": \"<string>\",\n \"ok\": true,\n \"error\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"applied": 0,
"failed": 0,
"expired": 0
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}