Box Developer Documentation
 
    Latest version

    Update storage policy assignment

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

    This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

    Updates a specific storage policy assignment.

    Request

    bearer [ACCESS_TOKEN]
    application/json

    Path Parameters

    stringin pathrequired
    932483

    The ID of the storage policy assignment.

    Request Body

    objectin body

    The storage policy to assign to the user or enterprise

    stringin bodyrequired
    "1434325"

    The ID of the storage policy to assign.

    stringin bodyrequired
    "storage_policy"

    The type to assign.

    Value is always storage_policy

    Response

    Returns an updated storage policy assignment object.

    application/jsonClient error

    An unexpected client error.

    put
    Update storage policy assignment
    You can now try out some of our APIs live, right here in the documentation.
    Log in

    Request Example

    cURL
    curl -i -X PUT "https://api.box.com/2.0/storage_policy_assignments/932483" \
         -H "authorization: Bearer <ACCESS_TOKEN>" \
         -H "content-type: application/json" \
         -d '{
           "storage_policy": {
             "type": "storage_policy",
             "id": "1434325"
           }
         }'

    Response Example

    {
      "id": "ZW50ZXJwcmlzZV8xMjM0NTY3ODkw",
      "type": "storage_policy_assignment",
      "assigned_to": {
        "id": "11446498",
        "type": "file"
      },
      "storage_policy": {
        "id": "11446498",
        "type": "storage_policy"
      }
    }