메인 콘텐츠로 건너뛰기
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

본문

application/json
ext
object
필수

for various configuration

last_comment
string
필수

Last comment

no
integer<int64>
필수

ID of the allocation

status
string
필수

Status

tagid
string
필수

Placement ID

cid
string | null

Campaign id

crid
string | null

Creative id

응답

성공