소재
소재 미디어 파일 업로드
POST
/
api
/
manager
/
creatives
/
{crid}
/
media
소재 미디어 파일 업로드
curl --request POST \
--url https://your_a2_service/api/manager/creatives/{crid}/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://your_a2_service/api/manager/creatives/{crid}/media"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://your_a2_service/api/manager/creatives/{crid}/media', 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/manager/creatives/{crid}/media",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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/manager/creatives/{crid}/media"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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/manager/creatives/{crid}/media")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/manager/creatives/{crid}/media")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"height": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "banner",
"updated_at": "2023-11-07T05:31:56Z",
"width": 1,
"advertiser_domain": "<string>",
"advertiser_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"banner": {
"ext": {
"alt": "<string>",
"impression_tracking_url": "<string>",
"show_ad_badge": true
},
"img": "<string>",
"link": {
"url": "<string>",
"ext": null,
"trkr": [
"<string>"
],
"urlfb": "<string>"
}
},
"description": "<string>",
"end_date": "2023-11-07T05:31:56Z",
"ext": {},
"native": {
"asset": [
{
"data": {
"value": "<string>",
"ext": null,
"len": 123,
"type": 1
},
"ext": null,
"id": 123,
"image": {
"url": "<string>",
"ext": null,
"h": 1,
"type": 1,
"w": 1
},
"link": {
"url": "<string>",
"ext": null,
"trkr": [
"<string>"
],
"urlfb": "<string>"
},
"req": 0,
"title": {
"text": "<string>",
"ext": null,
"len": 1
},
"video": {
"adm": "<string>",
"curl": "<string>",
"ext": null
}
}
],
"ext": null,
"link": {
"url": "<string>",
"ext": null,
"trkr": [
"<string>"
],
"urlfb": "<string>"
}
},
"no": 123,
"start_date": "2023-11-07T05:31:56Z",
"status": "inactive",
"video": {
"adm": "<string>",
"api": [
32767
],
"ctype": 32767,
"curl": "<string>",
"dur": 1,
"ext": null,
"mime": [
"<string>"
]
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}인증
Bearer 인증. 액세스 토큰을 Authorization: Bearer <token> 헤더로 전달합니다.
경로 매개변수
본문
multipart/form-data
업로드할 미디어 파일. 허용 형식: 이미지(PNG, JPEG, GIF) 또는 비디오(MP4).
응답
성공 응답
소재 높이 (픽셀).
필수 범위:
x >= 0소재 고유 식별자 (UUID v7).
소재 이름.
소재를 생성한 관리자/운영자 사용자 ID.
소재 유형 (예: "banner", "video", "native").
사용 가능한 옵션:
banner, video, native 소재 너비 (픽셀).
필수 범위:
x >= 0이 소재를 사용하는 광고주 도메인.
이 소재를 사용하는 광고주 ID.
읽기/응답용 DTO — 저장된 AdCOM Banner를 그대로 노출. 검증 없음.
Show child attributes
Show child attributes
소재의 선택적 설명.
소재 확장 데이터
네이티브 소재 콘텐츠.
Show child attributes
Show child attributes
소재 상태.
사용 가능한 옵션:
inactive, active Show child attributes
Show child attributes
이 페이지가 도움이 되었나요?
⌘I
소재 미디어 파일 업로드
curl --request POST \
--url https://your_a2_service/api/manager/creatives/{crid}/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://your_a2_service/api/manager/creatives/{crid}/media"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://your_a2_service/api/manager/creatives/{crid}/media', 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/manager/creatives/{crid}/media",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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/manager/creatives/{crid}/media"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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/manager/creatives/{crid}/media")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/manager/creatives/{crid}/media")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"height": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "banner",
"updated_at": "2023-11-07T05:31:56Z",
"width": 1,
"advertiser_domain": "<string>",
"advertiser_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"banner": {
"ext": {
"alt": "<string>",
"impression_tracking_url": "<string>",
"show_ad_badge": true
},
"img": "<string>",
"link": {
"url": "<string>",
"ext": null,
"trkr": [
"<string>"
],
"urlfb": "<string>"
}
},
"description": "<string>",
"end_date": "2023-11-07T05:31:56Z",
"ext": {},
"native": {
"asset": [
{
"data": {
"value": "<string>",
"ext": null,
"len": 123,
"type": 1
},
"ext": null,
"id": 123,
"image": {
"url": "<string>",
"ext": null,
"h": 1,
"type": 1,
"w": 1
},
"link": {
"url": "<string>",
"ext": null,
"trkr": [
"<string>"
],
"urlfb": "<string>"
},
"req": 0,
"title": {
"text": "<string>",
"ext": null,
"len": 1
},
"video": {
"adm": "<string>",
"curl": "<string>",
"ext": null
}
}
],
"ext": null,
"link": {
"url": "<string>",
"ext": null,
"trkr": [
"<string>"
],
"urlfb": "<string>"
}
},
"no": 123,
"start_date": "2023-11-07T05:31:56Z",
"status": "inactive",
"video": {
"adm": "<string>",
"api": [
32767
],
"ctype": 32767,
"curl": "<string>",
"dur": 1,
"ext": null,
"mime": [
"<string>"
]
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}