Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,12 @@
"reference/limits"
]
},
{
"group": "EXAMPLE API",
"pages": [
"reference/example"
]
},
{
"group": "DATA PIPELINES API",
"pages": [
Expand Down
329 changes: 329 additions & 0 deletions openapi/platform.openapi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,329 @@
{
"openapi": "3.1.0",
"info": {
"title": "Mixpanel Platform API",
"version": "1",
"description": ""
},
"paths": {
"/v1/example/": {
"post": {
"operationId": "v1_example_api_example",
"summary": "Example",
"parameters": [],
"responses": {
"204": {
"description": "No Content"
},
"422": {
"description": "Request validation failed.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestValidationErrorResponse"
}
}
}
},
"default": {
"description": "Error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"description": "Example description",
"tags": [
"Example"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExampleRequest"
}
}
},
"required": true
}
}
}
},
"components": {
"schemas": {
"ExampleRequest": {
"properties": {
"sub_id": {
"$ref": "#/components/schemas/SubId"
}
},
"required": [
"sub_id"
],
"title": "ExampleRequest",
"type": "object"
},
"SubId": {
"properties": {
"format": {
"const": "email",
"title": "Format",
"type": "string"
},
"email": {
"title": "Email",
"type": "string"
}
},
"required": [
"format",
"email"
],
"title": "SubId",
"type": "object"
},
"ErrorResponse": {
"additionalProperties": false,
"properties": {
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A stable reference that identifies the problem type, if applicable.",
"title": ""
},
"status": {
"description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
"title": "",
"type": "integer"
},
"instance": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A stable reference that identifies the specific occurrence of the problem, if applicable.",
"title": ""
},
"detail": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A human-readable explanation specific to this occurrence of the problem, if applicable.",
"title": ""
},
"error_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Opaque identifier for this error occurrence. Include it when contacting support so the corresponding server-side error can be located.",
"title": ""
},
"title": {
"description": "A short, human-readable summary of the problem type.",
"readOnly": true,
"title": "",
"type": "string"
}
},
"required": [
"status",
"title"
],
"title": "ErrorResponse",
"type": "object"
},
"RequestValidationErrorItem": {
"properties": {
"type": {
"description": "Machine-readable validation error type, e.g. 'missing'.",
"title": "Type",
"type": "string"
},
"loc": {
"description": "Location of the offending value in the request.",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"title": "Loc",
"type": "array"
},
"msg": {
"description": "Human-readable description of the error.",
"title": "Msg",
"type": "string"
},
"ctx": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Additional context about the error, if any.",
"title": "Ctx"
}
},
"required": [
"type",
"loc",
"msg"
],
"title": "RequestValidationErrorItem",
"type": "object"
},
"RequestValidationErrorResponse": {
"additionalProperties": false,
"properties": {
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A stable reference that identifies the problem type, if applicable.",
"title": ""
},
"status": {
"description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
"title": "",
"type": "integer"
},
"instance": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A stable reference that identifies the specific occurrence of the problem, if applicable.",
"title": ""
},
"detail": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A human-readable explanation specific to this occurrence of the problem, if applicable.",
"title": ""
},
"error_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Opaque identifier for this error occurrence. Include it when contacting support so the corresponding server-side error can be located.",
"title": ""
},
"errors": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/RequestValidationErrorItem"
},
{
"additionalProperties": true,
"type": "object"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The set of request validation errors.",
"title": ""
},
"title": {
"description": "A short, human-readable summary of the problem type.",
"readOnly": true,
"title": "",
"type": "string"
}
},
"required": [
"status",
"title"
],
"title": "RequestValidationErrorResponse",
"type": "object"
}
}
},
"servers": [
{
"url": "https://platform-{region}.mixpanel.com",
"variables": {
"region": {
"default": "us",
"enum": [
"us",
"eu",
"in"
],
"description": "Mixpanel data residency region."
}
}
}
]
}
4 changes: 4 additions & 0 deletions reference/example.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
openapi: /openapi/platform.openapi.json POST /v1/example/
title: Example
---