Creates a storage policy assignment for an enterprise or user.
The user or enterprise to assign the storage policy to.
"9987987"
The ID of the user or enterprise
"user"
The type to assign the policy to.
Value is one of user
,enterprise
The storage policy to assign to the user or enterprise
"1434325"
The ID of the storage policy to assign.
"storage_policy"
The type to assign.
Value is always storage_policy
Returns the new storage policy assignment created.
An unexpected client error.
curl -i -X POST "https://api.box.com/2.0/storage_policy_assignments" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"storage_policy": {
"type": "storage_policy",
"id": "1434325"
},
"assigned_to": {
"type": "user",
"id": "9987987"
}
}'
{
"id": "ZW50ZXJwcmlzZV8xMjM0NTY3ODkw",
"type": "storage_policy_assignment",
"assigned_to": {
"id": "11446498",
"type": "file"
},
"storage_policy": {
"id": "11446498",
"type": "storage_policy"
}
}