- List retention policy assignments
- Assign retention policy
- Get retention policy assignment
- Remove retention policy assignment
- Get files under retention
Returns a list of all retention policy assignments associated with a specified retention policy.
This operation is performed by calling function getRetentionPolicyAssignments
.
See the endpoint docs at API Reference.
await client.retentionPolicyAssignments.getRetentionPolicyAssignments(
retentionPolicy.id,
);
- retentionPolicyId
string
- The ID of the retention policy. Example: "982312"
This function returns a value of type RetentionPolicyAssignments
.
Returns a list of the retention policy assignments associated with the specified retention policy.
Assigns a retention policy to an item.
This operation is performed by calling function createRetentionPolicyAssignment
.
See the endpoint docs at API Reference.
await client.retentionPolicyAssignments.createRetentionPolicyAssignment({
policyId: retentionPolicy.id,
assignTo: {
type: 'folder' as CreateRetentionPolicyAssignmentRequestBodyAssignToTypeField,
id: folder.id,
} satisfies CreateRetentionPolicyAssignmentRequestBodyAssignToField,
} satisfies CreateRetentionPolicyAssignmentRequestBody);
- requestBody
CreateRetentionPolicyAssignmentRequestBody
- Request body of createRetentionPolicyAssignment method
This function returns a value of type RetentionPolicyAssignment
.
Returns a new retention policy assignment object.
Retrieves a retention policy assignment
This operation is performed by calling function getRetentionPolicyAssignmentById
.
See the endpoint docs at API Reference.
await client.retentionPolicyAssignments.getRetentionPolicyAssignmentById(
retentionPolicyAssignment.id,
);
- retentionPolicyAssignmentId
string
- The ID of the retention policy assignment. Example: "1233123"
This function returns a value of type RetentionPolicyAssignment
.
Returns the retention policy assignment object.
Removes a retention policy assignment applied to content.
This operation is performed by calling function deleteRetentionPolicyAssignmentById
.
See the endpoint docs at API Reference.
await client.retentionPolicyAssignments.deleteRetentionPolicyAssignmentById(
retentionPolicyAssignment.id,
);
- retentionPolicyAssignmentId
string
- The ID of the retention policy assignment. Example: "1233123"
This function returns a value of type undefined
.
Returns an empty response when the policy assignment is successfully deleted.
Returns a list of files under retention for a retention policy assignment.
This operation is performed by calling function getFilesUnderRetentionPolicyAssignment
.
See the endpoint docs at API Reference.
await client.retentionPolicyAssignments.getFilesUnderRetentionPolicyAssignment(
retentionPolicyAssignment.id,
);
- retentionPolicyAssignmentId
string
- The ID of the retention policy assignment. Example: "1233123"
This function returns a value of type FilesUnderRetention
.
Returns a list of files under retention that are associated with the specified retention policy assignment.