> ## Documentation Index
> Fetch the complete documentation index at: https://help.airbridge.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 목록 가져오기 v2

생성한 트래킹 링크 목록을 조회합니다.

<Card title="Try API Request" icon="rectangle-api" horizontal href="https://www.postman.com/airbridge-engineering/workspace/airbridge-api/request/22395869-9838b3eb-1eed-4a86-8aed-75a62e3165e5" />

```text GET theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
https://api.airbridge.io/v2/tracking-links
```

<h2 id="목록-가져오기-v2-request">
  Request
</h2>

***

<h3 id="목록-가져오기-v2-headers">
  Headers
</h3>

<ParamField header="Accept-Language" type="string">
  API 요청 및 결과 반환에 사용할 언어를 지정할 수 있습니다. ISO-639-1 포맷을 따릅니다.
</ParamField>

<ParamField header="Content-Type" type="string">
  리소스의 미디어 타입을 나타냅니다. 기본값으로 `application/json`을 사용합니다.
</ParamField>

<ParamField header="Authorization" type="string">
  API 요청에 사용하는 키값입니다. [키값 생성 및 조회 방법](/ko/references/introduction)을 확인하여 획득할 수 있습니다.
</ParamField>

<h3 id="목록-가져오기-v2-query-params">
  Query Params
</h3>

<ParamField query="from" type="string" required>
  생성한 트래킹 링크 목록을 조회할 기준 시작일.
</ParamField>

<ParamField query="to" type="string" required>
  생성한 트래킹 링크 목록을 조회할 기준 종료일.
</ParamField>

<ParamField query="next_cursor" type="number">
  다음 트래킹 링크 데이터를 이어서 조회하기 위한 기준 ID.
</ParamField>

<ParamField query="size" type="number">
  가져올 item의 갯수. (최대 1000)
</ParamField>

<ParamField query="keyword" type="string">
  검색 키워드.
</ParamField>

<ParamField query="channel_name" type="string">
  채널 명 필터.
</ParamField>

<ParamField query="sort_key" type="enum">
  정렬 기준 (기본값: `createdAt`)

  | 벨류          | 설명      |
  | ----------- | ------- |
  | `createdAt` | 생성 순 정렬 |
</ParamField>

<ParamField query="sort_type" type="enum">
  정렬 타입. (기본값: `ASC`)

  | 벨류     | 설명       |
  | ------ | -------- |
  | `DESC` | 내림차순 정렬. |
  | `ASC`  | 오름차순 정렬. |
</ParamField>

<RequestExample>
  ```shellscript Request theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  curl -X GET 'https://api.airbridge.io/v2/tracking-links?from=2023-04-01&to=2023-04-02&next_cursor=123456789&size=10&sort_key=createdAt&sort_type=ASC' \
    -H 'Accept-Language: ko' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}'
  ```
</RequestExample>

<h2 id="목록-가져오기-v2-response">
  Response
</h2>

***

### 200

**totalCount**

* 타입: number
* 설명: 응답에 포함된 트래킹 링크의 개수를 나타냅니다. 요청 시 지정한 `size` 값보다 클 수 없으며, 요청에 `size`를 지정하지 않은 경우 최대 1,000까지 반환됩니다. 조회 기간 동안 생성된 트래킹 링크가 없는 경우 0이 반환됩니다.

**hasNext**

* 타입: boolean
* 설명: `from`, `to` 기간 내에 추가로 조회할 수 있는 트래킹 링크가 존재하는지를 나타냅니다. true는 추가 데이터 있음, false는 더 이상 조회할 데이터 없음을 의미합니다. 일반적으로 `nextCursor`와 함께 사용됩니다.

**nextCursor**

* 타입: number (nullable)
* 설명: 다음 트래킹 링크를 요청할 때 사용되는 값입니다.

  * 예를 들어, 앱에서 생성된 1,001번째 트래킹 링크 ID가 20002342라면, 첫 요청으로 트래킹 링크 1,000개를 받은 후 응답에 "next\_cursor": "20002342"가 포함되어 반환됩니다. 이후 요청에서 이 값을 `next_cursor` 파라미터로 전달하면, 1,001번째부터 2,000번째까지의 트래킹 링크를 조회할 수 있습니다.
  * 단, ID는 Airbridge에서 생성되는 전체 트래킹 링크를 기준으로 부여되기 때문에, 해당 앱에서 생성한 순서와 일치하지 않거나 연속적이지 않을 수 있습니다. 더 이상 조회할 데이터가 없는 경우 null이 반환됩니다.

### 400

입력한 필드가 오류가 있거나 형태가 올바르지 않습니다.

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  {
    "data": {
      "hasNext": true,
      "nextCursor": 55843942,
      "totalCount": 2,
      "trackingLinks": [
        {
          "id": 55835049,
          "link": {
            "click": "https://abr.ge/@app_name/channel?og_tag_id=123&routing_short_id=id&tracking_template_id=template&ad_type=click",
            "impression": null,
            "serverToServerClick": null
          },
          "email": "user@ab180.co",
          "ogTag": {
            "title": "AB180",
            "imageUrl": "http://static.airbridge.io/images/og_tags/50ca2e8d-07b2-4a0e-8294-f00ddb8e59ae.png",
            "description": "Discovering Metrics That Matter!"
          },
          "company": null,
          "shortId": "short_id",
          "shortUrl": "https://abr.ge/short_id",
          "createdAt": "2024-02-26T19:35:02+09:00",
          "channelName": "channel",
          "channelType": "custom",
          "deeplinkUrl": "scheme://",
          "fallbackPaths": {
            "ios": "https://airbridge.io",
            "option": {
              "iosCustomProductPageId": null,
              "googlePlayCustomStoreListing": null
            },
            "android": "https://airbridge.io",
            "desktop": "https://airbridge.io"
          },
          "campaignParams": {
            "term": null,
            "subId": null,
            "subId1": null,
            "subId2": null,
            "subId3": null,
            "adGroup": null,
            "content": null,
            "campaign": null,
            "adCreative": null
          },
          "deeplinkOption": {
            "showAlertForInitialDeeplinkingIssue": false
          },
          "isReengagement": "OFF"
        },
        {
          "id": 55835585,
          "link": {
            "click": "https://abr.ge/@app_name/test?campaign=test&routing_short_id=short&tracking_template_id=template&ad_type=click",
            "impression": null,
            "serverToServerClick": null
          },
          "email": "user@ab180.co",
          "ogTag": {
            "title": "AB180",
            "imageUrl": "http://static.airbridge.io/images/og_tags/50ca2e8d-07b2-4a0e-8294-f00ddb8e59ae.png",
            "description": "Discovering Metrics That Matter!"
          },
          "company": null,
          "shortId": "short_id2",
          "shortUrl": "https://abr.ge/short_id2",
          "createdAt": "2024-02-26T19:40:44+09:00",
          "channelName": "channel",
          "channelType": "custom",
          "deeplinkUrl": null,
          "fallbackPaths": {
            "ios": "itunes-appstore",
            "option": {
              "iosCustomProductPageId": null,
              "googlePlayCustomStoreListing": null
            },
            "android": "google-play",
            "desktop": "https://airbridge.io"
          },
          "campaignParams": {
            "term": null,
            "subId": null,
            "subId1": null,
            "subId2": null,
            "subId3": null,
            "adGroup": null,
            "content": null,
            "campaign": "test",
            "adCreative": null
          },
          "deeplinkOption": {
            "showAlertForInitialDeeplinkingIssue": false
          },
          "isReengagement": "OFF"
        }
      ]
    },
    "resultMessage": "Here is your result."
  }
  ```

  ```json 400 theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  {
    "instance": [
      {
        "loc": [
          "size"
        ],
        "msg": "must be less than or equal to 1000",
        "type": "validation_error"
      }
    ],
    "detail": "invalid_request",
    "status": 400,
    "title": "Bad Request",
    "traceId": "1-68513579-369f49243aa5430b228cfa8a",
    "type": "about:blank"
  }
  ```
</ResponseExample>
