Get policy assignment

get
https://api.box.com/2.0
/storage_policy_assignments/:storage_policy_assignment_id

Fetches a specific storage policy assignment.

Request

application/json

Path Parameters

stringin pathrequired
932483

The ID of the storage policy assignment.

Response

Returns a storage policy assignment object.

You can now try out some of our APIs live, right here in the documentation.
Log In

Request Example

cURL
curl -X GET https://api.box.com/2.0/storage_policy_assignments/932483 \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
.NET
BoxStoragePolicyAssignment assignment = await client.StoragePoliciesManager
    .GetAssignmentAsync(assignmentId: "dXNlcl8yMjIyMg==");
Java
BoxStoragePolicyAssignment storagePolicyAssignment = new BoxStoragePolicyAssignment(api, id);
BoxStoragePolicyAssignment.Info assignmentInfo = storagePolicyAssignment.getInfo();
Python
assignment = client.storage_policy_assignment(assignment_id='12345').get()
print('Assignment ID is {0} and the storage policy ID is {1}'.format(assignment.id, assignment.storage_policy.id))
Node
client.storagePolicies.getAssignment('dXNlcl8yMjIyMg==')
    .then(assignment => {
        /* assignment -> {
            type: 'storage_policy_assignment',
            id: 'dXNlcl8yMjIyMg==',
            storage_policy: 'storage_policy', id: '7' },
            assigned_to: { type: 'user', id: '22222' } }
        */
    });

Response Example

{
  "storage_policy": {
    "id": 11446498,
    "type": "storage_policy"
  },
  "assigned_to": {
    "id": 11446498
  }
}