Terms Service
注:
このサービスは現在、限られた一連のクライアントと Microsoft の従業員のみが利用できます。
このサービスは、Tango メンバーによる Tango の利用規約への同意を記録するために使用されます。 このサービスは現在の Tango のニーズをサポートするために作成されましたが、今後、他のサービス条件のニーズに使用される可能性があります。
REST API
HTTP メソッド | エンドポイント | 説明 |
---|---|---|
POST |
https://api.appnexus.com/terms-of-service ( add_TOS JSON) |
新しいサービス条件同意レコードを追加します。 |
GET |
https://api.appnexus.com/terms-of-service |
すべてのサービス条件レコードを表示します。 |
GET |
https://api.appnexus.com/terms-of-service?id=TERMS_OF_SERVICE_ID |
特定のサービス条件レコードを表示します。 |
GET |
https://api.appnexus.com/terms-of-service/meta |
フィルター処理および並べ替えの対象となるフィールドを確認します。 |
注:
以下の呼び出しは、Xandr Employees にのみ表示されます。 これらの呼び出しは、管理者にのみ行うことができます。
HTTP メソッド | エンドポイント | 説明 |
---|---|---|
PUT |
https://api.appnexus.com/terms-of-service?id=TERMS_OF_SERVICE_ID ( modify_TOS JSON) |
サービス条件レコードを変更します。 |
DELETE |
https://api.appnexus.com/terms-of-service?id=TERMS_OF_SERVICE_ID |
サービス条件レコードを削除します。 |
JSON フィールド
フィールド | 種類 | 説明 |
---|---|---|
id |
int | サービス条件レコードの ID。 既定値: 自動生成された数値 |
user_id |
int | サービス条件に同意したユーザーの ID。 既定値: null 必須: POST |
terms_name |
string | 受け入れられたサービス条件の名前。 現時点では、これは Tango 関連のサービス条件に限定する必要があります。 必須: POST |
date_accepted |
date | サービス条件が承諾された日付。 必須: POST |
last_modified |
string | レコードが最後に変更された日付。 |
例
同意されたサービス条件のレコードを追加する
$ cat add_TOS
{
"terms_of_service":
{
"user_id" : 1066,
"terms_name" : "Test Terms",
"date_accepted" : "2013-01-16 00:10:00"
}
}
$ curl -b cookies -c cookies -X POST -d @add_TOS.json "https://api.appnexus.com/terms-of-service"
{
"response": {
"status": "OK",
"count": 1,
"id": 19,
"terms_of_service": {
"id": 19,
"user_id": 1066,
"terms_name": "Test Terms",
"date_accepted": "2013-01-16 00:10:00",
"last_modified": "2013-10-09 15:43:53"
},
}
}
すべてのサービス条件レコードを表示する
$ curl -b cookies -c cookies "http://sand.api.appnexus.com/terms-of-service"
{
"response": {
"status": "OK",
"count": 8,
"terms_of_services": [
{
"id": 1,
"user_id": 3920,
"terms_name": "",
"date_accepted": "0000-00-00 00:00:00",
"last_modified": "2013-10-01 21:31:45"
},
{
"id": 5,
"user_id": 3920,
"terms_name": "\"hey\"",
"date_accepted": "2013-10-02 00:00:00",
"last_modified": "2013-10-01 21:35:10"
},
{
"id": 6,
"user_id": 3920,
"terms_name": "v1",
"date_accepted": "0000-00-00 00:00:00",
"last_modified": "2013-10-01 22:20:44"
},
{
"id": 11,
"user_id": 3920,
"terms_name": "\"v1\"",
"date_accepted": "0000-00-00 00:00:00",
"last_modified": "2013-10-01 22:37:09"
},
{
"id": 16,
"user_id": 5870,
"terms_name": "hey",
"date_accepted": "2013-10-01 00:00:00",
"last_modified": "2013-10-03 19:11:34"
},
{
"id": 17,
"user_id": 5870,
"terms_name": "v1",
"date_accepted": "2013-10-01 00:00:00",
"last_modified": "2013-10-03 19:19:12"
},
{
"id": 18,
"user_id": 5870,
"terms_name": "v0",
"date_accepted": "2013-10-03 17:10:40",
"last_modified": "2013-10-04 00:22:40"
},
{
"id": 19,
"user_id": 1066,
"terms_name": "Test Terms",
"date_accepted": "2013-01-16 00:10:00",
"last_modified": "2013-10-09 15:43:53"
}
],
}
}
特定のサービス条件レコードを表示する
$ curl -b cookies -c cookies "https://api.appnexus.com/terms-of-service?id=19"
{
"response": {
"status": "OK",
"count": 1,
"terms_of_service": {
"id": 19,
"user_id": 1066,
"terms_name": "Test Terms",
"date_accepted": "2013-01-16 00:10:00",
"last_modified": "2013-10-09 15:43:53"
},
}
}
注:
次の例は、Xandr 従業員にのみ表示されます。 これらの呼び出しは、管理者にのみ行うことができます。
サービス条件レコードを変更する
$ cat modify_TOS
{
"terms_of_service":
{
"terms_name" : "Usage Terms of Service"
}
}
$ curl -b cookies -c cookies -X PUT -d @modify_TOS.json "https://api.appnexus.com/terms-of-service?id=19"
{
"response": {
"status": "OK",
"count": 1,
"id": 19,
"terms_of_service": {
"id": 19,
"user_id": 1066,
"terms_name": "Usage Terms of Service",
"date_accepted": "2013-01-16 00:10:00",
"last_modified": "2013-10-09 15:43:53"
},
}
}
サービス条件レコードを削除する
$ curl -b cookies -c cookies -X DELETE "https://api.appnexus.com/terms-of-service?id=19"
{
"response": {
"status": "OK",
"count": 1,
}
}