Latest version

List enterprise device pins

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

Retrieves all the device pins within an enterprise.

The user must have admin privileges, and the application needs the "manage enterprise" scope to make this call.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
3442311

The ID of the enterprise

Query Parameters

stringin queryoptional
ASC

The direction to sort results in. This can be either in alphabetical ascending (ASC) or descending (DESC) order.

Value is one of ASC,DESC

integer (int64)in queryoptional
1000
1000

The maximum number of items to return per page.

stringin queryoptional
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii

Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination.

This requires usemarker to be set to true.

Response

application/jsonDevice pinners

Returns a list of device pins for a given enterprise.

application/jsonClient error

An unexpected client error.

get
List enterprise device pins
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X GET "https://api.box.com/2.0/enterprises/3442311/device_pinners" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Python Gen
client.device_pinners.get_enterprise_device_pinners(
    enterprise_id, direction=GetEnterpriseDevicePinnersDirection.DESC
)
.NET Gen
await client.DevicePinners.GetEnterpriseDevicePinnersAsync(enterpriseId: enterpriseId, queryParams: new GetEnterpriseDevicePinnersQueryParams() { Direction = GetEnterpriseDevicePinnersQueryParamsDirectionField.Desc });
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}')
.NET
BoxCollectionMarkerBased<BoxDevicePin> pins = await client.DevicePinManager
    .GetEnterpriseDevicePinsAsync(enterpriseId: "12345");
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' } ] }
        */
    });

Response Example

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