Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
haidang-dam committed Mar 6, 2024
2 parents aeb1460 + b3d37be commit 495c823
Show file tree
Hide file tree
Showing 99 changed files with 1,614 additions and 671 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rdme-delete-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:

jobs:
delete-staging:
if: ${{ github.event.pull_request.head.repo.full_name == 'mixpanel/docs' }}
runs-on: ubuntu-latest
steps:
- name: Check out repo 📚
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rdme-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:

# Create a new ReadMe Version if it needs to and pushes content to the version
rdme-staging:
if: ${{ github.event.pull_request.head.repo.full_name == 'mixpanel/docs' }}
runs-on: ubuntu-latest
steps:
- name: Check out repo 📚
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/vercel-preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches-ignore:
- main
jobs:
Deploy-Preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
39 changes: 16 additions & 23 deletions openapi/src/ingestion.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ paths:
"title": "Validation"
}
[/block]
/import validates the supplied events and returns a 400 status code if _any_ of the events fail validation with details of the error. If some events pass validation and others fail, we will ingest the events that pass validation. When you encounter a 400 error in production, simply log the JSON response, as it will contain the `$insert_id`s of the invalid events, which can be used to debug.
If you provide the strict=1 parameter (recommended), /import will validate the supplied events and returns a 400 status code if _any_ of the events fail validation with details of the error. If some events pass validation and others fail, Mixpanel will ingest the events that pass validation. When you encounter a 400 error in production, simply log the JSON response, as it will contain the `$insert_id`s of the invalid events, which can be used to debug.
### High-level requirements
Expand Down Expand Up @@ -404,18 +404,6 @@ paths:
If the profile does not exist, it creates it with these properties. If
it does exist, it sets the properties to these values, overwriting
existing values.
[block:callout]
{
"type": "info",
"body": "This API will return a `200 OK` even if there are data validation issues. To ensure the request actually succeeded, you need to check the response body."
}
[/block]
[block:callout]
{
"type": "info",
"body": "This API does not support gzip encoding."
}
[/block]
parameters:
- $ref: ./common/ingestion-api.yaml#/OptionalRequestParameter/ResponseType/Verbose
- $ref: ./common/ingestion-api.yaml#/OptionalRequestParameter/ResponseType/JavascriptWithCallback
Expand Down Expand Up @@ -601,7 +589,7 @@ paths:
summary: Append to List Property
description: >-
Takes a JSON object containing keys and values, and appends each to a
list associated with the corresponding property name. $appending to a
list associated with the corresponding property name. Appending to a
property that doesn't exist will result in assigning a list with one
element to that property.
parameters:
Expand Down Expand Up @@ -736,7 +724,10 @@ paths:
Send a batch of profile updates. Instead of sending a single JSON object
as the data query parameter, send a JSON list of objects as the data
parameter of an application/json POST or GET request
body
body.
Refer to the respective user profile update commands ($set, $set_once, $add, $union, $append, $remove, $unset, and $delete) on syntax for their parameters.
parameters:
- $ref: ./common/ingestion-api.yaml#/OptionalRequestParameter/ResponseType/Verbose
- $ref: ./common/ingestion-api.yaml#/OptionalRequestParameter/ResponseType/JavascriptWithCallback
Expand All @@ -755,12 +746,17 @@ paths:
{
"$token": "YOUR_PROJECT_TOKEN",
"$distinct_id": "13793",
"$add": { "Coins Gathered": 12 }
"$set": { "$email": "[email protected]" }
},
{
"$token": "YOUR_PROJECT_TOKEN",
"$distinct_id": "13794",
"$add": { "Coins Gathered": 13 }
},
{
"$token": "YOUR_PROJECT_TOKEN",
"$distinct_id": "13795",
"$unset": ["$email"]
}
]
responses:
Expand Down Expand Up @@ -1066,7 +1062,10 @@ paths:
Send a batch of group profile updates. Instead of sending a single JSON object
as the data query parameter, send a JSON list of objects as the data
parameter of an application/x-www-form-urlencoded POST or GET request
body
body.
Refer to the respective group profile update commands ($set, $set_once, $add, $union, $remove, $unset, and $delete) on syntax for their parameters.
parameters:
- $ref: ./common/ingestion-api.yaml#/OptionalRequestParameter/ResponseType/Verbose
requestBody:
Expand Down Expand Up @@ -1241,12 +1240,6 @@ 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!
[block:api-header]
{
"title": "Legacy API"
}
[/block]
Our [legacy lookup tables API](https://developer.mixpanel.com/v2.60/reference/lookup-tables) is now deprecated; we strongly recommend transitioning to this API.
parameters:
- in: path
name: id
Expand Down
6 changes: 5 additions & 1 deletion openapi/src/lexicon-schemas.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/ListSchemasResponse'
$ref: '#/components/schemas/Schema'
'401':
$ref: ./common/responses.yaml#/401Unauthorized
'403':
Expand Down Expand Up @@ -442,6 +442,9 @@ components:
type: object
description: The schema for the entity
properties:
description:
type: string
description: The entity description
properties:
type: object
description: >-
Expand All @@ -464,6 +467,7 @@ components:
- string
description:
type: string
description: The property description
metadata:
type: object
properties:
Expand Down
2 changes: 1 addition & 1 deletion openapi/src/query.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ paths:
type: integer
description: >-
The ID of your Insights report can be found from the url:
`https://mixpanel.com/report/1/insights#report/<YOUR_BOOKMARK_ID>/example-report`
`https://mixpanel.com/project/<YOUR_PROJECT_ID>/view/<YOUR_WORKSPACE_ID>/app/boards#id=12345&editor-card-id=%22report-<YOUR_BOOKMARK_ID>%22`
required: true
responses:
'200':
Expand Down
Loading

0 comments on commit 495c823

Please sign in to comment.