Retrieves a list of all the metadata cascade policies
that are applied to a given folder. This can not be used on the root
folder with ID 0.
This operation is performed by calling function getMetadataCascadePolicies.
See the endpoint docs at API Reference.
await client.metadataCascadePolicies.getMetadataCascadePolicies({
folderId: folder.id,
} satisfies GetMetadataCascadePoliciesQueryParams);
GetMetadataCascadePoliciesQueryParams
GetMetadataCascadePoliciesOptionalsInputThis function returns a value of type MetadataCascadePolicies.
Returns a list of metadata cascade policies.
Creates a new metadata cascade policy that applies a given metadata template to a given folder and automatically cascades it down to any files within that folder.
In order for the policy to be applied a metadata instance must first be applied to the folder the policy is to be applied to.
This operation is performed by calling function createMetadataCascadePolicy.
See the endpoint docs at API Reference.
await client.metadataCascadePolicies.createMetadataCascadePolicy({
folderId: folder.id,
scope: 'enterprise' as CreateMetadataCascadePolicyRequestBodyScopeField,
templateKey: templateKey,
} satisfies CreateMetadataCascadePolicyRequestBody);
CreateMetadataCascadePolicyRequestBody
CreateMetadataCascadePolicyOptionalsInputThis function returns a value of type MetadataCascadePolicy.
Returns a new of metadata cascade policy.
Retrieve a specific metadata cascade policy assigned to a folder.
This operation is performed by calling function getMetadataCascadePolicyById.
See the endpoint docs at API Reference.
await client.metadataCascadePolicies.getMetadataCascadePolicyById(
cascadePolicyId,
);
string
GetMetadataCascadePolicyByIdOptionalsInputThis function returns a value of type MetadataCascadePolicy.
Returns a metadata cascade policy.
Deletes a metadata cascade policy.
This operation is performed by calling function deleteMetadataCascadePolicyById.
See the endpoint docs at API Reference.
await client.metadataCascadePolicies.deleteMetadataCascadePolicyById(
cascadePolicyId,
);
string
DeleteMetadataCascadePolicyByIdOptionalsInputThis function returns a value of type undefined.
Returns an empty response when the policy is successfully deleted.
Force the metadata on a folder with a metadata cascade policy to be applied to all of its children. This can be used after creating a new cascade policy to enforce the metadata to be cascaded down to all existing files within that folder.
This operation is performed by calling function applyMetadataCascadePolicy.
See the endpoint docs at API Reference.
await client.metadataCascadePolicies.applyMetadataCascadePolicy(
cascadePolicyId,
{
conflictResolution:
'overwrite' as ApplyMetadataCascadePolicyRequestBodyConflictResolutionField,
} satisfies ApplyMetadataCascadePolicyRequestBody,
);
string
ApplyMetadataCascadePolicyRequestBody
ApplyMetadataCascadePolicyOptionalsInputThis function returns a value of type undefined.
Returns an empty response when the API call was successful. The metadata cascade operation will be performed asynchronously.
The API call will return directly, before the cascade operation is complete. There is currently no API to check for the status of this operation.