# Publisher API (Metadata)

## URL

* <https://sspi-ext-report.adpopcorn.com/v1/metadata/publisher/media>

## Method

* GET

## Request Headers

<table><thead><tr><th width="154">Name</th><th width="79">Type</th><th width="153">Value</th><th width="69" align="center">필수</th><th>설명</th></tr></thead><tbody><tr><td>Authorization</td><td>string</td><td>Bearer ${access_token}</td><td align="center"><mark style="color:red;">Y</mark></td><td>생성된 액세스 토큰을 ${access_token} 자리에 넣어 인증에 사용하세요.</td></tr></tbody></table>

{% code overflow="wrap" %}

```bash
$ curl "https://sspi-ext-report.adpopcorn.com/v1/metadata/publisher/media?page=1" -H "Authorization: Bearer test_access_token" -L
```

{% endcode %}

## Parameter

<table><thead><tr><th width="156">Parameter</th><th width="95">Type</th><th width="65" align="center">필수</th><th>설명</th></tr></thead><tbody><tr><td>page</td><td>int</td><td align="center"><mark style="color:red;">Y</mark></td><td>출력할 페이지 수(default: 1)</td></tr><tr><td>pageSize</td><td>int</td><td align="center"><mark style="color:red;">Y</mark></td><td>페이지 당 들어갈 레코드 수(default: 50)</td></tr><tr><td>sortBy</td><td>string</td><td align="center">N</td><td>기본적으로 정렬 순서는 오름차순입니다. 내림차순으로 변경하려면 요청한 필드 앞에 마이너스 기호를 붙이세요. 예시: sortBy=-media_key,placement_id</td></tr></tbody></table>

## Content-Type

* application/json

## Response parameter

<table><thead><tr><th width="188">Body parameter</th><th width="142">Type</th><th>설명</th></tr></thead><tbody><tr><td>alert</td><td>string</td><td>서버에서 전송된 알림 메시지. 대부분의 경우 null일 것입니다. 예시: "alert": null</td></tr><tr><td>page</td><td>int</td><td>출력할 페이지 수</td></tr><tr><td>page_size</td><td>int</td><td>페이지 당 노출될 record 수</td></tr><tr><td>page_count</td><td>int</td><td>전체  페이지 수</td></tr><tr><td>total_record_count</td><td>int</td><td>전체 레코드 개수</td></tr><tr><td>records</td><td>Array of Media</td><td>리포트 데이터</td></tr></tbody></table>

### Media

<table><thead><tr><th width="159">ID</th><th width="174">Type</th><th>설명</th></tr></thead><tbody><tr><td>key</td><td>string</td><td>매체 키</td></tr><tr><td>name</td><td>string</td><td>매체 명</td></tr><tr><td>type</td><td>int</td><td>1: iOS, 2: Android</td></tr><tr><td>status</td><td>int</td><td>상태 (10: 활성화, 30: 비활성화)</td></tr><tr><td>placements</td><td>Array of Placement</td><td>플레이스먼트 데이터</td></tr></tbody></table>

### Placements

<table><thead><tr><th width="164">ID</th><th width="177">Type</th><th>설명</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>플레이스먼트 ID</td></tr><tr><td>name</td><td>string</td><td>플레이스먼트 이름</td></tr><tr><td>status</td><td>int</td><td>상태 (10: 활성화, 30: 비활성화)</td></tr><tr><td>campaign_type</td><td>int</td><td>광고 타입(1: 배너, 2: 전면, 3: 전면 비디오, 4: 네이티브). 앱 매체 한정.</td></tr><tr><td>size</td><td>string</td><td>광고 사이즈(campaign_type =1 or 2 이거나 웹 매체 한정)</td></tr></tbody></table>

{% tabs %}
{% tab title="200" %}
{% code title="json" %}

```json
{
	"alert": null,
	"page": 1,
	"page_size": 50,
	"page_count": 2,
	"total_record_count": 71,
	"records": [
		{
			"key": "test_media_key",
			"name": "test_media_name",
			"status": 10,
			"placements": [
				{
						"id": "test_placement_id",
						"name": "test_placement_name",
						"status": 10,
						"campaign_type": 1,
						"size": "728x90"
				}
			]
		}
	]
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## 서버 응답 코드

아래 표는 Adpopcorn API 플랫폼에서 REST API 응답으로 전송되는 일반적인 HTTP 상태 코드를 나열한 것입니다.

<table><thead><tr><th width="126">Code</th><th width="173">메세지</th><th>설명</th></tr></thead><tbody><tr><td>200</td><td>성공</td><td>요청이 성공적으로 처리되었습니다.</td></tr><tr><td>400</td><td>client-side 에러</td><td>유효성 검사에 실패했습니다.</td></tr><tr><td>401</td><td>인증되지 않음</td><td>인증 또는 권한 부여 실패가 발생했습니다.</td></tr><tr><td>500</td><td>API-side 에러</td><td>Adpopcorn API 플랫폼에 문제가 발생했습니다.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://adpopcornssp.gitbook.io/ssp-sdk/undefined-2/api/publisher-api-metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
