diff --git a/docs.json b/docs.json index 7126e772..b37f1c52 100644 --- a/docs.json +++ b/docs.json @@ -973,6 +973,12 @@ "reference/limits" ] }, + { + "group": "EXAMPLE API", + "pages": [ + "reference/example" + ] + }, { "group": "DATA PIPELINES API", "pages": [ diff --git a/openapi/platform.openapi.json b/openapi/platform.openapi.json new file mode 100644 index 00000000..ce8dcd97 --- /dev/null +++ b/openapi/platform.openapi.json @@ -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." + } + } + } + ] +} \ No newline at end of file diff --git a/reference/example.mdx b/reference/example.mdx new file mode 100644 index 00000000..81968706 --- /dev/null +++ b/reference/example.mdx @@ -0,0 +1,4 @@ +--- +openapi: /openapi/platform.openapi.json POST /v1/example/ +title: Example +---