Device pins allow enterprises to control what devices can use native Box applications. To learn more about device pinning, please see the Device Pinning documentation.
To get information about a specific device pin, call the
devicePins.get(pinID, options, callback)
method with the ID of the device pin.
client.devicePins.get('11111')
.then(pin => {
/* pin -> {
type: 'device_pinner',
id: '11111',
owned_by:
{
type: 'user',
id: '22222',
name: 'Example User',
login: '[email protected]'
},
product_name: 'iPad'
}
*/
});
To remove a specific device pin, call the
devicePins.delete(pinID, options, callback)
method with the ID of the device pin.
client.devicePins.delete('28345')
.then(() => {
// deletion succeeded — no value returned
});
Get all device pins records for the current enterprise by calling the
devicePins.getAll(options, callback)
method.
client.devicePins.getAll()
.then(pins => {
/* pins -> {
entries:
[ { type: 'device_pinner',
id: '11111',
owned_by:
{ type: 'user',
id: '22222',
name: 'Example User',
login: '[email protected]' },
product_name: 'iPad' },
{ type: 'device_pinner',
id: '11112',
owned_by:
{ type: 'user',
id: '22222',
name: 'Example User',
login: '[email protected]' },
product_name: 'iPhone' } ],
limit: 100,
order: [ { by: 'id', direction: 'ASC' } ] }
*/
});