次の方法で共有


ユーザー DRT サービス

注:

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

ユーザー DRT サービスは、DRT (Corp-IT が管理する & 所有する中央ユーザー ストア) がユーザーのアクセスを制御できるようにするために作成されました。 最終的に、ロールとアクセス許可は DRT サービスを介して管理されます。

DRT によって使用される中央 ID は、ユーザー ID とアカウント ID の間のマッピング データを格納する account_idです。

注:

このサービスには、次の種類のユーザーのみがアクセスできます。

  • 読み取りアクセス: すべての管理者。
  • 書き込みアクセス: 構成で指定された特定のユーザーのみ。

REST API

HTTP メソッド エンドポイント Decsription
POST https://api.appnexus.com/user-DRT
(ユーザー DRT JSON)
ユーザーの新しいユーザー DRT オブジェクトを作成します。
PUT https://api.appnexus.com/user-DRT?id=ID
(ユーザー DRT JSON)
ユーザー DRT オブジェクトを変更します。
GET https://api.appnexus.com/user-DRT すべてのユーザーの DRT 情報を表示します。
GET https://api.appnexus.com/user-DRT?id=ID 特定のユーザーの DRT 情報を表示します。
GET https://api.appnexus.com/user-DRT?account_id=ACCOUNT_ID 特定の DRT アカウントのすべてのユーザーの DRT 情報を表示します。
DELETE https://api.appnexus.com/user-DRT?id=ID ユーザーの DRT 情報を削除します。
GET https://api.appnexus.com/user-DRT/meta フィルター処理および並べ替えの対象となるフィールドを確認します。

JSON フィールド

フィールド 種類 説明
id int 対応するユーザーの ID。 同じユーザーの重複エントリは許可されません。
クエリ文字列で必要な On:PUT/DELETE
account_id int DRT テーブルのアカウント ID。 これは 0より大きくする必要があります。
デフォルト:null
username string 読み取り専用です。 ユーザーのログイン名。
first_name string 読み取り専用です。 ユーザーの名。
last_name string 読み取り専用です。 ユーザーの姓。
email string 読み取り専用です。 ユーザーの電子メール アドレス。
user_type string 読み取り専用です。 ユーザーの種類。
使用可能な値:
- "member"
- "bidder"
- "publisher"
- "advertiser"
- "member_advertiser"
- "member_publisher"
entity_id int 読み取り専用です。 ユーザーが属するエンティティ (メンバーまたは入札者) の ID。
read_only ブール値 読み取り専用です。 true場合、ユーザーは API を介して変更を加えることはできません。

新しいユーザー DRT オブジェクトを作成する

$ cat user-DRT.json
{
    "user-DRT": {
        "id": "11",
        "account_id": "123"
    }
}
$ curl -b cookies -c cookies -X POST -d @user-DRT.json 'https://api.appnexus.com/user-DRT'
{
   "response" : {
      "count" : 1,
      "status" : "OK",
      "num_elements" : 100,
      "user-DRT" : {
         "user_type" : "member",
         "last_name" : null,
         "username" : "dwm6",
         "account_id" : 123,
         "email" : null,
         "entity_id" : "6",
         "read_only" : "0",
         "id" : 11,
         "first_name" : null
      },
      "id" : 11,
      "start_element" : 0
   }
}

ユーザーの DRT 情報を変更する

$ cat modify-user-DRT.json
{
    "user-DRT": {
        "account_id": "321"
    }
}
$ curl -b cookies -c cookies -X PUT -d @modify-user-DRT.json 'https://api.appnexus.com/user-DRT?id=11'
{
   "response" : {
      "count" : 1,
      "status" : "OK",
      "num_elements" : 100,
      "user-DRT" : {
         "user_type" : "member",
         "last_name" : null,
         "username" : "dwm6",
         "account_id" : 223,
         "email" : null,
         "entity_id" : "6",
         "read_only" : "0",
         "id" : 11,
         "first_name" : null
      },
      "id" : "11",
      "start_element" : 0
   }
}

特定のユーザーの DRT 情報を表示する

$ curl -b cookies -c cookies -X GET 'https://api.appnexus.com/user-DRT?id=11'
{
   "response" : {
      "count" : 1,
      "status" : "OK",
      "num_elements" : 100,
      "user-DRT" : {
         "user_type" : "member",
         "last_name" : null,
         "username" : "dwm6",
         "account_id" : 223,
         "email" : null,
         "entity_id" : "6",
         "read_only" : "0",
         "id" : 11,
         "first_name" : null
      },
      "start_element" : 0
   }
}

特定のアカウントのすべてのユーザーの DRT 情報を表示する

$ curl -b cookies -c cookies -X GET 'https://api.appnexus.com/user-DRT?account_id=123'
{
   "response" : {
      "count" : 2,
      "status" : "OK",
      "num_elements" : 100,
      "user-DRTs" : [
         {
            "user_type" : "member",
            "last_name" : null,
            "username" : "data-provider",
            "account_id" : 123,
            "email" : null,
            "entity_id" : "3",
            "read_only" : "0",
            "id" : 6,
            "first_name" : null
         },
         {
            "user_type" : "member",
            "last_name" : null,
            "username" : "dwm273",
            "account_id" : 123,
            "email" : null,
            "entity_id" : "273",
            "read_only" : "0",
            "id" : 12,
            "first_name" : null
         }
      ],
      "start_element" : 0
   }
}

ユーザー DRT オブジェクトと、それに含まれるキャンペーン承認要件情報を削除する

$ curl -b cookies -c cookies -X DELETE 'https://api.appnexus.com/user-DRT?id=11'
{
   "response" : {
      "status" : "OK",
      "dbg_info" : {
         "warnings" : [],
         "db" : "master",
         "version" : "trunk",
         "time" : 89.476108551025,
         "start_microtime" : 1396626820.4141,
         "awesomesauce_cache_used" : false,
         "count_cache_used" : false,
         "instance" : "localhost",
         "output_term" : "not_found",
         "s1ave_hit" : false
      }
   }
}