Cache Management
Update Allocations
등록 할당
지면과 캠페인 간의 할당 정보를 저장합니다.
중재 중에 적격한 캠페인을 결정하는 데 사용됩니다.
POST
/
api
/
cache
/
allocations
Update Allocations
curl --request POST \
--url https://your_a2_service/api/cache/allocations \
--header 'Content-Type: application/json' \
--data '
[
{
"ext": {
"frequency_capping": {
"enabled": 123,
"limit_multiple_click": 123,
"user_limit_count": 123,
"user_limit_days": 123
}
},
"last_comment": "<string>",
"no": 123,
"status": "<string>",
"tagid": "<string>",
"cid": "<string>",
"crid": "<string>"
}
]
'import requests
url = "https://your_a2_service/api/cache/allocations"
payload = [
{
"ext": { "frequency_capping": {
"enabled": 123,
"limit_multiple_click": 123,
"user_limit_count": 123,
"user_limit_days": 123
} },
"last_comment": "<string>",
"no": 123,
"status": "<string>",
"tagid": "<string>",
"cid": "<string>",
"crid": "<string>"
}
]
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([
{
ext: {
frequency_capping: {
enabled: 123,
limit_multiple_click: 123,
user_limit_count: 123,
user_limit_days: 123
}
},
last_comment: '<string>',
no: 123,
status: '<string>',
tagid: '<string>',
cid: '<string>',
crid: '<string>'
}
])
};
fetch('https://your_a2_service/api/cache/allocations', 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/allocations",
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([
[
'ext' => [
'frequency_capping' => [
'enabled' => 123,
'limit_multiple_click' => 123,
'user_limit_count' => 123,
'user_limit_days' => 123
]
],
'last_comment' => '<string>',
'no' => 123,
'status' => '<string>',
'tagid' => '<string>',
'cid' => '<string>',
'crid' => '<string>'
]
]),
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/allocations"
payload := strings.NewReader("[\n {\n \"ext\": {\n \"frequency_capping\": {\n \"enabled\": 123,\n \"limit_multiple_click\": 123,\n \"user_limit_count\": 123,\n \"user_limit_days\": 123\n }\n },\n \"last_comment\": \"<string>\",\n \"no\": 123,\n \"status\": \"<string>\",\n \"tagid\": \"<string>\",\n \"cid\": \"<string>\",\n \"crid\": \"<string>\"\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/allocations")
.header("Content-Type", "application/json")
.body("[\n {\n \"ext\": {\n \"frequency_capping\": {\n \"enabled\": 123,\n \"limit_multiple_click\": 123,\n \"user_limit_count\": 123,\n \"user_limit_days\": 123\n }\n },\n \"last_comment\": \"<string>\",\n \"no\": 123,\n \"status\": \"<string>\",\n \"tagid\": \"<string>\",\n \"cid\": \"<string>\",\n \"crid\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/cache/allocations")
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 \"ext\": {\n \"frequency_capping\": {\n \"enabled\": 123,\n \"limit_multiple_click\": 123,\n \"user_limit_count\": 123,\n \"user_limit_days\": 123\n }\n },\n \"last_comment\": \"<string>\",\n \"no\": 123,\n \"status\": \"<string>\",\n \"tagid\": \"<string>\",\n \"cid\": \"<string>\",\n \"crid\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body이 페이지가 도움이 되었나요?
⌘I
Update Allocations
curl --request POST \
--url https://your_a2_service/api/cache/allocations \
--header 'Content-Type: application/json' \
--data '
[
{
"ext": {
"frequency_capping": {
"enabled": 123,
"limit_multiple_click": 123,
"user_limit_count": 123,
"user_limit_days": 123
}
},
"last_comment": "<string>",
"no": 123,
"status": "<string>",
"tagid": "<string>",
"cid": "<string>",
"crid": "<string>"
}
]
'import requests
url = "https://your_a2_service/api/cache/allocations"
payload = [
{
"ext": { "frequency_capping": {
"enabled": 123,
"limit_multiple_click": 123,
"user_limit_count": 123,
"user_limit_days": 123
} },
"last_comment": "<string>",
"no": 123,
"status": "<string>",
"tagid": "<string>",
"cid": "<string>",
"crid": "<string>"
}
]
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([
{
ext: {
frequency_capping: {
enabled: 123,
limit_multiple_click: 123,
user_limit_count: 123,
user_limit_days: 123
}
},
last_comment: '<string>',
no: 123,
status: '<string>',
tagid: '<string>',
cid: '<string>',
crid: '<string>'
}
])
};
fetch('https://your_a2_service/api/cache/allocations', 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/allocations",
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([
[
'ext' => [
'frequency_capping' => [
'enabled' => 123,
'limit_multiple_click' => 123,
'user_limit_count' => 123,
'user_limit_days' => 123
]
],
'last_comment' => '<string>',
'no' => 123,
'status' => '<string>',
'tagid' => '<string>',
'cid' => '<string>',
'crid' => '<string>'
]
]),
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/allocations"
payload := strings.NewReader("[\n {\n \"ext\": {\n \"frequency_capping\": {\n \"enabled\": 123,\n \"limit_multiple_click\": 123,\n \"user_limit_count\": 123,\n \"user_limit_days\": 123\n }\n },\n \"last_comment\": \"<string>\",\n \"no\": 123,\n \"status\": \"<string>\",\n \"tagid\": \"<string>\",\n \"cid\": \"<string>\",\n \"crid\": \"<string>\"\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/allocations")
.header("Content-Type", "application/json")
.body("[\n {\n \"ext\": {\n \"frequency_capping\": {\n \"enabled\": 123,\n \"limit_multiple_click\": 123,\n \"user_limit_count\": 123,\n \"user_limit_days\": 123\n }\n },\n \"last_comment\": \"<string>\",\n \"no\": 123,\n \"status\": \"<string>\",\n \"tagid\": \"<string>\",\n \"cid\": \"<string>\",\n \"crid\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/cache/allocations")
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 \"ext\": {\n \"frequency_capping\": {\n \"enabled\": 123,\n \"limit_multiple_click\": 123,\n \"user_limit_count\": 123,\n \"user_limit_days\": 123\n }\n },\n \"last_comment\": \"<string>\",\n \"no\": 123,\n \"status\": \"<string>\",\n \"tagid\": \"<string>\",\n \"cid\": \"<string>\",\n \"crid\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body