From 505ad7a824bcf77c0193e325bc59aab4b2ca126f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Przemys=C5=82aw=20Kukulski?=
Date: Fri, 8 Sep 2023 18:59:00 +0200
Subject: [PATCH] PPCDP-1013 added profile update api, attribute api, event
dimensions table
---
conf.py | 1 +
.../authorized_api/attributes.rst | 12 +
...customer_data_platform_attributes_api.yaml | 290 ++++++++++
.../authorized_api/index.rst | 1 +
customer_data_platform/components.yaml | 34 +-
customer_data_platform/event_dimensions.rst | 505 ++++++++++++++++++
customer_data_platform/index.rst | 3 +-
.../customer_data_platform_profiles_api.yaml | 95 +++-
requirements.txt | 4 +-
9 files changed, 931 insertions(+), 14 deletions(-)
create mode 100644 customer_data_platform/authorized_api/attributes.rst
create mode 100644 customer_data_platform/authorized_api/customer_data_platform_attributes_api.yaml
create mode 100644 customer_data_platform/event_dimensions.rst
diff --git a/conf.py b/conf.py
index 1d90026b..ad6f1fc5 100644
--- a/conf.py
+++ b/conf.py
@@ -51,6 +51,7 @@
'customer_data_platform_profiles_api.json': 'customer_data_platform/public_api/customer_data_platform_profiles_api.yaml',
'customer_data_platform_activations_api.json': 'customer_data_platform/authorized_api/customer_data_platform_activations_api.yaml',
'customer_data_platform_audiences_api.json': 'customer_data_platform/authorized_api/customer_data_platform_audiences_api.yaml',
+ 'customer_data_platform_attributes_api.json': 'customer_data_platform/authorized_api/customer_data_platform_attributes_api.yaml',
}
diff --git a/customer_data_platform/authorized_api/attributes.rst b/customer_data_platform/authorized_api/attributes.rst
new file mode 100644
index 00000000..23848ec0
--- /dev/null
+++ b/customer_data_platform/authorized_api/attributes.rst
@@ -0,0 +1,12 @@
+Attributes API
+==============
+
+.. raw:: html
+
+
+
+
diff --git a/customer_data_platform/authorized_api/customer_data_platform_attributes_api.yaml b/customer_data_platform/authorized_api/customer_data_platform_attributes_api.yaml
new file mode 100644
index 00000000..27a438a3
--- /dev/null
+++ b/customer_data_platform/authorized_api/customer_data_platform_attributes_api.yaml
@@ -0,0 +1,290 @@
+openapi: 3.1.0
+info:
+ title: CDP Attributes API Documentation
+ version: 0.0.0
+ description: This is the documentation of the CDP Attributes API service.
+servers:
+ - url: https://organization.piwik.pro
+paths:
+ /api/cdp/settings/v1/app/{app_id}/attribute:
+ get:
+ summary: List attributes
+ security:
+ - JWTAuth: []
+ operationId: get-settings-app-attributes
+ description: Returns a list of all profiles attributes available in CDP for given app.
+ parameters:
+ - $ref: "../components.yaml#/components/parameters/AppId"
+ responses:
+ 200:
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: "#/components/schemas/Attribute"
+ 401:
+ $ref: '../components.yaml#/components/responses/UnauthorizedError'
+ 402:
+ $ref: '../components.yaml#/components/responses/ModuleDisabledError'
+ 404:
+ $ref: '../components.yaml#/components/responses/NotFoundError'
+ 500:
+ $ref: '../components.yaml#/components/responses/InternalServerError'
+ post:
+ summary: Create custom attribute
+ security:
+ - JWTAuth: []
+ operationId: post-settings-app-custom-attribute
+ description: 'Creates a new custom attribute'
+ parameters:
+ - $ref: "../components.yaml#/components/parameters/AppId"
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomAttributeInput'
+ responses:
+ 201:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomAttribute'
+ description: 'Created'
+ 400:
+ $ref: '../components.yaml#/components/responses/BadRequestError'
+ 401:
+ $ref: '../components.yaml#/components/responses/UnauthorizedError'
+ 402:
+ $ref: '../components.yaml#/components/responses/ModuleDisabledError'
+ 404:
+ $ref: '../components.yaml#/components/responses/NotFoundError'
+ 422:
+ $ref: '../components.yaml#/components/responses/UnprocessableEntity'
+ 500:
+ $ref: '../components.yaml#/components/responses/InternalServerError'
+ /api/cdp/settings/v1/app/{app_id}/attribute/bulk:
+ post:
+ summary: Create custom attribute bulk
+ security:
+ - JWTAuth: []
+ operationId: post-settings-app-custom-attribute-bulk
+ description: 'Creates multiple new custom attributes'
+ parameters:
+ - $ref: "../components.yaml#/components/parameters/AppId"
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/CustomAttributeInput'
+ responses:
+ 201:
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/CustomAttribute'
+ description: 'Created'
+ 400:
+ $ref: '../components.yaml#/components/responses/BadRequestError'
+ 401:
+ $ref: '../components.yaml#/components/responses/UnauthorizedError'
+ 402:
+ $ref: '../components.yaml#/components/responses/ModuleDisabledError'
+ 404:
+ $ref: '../components.yaml#/components/responses/NotFoundError'
+ 422:
+ $ref: '../components.yaml#/components/responses/UnprocessableEntity'
+ 500:
+ $ref: '../components.yaml#/components/responses/InternalServerError'
+ /api/cdp/settings/v1/app/{app_id}/attribute/{column_id}:
+ put:
+ summary: Update custom attribute
+ security:
+ - JWTAuth: []
+ operationId: put-settings-app-custom-attribute
+ description: 'Updates name of the existing custom attribute'
+ parameters:
+ - $ref: "../components.yaml#/components/parameters/AppId"
+ - in: path
+ name: column_id
+ description: Column ID of an attribute
+ required: true
+ schema:
+ type: string
+ example: custom_attribute_1
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomAttributeUpdateInput'
+ responses:
+ 200:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomAttributeUpdated'
+
+ description: 'OK'
+ 400:
+ $ref: '../components.yaml#/components/responses/BadRequestError'
+ 401:
+ $ref: '../components.yaml#/components/responses/UnauthorizedError'
+ 402:
+ $ref: '../components.yaml#/components/responses/ModuleDisabledError'
+ 404:
+ $ref: '../components.yaml#/components/responses/NotFoundError'
+ 422:
+ $ref: '../components.yaml#/components/responses/UnprocessableEntity'
+ 500:
+ $ref: '../components.yaml#/components/responses/InternalServerError'
+components:
+ securitySchemes:
+ JWTAuth:
+ type: http
+ scheme: bearer
+ bearerFormat: JWT
+ schemas:
+ Attribute:
+ type: object
+ required:
+ - column_id
+ - incoming_key
+ - immutable
+ - column_meta
+ properties:
+ column_id:
+ type: string
+ description: Unique ID of column.
+ incoming_key:
+ type: string
+ description: Key of the imported data value or name of Tracker event dimension to populate attribute.
+ example: "user_age"
+ immutable:
+ type: boolean
+ example: false
+ description: |
+ A flag indicating whether the attribute is immutable.
+
+ If `immutable` is set to `true`, the attribute is considered
+ read-only and cannot be modified. If set to `false`, the
+ attribute can be modified.
+ column_meta:
+ $ref: "../components.yaml#/components/schemas/ColumnMeta"
+ CustomAttributeInput:
+ type: object
+ required:
+ - name
+ - incoming_key
+ - data_type
+ - aggregation
+ properties:
+ name:
+ $ref: '#/components/schemas/CustomAttributeInputName'
+ incoming_key:
+ $ref: '#/components/schemas/CustomAttributeInputIncomingKey'
+ data_type:
+ $ref: '#/components/schemas/CustomAttributeInputDataType'
+ aggregation:
+ type: string
+ description: |
+ Aggregation type for attribute values.
+
+ Allowed values depend on selected `data_type`:
+
+ | data_type | first | last | first_last | list | list_unique | min | max | sum |
+ |-----------|-------|------|------------|------|-------------|-----|-----|-----|
+ | number | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
+ | bool | | ✓ | | | | | | |
+ | ip | | | ✓ | | | | | |
+ | datetime | | | | | | ✓ | ✓ | |
+ | string | ✓ | ✓ | ✓ | ✓ | ✓ | | | |
+ enum:
+ - first
+ - last
+ - first_last
+ - list
+ - list_unique
+ - min
+ - max
+ - sum
+ example: first
+ CustomAttributeUpdateInput:
+ type: object
+ properties:
+ name:
+ $ref: '#/components/schemas/CustomAttributeInputName'
+ incoming_key:
+ $ref: '#/components/schemas/CustomAttributeInputIncomingKey'
+ CustomAttribute:
+ allOf:
+ - $ref: '#/components/schemas/Attribute'
+ - type: object
+ properties:
+ column_id:
+ example: custom_attribute_3
+ column_meta:
+ $ref: "#/components/schemas/CustomAttributeColumnMeta"
+ CustomAttributeInputName:
+ type: string
+ maxLength: 255
+ minLength: 1
+ description: Name of the attribute.
+ example: Age of the user
+ CustomAttributeInputDataType:
+ type: string
+ description: |
+ Type of the column.
+
+ If `incoming_key` is a key of a [predefined event dimension](/customer_data_platform/event_dimensions.html),
+ `data_type` must be type of that event dimension.
+ enum:
+ - number
+ - bool
+ - ip
+ - datetime
+ - string
+ example: string
+ CustomAttributeInputIncomingKey:
+ type: string
+ maxLength: 255
+ minLength: 1
+ description: |
+ Key of an event dimension (custom or one of [predefined event dimensions](/customer_data_platform/event_dimensions.html)),
+ whose values will be collected in the attribute.
+ CustomAttributeUpdated:
+ allOf:
+ - $ref: '#/components/schemas/CustomAttribute'
+ - type: object
+ properties:
+ column_meta:
+ properties:
+ column_name:
+ example: Age of the user
+ CustomAttributeColumnMeta:
+ allOf:
+ - $ref: "../components.yaml#/components/schemas/ColumnMeta"
+ - type: object
+ properties:
+ column_name:
+ example: User's Age
+ data_type:
+ example: number
+ column_unit:
+ example: ""
+ column_category:
+ example: ["Custom attribute"]
+ analytics_column_id:
+ example: null
+ analytics_transformation_id:
+ example: null
+ value_selectors:
+ example: [first]
+ extractions:
+ example: [first]
+ scope:
+ example: "profile"
diff --git a/customer_data_platform/authorized_api/index.rst b/customer_data_platform/authorized_api/index.rst
index c2a7c7d5..fb5896dc 100644
--- a/customer_data_platform/authorized_api/index.rst
+++ b/customer_data_platform/authorized_api/index.rst
@@ -6,3 +6,4 @@ Authorized HTTP API
audiences
activations
+ attributes
diff --git a/customer_data_platform/components.yaml b/customer_data_platform/components.yaml
index 227f30aa..c1aba58f 100644
--- a/customer_data_platform/components.yaml
+++ b/customer_data_platform/components.yaml
@@ -173,15 +173,7 @@ components:
column_type:
type: string
description: Type of the column.
- enum:
- - number
- - string
- - ipv4
- - ipv6
- - bool
- - int
- - uuid
- - hex
+ $ref: "#/components/schemas/ColumnType"
example: string
column_unit:
type: string
@@ -240,6 +232,30 @@ components:
- event
- profile
example: event
+ DataType:
+ description: Type of the data.
+ type: string
+ enum:
+ - number
+ - bool
+ - ip
+ - datetime
+ - string
+ example: string
+ ColumnType:
+ description: Type of the column.
+ type: string
+ enum:
+ - number
+ - string
+ - ipv4
+ - ipv6
+ - bool
+ - int
+ - uuid
+ - hex
+ - datetime
+ example: string
AttributeOptions:
type: object
description: Defines additional options for attribute
diff --git a/customer_data_platform/event_dimensions.rst b/customer_data_platform/event_dimensions.rst
new file mode 100644
index 00000000..6d15937c
--- /dev/null
+++ b/customer_data_platform/event_dimensions.rst
@@ -0,0 +1,505 @@
+Event dimensions
+================
+
+Profile attributes in Customer Data Platform are populated with values of event
+dimensions sent in events. The table below shows all event dimensions that are
+available out of the box.
+
+`Profile update API `_
+allows you to send events with event dimensions and thus update profiles the
+same way events coming from your website would. Use dimension's incoming key as
+property name in `identifiers` object to specify value for that dimension.
+
+You can also provide incoming key of a predefined event dimension when creating
+custom profile attributes. The attribute will collect values of the associated
+event dimension.
+
+.. list-table::
+ :widths: auto
+ :header-rows: 1
+
+ * - Incoming key
+ - Description
+ - Example
+ - Type
+ - Notes
+ * - server_time
+ - Time of the event
+ - ``"2023-09-11T17:39:31.000000Z"``
+ - datetime
+ -
+ * - event_url
+ - Event URL
+ - ``"https://example.com/hello"``
+ - string
+ -
+ * - event_title
+ - Event title
+ - ``"Piwik PRO Analytics Suite"``
+ - string
+ -
+ * - event_type
+ - Event type
+ - ``1``
+ - number
+ - Possible values: :download:`event_type.json `
+ * - is_anonymous
+ - Whether event is anonymous and should not be saved
+ - ``false``
+ - bool
+ -
+ * - user_id
+ - User identifier
+ - ``"mikesmith@example.com"``
+ - string
+ - When updating profile, this dimension should be sent in **user_id** property of `identifiers`
+ * - cookie_id_hex
+ - Cookie identifier
+ - ``"8d4dd17c784a6330"``
+ - string
+ - When updating profile, this dimension should be sent in **cookie_id** property of `identifiers`
+ * - visitor_id_hex
+ - Visitor identifier
+ - ``"af7a891e65ecf95b"``
+ - string
+ -
+ * - source
+ - Source
+ - ``"google"``
+ - string
+ -
+ * - medium
+ - Medium
+ - ``"organic"``
+ - string
+ -
+ * - source_medium
+ - Source / Medium
+ - ``"google / organic"``
+ - string
+ -
+ * - keyword
+ - Keyword
+ - ``"git"``
+ - string
+ -
+ * - referrer_type
+ - Referrer type
+ - ``2``
+ - number
+ - Possible values: :download:`referrer_type.json `
+ * - referrer_url
+ - Referrer URL
+ - ``"https://referrer.example.com/"``
+ - string
+ -
+ * - campaign_name
+ - Campaign name
+ - ``"spring_sale"``
+ - string
+ -
+ * - campaign_id
+ - Campaign ID
+ - ``"c0172"``
+ - string
+ -
+ * - campaign_content
+ - Campaign content
+ - ``"textlink"``
+ - string
+ -
+ * - campaign_gclid
+ - Campaign gclid
+ - ``"MFIXNyAtIzlqSWgivr-aAfYFHchmPWSuiFI"``
+ - string
+ -
+ * - operating_system
+ - Operating system
+ - ``"WIN"``
+ - string
+ - Possible values: :download:`operating_system.json `
+ * - operating_system_version
+ - Operating system version
+ - ``"10"``
+ - string
+ -
+ * - browser_name
+ - Browser name
+ - ``"FF"``
+ - string
+ - Possible values: :download:`browser_name.json `
+ * - browser_engine
+ - Browser engine
+ - ``"Gecko"``
+ - string
+ -
+ * - browser_version
+ - Browser version
+ - ``"79.0"``
+ - string
+ -
+ * - browser_language_iso639
+ - Browser language ISO-639
+ - ``"en"``
+ - string
+ - Possible values: :download:`browser_language_iso639.json `
+ * - device_type
+ - Device type
+ - ``0``
+ - number
+ - Possible values: :download:`device_type.json `
+ * - device_brand
+ - Device brand
+ - ``"DL"``
+ - string
+ - Possible values: :download:`device_brand.json `
+ * - device_model
+ - Device model
+ - ``"Vostro 3020 MT"``
+ - string
+ -
+ * - resolution
+ - Resolution
+ - ``"1920x1080"``
+ - string
+ -
+ * - resolution_width
+ - Resolution width
+ - ``1920``
+ - number
+ -
+ * - resolution_height
+ - Resolution height
+ - ``1080``
+ - number
+ -
+ * - location_ipv4
+ - IP v4
+ - ``"192.168.1.3"``
+ - ip
+ -
+ * - location_ipv6
+ - IP v6
+ - ``"2001:0db8:0:0::1428:57ab"``
+ - ip
+ -
+ * - location_continent_iso_code
+ - Location continent ISO code
+ - ``"EU"``
+ - string
+ - Possible values: :download:`location_continent_iso_code.json `
+ * - location_country_iso_code
+ - Location country ISO code
+ - ``"GB"``
+ - string
+ - When updating profile, must be provided together with `location_country_name`
+ * - location_country_name
+ - Location country name
+ - ``"United Kingdom"``
+ - string
+ - When updating profile, must be provided together with `location_country_iso_code`
+ * - location_subdivision_1_iso_code
+ - Location subdivision 1 ISO code
+ - ``"EN"``
+ - string
+ - When updating profile, must be provided together with `location_subdivision_1_name`
+ * - location_subdivision_1_name
+ - Location subdivision 1 name
+ - ``"England"``
+ - string
+ - When updating profile, must be provided together with `location_subdivision_1_iso_code`
+ * - location_subdivision_2_iso_code
+ - Location subdivision 2 ISO code
+ - ``"CAM"``
+ - string
+ - When updating profile, must be provided together with `location_subdivision_2_name`
+ * - location_subdivision_2_name
+ - Location subdivision 2 name
+ - ``"Cambridgeshire"``
+ - string
+ - When updating profile, must be provided together with `location_subdivision_2_iso_code`
+ * - location_city_geoname_id
+ - Location city geoname ID
+ - ``11609029``
+ - number
+ - When updating profile, must be provided together with `location_city_name`
+ * - location_city_name
+ - Location city name
+ - ``"Cambridgeshire"``
+ - string
+ - When updating profile, must be provided together with `location_city_geoname_id`
+ * - location_provider
+ - Location provider
+ - ``"provider"``
+ - string
+ -
+ * - location_organization
+ - Location organization
+ - ``"organization"``
+ - string
+ -
+ * - location_latitude
+ - Latitude
+ - ``52.36717``
+ - number
+ -
+ * - location_longitude
+ - Longitude
+ - ``0.00433``
+ - number
+ -
+ * - timing_dom_interactive
+ - DOM interactive time (in milliseconds)
+ - ``743``
+ - number
+ -
+ * - timing_event_end
+ - Event end time (in milliseconds)
+ - ``259``
+ - number
+ -
+ * - event_custom_dimension_N
+ - Event custom dimension
+ - ``"size-m"``
+ - string
+ -
+ * - session_custom_dimension_N
+ - Session custom dimension
+ - ``"hight-contrast-on"``
+ - string
+ -
+ * - outlink_url
+ - Outlink URL
+ - ``"https://out.example.com"``
+ - string
+ -
+ * - download_url
+ - Download URL
+ - ``"https://example.com/file.pdf"``
+ - string
+ -
+ * - search_keyword
+ - Search keyword
+ - ``running shoes``
+ - string
+ -
+ * - search_category
+ - Search category
+ - ``footwear``
+ - string
+ -
+ * - search_results_count
+ - Search results count
+ - ``165``
+ - number
+ -
+ * - custom_event_category
+ - Custom event category
+ - ``"assignment"``
+ - string
+ -
+ * - custom_event_action
+ - Custom event action
+ - ``"assignment-submitted"``
+ - string
+ -
+ * - custom_event_name
+ - Custom event name
+ - ``"Math - Trigonometry - assignment 4"``
+ - string
+ -
+ * - custom_event_value
+ - Custom event value
+ - ``10``
+ - number
+ -
+ * - content_name
+ - Content name
+ - ``"promo-video"``
+ - string
+ -
+ * - content_piece
+ - Content piece
+ - ``"https://example.com/public/promo-01.mp4"``
+ - string
+ -
+ * - content_target
+ - Content target
+ - ``"https://example.com/more"``
+ - string
+ -
+ * - goal_uuid
+ - UUID of the converted goal
+ - ``"18344645-84d3-4544-b870-8df42b24d9f2"``
+ - string
+ -
+ * - goal_revenue
+ - Value of the goal conversion
+ - ``5``
+ - number
+ -
+ * - order_id
+ - E-commerce order ID
+ - ``"1634"``
+ - string
+ -
+ * - order_time
+ - Time of the e-commerce order
+ - ``"2023-09-12T09:23:45.000000Z"``
+ - datetime
+ -
+ * - item_count
+ - E-commerce item count
+ - ``1``
+ - number
+ -
+ * - revenue
+ - E-commerce order value
+ - ``35.5``
+ - number
+ -
+ * - revenue_subtotal
+ - E-commerce order subtotal
+ - ``25.5``
+ - number
+ -
+ * - revenue_tax
+ - E-commerce order tax
+ - ``7.23``
+ - number
+ -
+ * - revenue_shipping
+ - E-commerce order shipping
+ - ``10``
+ - number
+ -
+ * - revenue_discount
+ - E-commerce order discount
+ - ``5.5``
+ - number
+ -
+ * - consent_source
+ - Consent source
+ - ``1``
+ - number
+ - Possible values: :download:`consent_source.json `
+ * - consent_form_button
+ - Consent form button
+ - ``1``
+ - number
+ - Possible values: :download:`consent_form_button.json `
+ * - consent_scope
+ - Consent scope
+ - ``1``
+ - number
+ - Possible values: :download:`consent_scope.json `
+ * - consent_action
+ - Consent action
+ - ``1``
+ - number
+ - Possible values: :download:`consent_action.json `
+ * - consent_type_analytics
+ - Whether users consents to analytics
+ - ``true``
+ - bool
+ -
+ * - consent_type_ab_testing_personalization
+ - Whether users consents to AB testing and personalization
+ - ``true``
+ - bool
+ -
+ * - consent_type_conversion_tracking
+ - Whether users consents to conversion tracking
+ - ``true``
+ - bool
+ -
+ * - consent_type_marketing_automation
+ - Whether users consents to marketing automation
+ - ``true``
+ - bool
+ -
+ * - consent_type_remarketing
+ - Whether users consents to remarketing
+ - ``true``
+ - bool
+ -
+ * - consent_type_user_feedback
+ - Whether users consents to feedback
+ - ``true``
+ - bool
+ -
+ * - consent_type_custom_1
+ - Whether users consents to a custom action
+ - ``true``
+ - bool
+ -
+ * - sharepoint_action
+ - Sharepoint action
+ - ``1``
+ - number
+ - Deprecated. Possible values: :download:`sharepoint_action.json `
+ * - sharepoint_object_type
+ - Sharepoint object type
+ - ``2``
+ - number
+ - Deprecated. Possible values: :download:`sharepoint_object_type.json `
+ * - sharepoint_content_type
+ - Sharepoint content type
+ - ``"document"``
+ - string
+ - Deprecated
+ * - sharepoint_display_name
+ - Sharepoint display name
+ - ``"Trixie Smith"``
+ - string
+ - Deprecated
+ * - sharepoint_office
+ - Sharepoint office
+ - ``"Human Resources office"``
+ - string
+ - Deprecated
+ * - sharepoint_department
+ - Sharepoint department
+ - ``"Human Resources"``
+ - string
+ - Deprecated
+ * - sharepoint_job_title
+ - Sharepoint job title
+ - ``"Human Resources Manager"``
+ - string
+ - Deprecated
+ * - sharepoint_author
+ - Sharepoint author
+ - ``"rob.thompson@example.com"``
+ - string
+ - Deprecated
+ * - sharepoint_author_display_name
+ - Sharepoint author display name
+ - ``"Rob Thompson"``
+ - string
+ - Deprecated
+ * - sharepoint_author_office
+ - Sharepoint author office
+ - ``"Security office"``
+ - string
+ - Deprecated
+ * - sharepoint_author_department
+ - Sharepoint author department
+ - ``"Security and Compliance"``
+ - string
+ - Deprecated
+ * - sharepoint_author_job_title
+ - Sharepoint author job title
+ - ``"Security Researcher"``
+ - string
+ - Deprecated
+ * - sharepoint_file_url
+ - Sharepoint file URL
+ - ``"https://example.com/documents/report.pdf"``
+ - string
+ - Deprecated
+ * - sharepoint_file_type
+ - Sharepoint File Type
+ - ``"pdf"``
+ - string
+ - Deprecated
diff --git a/customer_data_platform/index.rst b/customer_data_platform/index.rst
index fedbd97a..ae06a1ce 100644
--- a/customer_data_platform/index.rst
+++ b/customer_data_platform/index.rst
@@ -1,10 +1,11 @@
.. _customer-data-platform:
Customer Data Platform
-===============
+======================
.. toctree::
:maxdepth: 2
public_api/public_api
authorized_api/index
+ event_dimensions
diff --git a/customer_data_platform/public_api/customer_data_platform_profiles_api.yaml b/customer_data_platform/public_api/customer_data_platform_profiles_api.yaml
index d91382c2..ca74b2ab 100644
--- a/customer_data_platform/public_api/customer_data_platform_profiles_api.yaml
+++ b/customer_data_platform/public_api/customer_data_platform_profiles_api.yaml
@@ -9,8 +9,6 @@ paths:
/api/cdp/profiles/public/v1/app/{app_id}/profile/{cookie_id}/audiences:
get:
summary: Fetch audiences the profile belongs to
- tags:
- - profiles
security: []
operationId: get-profile-audiences
description: Get audiences the profile belongs to
@@ -43,6 +41,39 @@ paths:
description: Profile with given cookie_id or organization was not found
500:
$ref: "../components.yaml#/components/responses/InternalServerError"
+ /api/cdp/profiles/public/v1/app/{app_id}/update-profile:
+ post:
+ summary: Create or update profile attributes
+ security: []
+ operationId: post-profile-attributes
+ description: |
+ A single request can be used to create or update multiple profile attributes.
+ The data payload should consist of a key-value map where each attribute's name is denoted by a key, along with its corresponding value.
+ It will exclusively impact the app associated with the provided `app_id` in the URL path.
+
+ Provided data must have at least one identifier:
+
+ - ``user_id``
+ - ``cookie_id``
+ parameters:
+ - $ref: "../components.yaml#/components/parameters/AppId"
+ requestBody:
+ required: true
+ description: User's custom attributes
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ProfileCustomAttributesUpdateInput"
+ responses:
+ 202:
+ description: Request accepted and waiting for processing.
+ 400:
+ $ref: "../components.yaml#/components/responses/BadRequestError"
+ 402:
+ $ref: "../components.yaml#/components/responses/ModuleDisabledError"
+ 500:
+ $ref: "../components.yaml#/components/responses/InternalServerError"
+
components:
schemas:
ProfileAudienceIdList:
@@ -52,3 +83,63 @@ components:
type: string
format: uuid
example: "2fb368ff-c0ca-45b9-bac5-421e40a34ff0"
+ ProfileCustomAttributesUpdateInput:
+ type: object
+ description: Profile attributes object for creating and updating user custom attributes.
+ required:
+ - identifiers
+ - attributes
+ properties:
+ identifiers:
+ description: Identifiers associated with a user.
+ anyOf:
+ - $ref: "#/components/schemas/UserID"
+ - $ref: "#/components/schemas/CookieID"
+ - $ref: "#/components/schemas/ID"
+ example:
+ user_id: tom1987@bob.com
+ cookie_id: "176a5215ff7b62e3"
+ attributes:
+ type: object
+ description: Attributes of the occurred event.
+ additionalProperties:
+ oneOf:
+ - type: string
+ - type: number
+ - type: boolean
+ - type: string
+ format: date-time
+ description: A string that follows the ISO 8601 date-time notation, such as `2023-07-21T17:32:28Z`.
+ example:
+ occupation: teacher
+ mood: happy
+ contract_end: 2023-07-21T17:32:28Z
+ UserID:
+ type: object
+ required:
+ - user_id
+ properties:
+ user_id:
+ description: User ID identifier
+ type: string
+ example: "tom1987@bob.com"
+ CookieID:
+ type: object
+ required:
+ - cookie_id
+ properties:
+ cookie_id:
+ type: string
+ description: Cookie ID identifier
+ example: "176a5215ff7b62e3"
+ format: hex
+ ID:
+ type: object
+ required:
+ - id
+ properties:
+ id:
+ type: string
+ description: Profile ID identifier
+ example: "836fa2fea2cf988b"
+ format: hex
diff --git a/requirements.txt b/requirements.txt
index 478f6145..789dc808 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,5 +3,5 @@ Sphinx==1.8.5
commonmark==0.8.1
recommonmark==0.5.0
sphinx-rtd-theme==0.2.5b2
-PyYAML==5.4.1
-docutils==0.17
\ No newline at end of file
+PyYAML==6.0.1
+docutils==0.17