Skip to main content
Version: 2.8

Working with policies via REST

This page describes how to create and delete policies for Document.One (D1) using the Policy Administration API endpoints (which are synchronous).

To create or delete policies in the D1 user interface, see Configuring policies.

Task 1: Creating a Default Type policy

This request creates a Default Type policy matching your specification.

cURL example

You can use the example below as a template for your request.

curl --location --request POST 'D1_HOST/tribefire-services/api/v1/access.adx.admin/v1/policy/default-type?sessionId=SESSION_ID' \
--form 'name=POLICY_NAME' \
--form 'defaultTypeName=DEFAULT_TYPE'

Adapt the following properties before executing the request:

  • SESSION_ID Replace with your session ID.
  • POLICY_NAME Replace with your policy name.
  • DEFAULT_TYPE Replace with the name of the default type to be used by this policy.

OpenAPI

For a code sample, see

Create a Default Type policy by type signature

Endpoint description

HTTP requestEndpointService descriptionRequest query parametersForm dataReturns
POSTD1_HOST/tribefire-services/api/v1/access.adx.admin/v1/policy/default-typeCreate a Default Type policy.sessionIdname, defaultTypeNameThe metadata of the created policy.

Parameters

The following table lists the parameters and their descriptions:

NameData typeDescription
sessionIdstringThe session ID returned when you authenticate.
namestringThe name of the created policy.
defaultTypestringThe default type this policy assigns to entries.

Task 2: Creating an Inheritance policy

This request creates an Inheritance Policy matching your specification.

cURL example

You can use the example below as a template for your request.

curl --location --request POST 'D1_HOST/tribefire-services/api/v1/access.adx.admin/v1/policy/inheritance?sessionId=[SESSION_ID]' \
--form 'name=POLICY_NAME' \
--form 'inheritAcl=true' \
--form 'inheritClassification=true' \
--form 'inheritCommonProperties=true' \
--form 'inheritPolicies=true' \
--form 'inheritTags=true'

Adapt the following properties before executing the request:

  • SESSION_ID Replace with your session ID.
  • POLICY_NAME Replace with your policy name.
  • Inheritance properties Set to true or false in accordance with your business needs (all set to true by default).

OpenAPI

For a code sample, see

Create an Inheritance policy

Endpoint description

HTTP requestEndpointService descriptionEndpointRequest query parametersForm data
POSTD1_HOST/tribefire-services/api/v1/access.adx.admin/v1/policy/inheritanceCreate an Inheritance policy.sessionIdname, inheritAcl, inheritClassification, inheritCommonProperties, inheritPolicies, inheritTagsThe metadata of the created policy.

Parameters

The following table lists the parameters and their descriptions:

NameData typeDescription
namestringThe name of the policy.
inheritAclbooleanWhen set to true, the access control list (ACL) will be inherited from the parent by the entries affected by this policy.
inheritClassificationbooleanWhen set to true, the classifications will be inherited from the parent by the entries affected by this policy.
inheritCommonPropertiesbooleanWhen set to true, the common properties (between the child and the parent) will be inherited from the parent by the entries affected by this policy.
inheritPoliciesbooleanWhen set to true, the policies will be inherited from the parent by the entries affected by this policy.
inheritTagsbooleanWhen set to true, the tags will be inherited from the parent by the entries affected by this policy.

Task 3: Creating a Type Restriction policy

This request creates a Type Restriction policy matching your specification.

cURL example

You can use the example below as a template for your request.

curl --location --request POST 'D1_HOST/tribefire-services/api/v1/access.adx.admin/v1/policy/type-restriction?sessionId=20201002172057753-956e81a9-094f-4d53-853b-21dd6b4488e2' \
--form 'name=RestrictionPolicy' \
--form 'description=' \
--form 'includeSubTypes=true' \
--form 'restrictedTypeNames
=CustomContent'

Adapt the following properties before executing the request:

  • SESSION_ID Replace with your session ID.
  • Type restriction properties Set in accordance with your business needs.

OpenAPI

For a code sample, see

Create a Type Restriction policy by type signatures

Endpoint description

HTTP requestEndpointService descriptionRequest query parametersForm dataReturns
POSTD1_HOST/tribefire-services/api/v1/access.adx.admin/v1/policy/type-restrictionCreate a Type Restriction policy.sessionIdname, description, allowedTypeNames, deniedTypeNames, includeSubTypesThe metadata of the created policy.

Parameters

The following table lists the parameters and their descriptions:

NameData typeDescription
sessionIdstringThe session ID returned after authenticating.
namestringThe name of the policy.
descriptionstringThe description of the policy.
allowedTypeNamesarrayThe array of type names identifying the content/folder types allowed in folders where this policy is in effect.
deniedTypeNamesarrayThe array of type names identifying the content/folder types denied from folders where this policy is in effect.
includeSubTypesbooleanWhen set to true, the policy is extended to sub-types. When set to false, only the types explicitly mentioned in allowedTypeNames or deniedTypeNames are affected.

Task 4: Deleting policies

D1 provides endpoints for deleting a batch of policies as well as for deleting single policies. You can delete policies based on their IDs or based on their technical names.

cURL example

The example below shows how to delete multiple policies by IDs.

curl -X DELETE "[D1_HOST]/tribefire-services/api/v1/access.adx.admin/v1/policies?policyIds=[POLICY_ID_1]&policyIds=[POLICY_ID_2]" -H "accept: application/json"

Replace the following parts of the query:

  • [D1_HOST] Enter your D1 host.
  • [POLICY_ID_1], [POLICY_ID_2] Enter the policy IDs to identify the policies to be deleted.
  • [SESSION_ID] The session ID obtained by authenticating.

OpenAPI

For code samples, see

Delete policies by IDs

Delete policy by ID
Delete policies by IDs

Delete policies by technical names

Delete policy by technical name
Delete policies by technical names

Endpoint description

HTTP requestEndpointService descriptionRequest query parametersForm dataReturns
DELETED1_HOST/tribefire-services/api/v1/access.adx.admin​/v1​/policiesDelete policies by IDs.​sessionId, policyIdsnoneThe job response quoting the duration of execution.
DELETED1_HOST/tribefire-services/api/v1/access.adx.admin​/v1​/policies​/by-technical-namesDelete policies by technical names.sessionId, technicalNames (deletes all custom policies if empty!)noneThe job response quoting the duration of execution.
DELETED1_HOST/tribefire-services/api/v1/access.adx.admin​/v1​/policyDelete policy by ID.sessionId, policyIdnoneThe job response quoting the duration of execution.
DELETED1_HOST/tribefire-services/api/v1/access.adx.admin​/v1​/policy​/by-technical-nameDelete policy by technical name.sessionId, technicalNamenoneThe job response quoting the duration of execution.