openapi: 3.2.0 info: title: Policy Service Enabled core policies API description: "Adobe Experience Platform Data Governance simplifies and streamlines the process of categorizing data and creating data usage policies. Once data labels have been applied and data usage policies are in place, marketing actions can be evaluated to ensure the correct use of data.\n\nUse the Policy Service API to programmatically manage data usage labels, policies, and marketing actions. The API also provides endpoints to evaluate marketing actions against specific data usage labels to test for policy violations.\n\nNote: You can use the [Dataset Service API](./dataset-service.yaml) to manage data usage labels for an existing dataset.\n- **Related documentation**:\n - [Data Governance documentation](http://www.adobe.com/go/data-governance-overview-en)\n\n- **Visualize API calls with Postman (a free, third-party software)**:\n - [Policy Service API Postman collection on GitHub](https://github.com/adobe/experience-platform-postman-samples/blob/master/apis/experience-platform/Policy%20Service%20API.postman_collection.json)\n - [Video guide for creating the Postman environment](https://video.tv.adobe.com/v/28832)\n - [Steps for importing environments and collections in Postman](https://learning.getpostman.com/docs/postman/collection_runs/using_environments_in_collection_runs/)\n\n- **API paths**:\n - PLATFORM Gateway URL: https://platform.adobe.io/\n - Base path for this API: /data/foundation/dulepolicy\n - Example of a complete path: https://platform.adobe.io/data/foundation/dulepolicy/labels/custom\n\n- **Required headers**:\n - All calls require the headers `Authorization`, `x-gw-ims-org-id`, and `x-api-key`. For more information on how to obtain these values, see the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en).\n - All resources in Experience Platform are isolated to specific virtual sandboxes. All requests to Platform APIs require the header `x-sandbox-name` whose value is the all-lowercase name of the sandbox the operation will take place in (for example, \"prod\"). See the [sandboxes overview](https://adobe.com/go/sandbox-overview-en) for more information.\n - All requests with a payload in the request body (such as POST, PUT, and PATCH calls) must include the header `Content-Type` with a value of `application/json`.\n\n- **API error handling**:\n - Refer to the Experience Platform API troubleshooting guide for [FAQs](https://experienceleague.adobe.com/docs/experience-platform/landing/troubleshooting.html#faq), [API status codes](https://experienceleague.adobe.com/docs/experience-platform/landing/troubleshooting.html#api-status-codes), and [request header errors](https://experienceleague.adobe.com/docs/experience-platform/landing/troubleshooting.html#request-header-errors)." version: '1.0' servers: - url: //{environment}.adobe.io/data/foundation/dulepolicy variables: environment: default: platform enum: - platform - platform-stage tags: - name: Enabled core policies description: Unless explicitly indicated otherwise, only enabled policies participate in evaluation. The Policy Service API maintains a list of enabled core policies for your organization that you can manage using single API calls. paths: /enabledCorePolicies: get: tags: - Enabled core policies summary: List all enabled core policies description: '>**NOTE**: For more information on using this operation, see the [policies endpoint guide](https://experienceleague.adobe.com/docs/experience-platform/data-governance/api/policies.html) on Experience League.' operationId: listEnabledCorePolicies parameters: - name: x-api-key in: header description: The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: x-gw-ims-org-id in: header description: The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: x-sandbox-name in: header description: The name of the sandbox in which the operation will take place. See the [sandboxes overview documentation](https://adobe.com/go/sandbox-overview-en) for more information. required: true schema: type: string - name: Authorization in: header description: The access token which can be copied from your Experience Platform integration, prefixed with "Bearer ". For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string responses: '200': description: A successful request returns a list of enabled core policy IDs. x-summary: Enabled core policies retrieved successfully content: application/json: schema: $ref: '#/components/schemas/EnabledCorePoliciesResponse' put: tags: - Enabled core policies summary: Create or update the list of enabled core policies description: 'You can use this endpoint to create or update the list of enabled core policies. >**NOTE**: For more information on using this operation, see the [policies endpoint guide](https://experienceleague.adobe.com/docs/experience-platform/data-governance/api/policies.html) on Experience League.' operationId: createOrUpdateEnabledCorePolicies parameters: - name: x-api-key in: header description: The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: x-gw-ims-org-id in: header description: The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: x-sandbox-name in: header description: The name of the sandbox in which the operation will take place. See the [sandboxes overview documentation](https://adobe.com/go/sandbox-overview-en) for more information. required: true schema: type: string - name: Authorization in: header description: The access token which can be copied from your Experience Platform integration, prefixed with "Bearer ". For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string requestBody: description: List of core policy IDs. content: application/json: schema: $ref: '#/components/schemas/EnabledCorePoliciesRequest' required: true responses: '200': description: List of enabled core policies was successfully updated x-summary: Enabled core policies updated successfully content: application/json: schema: $ref: '#/components/schemas/EnabledCorePoliciesResponse' '400': description: The request payload was malformed, or one of the provided policy IDs were not found. x-summary: Invalid request payload content: application/json: schema: $ref: '#/components/schemas/EnabledCorePoliciesError' '409': description: This policy update could not be completed because it would be violated by an existing lineage of entities. x-summary: Policy update violates existing entities content: application/json: schema: $ref: '#/components/schemas/EnableCorePolicyViolation' x-codegen-request-body-name: body components: schemas: PolicyBody: type: object properties: name: type: string description: The name of the policy example: Email Policy status: type: string description: The status of the policy example: ENABLED enum: - DRAFT - ENABLED - DISABLED marketingActionRefs: type: array description: List of marketing action URI references to which this policy applies. example: - https://platform.adobe.io:443/data/foundation/dulepolicy/marketingActions/core/emailTargeting items: type: string format: uri description: type: string description: A description of what this policy enforces. Specifically, the reasoning behind the denial of these marketing actions in the presence of the data usage labels. example: Conditions under which we won't send marketing-based email deny: $ref: '#/components/schemas/PolicyExpression' _links: type: object properties: _links: type: object properties: self: type: object properties: href: type: string description: The URI reference that clients may use to obtain this resource. Typically this URL ends with the `name` or `id` property of the resource. format: uri example: https://platform.adobe.io:443/data/foundation/dulepolicy/policies/core/corepolicy_0003 description: Contains the URI reference that clients may use to obtain this resource. EnabledCorePoliciesRequest: allOf: - $ref: '#/components/schemas/EnabledCorePoliciesBody' - type: object properties: policyIds: type: array description: A list of core policy IDs that you want to enable for this IMS Organization and sandbox. example: '' ViolationsError: allOf: - $ref: '#/components/schemas/Error' - type: object properties: status: type: integer example: '409' title: type: string example: Violations Error detail: type: string example: The attempted action will cause violations. - type: object properties: violations: type: array description: A list of violation events, one for each marketing action that resulted in policy violations. items: $ref: '#/components/schemas/UpdateViolation' EnableCorePolicyViolation: allOf: - $ref: '#/components/schemas/ViolationsError' - type: object properties: detail: type: string example: Enabling this list of policies will cause violations. BadRequestError: allOf: - $ref: '#/components/schemas/Error' - type: object example: type: /placeholder/type/uri status: 400 title: BadRequest OptionName: type: object properties: id: type: string example: https://ns.adobe.com/ddgduleint/schemas/3d2cb5a144bcc3becbba1e197fa25c1e contentType: type: string example: application/vnd.adobe.xed-full+json;version=1 schemaPath: type: string example: /properties/person/properties/name/properties/fullName PolicyResponse: allOf: - type: object properties: id: type: string description: The unique ID for this policy resource, as assigned by the service. example: 76131228-7654-11e8-adc0-fa7ae01bbebc - $ref: '#/components/schemas/PolicyBody' - $ref: '#/components/schemas/ServiceProperties' EnabledCorePoliciesError: allOf: - $ref: '#/components/schemas/BadRequestError' - type: object properties: detail: type: string example: Policy corepolicy_12345 not found EnabledCorePoliciesBody: type: object properties: policyIds: type: array items: type: string Entity: type: object properties: name: type: string description: The name of the entity. example: Default Merge Policy entityId: $ref: '#/components/schemas/EntityId' _etag: type: string description: The entity tag (ETag) used to prevent dirty writes. parents: type: array description: A list of entities that have a parent relationship with the current entity. items: $ref: '#/components/schemas/EntityId' labels: type: array description: A list of labels that have been applied to the entity. items: type: string example: C1 options: type: array description: An array that allows you to specify which `optionalLabels` to include. To include all options, use null. To exclude all options use an empty list (i.e. []). To include specific options, list the options to include (i.e. [{option1, option2}]) items: $ref: '#/components/schemas/OptionName' optionalLabels: type: array items: type: object properties: option: $ref: '#/components/schemas/OptionName' labels: type: array items: type: string example: C1 flattenedLabels: type: object properties: labels: type: array items: type: string example: C1 entities: type: array items: $ref: '#/components/schemas/Entity' enforcementRefs: type: array items: type: string example: /dulepolicy/marketingActions/core//constraints selfRef: type: string example: https://platform.adobe.io/data/foundation/pes/entities/UPS:mergepolicy:5161238b-1e42-4072-a847-7d46f8004caf EntityId: type: object properties: namespace: type: string example: UPS type: type: string example: mergepolicy id: type: string example: 5161238b-1e42-4072-a847-7d46f8004caf UpdateViolation: type: object properties: enforcementRef: type: string description: The attempted marketing action that caused the violation(s) to occur. example: /dulepolicy/marketingActions/core/exportToThirdParty/constraints entities: type: array description: A list of entities that are associated with the violation, including their applied data usage labels. items: $ref: '#/components/schemas/Entity' violatedPolicies: type: array description: A list of policies that were violated as a result of the attempted marketing action. items: $ref: '#/components/schemas/PolicyResponse' ServiceProperties: properties: imsOrg: type: string description: The ID of the IMS Organization which maintains this resource. If the resource is a core resource (defined by Adobe), this value is set to "core". example: '{IMS_ORG}' sandboxName: type: string description: The name of the Platform sandbox that contains the resource. example: prod created: type: integer description: A timestamp in milliseconds when this resource was originally created. format: int64 example: 1529696681413 createdClient: type: string description: The ID of the client that originally created this resource. example: '{CLIENT_ID}' createdUser: type: string description: The user that originally created this resource. example: '{USER_ID}' updated: type: integer description: A timestamp when this resource was last updated. format: int64 example: 1529697651972 updatedClient: type: string description: The ID of the client that last updated this resource. example: '{CLIENT_ID}' updatedUser: type: string description: The ID of the user that last updated this resource. example: '{USER_ID}' allOf: - $ref: '#/components/schemas/_links' PolicyExpression: type: object properties: label: type: string description: The name of a single data usage label that applies to the policy. example: C1 operator: type: string description: "Indicates the conditional relationship between the labels provided in the sibling operands array. Accepted values are:\n \n - `OR`: The expression resolves to true if any of the labels in the operands array are present.\n - `AND`: The expression only resolves to true if all of the labels in the operands array are present." example: AND enum: - AND - OR operands: type: array description: An array of objects, with each object representing either a single `label` or an additional pair of `operator` and `operands` properties. The presence of the labels and/or operations in an `operands` array resolves to true or false based on the value of its sibling operator property. example: - label: C1 - label: C3 items: $ref: '#/components/schemas/PolicyExpression' description: A boolean expression to be evaluated over the presence of data usage labels, referred to as a "policy expression". Note that a policy expression **must** consist of **either** a label **or** an operator and operands. Each operand in turn is itself a policy expression. You cannot specify both a label and an operator/operand in combination. See the [Policy Service API guide](https://experienceleague.adobe.com/docs/experience-platform/data-governance/api/policies.html?lang=en#create-policy) for more details on how to configure this property. example: operator: AND operands: - label: C1 - operator: OR operands: - label: C3 - label: C7 EnabledCorePoliciesResponse: allOf: - $ref: '#/components/schemas/EnabledCorePoliciesBody' - $ref: '#/components/schemas/ServiceProperties' - type: object properties: policyIds: type: array description: A list of enabled core policies for this IMS Organization and sandbox. example: [] createdUser: type: string example: '{CLIENT_ID}' updatedUser: type: string example: '{CLIENT_ID}' _links: type: object properties: self: type: object properties: href: type: string example: https://platform.adobe.io:443/data/foundation/dulepolicy/enabledCorePolicies Error: type: object properties: type: type: string description: A placeholder value for the error type. example: /placeholder/type/uri status: type: integer description: The HTTP status associated with the error. format: int32 title: type: string description: The error title. detail: type: string description: A description of the error. x-original-swagger-version: '2.0'