Skip to main content
Question

Facing issues while getting files under retention policy

  • May 27, 2025
  • 0 replies
  • 10 views

Forum|alt.badge.img

Goal : Try to fetch the retention policy on a file if there is one.

Hey, I am trying to determine whether there is retention policy and if there is, get the winning retention policy.

I was hoping to get this from metedata of the file using 

GET "https://api.box.com/2.0/files/{file_id}"  API but this is not returning any details pertaining to retention policy.

I tried to fetch the info from 

GET "https://api.box.com/2.0/file_version_retentions?file_id={file_id}"  API but this is returning empty list of entries even though the file corresponding to {file_id} is under retention

Finally I am trying to fetch all the files under retention using 

GET  "https://api.box.com/2.0/retention_policy_assignments/{retention_policy_assignment_id}/files_under_retention" API

but this is returning 

{
"type": "error",
"status": 403,
"code": "access_denied_insufficient_permissions",
"message": "Access denied - insufficient permission",
"request_id": "qo54p1htkuh3dgtt"
}
 
Note : I have enabled manage_data_retention scope while creating the app. And I see that enterprise_content scope can be enabled through support ticket. If that scope is needed can the support team help me enable this.
 
 

0 replies

Be the first to reply!