プラットフォーム API

Red Hat Mobile Application Platform ホスト型 3

Red Hat Mobile Application Platform ホスト型 3 向け

Red Hat Customer Content Services

概要

本書では、RHMAP プラットフォーム API の参考情報を提供します。

第1章 API キーの API

ユーザーアカウントおよびアプリの各種 API キーを管理します。

注記

X-FH-AUTH-USER はすべてのリクエストのすべてのヘッダーになければなりません。詳細は、API キーの管理 を参照してください。

1.1. API キーの一覧表示

1.1.1. 説明

ユーザーまたはアプリ API キーを一覧表示します。

1.1.2. エンドポイント

  • URI: /box/srv/1.1/ide/<domain>/api/list
  • メソッド: POST

1.1.3. リクエストボディー

1.1.3.1. 現在ログインしているユーザーのキーを一覧表示

{
  "type": "user"
}

1.1.3.2. 指定されたアプリ ID に属するキーの一覧表示

{
  "type": "app",
  "appId": "<app_instance_id>"
}

1.1.4. レスポンスボディー

1.1.4.1. 成功

{
  "status": "ok",
  "list": [{
    "label": "<user_friendly_id>",
    "keyType": "<key_type>",
    "key": "<public_api_key>",
    "keyReference": "<reference_id>", // for example, user/app id
    "secret": "<api_secret_key>",  // only for 'admin' group
    "revoked": "<revoked_timestamp>",
    "revokedBy": "<revoked_by_ref_id>", // for example, user id
    "revokedEmail": "<revoked_by_user_email>"
  },
  /* ... */
  ]
}

1.1.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

1.2. 新規 API キーの作成

1.2.1. 説明

新規ユーザーまたはアプリ API キーを作成します。ユーザーは関連付けられた複数の API キーを持つことができますが、アプリには、常に 1 つのアクティブな API キーしか持たせることができません。アプリ API キーが作成されると、アプリの既存のキーは自動的に失効します。

1.2.2. エンドポイント

  • URI: /box/srv/1.1/ide/<domain>/api/create
  • メソッド: POST

1.2.3. リクエストボディー

1.2.3.1. 現在ログインしているユーザーの API キーを作成

{
  "type": "user",
  "label": "<user_friendly_id>"
}

1.2.3.2. 指定されたアプリ ID に属する新規 API キーを作成

このアプリのすべての既存キーは自動的に失効します。

{
  "type": "app",
  "label": "<user_friendly_id>",
  "appId": "<app_instance_id>"
}

1.2.4. 成功

{
  "status": "ok",
  "apiKey": {
    "label": "<user_friendly_id>",
    "keyType": "<key_type>",
    "key": "<public_api_key>",
    "keyReference": "<reference_id>", // for example, user/app id
    "secret": "<api_secret_key>",  // only for 'admin' group
    "revoked": "<revoked_timestamp>",
    "revokedBy": "<revoked_by_ref_id>", // for example, user id
    "revokedEmail": "<revoked_by_user_email>"
  }
}

1.2.5. エラー

{
  "status": "error",
  "message": "<error_message>"
}

1.3. 既存 API キーの失効

1.3.1. 説明

既存ユーザーまたはアプリ API キーを失効させます。

1.3.2. エンドポイント

  • URI: /box/srv/1.1/ide/<domain>/api/revoke
  • メソッド: POST

1.3.3. リクエストボディー

{
  "key": "<public_api_key>"
}

1.3.4. 成功

{
  "status": "ok",
  "apiKey": {
    "label": "<user_friendly_id>",
    "keyType": "<key_type>",
    "key": "<public_api_key>",
    "keyReference": "<reference_id>", // for example, user/app id
    "secret": "<api_secret_key>",  // only for 'admin' group
    "revoked": "<revoked_timestamp>",
    "revokedBy": "<revoked_by_ref_id>", // for example, user id
    "revokedEmail": "<revoked_by_user_email>"
  }
}

1.3.5. エラー

{
  "status": "error",
  "message": "<error_message>"
}

1.4. 既存 API キーの削除

1.4.1. 説明

既存ユーザーまたはアプリ API キーを完全に削除します。

1.4.2. エンドポイント

  • URI: /box/srv/1.1/ide/<domain>/api/delete
  • メソッド: POST

1.4.3. リクエストボディー

{
  "key": "<public_api_key>"
}

1.4.4. 成功

{
  "status": "ok",
  "apiKey": {
    "label": "<user_friendly_id>",
    "keyType": "<key_type>",
    "key": "<public_api_key>",
    "keyReference": "<reference_id>", // for example, user/app id
    "secret": "<api_secret_key>",  // only for 'admin' group
    "revoked": "<revoked_timestamp>",
    "revokedBy": "<revoked_by_ref_id>", // for example, user id
    "revokedEmail": "<revoked_by_user_email>"
  }
}

1.4.5. エラー

{
  "status": "error",
  "message": "<error_message>"
}

1.5. 既存 API キーの更新

1.5.1. 説明

既存 App またはユーザー API キーを更新します。

1.5.2. エンドポイント

  • URI: /box/srv/1.1/ide/<domain>/api/update
  • メソッド: POST

1.5.3. リクエストボディー

{
  "key": "<public_api_key>",
  "fields": {
    "label": "<new_user_friendly_id>"
  }
}

1.5.4. 成功

{
  "status": "ok",
  "apiKey": {
    "label": "<user_friendly_id>",
    "keyType": "<key_type>",
    "key": "<public_api_key>",
    "keyReference": "<reference_id>", // for example, user/app id
    "secret": "<api_secret_key>",  // only for 'admin' group
    "revoked": "<revoked_timestamp>",
    "revokedBy": "<revoked_by_ref_id>", // for example, user id
    "revokedEmail": "<revoked_by_user_email>"
  }
}

1.5.5. エラー

{
  "status": "error",
  "message": "<error_message>"
}

1.6. API キーの検証

1.6.1. 説明

API キーが有効であるかどうかを検査します。

1.6.2. エンドポイント

  • URI: /box/srv/1.1/ide/<domain>/api/validate
  • メソッド: POST

1.6.3. リクエストボディー

{
  "type" : "<key_type>"
  "key" : "<key_value>",
}

1.6.4. 成功

{
  "status" : "ok",
  "valid" : true | false
}

1.6.5. エラー

{
  "status" : "error",
  "message" : "<error_message>"
}

第2章 モバイルアプリ管理 API

2.1. アプリストアの読み込み

2.1.1. 説明

アプリストアの詳細を読み込みます。

2.1.2. エンドポイント

  • URI: /box/srv/1.1/admin/appstore/read
  • メソッド: POST

2.1.3. リクエストボディー

該当なし

2.1.4. レスポンスボディー

2.1.4.1. 成功

{
  "status": "ok",
  "guid": "<app_store_global_unique_id>",
  "name": "<app_store_name>",
  "description": "<app_store_description>",
  "icon":"<base64_String>"
  "storeitems": ["store_item_global_unique_id_1", "store_item_global_unique_id_2", ... "store_item_global_unique_id_N"],
  "authpolicies":["active_policy_ids"]
}

2.1.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.2. App Store の更新

2.2.1. 説明

アプリストアの詳細を読み込みます。

2.2.2. エンドポイント

  • URI: /box/srv/1.1/admin/appstore/update
  • メソッド: POST

2.2.3. リクエストボディー

{
  "name": "<app_store_name>", /*optional*/
  "description": "<app_store_description>" /*optional*/
  "storeitems":["store_item_global_unique_id_1"] /*optional*/
  "authpolicies":[policy_ids]
}

2.2.4. レスポンスボディー

2.2.4.1. 成功

{
  "status": "ok",
  "guid": "<app_store_global_unique_id>",
  "name": "<app_store_name>",
  "description": "<app_store_description>"
  "icon":"<base64_string>"
  "storeitems": ["store_item_global_unique_id_1", "store_item_global_unique_id_2", ... "store_item_global_unique_id_N"],
  "authpolicies":[active_policy_ids]
}

2.2.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.3. ストアアイテムのアプリストアへの追加

2.3.1. 説明

既存のストアアイテムをストアに追加し、ストア内で表示できるようにします。

2.3.2. エンドポイント

  • URI: /box/srv/1.1/admin/appstore/additem
  • メソッド: POST

2.3.3. リクエストボディー

{"guid":"<unique_store_item_id>"}

2.3.4. レスポンスボディー

2.3.4.1. 成功

{
  "status":"ok"
}

2.3.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.4. ストアアイテムのアプリストアからの削除

2.4.1. 説明

既存のストアアイテムをストアから削除し、ストア内で非表示にします。

2.4.2. エンドポイント

  • URI: /box/srv/1.1/admin/appstore/removeitem
  • メソッド: POST

2.4.3. リクエストボディー

{"guid":"<unique_store_item_id>"}

2.4.4. レスポンスボディー

2.4.4.1. 成功

{
  "status":"ok"
}

2.4.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.5. アプリストアアイコンのアップロード

2.5.1. 説明

ストアのアイコンを追加します。

2.5.2. エンドポイント

  • URI: /box/srv/1.1/admin/appstore/uploadbinary
  • メソッド: POST

2.5.3. リクエストボディー

イメージの multipart リクエスト

2.5.4. レスポンスボディー

2.5.4.1. 成功

{
  "status": "ok",
  "guid": "<app_store_global_unique_id>",
  "name": "<app_store_name>",
  "description": "<app_store_description>"
  "icon":"<base64_string>"
  "storeitems": ["store_item_global_unique_id_1", "store_item_global_unique_id_2", ... "store_item_global_unique_id_N"],
  "authpolicies":[active_policy_ids]
}

2.5.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.6. ストアアイテムのアプリストアへの一覧表示

2.6.1. 説明

現在のアイテムをアプリストアに一覧表示します。「バイナリー」フィールドは、バイナリーオプションに定義されます。

2.6.2. エンドポイント

  • URI: /box/srv/1.1/admin/appstore/liststoreitems
  • メソッド: POST

2.6.3. リクエストボディー

{}

2.6.4. レスポンスボディー

2.6.4.1. 成功

{
  "list": [
    {
      "authToken": "<unique id for auth>",
      "authpolicies": [unique_policy_ids],
      "binaries": [
        {
          "config": {
                      "bundle_id": "<ios_bundle_id>"
          },
          "storeItemBinaryVersion": 2,
          "sysModified": "Fri Nov 02 10:06:48 GMT 2012",
          "type": "iphone | android | ios | ipad",
          "url": "http://<domain>/box/srv/1.1/mas/storeitem/install?guid=dweFfHihI616y67aQB4sNGQt",
          "versions": [{
                      "config": {},
                      "destinationCode": "iphone | android | ios | ipad",
                      "storeItemBinaryGuid": "Y8a8lFjFufZyqd1tAdjonufw",
                      "storeItemBinaryModified": "Fri Nov 02 10:44:45 GMT 2012",
                      "storeItemBinaryVersion": 1,
                      "url": "http://<domain>/box/srv/1.1/mas/storeitem/downloadvers?guid=o1Z1S_t-hyGMXymqTzIWS4xd"
          }]
        }
      ],
      "description": "description",
      "guid": "<unique_id>",
      "icon": "<base64_string>",
      "name": "<string_item_name>"
    }
  ],
  "status": "ok"
}

2.6.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.6.5. オプション

2.6.5.1. バイナリーフィールド

バイナリーフィールドは、現在アップロードされているストアアイテムバイナリーについての情報の配列です。以下で構成されています。

  • config: 追加の OS 関連の設定についてのフィールドです (例: ios バンドル id)。
  • storeItemBinaryVersion: 現在のストアアイテムバイナリーのバージョン番号です。
  • sysModified: このストアアイテムバイナリーの最終修正日です。
  • type: ストアアイテムバイナリーのタイプです。
  • url: この URL を使用して、このストアアイテムバイナリーの最新バージョンをダウンロードできます。
  • versions: 古いストアアイテムバイナリーを含む配列です (最大 4 エントリーが保持されます)。

2.7. 認証ポリシーの追加

2.7.1. 説明

アプリストアで使用される認証ポリシーを追加します。

2.7.2. エンドポイント

  • URI: /box/srv/1.1/admin/appstore/addpolicy
  • メソッド: POST

2.7.3. リクエストボディー

{
  "guid":"<policy_id>"
}

2.7.4. レスポンスボディー

2.7.4.1. 成功

{
  "status": "ok"
}

2.7.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.8. ストア認証ポリシーの削除

2.8.1. 説明

アプリストアで使用される認証ポリシーを削除します。

2.8.2. エンドポイント

  • URI: /box/srv/1.1/admin/appstore/removepolicy
  • メソッド: POST

2.8.3. リクエストボディー

{
  "guid":"<policy_id>"
}

2.8.4. レスポンスボディー

2.8.4.1. 成功

{
  "status": "ok"
}

2.8.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.9. 認証ポリシーの一覧表示

2.9.1. 説明

アプリストアに割り当てられたポリシーを一覧表示します。

2.9.2. エンドポイント

  • URI: /box/srv/1.1/admin/appstore/listpolicies
  • メソッド: POST

2.9.3. リクエストボディー

{}

2.9.4. レスポンスボディー

2.9.4.1. 成功

{
  "list": [
    "ORF5SiIH623yYmBD1ftlFOA4"
  ],
  "status": "ok"
}

2.9.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.10. アプリストアアイテムの作成

2.10.1. 説明

アプリストアアイテムを作成します。

2.10.2. エンドポイント

  • URI: /box/srv/1.1/admin/storeitem/create
  • メソッド: POST
注記

アイコンはアイテムの作成後にアップロードされます。アイテムはアイコンがない状態で作成されます。

2.10.3. リクエストボディー

  {
    "name" : String,
    "description": String <optional>,
    "authToken":String <optional>
  }

2.10.4. レスポンスボディー

{
  "status": "ok",
    "guid": "<app_store_global_unique_id>",
    "name": "<app_store_name>",
    "description": "<app_store_description>",
    "authToken": "<unique_token_used_by_client_to_autheticate>",
    "icon": "<base_64_encoded_icon_data>",
    "binaries": [
      {
        "config": {
          "bundle_id": "<ios_bundle_id>"
        },
        "storeItemBinaryVersion": 2,
        "sysModified": "Fri Nov 02 10:06:48 GMT 2012",
        "type": "iphone | android | ios | ipad",
        "url": "http://<domain>/box/srv/1.1/mas/storeitem/install?guid=dweFfHihI616y67aQB4sNGQt",
        "versions": [{
            "config": {},
            "destinationCode": "iphone | android | ios | ipad",
            "storeItemBinaryGuid": "Y8a8lFjFufZyqd1tAdjonufw",
            "storeItemBinaryModified": "Fri Nov 02 10:44:45 GMT 2012",
            "storeItemBinaryVersion": 1,
            "url": "http://<domain>/box/srv/1.1/mas/storeitem/downloadvers?guid=o1Z1S_t-hyGMXymqTzIWS4xd"
          }]
      }
  ],
  "authpolicies": [<unique_policy_id>],
  "restrictToGroups": true|false,
  "groups": ["<store_item_group_id>",...]
}

2.10.4.1. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.11. アプリストアアイテムの読み込み

2.11.1. 説明

ストアアイテムの詳細を読み込みます。

2.11.2. エンドポイント

  • URI: /box/srv/1.1/admin/storeitem/read
  • メソッド: POST

2.11.3. リクエストボディー

{
  "guid":String
}

2.11.3.1. レスポンスボディー

{
  "status": "ok",
  "guid": "<app_store_global_unique_id>",
  "name": "<app_store_name>",
  "description": "<app_store_description>",
  "authToken": "<unique_token_used_by_client_to_autheticate>",
  "icon": "<base_64_encoded_icon_data">,
  "binaries": [
    {
      "config": {
        "bundle_id": "<ios_bundle_id>"
      },
        "storeItemBinaryVersion": 2,
        "sysModified": "Fri Nov 02 10:06:48 GMT 2012",
        "type": "iphone | android | ios | ipad",
        "url": "http://<domain>/box/srv/1.1/mas/storeitem/install?guid=dweFfHihI616y67aQB4sNGQt",
        "versions": [{
          "config": {},
          "destinationCode": "iphone | android | ios | ipad",
          "storeItemBinaryGuid": "Y8a8lFjFufZyqd1tAdjonufw",
          "storeItemBinaryModified": "Fri Nov 02 10:44:45 GMT 2012",
          "storeItemBinaryVersion": 1,
          "url": "http://<domain>/box/srv/1.1/mas/storeitem/downloadvers?guid=o1Z1S_t-hyGMXymqTzIWS4xd"
        }]
    }],
  "authpolicies": [<unique_policy_id>],
  "restrictToGroups": true|false,
  "groups": [<store_item_group_id>]
}

2.11.3.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.12. アイテムの更新

2.12.1. エンドポイント

  • /box/srv/1.1/admin/storeitem/update
  • メソッド: POST

2.12.2. リクエストボディー

{
  "name": String,
  "description": String,
  "authToken": String,
  "restrictToGroups": true|false // optional - will not change if not set
}

2.12.3. レスポンスボディー

{
  "status": "ok",
  "guid": "<app_store_global_unique_id>",
  "name": "<app_store_name>",
  "description": "<app_store_description>",
  "authToken": "<unique_token_used_by_client_to_autheticate>",
  "icon": "<base_64_encoded_icon_data>",
  "binaries": [
    {
      "config": {
        "bundle_id": "<ios_bundle_id>"
      },
        "storeItemBinaryVersion": 2,
        "sysModified": "Fri Nov 02 10:06:48 GMT 2012",
        "type": "iphone | android | ios | ipad",
        "url": "http://<domain>/box/srv/1.1/mas/storeitem/install?guid=dweFfHihI616y67aQB4sNGQt",
        "versions": [{
          "config": {},
          "destinationCode": "iphone | android | ios | ipad",
          "storeItemBinaryGuid": "Y8a8lFjFufZyqd1tAdjonufw",
          "storeItemBinaryModified": "Fri Nov 02 10:44:45 GMT 2012",
          "storeItemBinaryVersion": 1,
          "url": "http://<domain>/box/srv/1.1/mas/storeitem/downloadvers?guid=o1Z1S_t-hyGMXymqTzIWS4xd"
        }]
    }],
  "authpolicies": [<unique_policy_id>],
  "restrictToGroups": true|false,
  "groups": ["<store_item_group_id>",...]
}

2.12.3.1. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.13. アプリストアアイテムの削除

2.13.1. エンドポイント

  • /box/srv/1.1/admin/storeitem/delete
  • メソッド: POST

2.13.2. リクエストボディー

{
  "guid" : "unique store item id"
}

2.13.3. レスポンスボディー

{
  "status":"ok"
}

2.13.3.1. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.14. アプリストアアイテムの一覧表示

2.14.1. 説明

アプリストアのアイテムを一覧表示します。

2.14.2. エンドポイント

  • URI: /box/srv/1.1/admin/storeitem/list
  • メソッド: POST

2.14.3. リクエストボディー

  {}

2.14.4. レスポンスボディー

{
  "status": "ok",
  "list":[
    {
      "guid": "<app_store_global_unique_id>",
      "name": "<app_store_name>",
      "description": "<app_store_description>",
      "authToken": "<unique_token_used_by_client_to_autheticate>",
      "icon": "<base_64_encoded_icon_data>",
      "binaries": [
      {
        "config": {
          "bundle_id": "<ios_bundle_id>"
        },
        "storeItemBinaryVersion": 2,
        "sysModified": "Fri Nov 02 10:06:48 GMT 2012",
        "type": "iphone | android | ios | ipad",
        "url": "http://<domain>/box/srv/1.1/mas/storeitem/install?guid=dweFfHihI616y67aQB4sNGQt",
          "versions": [{
            "config": {},
            "destinationCode": "iphone | android | ios | ipad",
            "storeItemBinaryGuid": "Y8a8lFjFufZyqd1tAdjonufw",
            "storeItemBinaryModified": "Fri Nov 02 10:44:45 GMT 2012",
            "storeItemBinaryVersion": 1,
            "url": "http://<domain>/box/srv/1.1/mas/storeitem/downloadvers?guid=o1Z1S_t-hyGMXymqTzIWS4xd"
          }]
      }],
      "authpolicies": [<unique_policy_id>],
      "restrictToGroups": true|false,
      "groups": ["<store_item_group_id>",...]
    }
  ]
}

2.14.4.1. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.15. バイナリーのアップロード

2.15.1. エンドポイント

  • /box/srv/1.1/admin/storeitem/uploadbinary
  • メソッド: POST
  • multipart リクエストとして送信されるファイル

2.15.2. リクエストボディー

{
  "guid":"String",
  "type":"<icon|ios|ipad|iphone|android>"
}

2.15.3. レスポンス

{
  "status": "ok"
  "list":[
    {
      "guid": "<app_store_global_unique_id>",
      "name": "<app_store_name>",
      "description": "<app_store_description>",
      "authToken": "<unique_token_used_by_client_to_autheticate>",
      "icon": "<base_64_encoded_icon_data>",
      "binaries": [
      {
        "config": {
          "bundle_id": "<ios_bundle_id>"
        },
        "storeItemBinaryVersion": 2,
        "sysModified": "Fri Nov 02 10:06:48 GMT 2012",
        "type": "iphone | android | ios | ipad",
        "url": "http://<domain>/box/srv/1.1/mas/storeitem/install?guid=dweFfHihI616y67aQB4sNGQt",
          "versions": [{
            "config": {},
            "destinationCode": "iphone | android | ios | ipad",
            "storeItemBinaryGuid": "Y8a8lFjFufZyqd1tAdjonufw",
            "storeItemBinaryModified": "Fri Nov 02 10:44:45 GMT 2012",
            "storeItemBinaryVersion": 1,
            "url": "http://<domain>/box/srv/1.1/mas/storeitem/downloadvers?guid=o1Z1S_t-hyGMXymqTzIWS4xd"
          }]
      }],
      "authpolicies": [<unique_policy_id>],
      "restrictToGroups": true|false,
      "groups": ["<store_item_group_id>",...]
    }
  ]
}

2.15.3.1. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.16. 認証ポリシーの追加

2.16.1. エンドポイント

  • /box/srv/1.1/admin/storeitem/addpolicy
  • メソッド: POST

2.16.2. リクエストボディー

{
  "guid":"<store_item_id>",
  "authguid":"<policy_id>"
}

2.16.3. レスポンスボディー

{
  "status": "ok",
  "list":[
    {
      "guid": "<app_store_global_unique_id>",
      "name": "<app_store_name>",
      "description": "<app_store_description>",
      "authToken": "<unique_token_used_by_client_to_autheticate>",
      "icon": "<base_64_encoded_icon_data>",
      "binaries": [
      {
        "config": {
          "bundle_id": "<ios_bundle_id>"
        },
        "storeItemBinaryVersion": 2,
        "sysModified": "Fri Nov 02 10:06:48 GMT 2012",
        "type": "iphone | android | ios | ipad",
        "url": "http://<domain>/box/srv/1.1/mas/storeitem/install?guid=dweFfHihI616y67aQB4sNGQt",
          "versions": [{
            "config": {},
            "destinationCode": "iphone | android | ios | ipad",
            "storeItemBinaryGuid": "Y8a8lFjFufZyqd1tAdjonufw",
            "storeItemBinaryModified": "Fri Nov 02 10:44:45 GMT 2012",
            "storeItemBinaryVersion": 1,
            "url": "http://<domain>/box/srv/1.1/mas/storeitem/downloadvers?guid=o1Z1S_t-hyGMXymqTzIWS4xd"
          }]
      }],
      "authpolicies": [<unique_policy_id>],
      "restrictToGroups": true|false,
      "groups": ["<store_item_group_id>",...]
    }
  ]
}

2.16.3.1. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.17. ストアアイテム認証ポリシーの削除

2.17.1. エンドポイント

  • /box/srv/1.1/admin/storeitem/removepolicy
  • メソッド: POST

2.17.2. リクエストボディー

{
  "guid":"<store_item_id>",
  "authguid":"<policy_id>"
}

2.17.3. レスポンスボディー

{
  "status": "ok"
  "list":[
    {
      "guid": "<app_store_global_unique_id>",
      "name": "<app_store_name>",
      "description": "<app_store_description>",
      "authToken": "<unique_token_used_by_client_to_autheticate>",
      "icon": "<base_64_encoded_icon_data>",
      "binaries": [
      {
        "config": {
          "bundle_id": "<ios_bundle_id>"
        },
        "storeItemBinaryVersion": 2,
        "sysModified": "Fri Nov 02 10:06:48 GMT 2012",
        "type": "iphone | android | ios | ipad",
        "url": "http://<domain>/box/srv/1.1/mas/storeitem/install?guid=dweFfHihI616y67aQB4sNGQt",
          "versions": [{
            "config": {},
            "destinationCode": "iphone | android | ios | ipad",
            "storeItemBinaryGuid": "Y8a8lFjFufZyqd1tAdjonufw",
            "storeItemBinaryModified": "Fri Nov 02 10:44:45 GMT 2012",
            "storeItemBinaryVersion": 1,
            "url": "http://<domain>/box/srv/1.1/mas/storeitem/downloadvers?guid=o1Z1S_t-hyGMXymqTzIWS4xd"
          }]
      }],
      "authpolicies": [<unique_policy_id>],
      "restrictToGroups": true|false,
      "groups": ["<store_item_group_id>",...]
    }
  ]
}

2.17.3.1. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.18. バイナリー設定の取得

2.18.1. エンドポイント

  • /box/srv/1.1/admin/storeitem/getbinaryconfig
  • メソッド POST | GET

2.18.2. リクエストボディー

{
  "guid":"<store_item_guid>",
  "type":"<ios|ipad|iphone|android>"
}

2.18.3. レスポンス

{
  "status":"ok"
  "guid":"<store_item_guid>",
  "type": "<ios|iphone|ipad|android>",
  "config": {
    "<config_key>": "<config_value>"
  }
}

2.18.3.1. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.19. バイナリー設定の実行

2.19.1. エンドポイント

  • /box/srv/1.1/admin/storeitem/setbinaryconfig
  • メソッド: POST

2.19.2. リクエストボディー

{
  "guid":"<store_item_guid>",
  "type":"<ios|ipad|iphone|android>",
  "config": {
    "<config_key>": "<config_value>"
   }
 }

2.19.3. レスポンス

{
  "status":"ok"
  "guid":"<store_item_guid>",
  "type": "<ios|iphone|ipad|android>",
  "config": {
    "<config_key>": "<config_value>"
  }
}

2.19.4. エラー

2.19.4.1. 発生する可能性のあるエラーメッセージ:

  • invalid_type
  • invalid_guid

2.20. ストアアイテムグループの追加

2.20.1. エンドポイント

  • /box/srv/1.1/admin/storeitem/addgroups
  • メソッド: POST

2.20.2. リクエストボディー

{
  "guid":"<store_item_id>",
  "groups": ["<store_item_group_id>",...]
}

2.20.3. レスポンスボディー

{
  "status": "ok",
  "list":[
    {
      "guid": "<app_store_global_unique_id>",
      "name": "<app_store_name>",
      "description": "<app_store_description>",
      "authToken": "<unique_token_used_by_client_to_autheticate>",
      "icon": "<base_64_encoded_icon_data>",
      "binaries": [
      {
        "config": {
          "bundle_id": "<ios_bundle_id>"
        },
        "storeItemBinaryVersion": 2,
        "sysModified": "Fri Nov 02 10:06:48 GMT 2012",
        "type": "iphone | android | ios | ipad",
        "url": "http://<domain>/box/srv/1.1/mas/storeitem/install?guid=dweFfHihI616y67aQB4sNGQt",
          "versions": [{
            "config": {},
            "destinationCode": "iphone | android | ios | ipad",
            "storeItemBinaryGuid": "Y8a8lFjFufZyqd1tAdjonufw",
            "storeItemBinaryModified": "Fri Nov 02 10:44:45 GMT 2012",
            "storeItemBinaryVersion": 1,
            "url": "http://<domain>/box/srv/1.1/mas/storeitem/downloadvers?guid=o1Z1S_t-hyGMXymqTzIWS4xd"
          }]
      }],
      "authpolicies": [<unique_policy_id>],
      "restrictToGroups": true|false,
      "groups": ["<store_item_group_id>",...]
    }
  ]
}

2.20.3.1. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.21. ストアアイテムグループの削除

2.21.1. エンドポイント

  • /box/srv/1.1/admin/storeitem/removegroups
  • メソッド: POST

2.21.2. リクエストボディー

{
  "guid":"<store_item_id>",
  "groups": ["<store_item_group_id>",...]
}

2.21.3. レスポンスボディー

{
  "guid": "<app_store_global_unique_id>",
  "name": "<app_store_name>",
  "description": "<app_store_description>",
  "authToken": "<unique_token_used_by_client_to_autheticate>",
  "icon": "<base_64_encoded_icon_data">,
  "binaries": [
    {
      "type": "<ios|iphone|ipad|android>",
      "url": "<url_to_app_binary">
    }
  ],
  "authpolicies": [<unique_policy_id>],
  "restrictToGroups": true|false,
  "groups": ["<store_item_group_id>",...]
}

2.21.3.1. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.22. 監査ログエントリーの一覧表示

2.22.1. 説明

監査ログエントリーの一覧表示を取得します。

2.22.2. エンドポイント

  • URI: /box/srv/1.1/admin/auditlog/listlogs
  • メソッド: POST | GET

2.22.3. 認証

制限: ヘッダーとしてセッション ID (sessionId) が必要です。

X-FH-AUTH-SESSION: "<sessionId_returned_from_fh.auth_call>"

2.22.4. リクエストボディー

{
  "userId":"<unique user guid>",
  "storeItemGuid":"<store_item_global_unique_id>",
  "storeItemBinaryType":"ios | iphone | ipad | android",
  "limit":"10 | 100 | 1000"
}

2.22.5. レスポンスボディー

2.22.5.1. 成功

{
  "status": "ok",
  "list": [{
    "deviceId":"<device_global_unique_id>",
    "domain":"<domain name>",
    "guid":"<audit_log_entry_global_unique_id>_RA2E11wCdS>",
    "ipAddress":"<downloading host ip address>",
    "storeItemBinaryGuid":"<store item binary guid>",
    "storeItemBinaryType":"<store item binary type>",
    "storeItemBinaryVersion":"<store item binary version>",
    "storeItemGuid":"<store_item_global_unique_id>",
    "storeItemTitle":"<store item title>",
    "sysCreated":"<audit log creation time>",
    "sysVersion":"<version>",
    "userGuid":"<user guid>",
    "userId":"<user_friendly_id>"
  },
  /* ... */
  ]
}

2.22.5.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}
2.22.5.2.1. 発生する可能性のあるエラーメッセージ:
  • invalid_type

2.23. アプリストアの読み込み

2.23.1. 説明

名前、説明、アイコンおよびサポートされる認証ポリシーなど、アプリストアの詳細を読み込みます。

2.23.2. エンドポイント

  • URI: /box/srv/1.1/mas/appstore/read
  • メソッド: POST | GET

2.23.3. 認証

オープン: 認証なしで呼び出すことができるパブリックエンドポイントです。

2.23.4. リクエストボディー

該当なし

2.23.5. レスポンスボディー

2.23.5.1. 成功

{
  "status": "ok",
  "guid": "<app_store_global_unique_id>",
  "name": "<app_store_name>",
  "description": "<app_store_description>",
  "icon" : "<base64_encoded_representation_of_app_store_icon>"
  "authpolicies": [
    {
      "name": "<auth_policy_name_1>",
      "type": "<auth_policy_type_1>"
    },
    {
      "name": "<auth_policy_name_2>",
      "type": "<auth_policy_type_2>"
    },
    ...
    {
      "name": "<auth_policy_name_N>",
      "type": "<auth_policy_type_N>"
    }
  ]
}

2.23.5.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.24. アプリストアアイテムの取得

2.24.1. 説明

アプリストアで利用可能なストアアイテムの一覧を読み込みます。利用可能なバイナリーおよびそれらのタイプの一覧が含まれます。

2.24.2. エンドポイント

  • URI: /box/srv/1.1/mam/appstore/getstoreitems
  • メソッド: POST

2.24.3. 認証

制限: ヘッダーとしてセッション ID (sessionId) が必要です。

X-FH-AUTH-SESSION: "<sessionId_returned_from_fh.auth_call>"

2.24.4. リクエストボディー

{
  "appstore": "<app_store_global_unique_id>"
}

2.24.5. レスポンスボディー

2.24.5.1. 成功

{
  "status": "ok",
  "storeitems": [{
    "guid": "<store_item_global_unique_id_1>",
    "name": "<store_item_name_1>",
    "description": "<store_item_description_2>",
    "icon": "<base64_encoded_representation_of_store_item_icon_2>",
    "targets" : [
      {
        "type": "ios | iphone | ipad | android",
        "url": "url_of_installable_artifact_1"
      },
      {
        "type": "ios | iphone | ipad | android",
        "url": "url_of_installable_artifact_2"
      },
      ...
      {
        "type": "ios | iphone | ipad | android",
        "url": "url_of_installable_artifact_N"
      }
    ]
  },
  {
    "guid": "<store_item_global_unique_id_2>",
    "name": "<store_item_name_2>",
    "description": "<store_item_description_2>",
    "icon": "<base64_encoded_representation_of_store_item_icon_2>",
    "targets" : [
      {
        "type": "ios | iphone | ipad | android",
        "url": "url_of_installable_artifact_1"
      },
      {
        "type": "ios | iphone | ipad | android",
        "url": "url_of_installable_artifact_2"
      },
      ...
      {
        "type": "ios | iphone | ipad | android",
        "url": "url_of_installable_artifact_N"
      }
    ]
  }
  ...
  {
    "guid": "<store_item_global_unique_id_N>",
    "name": "<store_item_name_N>",
    "description": "<store_item_description_N>",
    "icon": "<base64_encoded_representation_of_store_item_icon_N>",
    "targets" : [
      {
        "type": "ios | iphone | ipad | android",
        "url": "url_of_installable_artifact_1"
      },
      {
        "type": "ios | iphone | ipad | android",
        "url": "url_of_installable_artifact_2"
      },
      ...
      {
        "type": "ios | iphone | ipad | android",
        "url": "url_of_installable_artifact_N"
      }
    ]
  }
}

2.24.5.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

2.25. ストアアイテムのインストール

2.25.1. 説明

アプリストアアイテムをインストールします。要求されるタイプに応じて、この API はバイナリーストリームまたは URL リダイレクトを返すことがあります。

2.25.2. エンドポイント

  • URI: /box/srv/1.1/mas/storeitem/install
  • メソッド: POST | GET

2.25.3. 認証

制限: ヘッダーとしてセッション ID (sessionId) が必要です。

X-FH-AUTH-SESSION: "<sessionId_returned_from_fh.auth_call>"

2.25.4. リクエストボディー

{
  "guid": "<store_item_global_unique_id>",
  "type": "ios | iphone | ipad | android"
}

2.25.5. レスポンス

2.25.5.1. 成功

レスポンスは、要求内の「タイプ」パラメーターによって異なります。

2.25.5.1.1. ios | iphone | ipad

iOS Over The Air (OTA) インストーラーページ

2.25.5.1.2. android

android デバイスのインストール可能なバイナリーアーティファクト: .apk ファイル。

2.25.5.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}
2.25.5.2.1. 発生する可能性のあるエラーメッセージ:
  • invalid_type
  • invalid_guid

第3章 認証ポリシー API

認証ポリシーにより、アプリケーションユーザーの 認証承認 を行うための異なるメソッドを定義することができます。異なる認証ポリシーにより、異なる認証設定オプションを定義する必要があります。各種の認証設定オプションの構造は、認証設定オプションで定義されます。

3.1. 認証ポリシーの作成

3.1.1. 説明

新規の認証ポリシーを作成します。

3.1.2. エンドポイント

  • URI: /box/srv/1.1/admin/authpolicy/create
  • メソッド: POST

3.1.3. リクエストボディー

{
  // required - a unique id for the policy. Used by $fh.auth() to
  // specify which Auth policy to use for authenticating/authorizing users
  "policyId": "<for example, oauth-google>",
  // required - the type of Autheitcation policy
  "policyType": "<oauth1 | oauth2 | ldap | openid>",
  // required, the configuration parameters for the policy
  // See Configuration Options section for full details
  "configurations": {<Config JSON Object>},
  // optional, default false
  // Flag to indicate if a check should be performed to
  // validate that the user id of the user being autheticated exists
  // in the platform. This should be set to
  // true for private apps & false for public apps.
  "checkUserExists": true | false,
  // Flag to indicate if our User needs to be approved for Auth
  "checkUserApproved": true | false
}

3.1.4. レスポンスボディー

3.1.4.1. 成功

{
  "status": "ok",
  "guid": "<new_auth_policy_global_unique_id>"
}

3.1.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

3.2. 認証ポリシーの読み込み

3.2.1. 説明

既存の認証ポリシーの詳細を読み込みます。

3.2.2. エンドポイント

  • URI: /box/srv/1.1/admin/authpolicy/read
  • メソッド: POST

3.2.3. リクエストボディー

{
  // required - the unique id the policy to read
  "policyId": "<for example, oauth-google>"
}

3.2.4. レスポンスボディー

3.2.4.1. 成功

{
  "status": "ok",
  "guid": "<auth_policy_global_unique_id>",
  "policyId" : "<user_defined_policy_identifier>"
  "policyType": "<oauth1 | oauth2 | ldap | openid>",
  "configurations": {<Config JSON Object>},
  "checkUserExists": true | false,
  "checkUserApproved": true | false,
  "users" : [<user-id>]
}

3.2.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

3.3. 認証ポリシーの更新

3.3.1. 説明

既存の認証ポリシーを更新します。

3.3.2. エンドポイント

  • URI: /box/srv/1.1/admin/authpolicy/update
  • メソッド: POST

3.3.3. リクエストボディー

{
  // required - the global unique identifier for the policy to update
  "guid" : "<global_unique_identifier>",
  // required - a unique id for the policy. Used by $fh.auth() to
  // specify which authentication policy to use for authenticating/authorizing users
  "policyId": "<for example, oauth-google>",
  // required - the type of Auth policy
  "policyType": "<oauth1 | oauth2 | ldap | openid>",
  // required, the configuration parameters for the policy
  // See See Configuration Options section for full details
  "configurations": {<Config JSON Object>},
  // optional, default false
  // Flag to indicate if a check should be performed to
  // validate that the user id of the user being authenticated exists
  // in the platform. This should be set to
  // true for private apps & false for public apps.
  "checkUserExists": true | false,
  // Flag to indicate if our User needs to be approved for Auth
  "checkUserApproved": true | false
}

3.3.4. レスポンスボディー

3.3.4.1. 成功

{
  "status": "ok",
  "guid": "<auth_policy_global_unique_id>"
}

3.3.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

3.4. 認証ポリシーの削除

3.4.1. 説明

既存の認証ポリシーを削除します。

3.4.2. エンドポイント

  • URI: /box/srv/1.1/admin/authpolicy/delete
  • メソッド: POST

3.4.3. リクエストボディー

{
  // required - the global unique identifier for the policy to delete
  "guid" : "<global_unique_identifier>"
}

3.4.4. レスポンスボディー

3.4.4.1. 成功

{
  "status": "ok"
}

3.4.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

3.5. 認証ポリシーの一覧表示

3.5.1. 説明

既存のすべての認証ポリシーを一覧表示します。

3.5.2. エンドポイント

  • URI: /box/srv/1.1/admin/authpolicy/list
  • メソッド: POST | GET

3.5.3. リクエストボディー

該当なし

3.5.4. レスポンスボディー

3.5.4.1. 成功

{
  "status": "ok",
  "list" : [
    {
      "guid": "<auth_policy_global_unique_id#1>",
      "policyId" : "<user_defined_policy_identifier#1>"
      "policyType": "<oauth1 | oauth2 | ldap | openid>",
      "configurations": {<Config JSON Object>},
      "checkUserExists": true | false,
      "checkUserApproved": true | false
    },
    {
      "guid": "<auth_policy_global_unique_id#2>",
      "policyId" : "<user_defined_policy_identifier#2>"
      "policyType": "<oauth1 | oauth2 | ldap | openid>",
      "configurations": {<Config JSON Object>},
      "checkUserExists": true | false,
      "checkUserApproved": true | false
    },
    ...
    {
      "guid": "<auth_policy_global_unique_id#N>",
      "policyId" : "<user_defined_policy_identifier#N>"
      "policyType": "<oauth1 | oauth2 | ldap | openid>",
      "configurations": {<Config JSON Object>},
      "checkUserExists": true | false,
      "checkUserApproved": true | false
    }
  ],
  "count" : "<number_of_policies>"
}

3.5.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

3.6. ポリシーユーザーの一覧表示

3.6.1. 説明

認証ポリシーに関連付けられたすべてのユーザーを一覧表示します。

3.6.2. エンドポイント

  • URI: /box/srv/1.1/admin/authpolicy/users
  • メソッド: POST

3.6.3. リクエストボディー

{
  "guid": "<policy_guid>",
}

3.6.4. レスポンスボディー

3.6.4.1. 成功

{
  "status": "ok",
  "list" : [
    {
      "userid": "<user_id>",
      "name" : "<user_name>"
      "email": "<user_email>",
    }
  ],
  "count" : "<number_of_users_for_this_policy>"
}

3.6.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

3.7. ユーザーのポリシーへの追加

3.7.1. 説明

ユーザーを認証ポリシーに関連付けます。

3.7.2. エンドポイント

  • URI: /box/srv/1.1/admin/authpolicy/addusers
  • メソッド: POST

3.7.3. リクエストボディー

{
  "guid": "<policy_guid>",
  "users": ["<user_id>"]
}

3.7.4. レスポンスボディー

3.7.4.1. 成功

{
  "status": "ok"
}

3.7.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

3.8. ユーザーのポリシーからの削除

3.8.1. 説明

認証ポリシーに関連付けられたユーザーを削除します。

3.8.2. エンドポイント

  • URI: /box/srv/1.1/admin/authpolicy/removeusers
  • メソッド: POST

3.8.3. リクエストボディー

{
  "guid": "<policy_guid>",
  "users": ["<user_id>"]
}

3.8.4. レスポンスボディー

3.8.4.1. 成功

{
  "status": "ok"
}

3.8.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

3.9. 認証設定オプション

3.9.1. OAuth 2.0

  • clientId: 認証を要求しているクライアントを特定するために使用されるパブリックキーです。このキーは、クライアントに渡され、クライアントによって使用されます。
  • clientSecret: OAuth プロバイダーによって割り当てられるシークレットキーです。このキーはクライアントに設定されたり、クライアントに保存されることはありません。これは、プラットフォームと OAuth プロバイダー間のサーバー間通信で使用されます。

3.9.1.1. 例:

{
  "clientId": "1234567890.apps.example.com",
  "clientSecret": "Wfv8DQw80hhyaBqnW37x5R23"
}

3.9.2. LDAP

  • authmethod - LDAP サーバーに対する認証時に使用する認証メソッドです。これは以下のいずれかになります。'simple'、'DIGEST-MD5'、'CRAM-MD5'、または 'GSSAPI'。
  • url - LDAP Server url (例: "ldap://foo.example.com:389/")
  • dn: 使用する「識別名」です。DN はカンマでつなげられた相対識別名 (RDN) のシーケンスです (例: "ou=people,dc=example,dc=com")。
  • dn_prefix: 認証に使用するプレフィックスです (例: "uid" または "cn")。

3.9.2.1. 例:

{
  "authmethod" : "simple",
  "url" : "ldap://foo.example.com:389/",
  "dn": "ou=people,dc=example,dc=com",
  "dn_prefix": "cn",
}

第4章 クラウドアラート API

4.1. アラートの一覧表示

4.1.1. 説明

アプリに関連付けれたアラートを一覧表示します。

4.1.2. エンドポイント

  • URI: /box/srv/1.1/cm/eventlog/alert/list
  • メソッド: POST

4.1.3. リクエストボディー

{
  "appGuid":"<24 char String>",
  "env":"<environment>"
}

4.1.4. レスポンスボディー

4.1.4.1. 成功

{
  "list":[
    {
      "alertName": "AppTerminated",
      "emails": "test@example.com",
      "enabled": true,
      "env": "dev",
      "eventCategories": "APP_STATE",
      "eventNames": "",
      "eventSeverities": "FATAL",
      "guid": "iV5E_ASJcQ_83TOgbDpYbHIp",
      "sysCreated": "2013-06-28 11:09:05",
      "sysModified": "2013-06-28 11:09:05",
      "uid": "ajBTU-_UMtc7ggOCL6MbZRP_"
    },
    ...
  ],
  "status":"ok"
}

4.1.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

4.2. アラートの作成

4.2.1. 説明

アプリの新規アラートを作成します。

4.2.2. エンドポイント

  • URI: /box/srv/1.1/cm/eventlog/alert/create
  • メソッド: POST

4.2.3. リクエストボディー

{
  "alertName": "<The name of the alert, for example, TestAlert>",
  "emails": "<The recipients of the alert>",
  "enabled": "<true|false>",
  "env": "<environment>",
  "eventCategories": "<any of the event categories, for example, APP_STATE>",
  "eventNames": "<any of the event name, for example, APP_TERMINATED. NOTE, if this is specified as well as the event categories and severities, need to make sure categories and severies are valid for the events>",
  "eventSeverities": "<any of the event severities, for example, FATAL>",
  "uid": "<the guid of the app>"
}

4.2.4. レスポンスボディー

4.2.4.1. 成功

{
  "alertName": "TestAlert",
  "emails": "test@example.com",
  "enabled": true,
  "env": "dev",
  "eventCategories": "APP_STATE",
  "eventNames": "TERMINATED",
  "eventSeverities": "FATAL",
  "guid": "F9zwTLwAwsaTZP7I45sOtRKJ",
  "sysCreated": "2013-07-04 15:32:54",
  "sysModified": "2013-07-04 15:32:54",
  "uid": "ajBTU-_UMtc7ggOCL6MbZRP_",
  "status":"ok"
}

4.2.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

4.3. アラートの更新

4.3.1. 説明

アプリの既存アラートを更新します。

4.3.2. エンドポイント

  • URI: /box/srv/1.1/cm/eventlog/alert/update
  • メソッド: POST

4.3.3. リクエストボディー

{
  "guid":"<The unique id of the alert>",
  "alertName": "<The name of the alert, for example, TestAlert>",
  "emails": "<The recipients of the alert>",
  "enabled": "<true|false>",
  "env": "<environment>",
  "eventCategories": "<any of the event categories, for example, APP_STATE>",
  "eventNames": "<any of the event name, for example, APP_TERMINATED. NOTE, if this is specified as well as the event categories and severities, need to make sure categories and severies are valid for the events>",
  "eventSeverities": "<any of the event severities, for example, FATAL>",
  "uid": "<the guid of the app>"
}

4.3.4. レスポンスボディー

4.3.4.1. 成功

{
  "alertName": "TestAlert",
  "emails": "test@example.com, test1@example.com",
  "enabled": true,
  "env": "dev",
  "eventCategories": "APP_STATE",
  "eventNames": "TERMINATED",
  "eventSeverities": "FATAL",
  "guid": "F9zwTLwAwsaTZP7I45sOtRKJ",
  "sysCreated": "2013-07-04 15:32:54",
  "sysModified": "2013-07-04 15:32:54",
  "uid": "ajBTU-_UMtc7ggOCL6MbZRP_",
  "status":"ok"
}

4.3.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

4.4. アラートの削除

4.4.1. 説明

アプリの既存アラートを削除します。

4.4.2. エンドポイント

  • URI: /box/srv/1.1/cm/eventlog/alert/delete
  • メソッド: POST

4.4.3. リクエストボディー

{
  "guid":"<The unique id of the alert>",
  "alertName": "<The name of the alert, for example, TestAlert>",
  "emails": "<The recipients of the alert>",
  "enabled": "<true|false>",
  "env": "<environment>",
  "eventCategories": "<any of the event categories, for example, APP_STATE>",
  "eventNames": "<any of the event name, for example, APP_TERMINATED. NOTE, if this is specified as well as the event categories and severities, need to make sure categories and severies are valid for the events>",
  "eventSeverities": "<any of the event severities, for example, FATAL>",
  "uid": "<the guid of the app>"
}

4.4.4. レスポンスボディー

4.4.4.1. 成功

{
  "alertName": "TestAlert",
  "emails": "test@example.com, test1@example.com",
  "enabled": true,
  "env": "dev",
  "eventCategories": "APP_STATE",
  "eventNames": "TERMINATED",
  "eventSeverities": "FATAL",
  "guid": "F9zwTLwAwsaTZP7I45sOtRKJ",
  "sysCreated": "2013-07-04 15:32:54",
  "sysModified": "2013-07-04 15:32:54",
  "uid": "ajBTU-_UMtc7ggOCL6MbZRP_",
  "status":"ok"
}

4.4.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

4.5. メール通知の一覧表示

4.5.1. 説明

アプリについて送信されるメール通知をすべて一覧表示します。

4.5.2. エンドポイント

  • URI: /box/srv/1.1/cm/eventlog/alert/listAudit
  • メソッド: POST

4.5.3. リクエストボディー

{
  "appGuid":"<24 char String>",
  "env":"<environment>"
}

4.5.4. レスポンスボディー

4.5.4.1. 成功

{
  "list":[
    {
      "alertName": "AppTerminated",
      "body": "<Email Content>",
      "env": "dev",
      "guid": "RD0O6ByAU_BwJRolaZUhXpl8",
      "recipients": "wei.li@feedhenry.com",
      "subject": "FeedHenry DynoFarm Testing Alert: AppTerminated - EventsTestApp1 (ajBTU-_UMtc7ggOCL6MbZRP_)",
      "sysCreated": "2013-07-04 14:24:23",
      "sysModified": "2013-07-04 14:24:23",
      "uid": "ajBTU-_UMtc7ggOCL6MbZRP_"
    },
    ...
  ],
  "status":"ok"
}

4.5.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

第5章 クラウドイベント API

5.1. イベントの一覧表示

5.1.1. 説明

アプリのイベントログからイベントを一覧表示します。

5.1.2. エンドポイント

  • URI: /box/srv/1.1/app/eventlog/listEvents
  • メソッド: POST

5.1.3. リクエストボディー

{
  "appGuid":"<24 char String>",
  "env":"<environment>"
}

5.1.4. レスポンスボディー

5.1.4.1. 成功

{
  "list":[{
    "fields":
      {
        "appGuid": "WaD9Fgzx7yMZRfAvQSwO85el",
        "category": "APP_STATE",
        "dismissed": false,
        "env": "dev",
        "eventDetails": {message:Completed app deployment},
        "message": "Completed app deployment",
        "eventType": "DEPLOYED",
        "guid": "43f-WyNeI4Wlif07-cgpBZVy",
        "message": "Completed app deployment",
        "severity": "INFO",
        "sysCreated": "2013-07-04 14:47:49:034",
        "timestamp": "2013-07-04 14:47:48:977",
        "title": "DEPLOYED",
        "uid": "WaD9Fgzx7yMZRfAvQSwO85el",
        "updatedBy": "System"
      },
      "guid":"rVfKTjq-YoosmcGUJf96f0xx",
      "type":"eventlog_EventLog"
    },
    ...
  ],
  "status":"ok"
}

5.1.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

第6章 デバイス API

6.1. デバイスの一覧表示

6.1.1. 説明

プラットフォームに対して認証されたデバイスの一覧を取得します。

6.1.2. エンドポイント

  • URI: /box/srv/1.1/admin/device/list
  • メソッド: POST

6.1.3. リクエストボディー

{}

6.1.4. レスポンスボディー

6.1.4.1. 成功

{
  "status": "ok",
  "count": <total device count>,
  "list" : [
    {
      "guid": "<device_global_unique_id>",
      "fields": {
        "cuid": "<id_assigned_by_device>",
        "name": "<Friendly_name_of_device>",
        "disabled": true|false, /* Is this device currently blocked from logging in */
        "blacklisted": true|false /* Should data be purged from apps the next time the device authenticates */
      }
    },
    ...
  ]
}

6.1.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

6.2. デバイスの読み込み

6.2.1. 説明

ID に基づいて特定デバイスの詳細を読み込みます。

6.2.2. エンドポイント

  • URI: /box/srv/1.1/admin/device/read
  • メソッド: POST

6.2.3. リクエストボディー

{
  "cuid": "<id_assigned_by_device>"
}

6.2.4. レスポンスボディー

6.2.4.1. 成功

{
  "status": "ok",
  "guid": "<global_unique_id>",
  "fields": {
    "cuid": "<id_assigned_by_device>",
    "name": "<Friendly_name_of_device>",
    "disabled": true|false, /* Is this device currently blocked from logging in */
    "blacklisted": true|false /* Should data be purged from apps the next time the device authenticates */
  }
}

6.2.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

6.3. デバイスの更新

6.3.1. 説明

GUID に基づいて特定デバイスの詳細を更新します。

6.3.2. エンドポイント

  • URI: /box/srv/1.1/admin/device/update
  • メソッド: POST

6.3.3. リクエストボディー

{
  "cuid": "<id_assigned_by_device>",
  "name": "<Friendly_name_of_device>",  /* Optional */
  "disabled": true|false   /* Optional - DEFAULT=false - Is this device currently blocked from logging in */
  "blacklisted": true|false /* Optional - DEFAULT=false - Should data be purged from apps the next time the device authenticates */
}

6.3.4. レスポンスボディー

6.3.4.1. 成功

{
  "status": "ok",
  "guid": "<global_unique_id>",
  "fields": {
    "cuid": "<id_assigned_by_device>",
    "name": "<Friendly_name_of_device>",
    "disabled": true|false, /* Is this device currently blocked from logging in */
    "blacklisted": true|false /* Should data be purged from apps the next time the device authenticates */
  }
}

6.3.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

6.4. アプリの一覧表示

6.4.1. 説明

指定されたデバイス ID から認証したアプリの一覧を返します。

6.4.2. エンドポイント

  • URI: /box/srv/1.1/admin/device/listapps
  • メソッド: POST

6.4.3. リクエストボディー

{
  "cuid": "<id_assigned_by_device>"
}

6.4.4. レスポンスボディー

6.4.4.1. 成功

{
  "status": "ok",
  "count": <total apps count>,
  "list" : [
    {
      "guid": <unique app guid>,
      "fields" : {
        "name" : <app name>,
        "description" : <app description>,
      }
    },
    ...
  ]
}

6.4.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

6.5. ユーザーの一覧表示

6.5.1. 説明

指定されたデバイス ID から認証したユーザー ID の一覧を返します。

6.5.2. エンドポイント

  • URI: /box/srv/1.1/admin/device/listusers
  • メソッド: POST

6.5.3. リクエストボディー

{
  "cuid": "<id_assigned_by_device>"
}

6.5.4. レスポンスボディー

6.5.4.1. 成功

{
  "status": "ok",
  "count": <total users count>,
  "list" : [
    {
      "guid": <unique user guid>,
      "fields" : {
        "userId" : <unique user id>,
        "email" : <user email>
      }
    },
    ...
  ]
}

6.5.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

第7章 エンドポイントセキュリティー API

7.1. getSecureEndpoint

7.1.1. 説明

指定されたアプリおよびランタイム環境についてのエンドポイントセキュリティーデータを取得します。

7.1.2. エンドポイント

  • URI: /box/srv/1.1/app/endpointsecurity/get
  • メソッド: POST

7.1.3. リクエストボディー

{
  // required
  "appId": "unqiue app identifier",
  // required
  "environment": "dev",
}

7.1.4. レスポンスボディー

7.1.4.1. 成功

{
  "status": "ok",
  "appId": "unqiue app identifier",
  "environment": "dev",
  "default": "https", // can be "https" | "appapikey"
  "updatedBy": "user@example.com",
  "updatedWhen": "2012-12-04 12:00",
  "overrides": {
    "<endpoint name 1>": {
      "security" : "https", // can be "https" | "appapikey",
      "updatedBy": "user@example.com",
      "updatedWhen": "2012-12-04 12:00"
    },
    "<endpoint name 2>": {
      "security" : "https", // can be "https" | "appapikey",
      "updatedBy": "user@example.com",
      "updatedWhen": "2012-12-04 12:00"
    },
    // ...
    "<endpoint name n>": {
      "security" : "https", // can be "https" | "appapikey",
      "updatedBy": "user@example.com",
      "updatedWhen": "2012-12-04 12:00"
    }
  }
}

7.1.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

7.2. setSecureEndpoint

7.2.1. 説明

指定されたアプリおよびランタイム環境についてのエンドポイントセキュリティーデータを設定します。

7.2.2. エンドポイント

  • URI: /box/srv/1.1/app/endpointsecurity/set
  • メソッド: POST

7.2.3. リクエストボディー

{
  // required
  "appId": "unqiue app identifier",
  // required
  "environment": "dev",
  // required
  "default": "https", // can be "https" | "appapikey"
  "overrides": {
    "<endpoint name 1>": {
      "security" : "https" // can be "https" | "appapikey"
    },
    "<endpoint name 2>": {
      "security" : "https" // can be "https" | "appapikey"
    },
    // ...
    "<endpoint name n>": {
      "security" : "https" // can be "https" | "appapikey"
    }
  }
}

7.2.4. レスポンスボディー

7.2.4.1. 成功

{
  "status": "ok"
}

7.2.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

7.3. setSecureEndpointOverride

7.3.1. 説明

アプリおよびランタイム環境の指定されたエンドポイントについてのエンドポイントセキュリティーデータを設定します。これにより、アプリのデフォルトセキュリティー設定が変更されることはありません。

7.3.2. エンドポイント

  • URI: /box/srv/1.1/app/endpointsecurity/setOverride
  • メソッド: POST

7.3.3. リクエストボディー

{
  // required
  "appId": "unqiue app identifier",
  // required
  "environment": "dev",
  // required
  "overrides": {
    "<endpoint name 1>": {
      "security" : "https" // can be "https" | "appapikey"
    },
    "<endpoint name 2>": {
      "security" : "https" // can be "https" | "appapikey"
    },
    // ...
    "<endpoint name n>": {
      "security" : "https" // can be "https" | "appapikey"
    }
  }
}

7.3.4. レスポンスボディー

7.3.4.1. 成功

{
  "status": "ok"
}

7.3.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

7.4. removeSecureEndpointOverride

7.4.1. 説明

アプリの指定されたエンドポイントおよびランタイム環境のエンドポイントセキュリティーのオーバーライドを削除します。これにより、アプリのデフォルトセキュリティー設定が変更されることはありません。

7.4.2. エンドポイント

  • URI: /box/srv/1.1/app/endpointsecurity/removeOverride
  • メソッド: POST

7.4.3. リクエストボディー

{
  // required
  "appId": "unqiue app identifier",
  // required
  "environment": "dev",
  // required
  "endpoint": "<endpoint name>"
}

7.4.4. レスポンスボディー

7.4.4.1. 成功

{
  "status": "ok"
}

7.4.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

7.5. setDefaultSecureEndpoint

7.5.1. 説明

指定されたアプリおよびランタイム環境についてのデフォルトエンドポイントセキュリティーを設定します。

7.5.2. エンドポイント

  • URI: /box/srv/1.1/app/endpointsecurity/setDefault
  • メソッド: POST

7.5.3. リクエストボディー

{
  // required
  "appId": "unqiue app identifier",
  // required
  "environment": "dev",
  // required
  "default": "https" // can be "https" | "appapikey"
}

7.5.4. レスポンスボディー

7.5.4.1. 成功

{
  "status": "ok"
}

7.5.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

7.6. auditLog

7.6.1. 説明

指定されたアプリおよびランタイム環境についてのエンドポイントセキュリティー監査ログデータを取得します。

オプションのフィルターパラメーターは、以下の基準で返される監査ログレコードをフィルターするために指定できます。

  • endpoint: エンドポイントの名前
  • security: https または appapikey を使用できます。
  • updatedBy: userId
  • event: "Set App Security"、"Add Endpoint"、"Remove Endpoint" のいずれか
  • limit: 返すレコードの数

7.6.2. エンドポイント

  • URI: /box/srv/1.1/app/endpointsecurity/auditLog
  • メソッド: POST

7.6.3. リクエストボディー

{
  // required
  "appId": "unqiue app identifier",
  // required
  "environment": "dev",
  "filter": {
    "endpoint": "<endpoint>",
    "security": "<security>",
    "updatedBy": "<updatedBy>",
    "event": "<event>",
    "limit": "<num records>"
  }
}

7.6.4. レスポンスボディー

7.6.4.1. 成功

{
  "list": [
    {
      "appId": "O_6sZAYZN4O3KsJtJ2-ssvAf",
      "endpoint": "getDemo",
      "environment": "dev",
      "event": "Add Endpoint",
      "security": "https",
      "updatedBy": "training@example.com",
      "updatedWhen": "Thu Dec 13 12:01:33 UTC 2012",
      "updatedWhenMillis": 1355400093157
    },
    {
      "appId": "O_6sZAYZN4O3KsJtJ2-ssvAf",
      "endpoint": "",
      "environment": "dev",
      "event": "Set App Security",
      "security": "appapikey",
      "updatedBy": "training@example.com",
      "updatedWhen": "Thu Dec 13 11:57:24 UTC 2012",
      "updatedWhenMillis": 1355399844528
    }
  ],
  "status": "ok"
}

7.6.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

第8章 ユーザーロール API

8.1. ユーザーのロールの一覧表示

8.1.1. 説明

現在ログインされているユーザーのロールを一覧表示します。

8.1.2. エンドポイント

  • URI: /box/srv/1.1/admin/role/list
  • メソッド: POST

8.1.3. リクエストボディー

{}

8.1.4. レスポンスボディー

8.1.4.1. 成功

{
  "status": "ok",
  "list": ["sub", "dev"]
}

8.1.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

8.2. ユーザーの割り当て可能ロールの一覧表示

8.2.1. 説明

現在ログインされているユーザーの割り当て可能なロールを一覧表示します (例: このユーザーが他のユーザーに割り当てることのできるロール)。

8.2.2. エンドポイント

  • URI: /box/srv/1.1/admin/role/listAssignable
  • メソッド: POST

8.2.3. リクエストボディー

{}

8.2.4. レスポンスボディー

8.2.4.1. 成功

{
  "status": "ok",
  "list": ["sub", "dev", "devadmin", "analytics", "portaladmin"]
}

8.2.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

第9章 チーム管理 API

チーム管理 API により、必要なパーミッションを持つユーザーはプラットフォームの複数の異なるレベルでチームを管理することができます。

9.1. 要件

チームを管理できるようにするには、ユーザーは、ログインし、返された cookie を使用するか、または Studio のユーザープロファイルの API キーの管理セクションにある API キーを使用することにより、特定ドメインに対して認証される必要があります。

さらに、ログインしているユーザーは、以下のパーミッションを持つチームのメンバーである必要があります。

  • Reseller

    • 管理者 (閲覧および編集)

または

  • Customer

    • 管理者 (閲覧および編集)

または

  • Domain

    • 管理者 (閲覧および編集)

9.2. チームの一覧表示

9.2.1. 説明

ユーザーがメンバーであるチームに割り当てられたパーミッションに基づいて、ユーザーが利用できるチームを一覧表示します。

9.2.2. JSON チームの定義

以下の JSON オブジェクトは、チーム管理プラットフォーム API のレスポンスボディーで参照されるチームの JSON 定義です。

{
    //Team Identifier
    "_id": "teamid1234",
    //The Business Objects that the Team has access to at different levels of the
    //Platform.
    "business-objects": {
        "cluster": [
            "<Cluster Name>"
          ],
          "cluster/reseller": [
            "<Reseller Id>"
          ],
          "cluster/reseller/customer": [
            "<Customer Id>"
          ]
    },
    //Array Of Users IDs Assigned to the Team.
    "users": ["userid1234"],
    //Permissiions assigned to the Team at Different Levels of the Platform
    "perms": {
        "cluster/reseller": "read"
        "cluster/reseller/customer": "write"
        "cluster/reseller/customer/domain": "read"
    },
    //Is this Team a Default Team or a User Created Team.
    "defaultTeam": true/false,
    //A User-defined description of a Team.
    "desc": "This is a Team.",
    //The Name of a Team.
    "name": "Team 1",
    //Timestamp of the last time the team was updated.
    "updated": "<1413466521479>",
    //A User-Defined code for the team.
    "code": "Team Code"
}

9.2.3. エンドポイント

  • URI: /api/v2/admin/teams
  • メソッド: GET

9.2.4. リクエストボディー

{}

9.2.5. レスポンスボディー

9.2.5.1. 成功

// Array of JSON Objects Representing A Team
[
    "<JSON Team Definition>",
    "<JSON Team Definition>"
]

9.2.5.2. エラー

{
    "error": {
        "error": "<Error Message>"
    }
}

9.3. ユーザーのチームの一覧表示

9.3.1. 説明

このエンドポイントは、ID userId のユーザーがメンバーであるチームを一覧表示します。

9.3.2. エンドポイント

  • URI: /api/v2/admin/users/<userId>/teams
  • メソッド: GET

9.3.3. リクエストボディー

{}

9.3.4. レスポンスボディー

9.3.4.1. 成功

[
    "<JSON Team Definition>"
]

9.3.4.2. エラー

{
    "error": {
        "error": "<Error Message>"
    }
}

9.4. チーム詳細の表示

9.4.1. 説明

ID teamId のチームについての完全な JSON 定義を表示します。

9.4.2. エンドポイント

  • URI: /api/v2/admin/teams/<teamId>
  • メソッド: GET

9.4.3. リクエストボディー

{}

9.4.4. レスポンスボディー

9.4.4.1. 成功

{
    "<JSON Team Definition>"
}

9.4.4.2. エラー

{
    "error": {
        "error": "<Error Message>"
    }
}

9.5. チームの作成

9.5.1. 説明

新規のユーザー定義チームを作成します。

9.5.2. エンドポイント

  • URI: /api/v2/admin/teams
  • メソッド: POST

9.5.3. リクエストボディー

{
    //A User-Defined name for the Team.
    "name":"User Team",
    //A User-Definied code for the Team.
    "code":"user-team",
    //A User-Definied description of the team.
    "desc":"A Team Created By A User",
    //Permissions Assigned to the Team at differnent levels of the Platform
    "perms":{
        "cluster": [
            "<Cluster Name>"
        ],
        "cluster/reseller": [
            "<Reseller Id>"
        ],
        "cluster/reseller/customer": [
            "<Customer Id>"
        ]
    },
    //User IDs of Users assigned to the Team.
    "users":[],
    //IDs of Business Objects assigned to the Team at different levels of the Platform.
    "business-objects":{
        "cluster/reseller": "read"
    }
}

9.5.4. レスポンスボディー

9.5.4.1. 成功

{
    "<JSON Team Definition>"
}

9.5.4.2. エラー

{
    "error": {
        "error": "<Error Message>"
    }
}

9.6. チームの削除

9.6.1. 説明

ID teamId のチームを削除します。

9.6.2. エンドポイント

  • URI: /api/v2/admin/teams/<teamId>
  • メソッド: DELETE

9.6.3. リクエストボディー

{}

9.6.4. レスポンスボディー

9.6.4.1. 成功

{
    "JSON Team Definition"
}

9.6.4.2. エラー

{
    "error": "<Error Message>"
}

9.7. ユーザーのチームへの追加

9.7.1. 説明

ID userId のユーザーを、ID teamId のチームに追加します。

9.7.2. エンドポイント

  • URI: /api/v2/admin/teams/<teamId>/user/<userId>
  • メソッド: POST

9.7.3. リクエストボディー

{
    "guid": "<userId>"
}

9.7.4. レスポンスボディー

9.7.4.1. 成功

{
    "<JSON Team Definition>"
}

9.7.4.2. エラー

{
    "error": "<Error Message>"
}

9.8. ユーザーをチームから削除

9.8.1. 説明

ID userId のユーザーを、ID teamId のチームから削除します。

9.8.2. エンドポイント

  • URI: /api/v2/admin/teams/<teamId>/user/<userId>
  • メソッド: DELETE

9.8.3. リクエストボディー

{}

9.8.4. レスポンスボディー

9.8.4.1. 成功

{
    "<JSON Team Definition>"
}

9.8.4.2. エラー

{
    "error": "<Error Message>"
}

第10章 ユーザー管理 API

10.1. 要件

ユーザーは、以下のパーミッションを持つ 1 つ以上のチームメンバーである必要があります。

  • Reseller

    • 管理 (表示 & 編集)

または

  • Customer

    • 管理 (表示 & 編集)

パーミッションについての詳細は、「チームおよびコラボレーション」を参照してください。

10.2. ユーザーの作成

10.2.1. 説明

指定された顧客に属する新規ユーザーを作成します。

10.2.2. エンドポイント

  • URI: /box/srv/1.1/admin/user/create
  • メソッド: POST

10.2.3. リクエストボディー

{
  // required
  "username": "unqiue user identifier",
  // optional, default is a randomly generated password
  // Useful to leave as default if User is to be sent an activation email,
  // allowing them to set the password as required upon activation
  "password": "<password>",
  //optional
  "email": "<email>",
  //optional
  "name": "<name>",
  // optional, default is ""
  // comma separated list of roles to assign new user
  "roles": "<roles>",
  // optional, default is ""
  // comma separated list of Auth policy guids to assign new user
  "authpolicies": "<authpolicies>",
  // optional, default is false
  // whether or not an activation invite email should be sent to the user
  "invite": false
}

10.2.4. レスポンスボディー

10.2.4.1. 成功

{
  "status": "ok",
  "username": "<user_name>"
}

10.2.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

10.3. ユーザーの更新

10.3.1. 説明

指定された顧客に属する既存ユーザーを更新します。

10.3.2. エンドポイント

  • URI: /box/srv/1.1/admin/user/update
  • メソッド: POST

10.3.3. リクエストボディー

{
  //required, and it can not be changed
  "username": "<unique user identifier>",
  // all fields are optional
  // email address of user to update
  "email": "<email>",
  "name": "<name>",
  "password": "<password>",
  //user won't be able to login if this is set to true
  "enabled": false,
  //if this is set to true, if will return a special flag next time the user logged in,
  //this flag can be used to delete application data on the device
  "blacklisted": false,
  // comma separated list of roles to set for this user for example, 'dev, analytics'
  "roles": "<roles>",
  // comma separated list of Auth policy guids to set for this user
  "authpolicies": "<authpolicies>"
}

10.3.4. レスポンスボディー

10.3.4.1. 成功

注記

teams フィールドは、チームがプラットフォーム上で有効にされている場合にのみ有効です。JSON チーム定義を表示するには、ここ をクリックしてください。

{
  "status": "ok",
  "fields": {
    "username": "<unique user identifier>",
    "email": "<email>",
    "name": "<name>",
    "enabled": false,
    "blacklisted": false,
    "roles": "<roles>",
    //An Array of JSON Team Definitions the User is a Member of.
    //Note: This is only included if Teams is enabled for the User.
     "teams": ["<JSON Team Definition>"]
  }
}

10.3.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

10.4. ユーザーの削除

10.4.1. 説明

ユーザーを削除します。ユーザーにはアプリが設定されていない状態にしておく必要があります。設定されているとこの削除が失敗します。

10.4.2. エンドポイント

  • URI: /box/srv/1.1/admin/user/delete
  • メソッド: POST

10.4.3. リクエストボディー

{
  // required
  // username of user to delete
  "username": "<unique user identifier>",
}

10.4.4. レスポンスボディー

10.4.4.1. 成功

{
  "status": "ok",
  "fields": {
    "username": "<unique user identifier>",
    "email": "<email>",
    "name": "<name>",
    "enabled": false,
    "blacklisted": false,
    "roles": "<roles>",
    "authpolicies": "<authpolicies>"
  }
}

10.4.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

10.5. ユーザーの読み込み

10.5.1. 説明

ユーザー名に基づいてユーザー情報を読み込みます。

10.5.2. エンドポイント

  • URI: /box/srv/1.1/admin/user/read
  • メソッド: POST

10.5.3. リクエストボディー

{
  // required
  // user name of the user to delete
  "username": "<unique user identifier>",
}

10.5.4. レスポンスボディー

{
  "status": "ok",
  "fields": {
    "username": "<unique user identifier>",
    "email": "<email>",
    "name": "<name>",
    "enabled": false,
    "blacklisted": false,
    "roles": [<an array of role string>],
    "authpolicies": [<an array of Auth policy guids>],
    "lastLogin" : "<timestamp of last login>"
  }
}

10.5.4.1. エラー

{
  "status": "error",
  "message": "<error_message>"
}

10.6. ユーザーの一覧表示

10.6.1. 説明

ユーザーを一覧表示します。

10.6.2. エンドポイント

  • URI: /box/srv/1.1/admin/user/list
  • メソッド: POST

10.6.3. リクエストボディー

{}

10.6.4. レスポンスボディー

10.6.4.1. 成功

{
  "status": "ok",
  "count": "<users total count>",
  "list": [{
    "fields": {
      "username": "<unique user identifier>",
      "email": "<email>",
      "name": "<name>",
      "enabled": false,
      "blacklisted": false,
      "authpolicies": [<an array of Auth policy guids>],
      "lastLogin" : "<timestamp of last login>"
    }
  }, ...]
}

10.6.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

10.7. ユーザーの有効化/無効化

10.7.1. 説明

既存ユーザーを有効/無効にします。

10.7.2. エンドポイント

  • URI: /box/srv/1.1/admin/user/update
  • メソッド: POST

10.7.3. リクエストボディー

{
  // required
  // username of user to update
  "username": "<unique user identifier>",
  "enabled": true/false
}

10.7.4. レスポンスボディー

10.7.4.1. 成功

{
  "status": "ok",
  "fields": {
    "username": "<unique user identifier>",
    "email": "<email>",
    "name": "<name>",
    "enabled": false,
    "blacklisted": false,
    "roles": [<an array of string>],
    "authpolicies": [<an array of Auth policy guids>]
  }
}

10.7.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

10.8. ロールの追加/削除

10.8.1. 説明

新規ロールを追加するか、またはユーザーの既存ロールを削除します。

10.8.2. エンドポイント

  • URI: /box/srv/1.1/admin/user/update
  • メソッド: POST

10.8.3. リクエストボディー

{
  // required
  // username of the user to update
  "username": "<unique user identifier>",
  // comma separated list of roles to set for this user for example, 'dev, analytics'
  "roles": "<roles>"
}

10.8.4. レスポンスボディー

10.8.4.1. 成功

{
  "status": "ok",
  "fields": {
    "username": "<unique user identifier>",
    "email": "<email>",
    "name": "<name>",
    "enabled": false,
    "blacklisted": false,
    "roles": [<an array of string>],
    "authpolicies": [<an array of Auth policy guids>]
  }
}

10.8.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

10.9. 認証ポリシーの追加/削除

10.9.1. 説明

新規の認証ポリシーをユーザーに追加するか、またはユーザーから既存の認証ポリシーを削除します。

10.9.2. エンドポイント

  • URI: /box/srv/1.1/admin/user/update
  • メソッド: POST

10.9.3. リクエストボディー

{
  // required
  // username of the user to update
  "username": "<unique user identifier>",
  // comma separated list of Auth policy guids to set for this user
  "authpolicies": "<authpolicies>"
}

10.9.4. レスポンスボディー

10.9.4.1. 成功

{
  "status": "ok",
  "fields": {
    "username": "<unique user identifier>",
    "email": "<email>",
    "name": "<name>",
    "enabled": false,
    "blacklisted": false,
    "roles": [<an array of string>],
    "authpolicies": [<an array of Auth policy guids>]
  }
}

10.9.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

10.10. ユーザーのデバイスの一覧表示

10.10.1. 説明

ユーザーのデバイスを一覧表示します。

10.10.2. エンドポイント

  • URI: /box/srv/1.1/admin/user/listdevices
  • メソッド: POST

10.10.3. リクエストボディー

{
  //required
  "username": "<unique user identifier>"
}

10.10.4. レスポンスボディー

10.10.4.1. 成功

{
  "status" : "ok",
  "list" : [{
      "guid" : "<device guid>",
      "cuid" : "<device id>",
      "name" : "<devicel lable>",
      "disabled" : "<is the device disabled>",
      "blacklisted" : "<is the device blacklisted>"
    }, ...]
}

10.10.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

10.11. ユーザーのストアアイテムの一覧表示

10.11.1. 説明

ユーザーがインストールしたアプリを一覧表示します (ただし、アプリは削除される可能性があります)。

10.11.2. エンドポイント

  • URI: /box/srv/1.1/admin/user/liststoreitems
  • メソッド: POST

10.11.3. リクエストボディー

{
  //required
  "username" : "<unique user identifier>"
}

10.11.4. レスポンスボディー

10.11.4.1. 成功

{
  "status" : "ok",
  "list" : [{
      "guid" : "<app guid>",
      "name" : "<app name>",
      "description" : "<app description>"
    }, ...]
}

10.11.4.2. エラー

{
  "status": "error",
  "message": "<error_message>"
}

法律上の通知

Copyright © 2017 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.