Manage Applications

    Get policy assignment

    get
    https://api.box.com/2.0
    /retention_policy_assignments/:retention_policy_assignment_id

    Retrieves a retention policy assignment

    Request

    application/json

    Path Parameters

    stringin pathrequired
    1233123

    The ID of the retention policy assignment.

    Response

    Returns the retention 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/retention_policy_assignments/1233123 \
         -H "Authorization: Bearer <ACCESS_TOKEN>"
    .NET
    BoxRetentionPolicyAssignment assignment = await client.RetentionPoliciesManager
        .GetRetentionPolicyAssignmentAsync("33333");
    Java
    BoxRetentionPolicyAssignment assignment = new BoxRetentionPolicyAssignment(api, id);
    BoxRetentionPolicyAssignment.Info assignmentInfo = assignment.getInfo("assigned_to");
    Python
    assignment = client.retention_policy_assignment('12345').get()
    print('Assignment id is {0} and it is assigned by {1}'.format(assignment.id, assignment.assigned_by.name))
    Node
    client.retentionPolicies.getAssignment('12345')
    	.then(assignment => {
    		/* assignment -> {
    			type: 'retention_policy_assignment',
    			id: '12345',
    			retention_policy: 
    			{ type: 'retention_policy',
    				id: '11111',
    				policy_name: 'Tax Documents' },
    			assigned_to: { type: 'folder', id: '22222' },
    			assigned_by: 
    			{ type: 'user',
    				id: '33333',
    				name: 'Example User',
    				login: 'user@example.com' },
    			assigned_at: '2015-07-20T14:28:09-07:00' }
    		*/
    	});

    Response Example

    {
      "id": 11446498,
      "type": "retention_policy_assignment",
      "retention_policy": {
        "id": 11446498,
        "type": "retention_policy",
        "policy_name": "Some Policy Name"
      },
      "assigned_to": {
        "id": 11446498
      },
      "assigned_by": {
        "id": 11446498,
        "type": "user",
        "name": "Aaron Levie",
        "login": "ceo@example.com"
      },
      "assigned_at": "2012-12-12T10:53:43-08:00"
    }