Cache Management
Update Placements
지면 등록
지면 정보를 캐시에 저장합니다. 지면 메타데이터를 기반으로 제공 로직을 업데이트하는 데 사용됩니다.
POST
/
api
/
cache
/
placements
Update Placements
curl --request POST \
--url https://your_a2_service/api/cache/placements \
--header 'Content-Type: application/json' \
--data '
[
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"display": {
"clktype": 1,
"instl": 0,
"priv": 0,
"unit": 2
},
"siteid": "<string>",
"video": {
"boxing": 1,
"maxext": 0,
"podseq": 0,
"skipafter": 0,
"skipmin": 0,
"slotinpod": 0,
"unit": 2
}
}
]
'import requests
url = "https://your_a2_service/api/cache/placements"
payload = [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"display": {
"clktype": 1,
"instl": 0,
"priv": 0,
"unit": 2
},
"siteid": "<string>",
"video": {
"boxing": 1,
"maxext": 0,
"podseq": 0,
"skipafter": 0,
"skipmin": 0,
"slotinpod": 0,
"unit": 2
}
}
]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{
created_at: '2023-11-07T05:31:56Z',
id: '<string>',
display: {clktype: 1, instl: 0, priv: 0, unit: 2},
siteid: '<string>',
video: {
boxing: 1,
maxext: 0,
podseq: 0,
skipafter: 0,
skipmin: 0,
slotinpod: 0,
unit: 2
}
}
])
};
fetch('https://your_a2_service/api/cache/placements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/api/cache/placements",
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([
[
'created_at' => '2023-11-07T05:31:56Z',
'id' => '<string>',
'display' => [
'clktype' => 1,
'instl' => 0,
'priv' => 0,
'unit' => 2
],
'siteid' => '<string>',
'video' => [
'boxing' => 1,
'maxext' => 0,
'podseq' => 0,
'skipafter' => 0,
'skipmin' => 0,
'slotinpod' => 0,
'unit' => 2
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/api/cache/placements"
payload := strings.NewReader("[\n {\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"display\": {\n \"clktype\": 1,\n \"instl\": 0,\n \"priv\": 0,\n \"unit\": 2\n },\n \"siteid\": \"<string>\",\n \"video\": {\n \"boxing\": 1,\n \"maxext\": 0,\n \"podseq\": 0,\n \"skipafter\": 0,\n \"skipmin\": 0,\n \"slotinpod\": 0,\n \"unit\": 2\n }\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://your_a2_service/api/cache/placements")
.header("Content-Type", "application/json")
.body("[\n {\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"display\": {\n \"clktype\": 1,\n \"instl\": 0,\n \"priv\": 0,\n \"unit\": 2\n },\n \"siteid\": \"<string>\",\n \"video\": {\n \"boxing\": 1,\n \"maxext\": 0,\n \"podseq\": 0,\n \"skipafter\": 0,\n \"skipmin\": 0,\n \"slotinpod\": 0,\n \"unit\": 2\n }\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/cache/placements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"display\": {\n \"clktype\": 1,\n \"instl\": 0,\n \"priv\": 0,\n \"unit\": 2\n },\n \"siteid\": \"<string>\",\n \"video\": {\n \"boxing\": 1,\n \"maxext\": 0,\n \"podseq\": 0,\n \"skipafter\": 0,\n \"skipmin\": 0,\n \"slotinpod\": 0,\n \"unit\": 2\n }\n }\n]"
response = http.request(request)
puts response.read_body본문
application/json
The date and time when the placement was created.
ID of the placement (uuid4) a.k.a tagid in internal system.
Placement Subtype Object that indicates that this may be a display placement and provides additional detail related thereto. Refer to Object: DisplayPlacement.
Show child attributes
Show child attributes
Additional placement-specific extensions. Defaults to the PlacementExt object.
Show child attributes
Show child attributes
(deprecated)
Placement Subtype Object that indicates that this may be a video placement and provides additional detail related thereto. Refer to Object: VideoPlacement.
Show child attributes
Show child attributes
응답
성공
이 페이지가 도움이 되었나요?
⌘I
Update Placements
curl --request POST \
--url https://your_a2_service/api/cache/placements \
--header 'Content-Type: application/json' \
--data '
[
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"display": {
"clktype": 1,
"instl": 0,
"priv": 0,
"unit": 2
},
"siteid": "<string>",
"video": {
"boxing": 1,
"maxext": 0,
"podseq": 0,
"skipafter": 0,
"skipmin": 0,
"slotinpod": 0,
"unit": 2
}
}
]
'import requests
url = "https://your_a2_service/api/cache/placements"
payload = [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"display": {
"clktype": 1,
"instl": 0,
"priv": 0,
"unit": 2
},
"siteid": "<string>",
"video": {
"boxing": 1,
"maxext": 0,
"podseq": 0,
"skipafter": 0,
"skipmin": 0,
"slotinpod": 0,
"unit": 2
}
}
]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{
created_at: '2023-11-07T05:31:56Z',
id: '<string>',
display: {clktype: 1, instl: 0, priv: 0, unit: 2},
siteid: '<string>',
video: {
boxing: 1,
maxext: 0,
podseq: 0,
skipafter: 0,
skipmin: 0,
slotinpod: 0,
unit: 2
}
}
])
};
fetch('https://your_a2_service/api/cache/placements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/api/cache/placements",
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([
[
'created_at' => '2023-11-07T05:31:56Z',
'id' => '<string>',
'display' => [
'clktype' => 1,
'instl' => 0,
'priv' => 0,
'unit' => 2
],
'siteid' => '<string>',
'video' => [
'boxing' => 1,
'maxext' => 0,
'podseq' => 0,
'skipafter' => 0,
'skipmin' => 0,
'slotinpod' => 0,
'unit' => 2
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/api/cache/placements"
payload := strings.NewReader("[\n {\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"display\": {\n \"clktype\": 1,\n \"instl\": 0,\n \"priv\": 0,\n \"unit\": 2\n },\n \"siteid\": \"<string>\",\n \"video\": {\n \"boxing\": 1,\n \"maxext\": 0,\n \"podseq\": 0,\n \"skipafter\": 0,\n \"skipmin\": 0,\n \"slotinpod\": 0,\n \"unit\": 2\n }\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://your_a2_service/api/cache/placements")
.header("Content-Type", "application/json")
.body("[\n {\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"display\": {\n \"clktype\": 1,\n \"instl\": 0,\n \"priv\": 0,\n \"unit\": 2\n },\n \"siteid\": \"<string>\",\n \"video\": {\n \"boxing\": 1,\n \"maxext\": 0,\n \"podseq\": 0,\n \"skipafter\": 0,\n \"skipmin\": 0,\n \"slotinpod\": 0,\n \"unit\": 2\n }\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/cache/placements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"display\": {\n \"clktype\": 1,\n \"instl\": 0,\n \"priv\": 0,\n \"unit\": 2\n },\n \"siteid\": \"<string>\",\n \"video\": {\n \"boxing\": 1,\n \"maxext\": 0,\n \"podseq\": 0,\n \"skipafter\": 0,\n \"skipmin\": 0,\n \"slotinpod\": 0,\n \"unit\": 2\n }\n }\n]"
response = http.request(request)
puts response.read_body