Wyświetlanie segmentów danych

Wyświetlanie pojedynczego segmentu danych

Aby wyświetlić jeden z segmentów danych, użyj metody curators.dataSegments.get.

Poniższy przykład wysyła żądanie HTTP GET do punktu końcowego interfejsu API, który odpowiada określonym segmentem danych.

Przykładowe wywołanie interfejsu API za pomocą polecenia „curl”

Żądanie

curl \
'https://authorizedbuyersmarketplace.googleapis.com/v1beta/curators/[YOUR_ACCOUNT_ID]/dataSegments/test-data-segment-1?key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--compressed

Odpowiedź

{
  "name": "curators/[YOUR_ACCOUNT_ID]/dataSegments/test-data-segment-1",
  "createTime": "2025-08-13T12:14:03.421Z",
  "updateTime": "2025-08-14T19:47:40.253938Z",
  "cpmFee": {
    "currencyCode": "USD",
    "units": "1000000"
  },
  "state": "INACTIVE"
}

Wyświetlanie listy wszystkich segmentów danych

Aby wyświetlić wszystkie segmenty danych, użyj metody curators.dataSegments.list.

Poniższy przykład wysyła żądanie HTTP GET do punktu końcowego interfejsu API, który odpowiada wszystkimi segmentami danych dla określonego konta kuratora.

Przykładowe wywołanie interfejsu API za pomocą polecenia „curl”

Żądanie

curl \
'https://authorizedbuyersmarketplace.googleapis.com/v1beta/curators/[YOUR_ACCOUNT_ID]/dataSegments?key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--compressed

Odpowiedź

{
  "dataSegments": [
    {
      "name": "curators/[YOUR_ACCOUNT_ID]/dataSegments/test-data-segment-1",
      "createTime": "2025-08-13T12:14:03.421Z",
      "updateTime": "2025-08-14T20:05:51.439110Z",
      "cpmFee": {
        "currencyCode": "USD",
        "units": "1"
      },
      "state": "INACTIVE"
    },
    {
      "name": "curators/[YOUR_ACCOUNT_ID]/dataSegments/test-data-segment-2",
      "createTime": "2025-08-14T17:45:08.744Z",
      "updateTime": "2025-08-14T17:56:02.200619Z",
      "cpmFee": {
        "currencyCode": "USD",
        "nanos": 50
      },
      "state": "ACTIVE"
    }
  ]
}

Dalsze kroki