次の方法で共有


Carrier Netblock サービス

注:

このサービスは現在、限られた一連のクライアントと Microsoft の従業員のみが利用できます。

この管理専用サービスを使用すると、IP アドレスのブロックをインターネット プロバイダーにマップし、モバイル キャンペーンを使用する広告主が特定のインターネット プロバイダーをターゲットにすることができます。

REST API

HTTP メソッド エンドポイント 説明
POST https://api.appnexus.com/carrier-netblock
(add_mapping JSON)
新しい carrier-netblock マッピングを追加します。
PUT https://api.appnexus.com/carrier-netblock?id=CARRIER_NETBLOCK_MAPPING_ID
(update_mapping JSON)
既存の carrier-netblock マッピングを変更します。
GET https://api.appnexus.com/carrier-netblock すべての carrier-netblock マッピングを表示します。
GET https://api.appnexus.com/carrier-netblock?id=CARRIER_NETBLOCK_MAPPING_ID 特定の carrier-netblock マッピングを表示します。
DELETE https://api.appnexus.com/carrier-netblock?id=CARRIER_NETBLOCK_MAPPING_ID carrier-netblock マッピングを削除します。
GET https://api.appnexus.com/carrier-netblock/meta フィルター処理および並べ替えの対象となるフィールドを確認します。

JSON フィールド

フィールド 種類 説明
id int carrier-netblock マッピングの ID。
デフォルト: 自動生成された数値。
必須:PUT
carrier_id int インターネット通信事業者の ID。 運送業者サービスを使用して、使用可能な運送業者とその ID の一覧を確認できます。
必須:POST
start_ip int マップする IP アドレスの範囲の先頭にある IP アドレス。 この値は、フラット化された整数として入力する必要があります。 フラット化された整数をPOSTまたはPUTに取得するには、このようなツールを使用して IP アドレスを変換します。
必須:POST
end_ip int マップする IP アドレスの範囲の末尾にある IP アドレス。 フラット化された整数をPOSTまたはPUTに取得するには、このようなツールを使用して IP アドレスを変換します。
必須:POST
notes string carrier-netblock マッピングに関連するすべてのメモ。
デフォルト:null
last_activity date carrier-netblock マッピングが最後に変更された日時。

carrier-netblock マッピングを追加する

$ cat add_mapping

{
        "carrier-netblock": {
             "carrier_id": 26,
             "start_ip": "2886794753",
             "end_ip": "4294967295"                
        }
}
$ curl -b cookies -c cookies -X POST -d @add_mapping.json "https://api.appnexus.com/carrier-netblock"
{
  "response": {
    "status": "OK",
    "count": 1,
    "id": 11829,
    "start_element": 0,
    "num_elements": 100,
    "carrier-netblock": {
      "id": 11829,
      "carrier_id": 26,
      "start_ip": 2886794753,
      "end_ip": 4294967295,
      "notes": null,
      "last_activity": "2013-09-12 13:47:04"
    },
  }
}

carrier-netblock マッピングを更新する

$ cat update_mapping

{
        "carrier-netblock": {
             "start_ip": "3221225471",
             "end_ip": "4294967295"               
        }
}
$ curl -b cookies -c cookies -X PUT -d @update_mapping.json "https://api.appnexus.com/carrier-netblock?id=11829"
{
  "response": {
    "status": "OK",
    "count": 1,
    "id": "11829",
    "start_element": 0,
    "num_elements": 100,
    "carrier-netblock": {
      "id": 11829,
      "carrier_id": 26,
      "start_ip": 3221225471,
      "end_ip": 4294967295,
      "notes": null,
      "last_activity": "2013-09-12 14:55:28"
    },
  }
}

すべての carrier-netblock マッピングを表示する

$ curl -b cookies -c cookies "https://api.appnexus.com/carrier-netblock"
{
  "response": {
    "status": "OK",
    "count": 6950,
    "start_element": 0,
    "num_elements": 100,
    "carrier-netblocks": [
      {
        "id": 4,
        "carrier_id": 165,
        "start_ip": 3452776960,
        "end_ip": 3452777215,
        "notes": "Seed",
        "last_activity": "2013-08-07 20:49:55"
      },
      {
        "id": 5,
        "carrier_id": 165,
        "start_ip": 3452811776,
        "end_ip": 3452812031,
        "notes": "Seed",
        "last_activity": "2013-08-07 20:49:55"
      },
      {
        "id": 6,
        "carrier_id": 165,
        "start_ip": 3517383936,
        "end_ip": 3517384191,
        "notes": "Seed",
        "last_activity": "2013-08-07 20:49:55"
      },
      {
        "id": 46,
        "carrier_id": 14,
        "start_ip": 68665344,
        "end_ip": 68665351,
        "notes": "Seed",
        "last_activity": "2012-11-27 16:11:25"
      },
      {
        "id": 48,
        "carrier_id": 14,
        "start_ip": 204593600,
        "end_ip": 204593615,
        "notes": "Seed",
        "last_activity": "2012-11-27 16:11:25"
      },
      {
        "id": 51,
        "carrier_id": 14,
        "start_ip": 214464808,
        "end_ip": 214464815,
        "notes": "Seed",
        "last_activity": "2012-11-27 16:11:25"
      },
 ...
      {
        "id": 1219,
        "carrier_id": 151,
        "start_ip": 3582880768,
        "end_ip": 3582885887,
        "notes": "Seed",
        "last_activity": "2013-05-15 15:15:00"
      },
      {
        "id": 1220,
        "carrier_id": 151,
        "start_ip": 3584180736,
        "end_ip": 3584180991,
        "notes": "Seed",
        "last_activity": "2013-05-15 15:15:00"
      },
      {
        "id": 1221,
        "carrier_id": 151,
        "start_ip": 3584181248,
        "end_ip": 3584182015,
        "notes": "Seed",
        "last_activity": "2013-05-15 15:15:00"
      },
      {
        "id": 1252,
        "carrier_id": 199,
        "start_ip": 44040192,
        "end_ip": 45088767,
        "notes": "Seed",
        "last_activity": "2013-05-15 15:18:07"
      },
      {
        "id": 1255,
        "carrier_id": 199,
        "start_ip": 1050537728,
        "end_ip": 1050537731,
        "notes": "Seed",
        "last_activity": "2013-05-15 15:18:07"
      }
    ],
  }
}

特定の通信事業者とネットブロックのマッピングを表示する

$ curl -b cookies -c cookies "https://api.appnexus.com/carrier-netblock?id=46"
{
  "response": {
    "status": "OK",
    "count": 1,
    "start_element": 0,
    "num_elements": 100,
    "carrier-netblock": {
      "id": 46,
      "carrier_id": 14,
      "start_ip": 68665344,
      "end_ip": 68665351,
      "notes": "Seed",
      "last_activity": "2012-11-27 16:11:25"
    },
  }
}