デバイスピンを取得

get
https://api.box.com/2.0
/device_pinners/:device_pinner_id

個々のデバイスピンに関する情報を取得します。

リクエスト

bearer [ACCESS_TOKEN]
application/json

パスパラメータ

stringパス内必須
2324234

デバイスピンのID

レスポンス

application/jsonDevice Pinner

単一のデバイスピンに関する情報を返します。

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

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

リクエストの例

cURL
curl -i -X GET "https://api.box.com/2.0/device_pinners/2324234" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
.NET
BoxDevicePin pin = await client.DevicePinManager.GetDevicePin(id: "11111");
Java
BoxDevicePin devicePin = new BoxDevicePin(api, id);
BoxDevicePin.Info devicePinInfo = devicePin.getInfo();
Python
device_pin_id = '1111'
device_pin = client.device_pinner(device_pin_id).get()
print(f'{pin.product_name} device for {pin.owned_by.name} is pinned')
Node
client.devicePins.get('11111')
    .then(pin => {
        /* pin -> {
            type: 'device_pinner',
            id: '11111',
            owned_by: 
            {
                type: 'user',
                id: '22222',
                name: 'Example User',
                login: 'user@example.com'
            },
            product_name: 'iPad'
        }
        */
    });
iOS
client.devicePins.get(devicePinId: "11111", fields: ["product_name"]) { (result: Result<DevicePin, BoxSDKError>) in
    guard case let .success(devicePin) = result else {
        print("Error retrieving device pin information")
        return
    }

    print("Device Pin for \(devicePin.productName) was created at \(devicePin.createdAt)")
}

レスポンスの例

{
  "id": "11446498",
  "type": "device_pinner",
  "owned_by": {
    "id": "11446498",
    "type": "user",
    "login": "ceo@example.com",
    "name": "Aaron Levie"
  },
  "product_name": "iPad"
}