본문 바로가기

IOS 개발

Using API Functionality

 

기사

Article

 

API 기능 사용

Using API Functionality

 

CRUD 메소드를 사용하여 엔드 포인트를 호출하십시오.

Call endpoints using CRUD methods.

 

 

개요

Overview

Apple Search Ads API는 REST 데이터 모델을 사용합니다. CRUD (만들기, 읽기, 업데이트, 삭제) 기능을 사용하여 엔드 포인트 자원을 호출 할 수 있습니다.

The Apple Search Ads API uses a REST data model. CRUD (create, read, update, delete) functions can be used to call endpoint resources.

 

 

다음 목록은 Search Ads API에서 CRUD 메소드의 기능을 설명합니다.

The following list describes the function of CRUD methods in the Search Ads API.POST

새 자원을 작성하고 자원을 찾고 보고서를 가져 오는 데 사용됩니다. POST 유용성은 다른 REST API 디자인과 일대일로 일치하지 않습니다. POST는 Search Ads Campaign Management API에서 약간 고유 한 방식으로 사용됩니다. API는 / find 호출과 함께 선택기를 사용하여 자원 데이터를 필터링하는 것을 지원합니다. 선택기 객체를 참조하십시오.

Used to create new resources, find resources and pull reports. POST usability isn't a one-to-one match with other REST API design. POST is used in a slightly unique manner in the Search Ads Campaign Management API. The API supports the use of selectors with /find calls to filter resource data. See Selector object.

 

가져 오기

특정 리소스를 읽습니다. 일부 통화는 식별자를 사용합니다. 자원의 수집을 위해, 취득 제한 및 검색어 매개 변수로 허용됩니다 오프셋합니다. 쿼리 매개 변수 기능에 부분 가져 오기 사용을 참조하십시오.

 

GET

Reads a specific resource. Some calls use an identifier. For a collection of resources to be obtained, limit and offset are accepted as query params. See Use Partial Fetch for query param functionality.

 

놓다

식별자로 특정 리소스 또는 여러 리소스를 업데이트합니다.

PUT

Updates a specific resource or multiple resources by identifier.

 

지우다

Soft는 식별자로 특정 리소스를 삭제합니다.

DELETE

Soft deletes a specific resource by identifier.

 

형식 요청 및 응답


API는 JSON (JavaScript Object Notation)을 사용하여 요청 및 응답 페이로드를 나타냅니다. 각 자원 오브젝트에 제공된 필드, 특성 및 값을 사용하여 JSON에서 페이로드를 작성하십시오. 필수 필드와 함께 제공되는 설명을 기록해 두십시오. 아래의 캠페인 작성을위한 POST 페이로드 예제는 Campaign 오브젝트를 지침으로 사용하여 작성되었습니다.

Format Requests and Responses

The API uses JSON (JavaScript Object Notation) to represent the request and response payloads. Create payloads in JSON using fields, properties, and values provided for each resource object. Take note of required fields and accompanying descriptions. The example POST payload to Create a Campaign below was created using the Campaign object as a guideline.

응답은 다음과 유사합니다.

Responses will resemble the following.

작성 응답에서 리턴 된 ID를 기록하십시오. 그런 다음 식별자 (ID)를 URI에서 사용하여 리소스를 대상으로 지정할 수 있습니다. 예 : campaignId, adgroupId 및 keywordId 위의 예에서 특정 캠페인 리소스를 호출 할 때마다 API 전체에서 Id를 campaignId로 사용하십시오. 광고 그룹 만들기 호출을 사용할 때도 동일한 논리가 사용됩니다. 반환 된 ID는 적용 가능한 엔드 포인트에서 광고 그룹 식별자 (adgroupId)로 사용될 수 있습니다.

In a create response, note the ID returned. The identifier (ID) can then be used in the URI to target a resource. For example: campaignId, adgroupId, and keywordId. In the example above, use the Id as a campaignId throughout the API whenever making calls to that specific campaign resource. The same logic is used when you use the Create an Ad Group call. The Id returned can then be used as an ad group identifier (adgroupId) in applicable endpoints.

 

다음 목록은 엔드 포인트 자원에서 사용할 ID를 얻을 수있는 위치를 설명합니다.

The following list explains where to obtain the Id to use in endpoint resources.

 

campaignId

     캠페인 작성을 사용하십시오.

 

campaignId

    Use Create a Campaign.

 

 

boId

     Apple Search Ads UI를 통해 예산 주문을 생성하면 예산 주문 ID (boId)가 설정됩니다.

boId

    When creating a budget order through the Apple Search Ads UI, a budget order Id (boId) is set.

 

 

 

adGroupId

     광고 그룹 만들기를 사용하십시오. 광고 그룹을 만들 때 ID는 URI의 campaignId를 기반으로 설정됩니다.

adGroupId
    Use Create an Ad Group. When creating an ad group, the Id is set based on the campaignId in the URI.

 

 

 

keywordId

     타겟팅 키워드 작성을 사용하십시오. 광고 그룹 타겟팅 또는 제외 키워드를 만들 때 URI의 campaignId 및 adgroupId를 기준으로 ID가 설정됩니다. 캠페인 제외 어 키워드를 만들 때 ID는 URI의 campaignId를 기반으로 설정됩니다.

keywordId

   Use Create Targeting Keywords. When creating ad group targeting or negative keywords, the Id is set based on  the campaignId and adgroupId in the URI. When creating campaign negative keywords, the Id is set based on the campaignId in the URI.

 

 

 

creativesetId

     광고 소재 세트의 식별자입니다. 캠페인을 만들 때 ID가 설정됩니다.

creativesetId

    The identifier for the Creative Set. The Id is set when a campaign is created.

 

 

adgroupcreativesetId

   Apple Search Ads UI 또는 API를 통해 광고 소재 세트를 생성 한 다음 광고 그룹에 연결하면 adgroupcreativesetId가 설정됩니다. 광고 그룹 광고 세트 만들기를 참조하십시오.

adgroupcreativesetId

  When creating a creative set either through the Apple Search Ads UI or API and then linking it to an ad group, an adgroupcreativesetId is set. See Create an Ad Group Creative Set.

 

 

 

 

 

부분 업데이트 사용


부분 업데이트에는 전체 객체 속성 세트 대신 객체 속성의 하위 세트를 업데이트하는 작업이 포함됩니다. API의 대부분의 PUT 호출에 대해 부분 업데이트가 지원됩니다. 필요에 따라 요청 페이로드를 편집하십시오. 예를 들어 다음 페이로드는 이름, countriesOrRegions 및 캠페인 상태에 대한 업데이트입니다.

 

Use Partial Updates

A partial update involves updating a subset of object properties instead of the entire set of object properties. Partial update is supported for most PUT calls in the API. Edit your request payloads as needed. For example, the following payload is an update to the name, countriesOrRegions, and status of a campaign.

 

 

부분 가져 오기 사용


부분 가져 오기는 데이터를 가져올 때 응답에 반환 할 속성을 나타냅니다. 선택적 필드 매개 변수를 사용하여 리턴되는 각 레코드 내의 필드를 제한하여 선택기가 사용 가능한 경우 부분 페치를 사용하십시오. "fields"쿼리 문자열 매개 변수를 지정하여 일부 GET 엔드 포인트와 부분 페치를 사용할 수 있습니다. 예를 들어 다음 예와 같이 각 캠페인에 대해서만 ID를 반환하도록 선택할 수 있습니다.

 

Use Partial Fetch

Partial fetch indicates which properties should be returned in a response when fetching data. Use partial fetch where a Selector is available, by using optional field parameters to limit the fields within each record that is returned. You can use partial fetch with some GET endpoints by specifying the “fields” query string parameter. For example, you can choose to only return id for each campaign, as shown in the following example.

 

 

쿼리 매개 변수 사용


검색어 매개 변수는 iOS 앱 검색, 지리적 위치 검색 및 지리적 위치 목록 엔드 포인트에서 지원됩니다. 메서드 호출에서 쿼리 매개 변수가 URI에 추가됩니다.

Use Query Params

Query params are supported with the Search for iOS AppsSearch for Geo Locations, and Get a List of Geo Locations endpoints. A query param is appended to the URI in method calls.

 

 

 

 

GET 호출은 쿼리 매개 변수를 사용하여 페이지 매김을 제어하고 반환 된 응답에 제한을 할당합니다. 이러한 쿼리 매개 변수를 가져올 데이터와 결합 할 수 있습니다. 예를 들면 다음과 같습니다.

GET calls use query params to control Pagination and to assign a limit to returned responses. You can combine these query params with data to fetch. For example:

 

 

 

주제

Topics

 

공통 API 사용성 응답

Common API Usability Responses

 

객체 조건

사용자가 레코드 목록을 필터링 할 수있는 조건 개체 목록입니다.

object Condition

The list of condition objects, which allows users to filter a list of records.

 

 

PageDetail 객체

페이지에 반환 된 항목 수입니다.

object PageDetail

The number of items returned in the page.

 

 

개체 매김

limit 및 offset 매개 변수를 사용하여 반환 된 결과를 구체화하는 절차입니다.

object Pagination

The procedure to refine returned results using limit and offset parameters.

 

 

객체 선택기

반환 된 데이터를 필터링하는 데 사용할 수있는 선택기 개체입니다.

object Selector

The selector objects available to filter returned data.

 

 

객체 정렬

그룹화 된 결과의 순서입니다.

object Sorting

The order of grouped results.

 

 

일반적인 오류 응답

Common Error Responses

 

ErrorResponseBody 개체

오류 응답 본문의 컨테이너입니다.

object ErrorResponseBody

A container for the error response body.

 

 

 

ErrorResponseItem 객체

응답 본문에 제공된 오류 응답 세부 사항입니다.

object ErrorResponseItem

The error response details provided in the response body.

 

 

IntegerResponse 개체

일반적인 정수형 응답.

object IntegerResponse

A common integer type response.

 

 

VoidResponse 개체

기본 일반 널 응답입니다

object VoidResponse

A default generic null response.

 

 

VoidResponse.Data 개체

데이터가 반환되지 않으면 기본 일반 null 응답이 트리거됩니다.

object VoidResponse.Data

A default generic null response triggered when no data is returned.

 

 

 

 

또한보십시오

See Also

 

요점

Essentials

 

Search Ads Campaign Management API를 사용하여 인증합니다.

API 인증서를 생성하여 Search Ads API에 요청을 합니다.

Authenticating with the Search Ads Campaign Management API

Generate an API certificate to make requests to the Search Ads API.

 

 

API 릴리스 노트를 검색

API 구현을 조정합니다.

Search Ads API Release Notes

Make adjustments to your API implementation.

 

 

 

 

[출처 : https://developer.apple.com/documentation/apple_search_ads/using_api_functionality?language=data]

'IOS 개발' 카테고리의 다른 글

[iOS] Introducing JSON  (0) 2020.02.24
[iOS] init()  (0) 2020.02.24
[iOS] class UIButton : UIControl  (0) 2020.02.20
[iOS] 특수문자 (특수기호) 뜻  (0) 2020.02.10
[iOS] class Bundle : NSObject  (0) 2020.02.10