Skip to content

Commit

Permalink
Merge branch 'main' into myronkaifung-add-customerio
Browse files Browse the repository at this point in the history
  • Loading branch information
ranic authored May 16, 2024
2 parents f1dd849 + ca429bf commit 2397660
Show file tree
Hide file tree
Showing 21 changed files with 590 additions and 414 deletions.
1 change: 1 addition & 0 deletions openapi/openapi.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiDefinitions:
connectors: ./src/connectors.openapi.yaml
data-pipelines: ./src/data-pipelines.openapi.yaml
export: ./src/export.openapi.yaml
gdpr: ./src/gdpr.openapi.yaml
identity: ./src/identity.openapi.yaml
ingestion: ./src/ingestion.openapi.yaml
lexicon-schemas: ./src/lexicon-schemas.openapi.yaml
Expand Down
4 changes: 4 additions & 0 deletions openapi/src/common/securitySchemes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ ProjectSecret:
type: http
scheme: basic
description: Project Secret
OAuthToken:
type: http
scheme: bearer
description: OAuth Token
48 changes: 22 additions & 26 deletions openapi/src/gdpr.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ info:
servers:
- $ref: ./common/app-api.yaml#/server
security:
- ServiceAccount: []
- OAuthToken: []
tags:
- name: Create Retrieval
description: Creates a data retrieval job
- name: Cancel Deletion
description: Cancels an existing deletion task
- name: Check Status of Retrieval
description: Checks the status of a data retrieval job
- name: Create a Deletion Task
description: Creates a task that specifies a list of users in a particular project to delete
- name: Check Status of a Deletion Task
description: Checks the status of an existing deletion task
- name: Cancel Deletion
description: Cancels an existing deletion task
- name: Create Retrieval
description: Creates a data retrieval job
- name: Create a Deletion Task
description: Creates a task that specifies a list of users in a particular project to delete
paths:
/api/app/data-retrievals/v3.0:
/data-retrievals/v3.0:
post:
parameters:
- name: token
Expand All @@ -42,14 +42,10 @@ paths:
$ref: '#/components/schemas/DistinctIds'
compliance_type:
description: 'Select CCPA or GDPR. Default is GDPR.'
required: true
schema:
type: string
type: string
disclosure_type:
description: 'Only required if compliance_type = CCPA. Can be Data, Categories, or Sources. Default is Data.'
required: true
schema:
type: string
type: string
tags:
- Create Retrieval
summary: Create Retrieval
Expand All @@ -61,11 +57,12 @@ paths:
$ref: ./common/responses.yaml#/401Unauthorized
'403':
$ref: ./common/responses.yaml#/403Forbidden
api/app/data-retrievals/v3.0/{tracking_id}:
/data-retrievals/v3.0/{tracking_id}:
parameters:
- name: tracking_id
in: path
schema: string
schema:
type: string
required: true
description: 'The tracking ID shown in the response'
get:
Expand All @@ -92,7 +89,7 @@ paths:
$ref: ./common/responses.yaml#/401Unauthorized
'403':
$ref: ./common/responses.yaml#/403Forbidden
api/app/data-deletions/v3.0:
/data-deletions/v3.0:
post:
parameters:
- name: token
Expand All @@ -112,9 +109,7 @@ paths:
$ref: '#/components/schemas/DistinctIds'
compliance_type:
description: 'Select CCPA or GDPR. Default is GDPR.'
required: true
schema:
type: string
type: string
tags:
- Create a Deletion Task
summary: Create a Deletion Task
Expand Down Expand Up @@ -162,11 +157,12 @@ paths:
$ref: ./common/responses.yaml#/401Unauthorized
'403':
$ref: ./common/responses.yaml#/403Forbidden
api/app/data-deletions/v3.0/{tracking_id}:
/data-deletions/v3.0/{tracking_id}:
parameters:
- name: tracking_id
in: path
schema: string
schema:
type: string
required: true
description: 'The tracking ID shown in the response'
get:
Expand Down Expand Up @@ -207,7 +203,7 @@ components:
- results
properties:
status:
type: '#/components/schemas/ResponseStatus'
$ref: '#/components/schemas/ResponseStatus'
results:
type: object
properties:
Expand All @@ -224,7 +220,7 @@ components:
- results
properties:
status:
type: '#/components/schemas/ResponseStatus'
$ref: '#/components/schemas/ResponseStatus'
results:
type: object
properties:
Expand All @@ -243,7 +239,7 @@ components:
results:
type: string
distinct_ids:
type: '#/components/schemas/DistinctIds'
$ref: '#/components/schemas/DistinctIds'
CreateDeletionTaskResponse:
title: CreateDeletionTaskResponse
description: "A JSON response object containing data about a data deletion job"
Expand All @@ -254,7 +250,7 @@ components:
- results
properties:
status:
type: '#/components/schemas/ResponseStatus'
$ref: '#/components/schemas/ResponseStatus'
results:
type: array
items:
Expand Down
9 changes: 6 additions & 3 deletions openapi/src/ingestion.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1191,22 +1191,24 @@ paths:
description: |
Replace the contents of an existing Lookup Table.
***
Lookup Tables must be [created via our UI](https://docs.mixpanel.com/docs/data-structure/lookup-tables#how-do-i-upload-a-lookup-table). Once a Lookup Table is created, its contents can be replaced via this API.
[block:api-header]
{
"title": "Validation"
}
[/block]
* The first column of the lookup table is assumed to be the ID of the row. All ID values must be unique.
* The first row of the lookup table is a header row. The values in the header must be unique, as each one uniquely identifies a column of the table. These will appear as properties of the lookup table in Mixpanel's UI.
* The CSV must be valid according to RFC4180.
* The CSV must be valid according to [RFC4180](https://datatracker.ietf.org/doc/html/rfc4180).
* If the `Content-Encoding: gzip` header is supplied, the table will be decompressed before parsing.
[block:api-header]
{
"title": "Types"
}
[/block]
* Integers or floats will be parsed as numbers.
* RFC3339 timestamps (`2021-08-21T05:36:01Z`) will parsed as datetimes.
* [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) timestamps (`2021-08-21T05:36:01Z`) will parsed as datetimes.
* `true` or `false` (case-insensitive) will be parsed as boolean.
* Empty fields (two adjacent commas) will be treated as `undefined`
* Comma separated, quoted strings in square brackets (`"["Free","Paid","Enterprise"]"`) will be parsed as list of strings.
Expand Down Expand Up @@ -1249,14 +1251,15 @@ paths:
This endpoint will return a 429 error if called more than 100 times in a rolling 24 hour window. We recommend updating lookup tables at most hourly to stay within this limit.
This endpoint will return a 413 error if a Lookup Table exceeds 100MB uncompressed. In practice, this translates to 1-2M rows. If you have a lookup table that exceeds the limit, we recommend pruning the number of columns to those that are useful to analysis. Removing long URLs or user-generated content can bring a lookup table within this limit. If you still exceed the limit, please reach out to us at [email protected] -- we'd love to hear your use case!
parameters:
- in: path
name: id
required: true
schema:
type: string
format: uuid
description: The ID of the lookup table to replace.
description: The ID of the lookup table to replace which can be retreived from Lexicon under the lookup table's details, click [here](https://docs.mixpanel.com/docs/data-structure/lookup-tables#where-can-i-find-the-id-of-the-lookup-table-for-apis-path-params) for more info.
- in: query
name: project_id
required: True
Expand Down
18 changes: 9 additions & 9 deletions openapi/src/query.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ paths:
tags:
- Engage
description: >
Query user profile data and return list of users that fit specified
Query user (or group) profile data and return list of users (or groups) that fit specified
parameters.
Expand Down Expand Up @@ -1232,10 +1232,14 @@ paths:
A JSON array of distinct_ids to retrieve profiles for.
Example: `distinct_ids=["id1", "id2"]`
data_group_id:
type: string
description: >-
The ID of the group key, used when querying group profiles, click [here](https://docs.mixpanel.com/docs/data-structure/advanced/group-analytics#exporting-group-profiles-via-api) for more info.
where:
type: string
description: >-
An expression to filter users by. See the [expressions
An expression to filter users (or groups) by. See the [expressions
section](ref:segmentation-expressions)
above.
output_properties:
Expand Down Expand Up @@ -1293,17 +1297,13 @@ paths:
include_all_users:
type: boolean
description: >
`include_all_users=True` means that the Engage API will
include distinct_ids that don’t have a user profile. This is
the default.
*\*only applicable with `filter_by_cohort` parameter*
`include_all_users=False` means that the Engage API will
only include distinct_ids with user profiles.
`include_all_users=true` (default) include all distinct_ids even if they don’t have a user (or group) profile.
*this parameter is only applied when combined with
`filter_by_cohort`
`include_all_users=false` include only distinct_ids with user (or group) profile.
responses:
'200':
description: Success.
Expand Down
4 changes: 2 additions & 2 deletions pages/docs/data-structure/advanced/group-analytics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,6 @@ The `<data_group_id>` can be found in the URL of the [Group Profile](/docs/data-

`https://mixpanel.com/project/<project_id>/view/<workspace_id>/app/profile#distinct_id=<distinct_id>&data_group_id=<data_group_id>`

Here's an actual example with `data_group_id` = `1405123841946871899`:
Here's an actual [example](https://mixpanel.com/project/3187769/view/3699049/app/profile#distinct_id=company_id_8889&data_group_id=-1405123841946871899) with `data_group_id` = `-1405123841946871899`:

https://mixpanel.com/project/3187769/view/3699049/app/profile#distinct_id=company_id_8889&data_group_id=-1405123841946871899
![image](/engage-api-data-group-id.png "Engage API Data Group ID")
Loading

0 comments on commit 2397660

Please sign in to comment.