会社のデバイスピンのリストを取得

get
https://api.box.com/2.0
/enterprises/:enterprise_id/device_pinners

会社内のすべてのデバイスピンを取得します。

この呼び出しを行うにはユーザーに管理者権限が必要で、アプリケーションに「Enterpriseの管理」スコープが必要です。

リクエスト

bearer [ACCESS_TOKEN]
application/json

パスパラメータ

stringパス内必須
3442311

会社のID

クエリパラメータ

stringクエリ内省略可能
ASC

結果を並べ替える方向。アルファベットの昇順 (ASC) または降順 (DESC) のいずれかを指定できます。

次の値のいずれか1つ: ASC,DESC

integer / int64クエリ内省略可能
10001000

返す項目の1ページあたりの最大数。

stringクエリ内省略可能
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii

結果が返される開始位置のマーカー。マーカーベースのページ割りを使用している場合に使用されます。

これを使用するには、usemarkertrueに設定する必要があります。

レスポンス

application/jsonDevice Pinner

指定した会社のデバイスピンのリストを返します。

予期しないクライアントエラー。

get
会社のデバイスピンのリストを取得
このドキュメント内で一部のAPIを試せるようになりました。
ログイン

リクエストの例

cURL
curl -i -X GET "https://api.box.com/2.0/enterprises/3442311/device_pinners" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
.NET
BoxCollectionMarkerBased<BoxDevicePin> pins = await client.DevicePinManager
    .GetEnterpriseDevicePinsAsync(enterpriseId: "12345");
Java
Iterable<BoxDevicePin.Info> enterpriseDevicePins = BoxDevicePin.getEnterpriceDevicePins(api, id);
for (BoxDevicePin.Info devicePin : enterpriseDevicePins) {
    // Do something with the device pin.
}
Python
device_pins = client.device_pinners()
for pin in device_pins:
    print(f'Pinned {pin.product_name} device for {pin.owned_by.name}')
Node
client.devicePins.getAll()
    .then(pins => {
        /* pins -> {
            entries: 
            [ { type: 'device_pinner',
                id: '11111',
                owned_by: 
                    { type: 'user',
                    id: '22222',
                    name: 'Example User',
                    login: 'user@example.com' },
                product_name: 'iPad' },
                { type: 'device_pinner',
                id: '11112',
                owned_by: 
                    { type: 'user',
                    id: '22222',
                    name: 'Example User',
                    login: 'user@example.com' },
                product_name: 'iPhone' } ],
            limit: 100,
            order: [ { by: 'id', direction: 'ASC' } ] }
        */
    });

レスポンスの例

{
  "entries": [
    {
      "id": "11446498",
      "type": "device_pinner",
      "owned_by": {
        "id": "11446498",
        "type": "user",
        "name": "Aaron Levie",
        "login": "ceo@example.com"
      },
      "product_name": "iPad"
    }
  ],
  "limit": 200,
  "next_marker": 3000,
  "order": [
    {
      "by": "id",
      "direction": "asc"
    }
  ]
}