Cache Management
지면 등록
캐시에 지면 정보를 저장합니다. 지면 메타데이터를 기반으로 제공 로직을 갱신하는 데 사용합니다.
POST
/
app
/
api
/
cache
/
placements
지면 등록
curl --request POST \
--url https://your_a2_service/app/api/cache/placements \
--header 'Content-Type: application/json' \
--data '
[
{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"ad_unit_ids": [],
"description": "<string>",
"ext": "<unknown>",
"status": "INACTIVE"
}
]
'import requests
url = "https://your_a2_service/app/api/cache/placements"
payload = [
{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"ad_unit_ids": [],
"description": "<string>",
"ext": "<unknown>",
"status": "INACTIVE"
}
]
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',
created_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
ad_unit_ids: [],
description: '<string>',
ext: '<unknown>',
status: 'INACTIVE'
}
])
};
fetch('https://your_a2_service/app/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/app/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',
'created_by' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'ad_unit_ids' => [
],
'description' => '<string>',
'ext' => '<unknown>',
'status' => 'INACTIVE'
]
]),
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/app/api/cache/placements"
payload := strings.NewReader("[\n {\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"ad_unit_ids\": [],\n \"description\": \"<string>\",\n \"ext\": \"<unknown>\",\n \"status\": \"INACTIVE\"\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/app/api/cache/placements")
.header("Content-Type", "application/json")
.body("[\n {\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"ad_unit_ids\": [],\n \"description\": \"<string>\",\n \"ext\": \"<unknown>\",\n \"status\": \"INACTIVE\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/app/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 \"created_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"ad_unit_ids\": [],\n \"description\": \"<string>\",\n \"ext\": \"<unknown>\",\n \"status\": \"INACTIVE\"\n }\n]"
response = http.request(request)
puts response.read_body"<string>""<string>""<string>"본문
application/json
지면이 생성된 일시
생성한 사용자의 ID입니다.
지면의 고유 식별자(UUID v4)입니다.
사람이 읽을 수 있는 지면 이름입니다.
연결된 광고 유닛 ID 목록입니다.
Maximum array length:
1000지면의 선택적 설명입니다.
추가 지면별 데이터를 위한 확장 필드입니다.
지면의 운영 상태입니다. 기본값은 Inactive입니다.
Allowed value:
"ACTIVE"응답
성공
이 페이지가 도움이 되었나요?
⌘I
지면 등록
curl --request POST \
--url https://your_a2_service/app/api/cache/placements \
--header 'Content-Type: application/json' \
--data '
[
{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"ad_unit_ids": [],
"description": "<string>",
"ext": "<unknown>",
"status": "INACTIVE"
}
]
'import requests
url = "https://your_a2_service/app/api/cache/placements"
payload = [
{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"ad_unit_ids": [],
"description": "<string>",
"ext": "<unknown>",
"status": "INACTIVE"
}
]
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',
created_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
ad_unit_ids: [],
description: '<string>',
ext: '<unknown>',
status: 'INACTIVE'
}
])
};
fetch('https://your_a2_service/app/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/app/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',
'created_by' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'ad_unit_ids' => [
],
'description' => '<string>',
'ext' => '<unknown>',
'status' => 'INACTIVE'
]
]),
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/app/api/cache/placements"
payload := strings.NewReader("[\n {\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"ad_unit_ids\": [],\n \"description\": \"<string>\",\n \"ext\": \"<unknown>\",\n \"status\": \"INACTIVE\"\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/app/api/cache/placements")
.header("Content-Type", "application/json")
.body("[\n {\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"ad_unit_ids\": [],\n \"description\": \"<string>\",\n \"ext\": \"<unknown>\",\n \"status\": \"INACTIVE\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/app/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 \"created_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"ad_unit_ids\": [],\n \"description\": \"<string>\",\n \"ext\": \"<unknown>\",\n \"status\": \"INACTIVE\"\n }\n]"
response = http.request(request)
puts response.read_body"<string>""<string>""<string>"