diff --git a/.env.example b/.env.example index 6b27646..cf452ae 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,5 @@ -POSTHOG_RS_E2E_TEST_API_KEY=phc_XXXX # used in tests \ No newline at end of file +POSTHOG_PUBLIC_KEY="..." +POSTHOG_API_KEY="..." +POSTHOG_API_URL="https://us.posthog.com" +POSTHOG_BASE_URL="https://us.i.posthog.com/" +POSTHOG_PROJECT_ID="..." \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 3d6372d..d247f46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,24 +1,3 @@ -[package] -name = "posthog-rs" -license = "MIT" -version = "0.2.6" -authors = ["christos "] -description = "An unofficial Rust client for Posthog (https://posthog.com/)." -repository = "https://github.com/openquery-io/posthog-rs" -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -reqwest = { version = "0.11.3", default-features = false, features = ["blocking", "rustls-tls"] } -serde = { version = "1.0.125", features = ["derive"] } -chrono = {version = "0.4.19", features = ["serde"] } -serde_json = "1.0.64" -semver = "1.0.24" - -[dev-dependencies] -dotenv = "0.15.0" -ctor = "0.1.26" - -[features] -e2e-test = [] +[workspace] +members = ["posthog-rs", "examples/*"] +resolver = "2" diff --git a/README.md b/README.md index a5feac0..f5ddc66 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,113 @@ -# PostHog Rust +# PostHog Rust SDK -Please see the main [PostHog docs](https://posthog.com/docs). +A Rust SDK for [PostHog](https://posthog.com), featuring a flexible event builder, an actor-based service for efficient event batching, and API client capabilities. -**This crate is under development** +## Features -# Quickstart +- **Event Builder Pattern**: Intuitive builder pattern for constructing PostHog events +- **Flexible Event Properties**: Use `serde_json::Value` for maximum flexibility in event property definitions +- **Actor-based Service**: Built-in actor system for efficient event batching and delivery +- **Query API Support**: Access PostHog's Query API for data analysis +- **Async/Await**: Built on Tokio for asynchronous operation +- **Error Handling**: Comprehensive error handling with proper context -Add `posthog-rs` to your `Cargo.toml`. +## Installation + +Add `posthog-rs` to your `Cargo.toml`: ```toml [dependencies] -posthog_rs = "0.2.0" +posthog-rs = "0.2.0" ``` +## Quick Start + +### Event Capture + ```rust -let client = crate::client(env!("POSTHOG_API_KEY")); +use posthog_rs::sdk::{PostHogSDKClient, PostHogServiceActor, models::event::EventBuilder}; +use serde_json::json; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + // Initialize PostHog client + let client = PostHogSDKClient::new("your_api_key", "https://app.posthog.com")?; + let actor = PostHogServiceActor::new(client); + + // Start the service actor + let sender = actor.start().await; + + // Create and send an event + let event = EventBuilder::new("event_name") + .distinct_id("user_123") + .timestamp_now() + .properties(json!({ + "property1": "value1", + "property2": 42, + "nested": { + "key": "value" + } + })) + .build(); + + sender.send(PostHogServiceMessage::Capture(event)).await? + + Ok(()) +} +``` -let mut event = Event::new("test", "1234"); -event.insert_prop("key1", "value1").unwrap(); -event.insert_prop("key2", vec!["a", "b"]).unwrap(); +### Query API -client.capture(event).unwrap(); +```rust +use posthog_rs::api::{client::PostHogAPIClient, query::QueryRequest}; +use serde_json::json; +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let client = PostHogAPIClient::new("your_api_key", "https://app.posthog.com")?; + + let request = QueryRequest::default().with_query(json!({ + "kind": "HogQLQuery", + "query": "select * from events limit 10" + })); + + let response = client.query("your_project_id", request).await?; + println!("{:#?}", response); + + Ok(()) +} ``` +## Examples + +Check out our [examples directory](./examples) for complete working examples: + +- [Actor Microservice](./examples/actor-microservice): Using the PostHog service actor in a microservice +- [Query API](./examples/query): Executing queries against the PostHog Query API +- [Axum Server](./examples/axum-server): Integrating PostHog with an Axum web server + +## API Coverage + +Currently, the SDK supports: +- Event capture with the PostHog Service Actor +- Public API client (decide and capture endpoints) + - Feature Flags + - Annotations + - Persons and Groups +- Query API for data analysis + +We plan to expand coverage to include: +- all the other posthog apis + - I write the client for the apis that I'm using in my projects, so If you need something, open a feature request in the issues tab or comment on one of the existing ones :) + +## Contributing + +Contributions are welcome! Feel free to: +- Open issues for bugs or feature requests +- Submit pull requests +- Improve documentation + +## License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. + diff --git a/arc/Actor.md b/arc/Actor.md new file mode 100644 index 0000000..b36d2c3 --- /dev/null +++ b/arc/Actor.md @@ -0,0 +1,93 @@ +Here's an architectural document describing the PostHog event actor system: + +# PostHog Event Actor Architecture Document + +## Overview +The system implements an actor-based approach for handling PostHog event submissions with timeout capabilities using Tokio and Rust channels. + +## Components + +### 1. Actor Message Enum +- `PostHogMessage`: An enumeration containing two variants + - `Capture`: Holds the event data to be sent to PostHog + - `Exit`: Signal to gracefully shutdown the actor + +### 2. Actor State +- Contains PostHog client instance +- Internal channel receivers +- Processing state management + +### 3. Core Components + +#### Actor Creation Function +- Purpose: Creates and initializes the actor system +- Input: PostHog client instance +- Output: PostHog actor system +- Operations: + - Initializes the actor system + +### Actor Run function +- Purpose: Runs the actor system +- Input: PostHog actor system +- Output: Sender of actor messages +- Operations: + - Spawns the actor task (using Runtime Provided when creating the system) + - Creates channel pair (sender/receiver) + - Spawns Tokio task for actor loop + - Returns sender handle to caller +- Actor Loop + - Infinite loop processing incoming messages + - Handles timeout for event processing + - Manages graceful shutdown + - Uses select pattern for message handling + +#### Event Processing +- Timeout wrapper for PostHog API capture batch calls +- Error handling and retry logic +- Async processing of capture events + +## Flow + +1. System Initialization: + - Client creates actor with PostHog client specifying the Runtime + - Receives sender handle for communication + +2. Normal Operation: + - System sends events via sender + - Actor processes events with timeout + - Events forwarded to PostHog + +3. Shutdown: + - System sends Exit signal + - Actor completes pending events + - Closes channels and exits + +## Error Handling + +- Timeout handling for API calls +- Channel communication errors +- PostHog API errors +- Graceful degradation + +## Performance Considerations + +- Async processing for non-blocking operation +- Channel buffer sizes +- Timeout durations +- Resource cleanup + +## Usage Pattern + +1. Initialize actor with PostHog client +2. Obtain sender handle +3. Send events through sender +4. Send exit signal when done +5. Wait for cleanup + +This architecture ensures: +- Asynchronous event processing +- Timeout handling +- Graceful shutdown +- Resource management +- Error handling +- Clean API surface \ No newline at end of file diff --git a/arc/Query.md b/arc/Query.md new file mode 100644 index 0000000..cbde1cc --- /dev/null +++ b/arc/Query.md @@ -0,0 +1,67 @@ +Below, I have outlined the PostHog Query API endpoint architecture based on the information provided: + +### Overview + +The Query API endpoint is the main interface for querying data in PostHog, supporting various types of queries, including trends, funnels, actors, events, and HogQL queries. It is versatile for querying both event data and non-event data, such as persons or session replay metadata. The endpoint imposes certain rate limits and result size restrictions. + +### Endpoints Summary + +1. **POST /api/projects/:project_id/query** + - **Description**: Main endpoint for executing queries on PostHog data. + - **Method**: POST + - **Path**: `/api/projects/:project_id/query` + - **Request Body**: + - Must be a JSON object with a `query` field. + - Example structure: + ```json + { + "query": { + "kind": "HogQLQuery", + "query": "select properties.email from persons where properties.email is not null" + } + } + ``` + - Optional parameters: + - `async`: A client-provided ID for later reference. + - `filters_override`: Specific filters to apply. + - `refresh`: Defines query execution behavior concerning caching (e.g., 'blocking', 'async'). + - **Response**: Typically returns the query result, limited to 10,000 rows. JSON format. + +2. **GET /api/projects/:project_id/query/:id** + - **Description**: Retrieve the status or result of a previously executed query. + - **Method**: GET + - **Path**: `/api/projects/:project_id/query/:id` + - **Response**: + - JSON object containing fields such as `query_status`, `task_id`, and `results`. + +3. **DELETE /api/projects/:project_id/query/:id** + - **Description**: Cancel an ongoing query. + - **Method**: DELETE + - **Path**: `/api/projects/:project_id/query/:id` + - **Response**: Status 204 No Content upon successful cancellation. + +4. **POST /api/projects/:project_id/query/check_auth_for_async** + - **Description**: Check authorization for executing asynchronous queries. + - **Method**: POST + - **Path**: `/api/projects/:project_id/query/check_auth_for_async` + - **Response**: Status 200 with no body. + +5. **GET /api/projects/:project_id/query/draft_sql** + - **Description**: Retrieve draft SQL query for a project. + - **Method**: GET + - **Path**: `/api/projects/:project_id/query/draft_sql` + - **Response**: Status 200 with no body. + +### Important Considerations + +- **Rate Limits**: The API allows up to 120 requests per hour per team, each capable of returning up to 10,000 rows. +- **Authentication**: Requires a personal API key with at least `query:read` scope. +- **Request Headers**: Should include 'Content-Type: application/json' and 'Authorization: Bearer [API_KEY]'. +- **Caching & Execution Modes**: The `refresh` parameter controls how queries interact with the cache and whether they execute asynchronously or synchronously. + +### Known Issues + +- Date filters may be overridden by default filters in HogQL unless explicitly set with `after` and `before`. +- If the query requires more data or requests than allowed by rate limits, consider using batch exports for larger data needs. + +Before implementing the API client, ensure to handle possible API rate limits and request Payload errors gracefully, and maintain up-to-date API keys and scopes. \ No newline at end of file diff --git a/examples/Readme.md b/examples/Readme.md new file mode 100644 index 0000000..2917a64 --- /dev/null +++ b/examples/Readme.md @@ -0,0 +1,6 @@ +# PostHog Rust Examples + +Here you will find some examples of how to use the PostHog SDK in Rust. +- [actor microservice example](./actor-microservice/Readme.md): An example of how to use the PostHog SDK in an actor-based microservice architecture. +- [axum server](./axum-server/Readme.md): An example of how to use the PostHog SDK in an Axum WebServer server. +- [Query API](./query/Readme.md): An example of how to use the PostHog SDK to query data in a PostHog project. \ No newline at end of file diff --git a/examples/actor-microservice/Cargo.toml b/examples/actor-microservice/Cargo.toml new file mode 100644 index 0000000..4ddfb16 --- /dev/null +++ b/examples/actor-microservice/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "actor-microservice" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.0.96" +axum = "0.8.1" +dotenvy = "0.15.7" +posthog-rs = { path = "../../posthog-rs" } +serde = { version = "1.0.218", features = ["derive"] } +serde_json = "1.0.139" +tokio = { version = "1.43.0", features = ["full"] } +tracing = "0.1.41" +tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } diff --git a/examples/actor-microservice/Readme.md b/examples/actor-microservice/Readme.md new file mode 100644 index 0000000..3d89c4a --- /dev/null +++ b/examples/actor-microservice/Readme.md @@ -0,0 +1,34 @@ +# PostHog Actor Microservice Example + +This example demonstrates how to use the PostHog SDK in an actor-based microservice architecture. It showcases: +- Creating a PostHog service actor for handling event capture +- Using channels for message passing between actors +- Implementing a sample actor that processes messages and sends events to PostHog +- Proper error handling and logging + +## Setup + +1. Create a `.env` file in this directory with the following variables: +```env +POSTHOG_PUBLIC_KEY=your_project_api_key +POSTHOG_BASE_URL=your_posthog_instance_url +``` + +2. Build and run the example: +```bash +cargo run +``` + +## How it Works + +The example creates a `SampleActor` that: +1. Receives JSON messages through a channel +2. Processes each message +3. Sends the processed data to PostHog using the `PostHogServiceActor` + +The `PostHogServiceActor` handles: +- Batching events for efficient delivery +- Automatic retries on failure +- Proper shutdown and cleanup + +The example will send 100 test messages, each containing a simple counter value, demonstrating how to integrate PostHog event capture into an actor-based system. diff --git a/examples/actor-microservice/src/main.rs b/examples/actor-microservice/src/main.rs new file mode 100644 index 0000000..e086826 --- /dev/null +++ b/examples/actor-microservice/src/main.rs @@ -0,0 +1,85 @@ +use anyhow::Context; +use posthog_rs::sdk::{ + models::event::EventBuilder, + service::{PostHogServiceMessage, PostHogServiceSender}, + PostHogSDKClient, PostHogServiceActor, +}; +use serde_json::{json, Value}; +use std::time::Duration; +use tokio::sync::mpsc; +use tracing::{info, level_filters::LevelFilter}; +use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; + +struct SampleActor { + posthog: PostHogServiceSender, +} + +impl SampleActor { + async fn start(mut rx: mpsc::Receiver, posthog: PostHogServiceSender) { + let mut s = Self { posthog }; + + while let Some(msg) = rx.recv().await { + if let Err(e) = s.process_message(msg).await { + eprintln!("Error processing event: {e:?}"); + } + } + } + + async fn process_message(&mut self, msg: Value) -> anyhow::Result<()> { + info!("Received event: {msg:?}"); + self.posthog + .send(PostHogServiceMessage::Capture( + EventBuilder::new("events.microservice") + .distinct_id("distinct-id".to_string()) + .timestamp_now() + .properties(json!({"message": msg})) + .build(), + )) + .await + .context("Failed to send posthog event")?; + + Ok(()) + } +} + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + dotenvy::dotenv().context("Didn't find .env file")?; + + tracing_subscriber::registry() + .with( + tracing_subscriber::EnvFilter::builder() + .with_default_directive(LevelFilter::DEBUG.into()) + .from_env_lossy() + .add_directive( + format!("{}=trace", env!("CARGO_CRATE_NAME")) + .parse() + .unwrap(), + ), + ) + .with(tracing_subscriber::fmt::layer()) + .init(); + + // Posthog setup + let posthog_public_key = std::env::var("POSTHOG_PUBLIC_KEY").unwrap(); + let posthog_base_url = std::env::var("POSTHOG_BASE_URL").unwrap(); + let actor = PostHogServiceActor::new( + PostHogSDKClient::new(posthog_public_key, posthog_base_url) + .context("Failed to create PostHog client")?, + ); + + let sender = actor.start().await; + + // Create Queue + let (tx, rx) = mpsc::channel(100); + tokio::spawn(async move { + for i in 0..100 { + tokio::time::sleep(Duration::from_millis(100)).await; + tx.send(json!(i)).await.unwrap(); + } + }); + + // Create actor + SampleActor::start(rx, sender).await; + Ok(()) +} diff --git a/examples/axum-server/Cargo.toml b/examples/axum-server/Cargo.toml new file mode 100644 index 0000000..3d4474c --- /dev/null +++ b/examples/axum-server/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "axum-server" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.0.96" +axum = "0.8.1" +dotenvy = "0.15.7" +posthog-rs = { path = "../../posthog-rs" } +serde = { version = "1.0.218", features = ["derive"] } +serde_json = "1.0.139" +tokio = { version = "1.43.0", features = ["full"] } +tracing = "0.1.41" +tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } diff --git a/examples/axum-server/Readme.md b/examples/axum-server/Readme.md new file mode 100644 index 0000000..aff8875 --- /dev/null +++ b/examples/axum-server/Readme.md @@ -0,0 +1,70 @@ +# PostHog Axum Web Server Example + +This example demonstrates how to integrate PostHog event tracking into an Axum web server. It showcases: +- Setting up PostHog with an Axum web server +- Using PostHog's service actor pattern in a web server context +- Handling PostHog event capture in HTTP request handlers +- Proper error handling and logging in a web service + +## Setup + +1. Create a `.env` file in this directory with the following variables: +```env +POSTHOG_PUBLIC_KEY=your_project_api_key +POSTHOG_BASE_URL=your_posthog_instance_url +``` + +2. Build and run the example: +```bash +cargo run +``` + +3. Test the server: +```bash +curl http://localhost:3000 +``` + +## How it Works + +The example creates a simple Axum web server that: + +1. Initializes a PostHog service actor at startup +2. Creates a single HTTP endpoint (`GET /`) that demonstrates event capture +3. Uses Axum's state management to share the PostHog sender across request handlers +4. Captures a PostHog event with custom properties for each request + +### Code Structure + +- The main server setup is in `main()`: + - Sets up logging with tracing + - Initializes the PostHog service actor + - Configures the Axum router and starts the server + +- The request handler in `handler()`: + - Creates a test event with: + - Event name: "event_name" + - Distinct ID: "my_custom_user_id" + - Custom properties: `{"key": "value"}` + - Sends the event to PostHog + - Returns appropriate HTTP responses + +## Customization + +You can modify the event capture in `handler()` to: +- Use different event names +- Add more properties +- Include user-specific distinct IDs +- Add custom timestamps +- Include any other event data supported by PostHog + +## Production Considerations + +When using this pattern in production: +1. Consider adding middleware for error handling +2. Implement proper request validation +3. Add health check endpoints +4. Configure proper shutdown handling +5. Add metrics and monitoring +6. Consider using environment-specific configuration + +For more information on PostHog event capture, see the [PostHog documentation](https://posthog.com/docs/libraries/rust). diff --git a/examples/axum-server/src/main.rs b/examples/axum-server/src/main.rs new file mode 100644 index 0000000..5e7c1df --- /dev/null +++ b/examples/axum-server/src/main.rs @@ -0,0 +1,76 @@ +use anyhow::Context; +use axum::{ + extract::State, + http::StatusCode, + response::{IntoResponse, Response}, + routing::get, + Router, +}; +use posthog_rs::sdk::{ + models::event::EventBuilder, service::PostHogServiceMessage, PostHogSDKClient, + PostHogServiceActor, +}; +use serde_json::json; +use tokio::sync::mpsc::Sender; +use tracing::level_filters::LevelFilter; +use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + tracing_subscriber::registry() + .with( + tracing_subscriber::EnvFilter::builder() + .with_default_directive(LevelFilter::DEBUG.into()) + .from_env_lossy() + .add_directive(format!("{}=trace", env!("CARGO_CRATE_NAME")).parse().unwrap()), + ) + .with(tracing_subscriber::fmt::layer()) + .init(); + + dotenvy::dotenv().context("Didn't find .env file")?; + + // Posthog setup + let posthog_public_key = std::env::var("POSTHOG_PUBLIC_KEY").unwrap(); + let posthog_base_url = std::env::var("POSTHOG_BASE_URL").unwrap(); + let actor = PostHogServiceActor::new( + PostHogSDKClient::new(posthog_public_key, posthog_base_url) + .context("Failed to create PostHog client")?, + ); + + let sender = actor.start().await; + + // Axum setup + let app = Router::new().route("/", get(handler)).with_state(sender); + + let listener = tokio::net::TcpListener::bind("127.0.0.1:3000") + .await + .unwrap(); + + println!("listening on {}", listener.local_addr().unwrap()); + axum::serve(listener, app).await.unwrap(); + + Ok(()) +} + +async fn handler(State(sender): State>) -> impl IntoResponse { + let value = EventBuilder::new("event_name") + .distinct_id("my_custom_user_id".to_string()) + .timestamp_now() + .properties(json!({ "key": "value" })) // Must be called last + .build(); + + match sender + .send(PostHogServiceMessage::Capture(value)) + .await + .context("Failed to send event") + { + Ok(_) => Response::builder() + .status(StatusCode::OK) + .body(format!("Event Captured")) + .unwrap(), + Err(e) => Response::builder() + .status(StatusCode::INTERNAL_SERVER_ERROR) + .body(format!("Failed to send event: {}", e)) + .unwrap(), + } +} diff --git a/examples/query/.gitignore b/examples/query/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/examples/query/.gitignore @@ -0,0 +1 @@ +/target diff --git a/examples/query/Cargo.toml b/examples/query/Cargo.toml new file mode 100644 index 0000000..623af94 --- /dev/null +++ b/examples/query/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "query" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.0.96" +dotenvy = "0.15.7" +posthog-rs = { path = "../../posthog-rs" } +serde_json = "1.0.139" +tokio = { version = "1.43.0", features = ["full"] } +tracing = "0.1.41" +tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } diff --git a/examples/query/Readme.md b/examples/query/Readme.md new file mode 100644 index 0000000..3c281f1 --- /dev/null +++ b/examples/query/Readme.md @@ -0,0 +1,51 @@ +# PostHog Query API Example + +This example demonstrates how to use the PostHog Query API to fetch data from your PostHog instance. It showcases: +- Setting up a PostHog API client +- Executing HogQL queries +- Handling both synchronous and asynchronous query responses +- Checking query status for async queries +- Error handling and logging + +## Setup + +1. Create a `.env` file in this directory with the following variables: +```env +POSTHOG_API_KEY=your_api_key +POSTHOG_API_URL=your_posthog_api_url +POSTHOG_PROJECT_ID=your_project_id +``` + +2. Build and run the example: +```bash +cargo run +``` + +## How it Works + +The example: +1. Creates a PostHog API client +2. Executes a simple HogQL query to fetch distinct IDs from person_distinct_ids +3. Handles the query response: + - For synchronous queries: displays the results immediately + - For asynchronous queries: checks the query status using the task ID + +You can modify the query in `main.rs` to execute any valid HogQL query supported by your PostHog instance: + +```rust +let request = QueryRequest::default().with_query(json!({ + "kind": "HogQLQuery", + "query": "select `distinct_id` from person_distinct_ids" +})); +``` + +## Query Types + +The example uses a simple HogQL query, but the Query API supports various query types: +- HogQL queries +- Event queries +- Funnel queries +- Retention queries +- Trends queries + +Refer to the [PostHog Query API documentation](https://posthog.com/docs/api/query) for more details on available query types and their parameters. diff --git a/examples/query/src/main.rs b/examples/query/src/main.rs new file mode 100644 index 0000000..e033e90 --- /dev/null +++ b/examples/query/src/main.rs @@ -0,0 +1,63 @@ +use anyhow::Context; +use posthog_rs::api::{client::PostHogAPIClient, query::QueryRequest}; +use serde_json::json; +use tracing::{info, level_filters::LevelFilter}; +use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + // Load environment variables + dotenvy::dotenv().context("Failed to load .env file")?; + + // Initialize tracing + tracing_subscriber::registry() + .with( + tracing_subscriber::EnvFilter::builder() + .with_default_directive(LevelFilter::DEBUG.into()) + .from_env_lossy() + .add_directive( + format!("{}=trace", env!("CARGO_CRATE_NAME")) + .parse() + .unwrap(), + ), + ) + .with(tracing_subscriber::fmt::layer()) + .init(); + + // Get environment variables + let api_key = std::env::var("POSTHOG_API_KEY").context("POSTHOG_API_KEY not set")?; + let base_url = std::env::var("POSTHOG_API_URL").context("POSTHOG_API_URL not set")?; + let project_id = std::env::var("POSTHOG_PROJECT_ID").context("POSTHOG_PROJECT_ID not set")?; + + // Initialize PostHog client + let client = PostHogAPIClient::new(api_key, base_url).context("Failed to create PostHog client")?; + + // Create a query request + let request = QueryRequest::default().with_query(json!({ + "kind": "HogQLQuery", + "query": "select `distinct_id` from person_distinct_ids" + })); + + // Execute the query + info!("Executing query..."); + let response = client + .query(&project_id, request) + .await + .context("Failed to execute query")?; + + // Print the results + info!("Query results: {:#?}", response); + + // If the query is asynchronous and has a task_id, we can check its status + if let Some(task_id) = response.task_id { + info!("Query is asynchronous. Checking status..."); + let status = client + .get_query_status(&project_id, &task_id) + .await + .context("Failed to get query status")?; + + info!("Query status: {:#?}", status); + } + + Ok(()) +} diff --git a/posthog-rs/Cargo.toml b/posthog-rs/Cargo.toml new file mode 100644 index 0000000..3530ab4 --- /dev/null +++ b/posthog-rs/Cargo.toml @@ -0,0 +1,39 @@ +[package] +name = "posthog-rs" +license = "MIT" +version = "0.2.6" +authors = ["christos "] +description = "An unofficial Rust client for Posthog (https://posthog.com/)." +repository = "https://github.com/openquery-io/posthog-rs" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +tokio = { version = "1", features = ["macros"] } +reqwest = { version = "0.12", features = ["rustls-tls", "json", "zstd"] } +serde = { version = "1", features = ["derive"] } +chrono = {version = "0.4", features = ["serde"] } +serde_json = "1" +semver = "1.0.24" +thiserror = "2" +async-trait = "0.1.86" +anyhow = "1" +tracing = "0.1.41" +tracing-subscriber = "0.3.19" +base64 = "0.22.1" +progenitor = "0.9.1" +async-compression = { version = "0.4.18", features = ["tokio", "gzip"] } + +[dev-dependencies] +mockito = "1.6.1" +dotenvy = "0.15.0" + +[features] +default = ["sdk", "service", "api"] + +service = [] +sdk = [] +api = [] + +e2e-test = [] diff --git a/posthog-rs/schema.yaml b/posthog-rs/schema.yaml new file mode 100644 index 0000000..7f54cce --- /dev/null +++ b/posthog-rs/schema.yaml @@ -0,0 +1,35787 @@ +openapi: 3.0.3 +info: + title: PostHog API + version: 'v1' + description: 'PostHog API' +paths: + /api/environments/{project_id}/app_metrics/{id}/: + get: + operationId: environments_app_metrics_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this plugin config. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - plugin:read + responses: + '200': + description: No response body + /api/environments/{project_id}/app_metrics/{id}/error_details/: + get: + operationId: environments_app_metrics_error_details_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this plugin config. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/app_metrics/{plugin_config_id}/historical_exports/: + get: + operationId: environments_app_metrics_historical_exports_retrieve + parameters: + - in: path + name: plugin_config_id + schema: + type: string + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - plugin:read + responses: + '200': + description: No response body + /api/environments/{project_id}/app_metrics/{plugin_config_id}/historical_exports/{id}/: + get: + operationId: environments_app_metrics_historical_exports_retrieve_2 + parameters: + - in: path + name: id + schema: + type: string + required: true + - in: path + name: plugin_config_id + schema: + type: string + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - plugin:read + responses: + '200': + description: No response body + /api/environments/{project_id}/batch_exports/: + get: + operationId: environments_batch_exports_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBatchExportList' + description: '' + post: + operationId: environments_batch_exports_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + description: '' + /api/environments/{project_id}/batch_exports/{batch_export_id}/backfills/: + get: + operationId: environments_batch_exports_backfills_list + description: |- + ViewSet for BatchExportBackfill models. + + Allows creating and reading backfills, but not updating or deleting them. + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this backfill belongs to. + required: true + - name: cursor + required: false + in: query + description: The pagination cursor value. + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBatchExportBackfillList' + description: '' + post: + operationId: environments_batch_exports_backfills_create + description: Create a new backfill for a BatchExport. + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this backfill belongs to. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportBackfill' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportBackfill' + description: '' + /api/environments/{project_id}/batch_exports/{batch_export_id}/backfills/{id}/: + get: + operationId: environments_batch_exports_backfills_retrieve + description: |- + ViewSet for BatchExportBackfill models. + + Allows creating and reading backfills, but not updating or deleting them. + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this backfill belongs to. + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export backfill. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportBackfill' + description: '' + /api/environments/{project_id}/batch_exports/{batch_export_id}/backfills/{id}/cancel/: + post: + operationId: environments_batch_exports_backfills_cancel_create + description: Cancel a batch export backfill. + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this backfill belongs to. + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export backfill. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportBackfill' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/environments/{project_id}/batch_exports/{batch_export_id}/runs/: + get: + operationId: environments_batch_exports_runs_list + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this run belongs to. + required: true + - name: cursor + required: false + in: query + description: The pagination cursor value. + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBatchExportRunList' + description: '' + /api/environments/{project_id}/batch_exports/{batch_export_id}/runs/{id}/: + get: + operationId: environments_batch_exports_runs_retrieve + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this run belongs to. + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export run. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportRun' + description: '' + /api/environments/{project_id}/batch_exports/{batch_export_id}/runs/{id}/cancel/: + post: + operationId: environments_batch_exports_runs_cancel_create + description: Cancel a batch export run. + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this run belongs to. + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export run. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportRun' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/environments/{project_id}/batch_exports/{batch_export_id}/runs/{id}/logs/: + get: + operationId: environments_batch_exports_runs_logs_retrieve + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this run belongs to. + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export run. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/batch_exports/{batch_export_id}/runs/{id}/retry/: + post: + operationId: environments_batch_exports_runs_retry_create + description: |- + Retry a batch export run. + + We use the same underlying mechanism as when backfilling a batch export, as retrying + a run is the same as backfilling one run. + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this run belongs to. + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export run. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportRun' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/environments/{project_id}/batch_exports/{id}/: + get: + operationId: environments_batch_exports_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + description: '' + put: + operationId: environments_batch_exports_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + description: '' + patch: + operationId: environments_batch_exports_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedBatchExport' + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + description: '' + delete: + operationId: environments_batch_exports_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '204': + description: No response body + /api/environments/{project_id}/batch_exports/{id}/backfill/: + post: + operationId: environments_batch_exports_backfill_create + description: |- + Trigger a backfill for a BatchExport. + + Note: This endpoint is deprecated. Please use POST /batch_exports//backfills/ instead. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/environments/{project_id}/batch_exports/{id}/logs/: + get: + operationId: environments_batch_exports_logs_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/batch_exports/{id}/pause/: + post: + operationId: environments_batch_exports_pause_create + description: Pause a BatchExport. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/environments/{project_id}/batch_exports/{id}/unpause/: + post: + operationId: environments_batch_exports_unpause_create + description: Unpause a BatchExport. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/environments/{project_id}/dashboards/: + get: + operationId: environments_dashboards_list + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - dashboard:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedDashboardBasicList' + description: '' + post: + operationId: environments_dashboards_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + security: + - PersonalAPIKeyAuth: + - dashboard:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: '' + /api/environments/{project_id}/dashboards/{dashboard_id}/collaborators/: + get: + operationId: environments_dashboards_collaborators_list + parameters: + - in: path + name: dashboard_id + schema: + type: integer + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - dashboard:read + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DashboardCollaborator' + description: '' + post: + operationId: environments_dashboards_collaborators_create + parameters: + - in: path + name: dashboard_id + schema: + type: integer + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardCollaborator' + required: true + security: + - PersonalAPIKeyAuth: + - dashboard:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardCollaborator' + description: '' + /api/environments/{project_id}/dashboards/{dashboard_id}/collaborators/{user__uuid}/: + delete: + operationId: environments_dashboards_collaborators_destroy + parameters: + - in: path + name: dashboard_id + schema: + type: integer + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: user__uuid + schema: + type: string + format: uuid + required: true + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - dashboard:write + responses: + '204': + description: No response body + /api/environments/{project_id}/dashboards/{dashboard_id}/sharing/: + get: + operationId: environments_dashboards_sharing_list + parameters: + - in: path + name: dashboard_id + schema: + type: integer + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - sharing_configuration:read + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SharingConfiguration' + description: '' + /api/environments/{project_id}/dashboards/{id}/: + get: + operationId: environments_dashboards_retrieve + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this dashboard. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - dashboard:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: '' + put: + operationId: environments_dashboards_update + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this dashboard. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + security: + - PersonalAPIKeyAuth: + - dashboard:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: '' + patch: + operationId: environments_dashboards_partial_update + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this dashboard. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedDashboard' + security: + - PersonalAPIKeyAuth: + - dashboard:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: '' + delete: + operationId: environments_dashboards_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this dashboard. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - dashboard:write + responses: + '405': + description: No response body + /api/environments/{project_id}/dashboards/{id}/move_tile/: + patch: + operationId: environments_dashboards_move_tile_partial_update + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this dashboard. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedDashboard' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/dashboards/create_from_template_json/: + post: + operationId: environments_dashboards_create_from_template_json_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/events/: + get: + operationId: environments_events_list + description: "\n This endpoint allows you to list and filter events.\n\ + \ It is effectively deprecated and is kept only for backwards compatibility.\n\ + \ If you ever ask about it you will be advised to not use it...\n \ + \ If you want to ad-hoc list or aggregate events, use the Query endpoint\ + \ instead.\n If you want to export all events or many pages of events\ + \ you should use our CDP/Batch Exports products instead.\n " + parameters: + - in: query + name: after + schema: + type: string + format: date-time + description: Only return events with a timestamp after this time. + - in: query + name: before + schema: + type: string + format: date-time + description: Only return events with a timestamp before this time. + - in: query + name: distinct_id + schema: + type: integer + description: Filter list by distinct id. + - in: query + name: event + schema: + type: string + description: Filter list by event. For example `user sign up` or `$pageview`. + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: query + name: limit + schema: + type: integer + description: The maximum number of results to return + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: query + name: person_id + schema: + type: integer + description: Filter list by person id. + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: properties + schema: + type: array + items: + $ref: '#/components/schemas/Property' + description: Filter events by event property, person property, cohort, groups + and more. + - in: query + name: select + schema: + type: array + items: + type: string + description: (Experimental) JSON-serialized array of HogQL expressions to + return + - in: query + name: where + schema: + type: array + items: + type: string + description: (Experimental) JSON-serialized array of HogQL expressions that + must pass + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedClickhouseEventList' + text/csv: + schema: + $ref: '#/components/schemas/PaginatedClickhouseEventList' + description: '' + /api/environments/{project_id}/events/{id}/: + get: + operationId: environments_events_retrieve + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: string + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ClickhouseEvent' + text/csv: + schema: + $ref: '#/components/schemas/ClickhouseEvent' + description: '' + /api/environments/{project_id}/events/values/: + get: + operationId: environments_events_values_retrieve + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '200': + description: No response body + /api/environments/{project_id}/explicit_members/: + get: + operationId: environments_explicit_members_list + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ExplicitTeamMember' + description: '' + post: + operationId: environments_explicit_members_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExplicitTeamMember' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ExplicitTeamMember' + description: '' + /api/environments/{project_id}/explicit_members/{parent_membership__user__uuid}/: + get: + operationId: environments_explicit_members_retrieve + parameters: + - in: path + name: parent_membership__user__uuid + schema: + type: string + format: uuid + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExplicitTeamMember' + description: '' + put: + operationId: environments_explicit_members_update + parameters: + - in: path + name: parent_membership__user__uuid + schema: + type: string + format: uuid + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExplicitTeamMember' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExplicitTeamMember' + description: '' + patch: + operationId: environments_explicit_members_partial_update + parameters: + - in: path + name: parent_membership__user__uuid + schema: + type: string + format: uuid + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedExplicitTeamMember' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExplicitTeamMember' + description: '' + delete: + operationId: environments_explicit_members_destroy + parameters: + - in: path + name: parent_membership__user__uuid + schema: + type: string + format: uuid + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + responses: + '204': + description: No response body + /api/environments/{project_id}/exports/: + get: + operationId: environments_exports_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedExportedAssetList' + description: '' + post: + operationId: environments_exports_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedAsset' + required: true + security: + - PersonalAPIKeyAuth: + - export:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedAsset' + description: '' + /api/environments/{project_id}/exports/{id}/: + get: + operationId: environments_exports_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this exported asset. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedAsset' + description: '' + /api/environments/{project_id}/exports/{id}/content/: + get: + operationId: environments_exports_content_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this exported asset. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - export:read + responses: + '200': + description: No response body + /api/environments/{project_id}/groups/: + get: + operationId: environments_groups_list + description: List all groups of a specific group type. You must pass ?group_type_index= + in the URL. To get a list of valid group types, call /api/:project_id/groups_types/ + parameters: + - name: cursor + required: false + in: query + description: The pagination cursor value. + schema: + type: string + - in: query + name: group_type_index + schema: + type: integer + description: Specify the group type to list + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: search + schema: + type: string + description: Search the group name + required: true + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - group:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGroupList' + description: '' + /api/environments/{project_id}/groups/find/: + get: + operationId: environments_groups_find_retrieve + parameters: + - in: query + name: group_key + schema: + type: string + description: Specify the key of the group to find + required: true + - in: query + name: group_type_index + schema: + type: integer + description: Specify the group type to find + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/groups/property_definitions/: + get: + operationId: environments_groups_property_definitions_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/groups/property_values/: + get: + operationId: environments_groups_property_values_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/groups/related/: + get: + operationId: environments_groups_related_retrieve + parameters: + - in: query + name: group_type_index + schema: + type: integer + description: Specify the group type to find + required: true + - in: query + name: id + schema: + type: string + description: Specify the id of the user to find groups for + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/insights/: + get: + operationId: environments_insights_list + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: created_by + schema: + type: integer + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: refresh + schema: + type: string + enum: + - async + - async_except_on_cache_miss + - blocking + - force_async + - force_blocking + - force_cache + - lazy_async + default: force_cache + description: |2- + + Whether to refresh the retrieved insights, how aggresively, and if sync or async: + - `'force_cache'` - return cached data or a cache miss; always completes immediately as it never calculates + - `'blocking'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache + - `'async'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache + - `'lazy_async'` - kick off background calculation, UNLESS there are somewhat fresh results in the cache + - `'force_blocking'` - calculate synchronously, even if fresh results are already cached + - `'force_async'` - kick off background calculation, even if fresh results are already cached + Background calculation can be tracked using the `query_status` response field. + - in: query + name: short_id + schema: + type: string + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedInsightList' + text/csv: + schema: + $ref: '#/components/schemas/PaginatedInsightList' + description: '' + post: + operationId: environments_insights_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: + - insight:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + text/csv: + schema: + $ref: '#/components/schemas/Insight' + description: '' + /api/environments/{project_id}/insights/{insight_id}/sharing/: + get: + operationId: environments_insights_sharing_list + parameters: + - in: path + name: insight_id + schema: + type: integer + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - sharing_configuration:read + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SharingConfiguration' + description: '' + /api/environments/{project_id}/insights/{id}/: + get: + operationId: environments_insights_retrieve + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: query + name: from_dashboard + schema: + type: integer + description: |2- + + Only if loading an insight in the context of a dashboard: The relevant dashboard's ID. + When set, the specified dashboard's filters and date range override will be applied. + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this insight. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: refresh + schema: + type: string + enum: + - async + - async_except_on_cache_miss + - blocking + - force_async + - force_blocking + - force_cache + - lazy_async + default: force_cache + description: |2- + + Whether to refresh the insight, how aggresively, and if sync or async: + - `'force_cache'` - return cached data or a cache miss; always completes immediately as it never calculates + - `'blocking'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache + - `'async'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache + - `'lazy_async'` - kick off background calculation, UNLESS there are somewhat fresh results in the cache + - `'force_blocking'` - calculate synchronously, even if fresh results are already cached + - `'force_async'` - kick off background calculation, even if fresh results are already cached + Background calculation can be tracked using the `query_status` response field. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + text/csv: + schema: + $ref: '#/components/schemas/Insight' + description: '' + put: + operationId: environments_insights_update + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this insight. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: + - insight:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + text/csv: + schema: + $ref: '#/components/schemas/Insight' + description: '' + patch: + operationId: environments_insights_partial_update + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this insight. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedInsight' + security: + - PersonalAPIKeyAuth: + - insight:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + text/csv: + schema: + $ref: '#/components/schemas/Insight' + description: '' + delete: + operationId: environments_insights_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this insight. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - insight:write + responses: + '405': + description: No response body + /api/environments/{project_id}/insights/{id}/activity/: + get: + operationId: environments_insights_activity_retrieve_2 + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this insight. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/environments/{project_id}/insights/{id}/viewed/: + post: + operationId: environments_insights_viewed_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this insight. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + description: No response body + /api/environments/{project_id}/insights/activity/: + get: + operationId: environments_insights_activity_retrieve + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/environments/{project_id}/insights/cancel/: + post: + operationId: environments_insights_cancel_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/insights/funnel/: + get: + operationId: environments_insights_funnel_retrieve + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + description: No response body + post: + operationId: environments_insights_funnel_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + description: No response body + /api/environments/{project_id}/insights/funnel/correlation/: + get: + operationId: environments_insights_funnel_correlation_retrieve + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + post: + operationId: environments_insights_funnel_correlation_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/insights/my_last_viewed/: + get: + operationId: environments_insights_my_last_viewed_retrieve + description: Returns basic details about the last 5 insights viewed by this + user. Most recently viewed first. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/insights/timing/: + post: + operationId: environments_insights_timing_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/insights/trend/: + get: + operationId: environments_insights_trend_retrieve + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + description: No response body + post: + operationId: environments_insights_trend_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/: + get: + operationId: environments_persons_list + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: distinct_id + schema: + type: string + description: Filter list by distinct id. + - in: query + name: email + schema: + type: string + description: Filter persons by email (exact match) + examples: + Email: + value: test@test.com + summary: email + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: properties + schema: + type: array + items: + $ref: '#/components/schemas/Property' + description: Filter Persons by person properties. + - in: query + name: search + schema: + type: string + description: Search persons, either by email (full text search) or distinct_id + (exact match). + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - person:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPersonList' + text/csv: + schema: + $ref: '#/components/schemas/PaginatedPersonList' + description: '' + /api/environments/{project_id}/persons/{id}/: + get: + operationId: environments_persons_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - person:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + text/csv: + schema: + $ref: '#/components/schemas/Person' + description: '' + put: + operationId: environments_persons_update + description: |- + Only for setting properties on the person. "properties" from the request data will be updated via a "$set" event. + This means that only the properties listed will be updated, but other properties won't be removed nor updated. + If you would like to remove a property use the `delete_property` endpoint. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + text/csv: + schema: + $ref: '#/components/schemas/Person' + description: '' + patch: + operationId: environments_persons_partial_update + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedPerson' + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + text/csv: + schema: + $ref: '#/components/schemas/Person' + description: '' + delete: + operationId: environments_persons_destroy + description: Use this endpoint to delete individual persons. For bulk deletion, + use the bulk_delete endpoint instead. + parameters: + - in: query + name: delete_events + schema: + type: boolean + default: false + description: If true, a task to delete all events associated with this person + will be created and queued. The task does not run immediately and instead + is batched together and at 5AM UTC every Sunday + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '204': + description: No response body + /api/environments/{project_id}/persons/{id}/activity/: + get: + operationId: environments_persons_activity_retrieve_2 + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/{id}/delete_property/: + post: + operationId: environments_persons_delete_property_create + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: $unset + schema: + type: string + description: Specify the property key to delete + required: true + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/{id}/properties_timeline/: + get: + operationId: environments_persons_properties_timeline_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/{id}/split/: + post: + operationId: environments_persons_split_create + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/{id}/update_property/: + post: + operationId: environments_persons_update_property_create + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: query + name: key + schema: + type: string + description: Specify the property key + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: value + schema: {} + description: Specify the property value + required: true + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/activity/: + get: + operationId: environments_persons_activity_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/bulk_delete/: + post: + operationId: environments_persons_bulk_delete_create + description: This endpoint allows you to bulk delete persons, either by the + PostHog person IDs or by distinct IDs. You can pass in a maximum of 1000 IDs + per call. + parameters: + - in: query + name: delete_events + schema: + type: boolean + default: false + description: If true, a task to delete all events associated with this person + will be created and queued. The task does not run immediately and instead + is batched together and at 5AM UTC every Sunday + - in: query + name: distinct_ids + schema: + type: object + additionalProperties: {} + description: A list of distinct IDs, up to 100 of them. We'll delete all persons + associated with those distinct IDs. + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: query + name: ids + schema: + type: object + additionalProperties: {} + description: A list of PostHog person IDs, up to 100 of them. We'll delete + all the persons listed. + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/cohorts/: + get: + operationId: environments_persons_cohorts_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - person:read + - cohort:read + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/funnel/: + get: + operationId: environments_persons_funnel_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + post: + operationId: environments_persons_funnel_create + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/funnel/correlation/: + get: + operationId: environments_persons_funnel_correlation_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + post: + operationId: environments_persons_funnel_correlation_create + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/lifecycle/: + get: + operationId: environments_persons_lifecycle_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/stickiness/: + get: + operationId: environments_persons_stickiness_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/trends/: + get: + operationId: environments_persons_trends_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/persons/values/: + get: + operationId: environments_persons_values_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - person:read + responses: + '200': + description: No response body + /api/environments/{project_id}/plugin_configs/{plugin_config_id}/logs/: + get: + operationId: environments_plugin_configs_logs_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: plugin_config_id + schema: + type: string + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - plugin:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPluginLogEntryList' + description: '' + /api/environments/{project_id}/query/: + post: + operationId: environments_query_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueryRequest' + required: true + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponseAlternative' + description: '' + /api/environments/{project_id}/query/{id}/: + get: + operationId: environments_query_retrieve + description: (Experimental) + parameters: + - in: path + name: id + schema: + type: string + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/QueryStatusResponse' + description: '' + delete: + operationId: environments_query_destroy + description: (Experimental) + parameters: + - in: path + name: id + schema: + type: string + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '204': + description: Query cancelled + /api/environments/{project_id}/query/check_auth_for_async/: + post: + operationId: environments_query_check_auth_for_async_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/query/draft_sql/: + get: + operationId: environments_query_draft_sql_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/session_recordings/: + get: + operationId: environments_session_recordings_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - session_recording:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSessionRecordingList' + description: '' + /api/environments/{project_id}/session_recordings/{id}/: + get: + operationId: environments_session_recordings_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this session recording. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - session_recording:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecording' + description: '' + put: + operationId: environments_session_recordings_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this session recording. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecording' + security: + - PersonalAPIKeyAuth: + - session_recording:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecording' + description: '' + patch: + operationId: environments_session_recordings_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this session recording. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedSessionRecording' + security: + - PersonalAPIKeyAuth: + - session_recording:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecording' + description: '' + delete: + operationId: environments_session_recordings_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this session recording. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - session_recording:write + responses: + '204': + description: No response body + /api/environments/{project_id}/session_recordings/{recording_id}/sharing/: + get: + operationId: environments_session_recordings_sharing_list + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: recording_id + schema: + type: string + required: true + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - sharing_configuration:read + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SharingConfiguration' + description: '' + /api/environments/{project_id}/session_recordings/ai/filters/: + post: + operationId: environments_session_recordings_ai_filters_create + description: Generate session recording filters using AI. This is in development + and likely to change, you should not depend on this API. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecording' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/session_recordings/ai/regex/: + post: + operationId: environments_session_recordings_ai_regex_create + description: Generate regex patterns using AI. This is in development and likely + to change, you should not depend on this API. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecording' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/sessions/property_definitions/: + get: + operationId: environments_sessions_property_definitions_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/sessions/values/: + get: + operationId: environments_sessions_values_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/environments/{project_id}/subscriptions/: + get: + operationId: environments_subscriptions_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - subscription:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSubscriptionList' + description: '' + post: + operationId: environments_subscriptions_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Subscription' + required: true + security: + - PersonalAPIKeyAuth: + - subscription:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Subscription' + description: '' + /api/environments/{project_id}/subscriptions/{id}/: + get: + operationId: environments_subscriptions_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this subscription. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - subscription:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Subscription' + description: '' + put: + operationId: environments_subscriptions_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this subscription. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Subscription' + required: true + security: + - PersonalAPIKeyAuth: + - subscription:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Subscription' + description: '' + patch: + operationId: environments_subscriptions_partial_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this subscription. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedSubscription' + security: + - PersonalAPIKeyAuth: + - subscription:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Subscription' + description: '' + delete: + operationId: environments_subscriptions_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this subscription. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - subscription:write + responses: + '405': + description: No response body + /api/environments/{project_id}/web_vitals/: + get: + operationId: environments_web_vitals_retrieve + parameters: + - in: query + name: pathname + schema: + type: string + description: Filter web vitals by pathname + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + - environments + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '200': + description: No response body + /api/organizations/: + get: + operationId: list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + tags: + - organizations + - organizations + security: + - PersonalAPIKeyAuth: + - organization:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedOrganizationList' + description: '' + post: + operationId: create + tags: + - organizations + - organizations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + required: true + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: '' + /api/organizations/{id}/: + get: + operationId: retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this organization. + required: true + tags: + - organizations + - organizations + security: + - PersonalAPIKeyAuth: + - organization:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: '' + put: + operationId: update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this organization. + required: true + tags: + - organizations + - organizations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + required: true + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: '' + patch: + operationId: partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this organization. + required: true + tags: + - organizations + - organizations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedOrganization' + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: '' + delete: + operationId: destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this organization. + required: true + tags: + - organizations + - organizations + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '204': + description: No response body + /api/organizations/{organization_id}/batch_exports/: + get: + operationId: batch_exports_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - batch_exports + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBatchExportList' + description: '' + post: + operationId: batch_exports_create + parameters: + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + description: '' + /api/organizations/{organization_id}/batch_exports/{id}/: + get: + operationId: batch_exports_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - batch_exports + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + description: '' + put: + operationId: batch_exports_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + description: '' + patch: + operationId: batch_exports_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedBatchExport' + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + description: '' + delete: + operationId: batch_exports_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - batch_exports + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '204': + description: No response body + /api/organizations/{organization_id}/batch_exports/{id}/backfill/: + post: + operationId: batch_exports_backfill_create + description: |- + Trigger a backfill for a BatchExport. + + Note: This endpoint is deprecated. Please use POST /batch_exports//backfills/ instead. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/organizations/{organization_id}/batch_exports/{id}/logs/: + get: + operationId: batch_exports_logs_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - batch_exports + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/organizations/{organization_id}/batch_exports/{id}/pause/: + post: + operationId: batch_exports_pause_create + description: Pause a BatchExport. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/organizations/{organization_id}/batch_exports/{id}/unpause/: + post: + operationId: batch_exports_unpause_create + description: Unpause a BatchExport. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/organizations/{organization_id}/domains/: + get: + operationId: domains_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - domains + security: + - PersonalAPIKeyAuth: + - organization:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedOrganizationDomainList' + description: '' + post: + operationId: domains_create + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - domains + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationDomain' + required: true + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationDomain' + description: '' + /api/organizations/{organization_id}/domains/{id}/: + get: + operationId: domains_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this domain. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - domains + security: + - PersonalAPIKeyAuth: + - organization:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationDomain' + description: '' + put: + operationId: domains_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this domain. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - domains + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationDomain' + required: true + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationDomain' + description: '' + patch: + operationId: domains_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this domain. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - domains + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedOrganizationDomain' + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationDomain' + description: '' + delete: + operationId: domains_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this domain. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - domains + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '204': + description: No response body + /api/organizations/{organization_id}/domains/{id}/verify/: + post: + operationId: domains_verify_create + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this domain. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - domains + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationDomain' + required: true + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/organizations/{organization_id}/invites/: + get: + operationId: invites_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - invites + security: + - PersonalAPIKeyAuth: + - organization_member:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedOrganizationInviteList' + description: '' + post: + operationId: invites_create + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - invites + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationInvite' + required: true + security: + - PersonalAPIKeyAuth: + - organization_member:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationInvite' + description: '' + /api/organizations/{organization_id}/invites/{id}/: + delete: + operationId: invites_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this organization invite. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - invites + security: + - PersonalAPIKeyAuth: + - organization_member:write + responses: + '204': + description: No response body + /api/organizations/{organization_id}/invites/bulk/: + post: + operationId: invites_bulk_create + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - invites + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationInvite' + required: true + security: + - PersonalAPIKeyAuth: + - organization_member:write + responses: + '200': + description: No response body + /api/organizations/{organization_id}/members/: + get: + operationId: members_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - members + security: + - PersonalAPIKeyAuth: + - organization_member:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedOrganizationMemberList' + description: '' + /api/organizations/{organization_id}/members/{user__uuid}/: + put: + operationId: members_update + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + - in: path + name: user__uuid + schema: + type: string + format: uuid + required: true + tags: + - organizations + - members + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationMember' + security: + - PersonalAPIKeyAuth: + - organization_member:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationMember' + description: '' + patch: + operationId: members_partial_update + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + - in: path + name: user__uuid + schema: + type: string + format: uuid + required: true + tags: + - organizations + - members + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedOrganizationMember' + security: + - PersonalAPIKeyAuth: + - organization_member:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationMember' + description: '' + delete: + operationId: members_destroy + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + - in: path + name: user__uuid + schema: + type: string + format: uuid + required: true + tags: + - organizations + - members + security: + - PersonalAPIKeyAuth: + - organization_member:write + responses: + '204': + description: No response body + /api/organizations/{organization_id}/projects/: + get: + operationId: list_2 + description: Projects for the current organization. + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - projects + security: + - PersonalAPIKeyAuth: + - project:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedProjectBackwardCompatBasicList' + description: '' + post: + operationId: create_2 + description: Projects for the current organization. + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + security: + - PersonalAPIKeyAuth: + - project:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + description: '' + /api/organizations/{organization_id}/projects/{id}/: + get: + operationId: retrieve_2 + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + description: A unique value identifying this project. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - projects + security: + - PersonalAPIKeyAuth: + - project:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + description: '' + put: + operationId: update_2 + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + description: A unique value identifying this project. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + security: + - PersonalAPIKeyAuth: + - project:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + description: '' + patch: + operationId: partial_update_2 + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + description: A unique value identifying this project. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedProjectBackwardCompat' + security: + - PersonalAPIKeyAuth: + - project:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + description: '' + delete: + operationId: destroy_2 + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + description: A unique value identifying this project. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - projects + security: + - PersonalAPIKeyAuth: + - project:write + responses: + '204': + description: No response body + /api/organizations/{organization_id}/projects/{id}/activity/: + get: + operationId: activity_retrieve + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + description: A unique value identifying this project. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - projects + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + description: '' + /api/organizations/{organization_id}/projects/{id}/add_product_intent/: + patch: + operationId: add_product_intent_partial_update + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + description: A unique value identifying this project. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedProjectBackwardCompat' + security: + - PersonalAPIKeyAuth: + - team:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + description: '' + /api/organizations/{organization_id}/projects/{id}/change_organization/: + post: + operationId: change_organization_create + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + description: A unique value identifying this project. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + description: '' + /api/organizations/{organization_id}/projects/{id}/complete_product_onboarding/: + patch: + operationId: complete_product_onboarding_partial_update + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + description: A unique value identifying this project. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedProjectBackwardCompat' + security: + - PersonalAPIKeyAuth: + - team:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + description: '' + /api/organizations/{organization_id}/projects/{id}/is_generating_demo_data/: + get: + operationId: is_generating_demo_data_retrieve + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + description: A unique value identifying this project. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - projects + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + description: '' + /api/organizations/{organization_id}/projects/{id}/reset_token/: + patch: + operationId: reset_token_partial_update + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + description: A unique value identifying this project. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedProjectBackwardCompat' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBackwardCompat' + description: '' + /api/organizations/{organization_id}/proxy_records/: + get: + operationId: proxy_records_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - proxy_records + security: + - PersonalAPIKeyAuth: + - organization:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedProxyRecordList' + description: '' + post: + operationId: proxy_records_create + parameters: + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - proxy_records + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyRecord' + required: true + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyRecord' + description: '' + /api/organizations/{organization_id}/proxy_records/{id}/: + get: + operationId: proxy_records_retrieve + parameters: + - in: path + name: id + schema: + type: string + required: true + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - proxy_records + security: + - PersonalAPIKeyAuth: + - organization:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyRecord' + description: '' + put: + operationId: proxy_records_update + parameters: + - in: path + name: id + schema: + type: string + required: true + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - proxy_records + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyRecord' + required: true + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyRecord' + description: '' + patch: + operationId: proxy_records_partial_update + parameters: + - in: path + name: id + schema: + type: string + required: true + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - proxy_records + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedProxyRecord' + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyRecord' + description: '' + delete: + operationId: proxy_records_destroy + parameters: + - in: path + name: id + schema: + type: string + required: true + - in: path + name: organization_id + schema: + type: string + required: true + tags: + - organizations + - proxy_records + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '204': + description: No response body + /api/organizations/{organization_id}/roles/: + get: + operationId: roles_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - roles + security: + - PersonalAPIKeyAuth: + - organization:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRoleList' + description: '' + post: + operationId: roles_create + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - roles + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Role' + required: true + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Role' + description: '' + /api/organizations/{organization_id}/roles/{id}/: + get: + operationId: roles_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this role. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - roles + security: + - PersonalAPIKeyAuth: + - organization:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Role' + description: '' + put: + operationId: roles_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this role. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - roles + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Role' + required: true + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Role' + description: '' + patch: + operationId: roles_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this role. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - roles + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedRole' + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Role' + description: '' + delete: + operationId: roles_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this role. + required: true + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - roles + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '204': + description: No response body + /api/organizations/{organization_id}/roles/{role_id}/role_memberships/: + get: + operationId: roles_role_memberships_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: organization_id + schema: + type: string + required: true + - in: path + name: role_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - roles + security: + - PersonalAPIKeyAuth: + - organization:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRoleMembershipList' + description: '' + post: + operationId: roles_role_memberships_create + parameters: + - in: path + name: organization_id + schema: + type: string + required: true + - in: path + name: role_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - roles + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RoleMembership' + required: true + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/RoleMembership' + description: '' + /api/organizations/{organization_id}/roles/{role_id}/role_memberships/{id}/: + delete: + operationId: roles_role_memberships_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this role membership. + required: true + - in: path + name: organization_id + schema: + type: string + required: true + - in: path + name: role_id + schema: + type: string + format: uuid + required: true + tags: + - organizations + - roles + security: + - PersonalAPIKeyAuth: + - organization:write + responses: + '204': + description: No response body + /api/projects/{project_id}/actions/: + get: + operationId: actions_list + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - actions + security: + - PersonalAPIKeyAuth: + - action:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedActionList' + text/csv: + schema: + $ref: '#/components/schemas/PaginatedActionList' + description: '' + post: + operationId: actions_create + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - actions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Action' + security: + - PersonalAPIKeyAuth: + - action:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Action' + text/csv: + schema: + $ref: '#/components/schemas/Action' + description: '' + /api/projects/{project_id}/actions/{id}/: + get: + operationId: actions_retrieve + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this action. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - actions + security: + - PersonalAPIKeyAuth: + - action:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Action' + text/csv: + schema: + $ref: '#/components/schemas/Action' + description: '' + put: + operationId: actions_update + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this action. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - actions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Action' + security: + - PersonalAPIKeyAuth: + - action:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Action' + text/csv: + schema: + $ref: '#/components/schemas/Action' + description: '' + patch: + operationId: actions_partial_update + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this action. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - actions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAction' + security: + - PersonalAPIKeyAuth: + - action:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Action' + text/csv: + schema: + $ref: '#/components/schemas/Action' + description: '' + delete: + operationId: actions_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this action. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - actions + security: + - PersonalAPIKeyAuth: + - action:write + responses: + '405': + description: No response body + /api/projects/{project_id}/activity_log/: + get: + operationId: activity_log_list + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - activity_log + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedActivityLogList' + description: '' + /api/projects/{project_id}/activity_log/bookmark_activity_notification/: + post: + operationId: activity_log_bookmark_activity_notification_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - activity_log + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ActivityLog' + required: true + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/activity_log/important_changes/: + get: + operationId: activity_log_important_changes_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - activity_log + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/annotations/: + get: + operationId: annotations_list + description: Create, Read, Update and Delete annotations. [See docs](https://posthog.com/docs/user-guides/annotations) + for more information on annotations. + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - name: search + required: false + in: query + description: A search term. + schema: + type: string + tags: + - annotations + security: + - PersonalAPIKeyAuth: + - annotation:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAnnotationList' + description: '' + post: + operationId: annotations_create + description: Create, Read, Update and Delete annotations. [See docs](https://posthog.com/docs/user-guides/annotations) + for more information on annotations. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - annotations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Annotation' + security: + - PersonalAPIKeyAuth: + - annotation:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Annotation' + description: '' + /api/projects/{project_id}/annotations/{id}/: + get: + operationId: annotations_retrieve + description: Create, Read, Update and Delete annotations. [See docs](https://posthog.com/docs/user-guides/annotations) + for more information on annotations. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this annotation. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - annotations + security: + - PersonalAPIKeyAuth: + - annotation:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Annotation' + description: '' + put: + operationId: annotations_update + description: Create, Read, Update and Delete annotations. [See docs](https://posthog.com/docs/user-guides/annotations) + for more information on annotations. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this annotation. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - annotations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Annotation' + security: + - PersonalAPIKeyAuth: + - annotation:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Annotation' + description: '' + patch: + operationId: annotations_partial_update + description: Create, Read, Update and Delete annotations. [See docs](https://posthog.com/docs/user-guides/annotations) + for more information on annotations. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this annotation. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - annotations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAnnotation' + security: + - PersonalAPIKeyAuth: + - annotation:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Annotation' + description: '' + delete: + operationId: annotations_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this annotation. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - annotations + security: + - PersonalAPIKeyAuth: + - annotation:write + responses: + '405': + description: No response body + /api/projects/{project_id}/app_metrics/{id}/: + get: + operationId: app_metrics_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this plugin config. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - app_metrics + security: + - PersonalAPIKeyAuth: + - plugin:read + responses: + '200': + description: No response body + /api/projects/{project_id}/app_metrics/{id}/error_details/: + get: + operationId: app_metrics_error_details_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this plugin config. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - app_metrics + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/app_metrics/{plugin_config_id}/historical_exports/: + get: + operationId: app_metrics_historical_exports_retrieve + parameters: + - in: path + name: plugin_config_id + schema: + type: string + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - app_metrics + security: + - PersonalAPIKeyAuth: + - plugin:read + responses: + '200': + description: No response body + /api/projects/{project_id}/app_metrics/{plugin_config_id}/historical_exports/{id}/: + get: + operationId: app_metrics_historical_exports_retrieve_2 + parameters: + - in: path + name: id + schema: + type: string + required: true + - in: path + name: plugin_config_id + schema: + type: string + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - app_metrics + security: + - PersonalAPIKeyAuth: + - plugin:read + responses: + '200': + description: No response body + /api/projects/{project_id}/batch_exports/: + get: + operationId: batch_exports_list_2 + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBatchExportList' + description: '' + post: + operationId: batch_exports_create_2 + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + description: '' + /api/projects/{project_id}/batch_exports/{batch_export_id}/backfills/: + get: + operationId: batch_exports_backfills_list + description: |- + ViewSet for BatchExportBackfill models. + + Allows creating and reading backfills, but not updating or deleting them. + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this backfill belongs to. + required: true + - name: cursor + required: false + in: query + description: The pagination cursor value. + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBatchExportBackfillList' + description: '' + post: + operationId: batch_exports_backfills_create + description: Create a new backfill for a BatchExport. + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this backfill belongs to. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportBackfill' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportBackfill' + description: '' + /api/projects/{project_id}/batch_exports/{batch_export_id}/backfills/{id}/: + get: + operationId: batch_exports_backfills_retrieve + description: |- + ViewSet for BatchExportBackfill models. + + Allows creating and reading backfills, but not updating or deleting them. + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this backfill belongs to. + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export backfill. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportBackfill' + description: '' + /api/projects/{project_id}/batch_exports/{batch_export_id}/backfills/{id}/cancel/: + post: + operationId: batch_exports_backfills_cancel_create + description: Cancel a batch export backfill. + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this backfill belongs to. + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export backfill. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportBackfill' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/projects/{project_id}/batch_exports/{batch_export_id}/runs/: + get: + operationId: batch_exports_runs_list + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this run belongs to. + required: true + - name: cursor + required: false + in: query + description: The pagination cursor value. + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBatchExportRunList' + description: '' + /api/projects/{project_id}/batch_exports/{batch_export_id}/runs/{id}/: + get: + operationId: batch_exports_runs_retrieve + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this run belongs to. + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export run. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportRun' + description: '' + /api/projects/{project_id}/batch_exports/{batch_export_id}/runs/{id}/cancel/: + post: + operationId: batch_exports_runs_cancel_create + description: Cancel a batch export run. + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this run belongs to. + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export run. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportRun' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/projects/{project_id}/batch_exports/{batch_export_id}/runs/{id}/logs/: + get: + operationId: batch_exports_runs_logs_retrieve + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this run belongs to. + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export run. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/batch_exports/{batch_export_id}/runs/{id}/retry/: + post: + operationId: batch_exports_runs_retry_create + description: |- + Retry a batch export run. + + We use the same underlying mechanism as when backfilling a batch export, as retrying + a run is the same as backfilling one run. + parameters: + - in: path + name: batch_export_id + schema: + type: string + format: uuid + description: The BatchExport this run belongs to. + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export run. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExportRun' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/projects/{project_id}/batch_exports/{id}/: + get: + operationId: batch_exports_retrieve_2 + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + security: + - PersonalAPIKeyAuth: + - batch_export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + description: '' + put: + operationId: batch_exports_update_2 + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + description: '' + patch: + operationId: batch_exports_partial_update_2 + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedBatchExport' + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + description: '' + delete: + operationId: batch_exports_destroy_2 + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '204': + description: No response body + /api/projects/{project_id}/batch_exports/{id}/backfill/: + post: + operationId: batch_exports_backfill_create_2 + description: |- + Trigger a backfill for a BatchExport. + + Note: This endpoint is deprecated. Please use POST /batch_exports//backfills/ instead. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/projects/{project_id}/batch_exports/{id}/logs/: + get: + operationId: batch_exports_logs_retrieve_2 + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/batch_exports/{id}/pause/: + post: + operationId: batch_exports_pause_create_2 + description: Pause a BatchExport. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/projects/{project_id}/batch_exports/{id}/unpause/: + post: + operationId: batch_exports_unpause_create_2 + description: Unpause a BatchExport. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this batch export. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - batch_exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchExport' + required: true + security: + - PersonalAPIKeyAuth: + - batch_export:write + responses: + '200': + description: No response body + /api/projects/{project_id}/cohorts/: + get: + operationId: cohorts_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - cohorts + security: + - PersonalAPIKeyAuth: + - cohort:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCohortList' + description: '' + post: + operationId: cohorts_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - cohorts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Cohort' + security: + - PersonalAPIKeyAuth: + - cohort:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Cohort' + description: '' + /api/projects/{project_id}/cohorts/{id}/: + get: + operationId: cohorts_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this cohort. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - cohorts + security: + - PersonalAPIKeyAuth: + - cohort:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Cohort' + description: '' + put: + operationId: cohorts_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this cohort. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - cohorts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Cohort' + security: + - PersonalAPIKeyAuth: + - cohort:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Cohort' + description: '' + patch: + operationId: cohorts_partial_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this cohort. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - cohorts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedCohort' + security: + - PersonalAPIKeyAuth: + - cohort:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Cohort' + description: '' + delete: + operationId: cohorts_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this cohort. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - cohorts + security: + - PersonalAPIKeyAuth: + - cohort:write + responses: + '405': + description: No response body + /api/projects/{project_id}/cohorts/{id}/activity/: + get: + operationId: cohorts_activity_retrieve_2 + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this cohort. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - cohorts + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/projects/{project_id}/cohorts/{id}/duplicate_as_static_cohort/: + get: + operationId: cohorts_duplicate_as_static_cohort_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this cohort. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - cohorts + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/cohorts/{id}/persons/: + get: + operationId: cohorts_persons_retrieve + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this cohort. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - cohorts + security: + - PersonalAPIKeyAuth: + - cohort:read + - person:read + responses: + '200': + description: No response body + /api/projects/{project_id}/cohorts/activity/: + get: + operationId: cohorts_activity_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - cohorts + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/projects/{project_id}/dashboard_templates/: + get: + operationId: dashboard_templates_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboard_templates + security: + - PersonalAPIKeyAuth: + - dashboard_template:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedDashboardTemplateList' + description: '' + post: + operationId: dashboard_templates_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboard_templates + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardTemplate' + security: + - PersonalAPIKeyAuth: + - dashboard_template:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardTemplate' + description: '' + /api/projects/{project_id}/dashboard_templates/{id}/: + get: + operationId: dashboard_templates_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this dashboard template. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboard_templates + security: + - PersonalAPIKeyAuth: + - dashboard_template:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardTemplate' + description: '' + put: + operationId: dashboard_templates_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this dashboard template. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboard_templates + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardTemplate' + security: + - PersonalAPIKeyAuth: + - dashboard_template:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardTemplate' + description: '' + patch: + operationId: dashboard_templates_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this dashboard template. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboard_templates + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedDashboardTemplate' + security: + - PersonalAPIKeyAuth: + - dashboard_template:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardTemplate' + description: '' + delete: + operationId: dashboard_templates_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this dashboard template. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboard_templates + security: + - PersonalAPIKeyAuth: + - dashboard_template:write + responses: + '405': + description: No response body + /api/projects/{project_id}/dashboard_templates/json_schema/: + get: + operationId: dashboard_templates_json_schema_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboard_templates + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/dashboards/: + get: + operationId: dashboards_list + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboards + security: + - PersonalAPIKeyAuth: + - dashboard:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedDashboardBasicList' + description: '' + post: + operationId: dashboards_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboards + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + security: + - PersonalAPIKeyAuth: + - dashboard:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: '' + /api/projects/{project_id}/dashboards/{dashboard_id}/collaborators/: + get: + operationId: dashboards_collaborators_list + parameters: + - in: path + name: dashboard_id + schema: + type: integer + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboards + security: + - PersonalAPIKeyAuth: + - dashboard:read + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DashboardCollaborator' + description: '' + post: + operationId: dashboards_collaborators_create + parameters: + - in: path + name: dashboard_id + schema: + type: integer + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboards + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardCollaborator' + required: true + security: + - PersonalAPIKeyAuth: + - dashboard:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardCollaborator' + description: '' + /api/projects/{project_id}/dashboards/{dashboard_id}/collaborators/{user__uuid}/: + delete: + operationId: dashboards_collaborators_destroy + parameters: + - in: path + name: dashboard_id + schema: + type: integer + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: user__uuid + schema: + type: string + format: uuid + required: true + tags: + - dashboards + security: + - PersonalAPIKeyAuth: + - dashboard:write + responses: + '204': + description: No response body + /api/projects/{project_id}/dashboards/{dashboard_id}/sharing/: + get: + operationId: dashboards_sharing_list + parameters: + - in: path + name: dashboard_id + schema: + type: integer + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboards + security: + - PersonalAPIKeyAuth: + - sharing_configuration:read + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SharingConfiguration' + description: '' + /api/projects/{project_id}/dashboards/{id}/: + get: + operationId: dashboards_retrieve + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this dashboard. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboards + security: + - PersonalAPIKeyAuth: + - dashboard:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: '' + put: + operationId: dashboards_update + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this dashboard. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboards + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + security: + - PersonalAPIKeyAuth: + - dashboard:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: '' + patch: + operationId: dashboards_partial_update + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this dashboard. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboards + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedDashboard' + security: + - PersonalAPIKeyAuth: + - dashboard:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: '' + delete: + operationId: dashboards_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this dashboard. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboards + security: + - PersonalAPIKeyAuth: + - dashboard:write + responses: + '405': + description: No response body + /api/projects/{project_id}/dashboards/{id}/move_tile/: + patch: + operationId: dashboards_move_tile_partial_update + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this dashboard. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboards + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedDashboard' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/dashboards/create_from_template_json/: + post: + operationId: dashboards_create_from_template_json_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - dashboards + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/early_access_feature/: + get: + operationId: early_access_feature_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - early_access_feature + security: + - PersonalAPIKeyAuth: + - early_access_feature:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedEarlyAccessFeatureList' + description: '' + post: + operationId: early_access_feature_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - early_access_feature + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EarlyAccessFeatureSerializerCreateOnly' + required: true + security: + - PersonalAPIKeyAuth: + - early_access_feature:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/EarlyAccessFeatureSerializerCreateOnly' + description: '' + /api/projects/{project_id}/early_access_feature/{id}/: + get: + operationId: early_access_feature_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this early access feature. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - early_access_feature + security: + - PersonalAPIKeyAuth: + - early_access_feature:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EarlyAccessFeature' + description: '' + put: + operationId: early_access_feature_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this early access feature. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - early_access_feature + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EarlyAccessFeature' + required: true + security: + - PersonalAPIKeyAuth: + - early_access_feature:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EarlyAccessFeature' + description: '' + patch: + operationId: early_access_feature_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this early access feature. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - early_access_feature + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedEarlyAccessFeature' + security: + - PersonalAPIKeyAuth: + - early_access_feature:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EarlyAccessFeature' + description: '' + delete: + operationId: early_access_feature_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this early access feature. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - early_access_feature + security: + - PersonalAPIKeyAuth: + - early_access_feature:write + responses: + '204': + description: No response body + /api/projects/{project_id}/environments/: + get: + operationId: environments_list + description: Projects for the current organization. + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + security: + - PersonalAPIKeyAuth: + - project:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTeamBasicList' + description: '' + post: + operationId: environments_create + description: Projects for the current organization. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Team' + security: + - PersonalAPIKeyAuth: + - project:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Team' + description: '' + /api/projects/{project_id}/environments/{id}/: + get: + operationId: environments_retrieve + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this team (soon to be environment). + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + security: + - PersonalAPIKeyAuth: + - project:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Team' + description: '' + put: + operationId: environments_update + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this team (soon to be environment). + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Team' + security: + - PersonalAPIKeyAuth: + - project:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Team' + description: '' + patch: + operationId: environments_partial_update + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this team (soon to be environment). + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedTeam' + security: + - PersonalAPIKeyAuth: + - project:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Team' + description: '' + delete: + operationId: environments_destroy + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this team (soon to be environment). + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + security: + - PersonalAPIKeyAuth: + - project:write + responses: + '204': + description: No response body + /api/projects/{project_id}/environments/{id}/activity/: + get: + operationId: environments_activity_retrieve + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this team (soon to be environment). + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/environments/{id}/add_product_intent/: + patch: + operationId: environments_add_product_intent_partial_update + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this team (soon to be environment). + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedTeam' + security: + - PersonalAPIKeyAuth: + - team:read + responses: + '200': + description: No response body + /api/projects/{project_id}/environments/{id}/complete_product_onboarding/: + patch: + operationId: environments_complete_product_onboarding_partial_update + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this team (soon to be environment). + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedTeam' + security: + - PersonalAPIKeyAuth: + - team:read + responses: + '200': + description: No response body + /api/projects/{project_id}/environments/{id}/is_generating_demo_data/: + get: + operationId: environments_is_generating_demo_data_retrieve + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this team (soon to be environment). + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/environments/{id}/reset_token/: + patch: + operationId: environments_reset_token_partial_update + description: Projects for the current organization. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this team (soon to be environment). + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedTeam' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/event_definitions/: + get: + operationId: event_definitions_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - event_definitions + security: + - PersonalAPIKeyAuth: + - event_definition:read + responses: + '200': + description: No response body + /api/projects/{project_id}/event_definitions/{id}/: + get: + operationId: event_definitions_retrieve_2 + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this event definition. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - event_definitions + security: + - PersonalAPIKeyAuth: + - event_definition:read + responses: + '200': + description: No response body + put: + operationId: event_definitions_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this event definition. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - event_definitions + security: + - PersonalAPIKeyAuth: + - event_definition:write + responses: + '200': + description: No response body + patch: + operationId: event_definitions_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this event definition. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - event_definitions + security: + - PersonalAPIKeyAuth: + - event_definition:write + responses: + '200': + description: No response body + delete: + operationId: event_definitions_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this event definition. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - event_definitions + security: + - PersonalAPIKeyAuth: + - event_definition:write + responses: + '204': + description: No response body + /api/projects/{project_id}/events/: + get: + operationId: events_list + description: "\n This endpoint allows you to list and filter events.\n\ + \ It is effectively deprecated and is kept only for backwards compatibility.\n\ + \ If you ever ask about it you will be advised to not use it...\n \ + \ If you want to ad-hoc list or aggregate events, use the Query endpoint\ + \ instead.\n If you want to export all events or many pages of events\ + \ you should use our CDP/Batch Exports products instead.\n " + parameters: + - in: query + name: after + schema: + type: string + format: date-time + description: Only return events with a timestamp after this time. + - in: query + name: before + schema: + type: string + format: date-time + description: Only return events with a timestamp before this time. + - in: query + name: distinct_id + schema: + type: integer + description: Filter list by distinct id. + - in: query + name: event + schema: + type: string + description: Filter list by event. For example `user sign up` or `$pageview`. + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: query + name: limit + schema: + type: integer + description: The maximum number of results to return + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: query + name: person_id + schema: + type: integer + description: Filter list by person id. + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: properties + schema: + type: array + items: + $ref: '#/components/schemas/Property' + description: Filter events by event property, person property, cohort, groups + and more. + - in: query + name: select + schema: + type: array + items: + type: string + description: (Experimental) JSON-serialized array of HogQL expressions to + return + - in: query + name: where + schema: + type: array + items: + type: string + description: (Experimental) JSON-serialized array of HogQL expressions that + must pass + tags: + - events + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedClickhouseEventList' + text/csv: + schema: + $ref: '#/components/schemas/PaginatedClickhouseEventList' + description: '' + /api/projects/{project_id}/events/{id}/: + get: + operationId: events_retrieve + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: string + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - events + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ClickhouseEvent' + text/csv: + schema: + $ref: '#/components/schemas/ClickhouseEvent' + description: '' + /api/projects/{project_id}/events/values/: + get: + operationId: events_values_retrieve + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - events + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '200': + description: No response body + /api/projects/{project_id}/experiment_holdouts/: + get: + operationId: experiment_holdouts_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiment_holdouts + security: + - PersonalAPIKeyAuth: + - experiment:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedExperimentHoldoutList' + description: '' + post: + operationId: experiment_holdouts_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiment_holdouts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentHoldout' + required: true + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentHoldout' + description: '' + /api/projects/{project_id}/experiment_holdouts/{id}/: + get: + operationId: experiment_holdouts_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment holdout. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiment_holdouts + security: + - PersonalAPIKeyAuth: + - experiment:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentHoldout' + description: '' + put: + operationId: experiment_holdouts_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment holdout. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiment_holdouts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentHoldout' + required: true + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentHoldout' + description: '' + patch: + operationId: experiment_holdouts_partial_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment holdout. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiment_holdouts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedExperimentHoldout' + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentHoldout' + description: '' + delete: + operationId: experiment_holdouts_destroy + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment holdout. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiment_holdouts + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '204': + description: No response body + /api/projects/{project_id}/experiment_saved_metrics/: + get: + operationId: experiment_saved_metrics_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiment_saved_metrics + security: + - PersonalAPIKeyAuth: + - experiment:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedExperimentSavedMetricList' + description: '' + post: + operationId: experiment_saved_metrics_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiment_saved_metrics + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentSavedMetric' + required: true + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentSavedMetric' + description: '' + /api/projects/{project_id}/experiment_saved_metrics/{id}/: + get: + operationId: experiment_saved_metrics_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment saved metric. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiment_saved_metrics + security: + - PersonalAPIKeyAuth: + - experiment:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentSavedMetric' + description: '' + put: + operationId: experiment_saved_metrics_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment saved metric. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiment_saved_metrics + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentSavedMetric' + required: true + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentSavedMetric' + description: '' + patch: + operationId: experiment_saved_metrics_partial_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment saved metric. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiment_saved_metrics + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedExperimentSavedMetric' + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentSavedMetric' + description: '' + delete: + operationId: experiment_saved_metrics_destroy + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment saved metric. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiment_saved_metrics + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '204': + description: No response body + /api/projects/{project_id}/experiments/: + get: + operationId: experiments_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiments + security: + - PersonalAPIKeyAuth: + - experiment:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedExperimentList' + description: '' + post: + operationId: experiments_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + required: true + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + description: '' + /api/projects/{project_id}/experiments/{id}/: + get: + operationId: experiments_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiments + security: + - PersonalAPIKeyAuth: + - experiment:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + description: '' + put: + operationId: experiments_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + required: true + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + description: '' + patch: + operationId: experiments_partial_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedExperiment' + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + description: '' + delete: + operationId: experiments_destroy + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiments + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '204': + description: No response body + /api/projects/{project_id}/experiments/{id}/create_exposure_cohort_for_experiment/: + post: + operationId: experiments_create_exposure_cohort_for_experiment_create + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + required: true + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '200': + description: No response body + /api/projects/{project_id}/experiments/{id}/results/: + get: + operationId: experiments_results_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiments + security: + - PersonalAPIKeyAuth: + - experiment:read + responses: + '200': + description: No response body + /api/projects/{project_id}/experiments/{id}/secondary_results/: + get: + operationId: experiments_secondary_results_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this experiment. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiments + security: + - PersonalAPIKeyAuth: + - experiment:read + responses: + '200': + description: No response body + /api/projects/{project_id}/experiments/requires_flag_implementation/: + get: + operationId: experiments_requires_flag_implementation_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - experiments + security: + - PersonalAPIKeyAuth: + - experiment:read + responses: + '200': + description: No response body + /api/projects/{project_id}/explicit_members/: + get: + operationId: explicit_members_list + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - explicit_members + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ExplicitTeamMember' + description: '' + post: + operationId: explicit_members_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - explicit_members + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExplicitTeamMember' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ExplicitTeamMember' + description: '' + /api/projects/{project_id}/explicit_members/{parent_membership__user__uuid}/: + get: + operationId: explicit_members_retrieve + parameters: + - in: path + name: parent_membership__user__uuid + schema: + type: string + format: uuid + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - explicit_members + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExplicitTeamMember' + description: '' + put: + operationId: explicit_members_update + parameters: + - in: path + name: parent_membership__user__uuid + schema: + type: string + format: uuid + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - explicit_members + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExplicitTeamMember' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExplicitTeamMember' + description: '' + patch: + operationId: explicit_members_partial_update + parameters: + - in: path + name: parent_membership__user__uuid + schema: + type: string + format: uuid + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - explicit_members + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedExplicitTeamMember' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExplicitTeamMember' + description: '' + delete: + operationId: explicit_members_destroy + parameters: + - in: path + name: parent_membership__user__uuid + schema: + type: string + format: uuid + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - explicit_members + responses: + '204': + description: No response body + /api/projects/{project_id}/exports/: + get: + operationId: exports_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - exports + security: + - PersonalAPIKeyAuth: + - export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedExportedAssetList' + description: '' + post: + operationId: exports_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - exports + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedAsset' + required: true + security: + - PersonalAPIKeyAuth: + - export:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedAsset' + description: '' + /api/projects/{project_id}/exports/{id}/: + get: + operationId: exports_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this exported asset. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - exports + security: + - PersonalAPIKeyAuth: + - export:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedAsset' + description: '' + /api/projects/{project_id}/exports/{id}/content/: + get: + operationId: exports_content_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this exported asset. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - exports + security: + - PersonalAPIKeyAuth: + - export:read + responses: + '200': + description: No response body + /api/projects/{project_id}/feature_flags/: + get: + operationId: feature_flags_list + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: query + name: active + schema: + type: string + enum: + - 'false' + - 'true' + - in: query + name: created_by_id + schema: + type: string + description: The User ID which initially created the feature flag. + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: search + schema: + type: string + description: Search by feature flag key or name. Case insensitive. + - in: query + name: type + schema: + type: string + enum: + - boolean + - experiment + - multivariant + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: + - feature_flag:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedFeatureFlagList' + description: '' + post: + operationId: feature_flags_create + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlag' + required: true + security: + - PersonalAPIKeyAuth: + - feature_flag:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlag' + description: '' + /api/projects/{project_id}/feature_flags/{feature_flag_id}/role_access/: + get: + operationId: feature_flags_role_access_list + parameters: + - in: path + name: feature_flag_id + schema: + type: integer + required: true + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: + - feature_flag:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedFeatureFlagRoleAccessList' + description: '' + post: + operationId: feature_flags_role_access_create + parameters: + - in: path + name: feature_flag_id + schema: + type: integer + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlagRoleAccess' + required: true + security: + - PersonalAPIKeyAuth: + - feature_flag:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlagRoleAccess' + description: '' + /api/projects/{project_id}/feature_flags/{feature_flag_id}/role_access/{id}/: + get: + operationId: feature_flags_role_access_retrieve + parameters: + - in: path + name: feature_flag_id + schema: + type: integer + required: true + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this feature flag role access. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: + - feature_flag:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlagRoleAccess' + description: '' + delete: + operationId: feature_flags_role_access_destroy + parameters: + - in: path + name: feature_flag_id + schema: + type: integer + required: true + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this feature flag role access. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: + - feature_flag:write + responses: + '204': + description: No response body + /api/projects/{project_id}/feature_flags/{id}/: + get: + operationId: feature_flags_retrieve + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this feature flag. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: + - feature_flag:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlag' + description: '' + put: + operationId: feature_flags_update + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this feature flag. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlag' + required: true + security: + - PersonalAPIKeyAuth: + - feature_flag:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlag' + description: '' + patch: + operationId: feature_flags_partial_update + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this feature flag. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedFeatureFlag' + security: + - PersonalAPIKeyAuth: + - feature_flag:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlag' + description: '' + delete: + operationId: feature_flags_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this feature flag. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: + - feature_flag:write + responses: + '405': + description: No response body + /api/projects/{project_id}/feature_flags/{id}/activity/: + get: + operationId: feature_flags_activity_retrieve_2 + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this feature flag. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/projects/{project_id}/feature_flags/{id}/create_static_cohort_for_flag/: + post: + operationId: feature_flags_create_static_cohort_for_flag_create + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this feature flag. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlag' + required: true + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/feature_flags/{id}/dashboard/: + post: + operationId: feature_flags_dashboard_create + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this feature flag. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlag' + required: true + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/feature_flags/{id}/enrich_usage_dashboard/: + post: + operationId: feature_flags_enrich_usage_dashboard_create + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this feature flag. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlag' + required: true + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/feature_flags/{id}/remote_config/: + get: + operationId: feature_flags_remote_config_retrieve + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this feature flag. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: + - feature_flag:read + responses: + '200': + description: No response body + /api/projects/{project_id}/feature_flags/{id}/status/: + get: + operationId: feature_flags_status_retrieve + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this feature flag. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: + - feature_flag:read + responses: + '200': + description: No response body + /api/projects/{project_id}/feature_flags/activity/: + get: + operationId: feature_flags_activity_retrieve + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/projects/{project_id}/feature_flags/evaluation_reasons/: + get: + operationId: feature_flags_evaluation_reasons_retrieve + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/feature_flags/local_evaluation/: + get: + operationId: feature_flags_local_evaluation_retrieve + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: + - feature_flag:read + responses: + '200': + description: No response body + /api/projects/{project_id}/feature_flags/my_flags/: + get: + operationId: feature_flags_my_flags_retrieve + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/feature_flags/user_blast_radius/: + post: + operationId: feature_flags_user_blast_radius_create + description: |- + Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/user-guides/feature-flags) for more information on feature flags. + + If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - feature_flags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlag' + required: true + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/file_system/: + get: + operationId: file_system_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - name: search + required: false + in: query + description: A search term. + schema: + type: string + tags: + - file_system + security: + - PersonalAPIKeyAuth: + - file_system:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedFileSystemList' + description: '' + post: + operationId: file_system_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - file_system + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSystem' + required: true + security: + - PersonalAPIKeyAuth: + - file_system:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FileSystem' + description: '' + /api/projects/{project_id}/file_system/{id}/: + get: + operationId: file_system_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this file system. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - file_system + security: + - PersonalAPIKeyAuth: + - file_system:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FileSystem' + description: '' + put: + operationId: file_system_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this file system. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - file_system + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSystem' + required: true + security: + - PersonalAPIKeyAuth: + - file_system:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FileSystem' + description: '' + patch: + operationId: file_system_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this file system. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - file_system + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedFileSystem' + security: + - PersonalAPIKeyAuth: + - file_system:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FileSystem' + description: '' + delete: + operationId: file_system_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this file system. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - file_system + security: + - PersonalAPIKeyAuth: + - file_system:write + responses: + '204': + description: No response body + /api/projects/{project_id}/file_system/unfiled/: + get: + operationId: file_system_unfiled_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - file_system + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/groups/: + get: + operationId: groups_list + description: List all groups of a specific group type. You must pass ?group_type_index= + in the URL. To get a list of valid group types, call /api/:project_id/groups_types/ + parameters: + - name: cursor + required: false + in: query + description: The pagination cursor value. + schema: + type: string + - in: query + name: group_type_index + schema: + type: integer + description: Specify the group type to list + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: search + schema: + type: string + description: Search the group name + required: true + tags: + - groups + security: + - PersonalAPIKeyAuth: + - group:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGroupList' + description: '' + /api/projects/{project_id}/groups/find/: + get: + operationId: groups_find_retrieve + parameters: + - in: query + name: group_key + schema: + type: string + description: Specify the key of the group to find + required: true + - in: query + name: group_type_index + schema: + type: integer + description: Specify the group type to find + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - groups + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/groups/property_definitions/: + get: + operationId: groups_property_definitions_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - groups + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/groups/property_values/: + get: + operationId: groups_property_values_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - groups + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/groups/related/: + get: + operationId: groups_related_retrieve + parameters: + - in: query + name: group_type_index + schema: + type: integer + description: Specify the group type to find + required: true + - in: query + name: id + schema: + type: string + description: Specify the id of the user to find groups for + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - groups + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/groups_types/: + get: + operationId: groups_types_list + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - groups_types + security: + - PersonalAPIKeyAuth: + - group:read + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupType' + description: '' + /api/projects/{project_id}/groups_types/update_metadata/: + patch: + operationId: groups_types_update_metadata_partial_update + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - groups_types + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedGroupType' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/insights/: + get: + operationId: insights_list + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: created_by + schema: + type: integer + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: refresh + schema: + type: string + enum: + - async + - async_except_on_cache_miss + - blocking + - force_async + - force_blocking + - force_cache + - lazy_async + default: force_cache + description: |2- + + Whether to refresh the retrieved insights, how aggresively, and if sync or async: + - `'force_cache'` - return cached data or a cache miss; always completes immediately as it never calculates + - `'blocking'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache + - `'async'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache + - `'lazy_async'` - kick off background calculation, UNLESS there are somewhat fresh results in the cache + - `'force_blocking'` - calculate synchronously, even if fresh results are already cached + - `'force_async'` - kick off background calculation, even if fresh results are already cached + Background calculation can be tracked using the `query_status` response field. + - in: query + name: short_id + schema: + type: string + tags: + - insights + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedInsightList' + text/csv: + schema: + $ref: '#/components/schemas/PaginatedInsightList' + description: '' + post: + operationId: insights_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: + - insight:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + text/csv: + schema: + $ref: '#/components/schemas/Insight' + description: '' + /api/projects/{project_id}/insights/{insight_id}/sharing/: + get: + operationId: insights_sharing_list + parameters: + - in: path + name: insight_id + schema: + type: integer + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + security: + - PersonalAPIKeyAuth: + - sharing_configuration:read + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SharingConfiguration' + description: '' + /api/projects/{project_id}/insights/{id}/: + get: + operationId: insights_retrieve + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: query + name: from_dashboard + schema: + type: integer + description: |2- + + Only if loading an insight in the context of a dashboard: The relevant dashboard's ID. + When set, the specified dashboard's filters and date range override will be applied. + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this insight. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: refresh + schema: + type: string + enum: + - async + - async_except_on_cache_miss + - blocking + - force_async + - force_blocking + - force_cache + - lazy_async + default: force_cache + description: |2- + + Whether to refresh the insight, how aggresively, and if sync or async: + - `'force_cache'` - return cached data or a cache miss; always completes immediately as it never calculates + - `'blocking'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache + - `'async'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache + - `'lazy_async'` - kick off background calculation, UNLESS there are somewhat fresh results in the cache + - `'force_blocking'` - calculate synchronously, even if fresh results are already cached + - `'force_async'` - kick off background calculation, even if fresh results are already cached + Background calculation can be tracked using the `query_status` response field. + tags: + - insights + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + text/csv: + schema: + $ref: '#/components/schemas/Insight' + description: '' + put: + operationId: insights_update + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this insight. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: + - insight:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + text/csv: + schema: + $ref: '#/components/schemas/Insight' + description: '' + patch: + operationId: insights_partial_update + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this insight. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedInsight' + security: + - PersonalAPIKeyAuth: + - insight:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + text/csv: + schema: + $ref: '#/components/schemas/Insight' + description: '' + delete: + operationId: insights_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this insight. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + security: + - PersonalAPIKeyAuth: + - insight:write + responses: + '405': + description: No response body + /api/projects/{project_id}/insights/{id}/activity/: + get: + operationId: insights_activity_retrieve_2 + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this insight. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/projects/{project_id}/insights/{id}/viewed/: + post: + operationId: insights_viewed_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this insight. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + description: No response body + /api/projects/{project_id}/insights/activity/: + get: + operationId: insights_activity_retrieve + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/projects/{project_id}/insights/cancel/: + post: + operationId: insights_cancel_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/insights/funnel/: + get: + operationId: insights_funnel_retrieve + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + description: No response body + post: + operationId: insights_funnel_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + description: No response body + /api/projects/{project_id}/insights/funnel/correlation/: + get: + operationId: insights_funnel_correlation_retrieve + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + post: + operationId: insights_funnel_correlation_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/insights/my_last_viewed/: + get: + operationId: insights_my_last_viewed_retrieve + description: Returns basic details about the last 5 insights viewed by this + user. Most recently viewed first. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/insights/timing/: + post: + operationId: insights_timing_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/insights/trend/: + get: + operationId: insights_trend_retrieve + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + description: No response body + post: + operationId: insights_trend_create + description: |- + Adds an "access_controls" action to the viewset that handles access control for the given resource + + Why a mixin? We want to easily add this to any existing resource, including providing easy helpers for adding access control info such + as the current users access level to any response. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - insights + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Insight' + security: + - PersonalAPIKeyAuth: + - insight:read + responses: + '200': + description: No response body + /api/projects/{project_id}/notebooks/: + get: + operationId: notebooks_list + description: The API for interacting with Notebooks. This feature is in early + access and the API can have breaking changes without announcement. + parameters: + - in: query + name: contains + schema: + type: string + description: |- + Filter for notebooks that match a provided filter. + Each match pair is separated by a colon, + multiple match pairs can be sent separated by a space or a comma + examples: + FilterForNotebooksThatHaveAnyRecording: + value: recording:true + summary: Filter for notebooks that have any recording + FilterForNotebooksThatDoNotHaveAnyRecording: + value: recording:false + summary: Filter for notebooks that do not have any recording + FilterForNotebooksThatHaveASpecificRecording: + value: recording:the-session-recording-id + summary: Filter for notebooks that have a specific recording + - in: query + name: created_by + schema: + type: integer + description: The UUID of the Notebook's creator + - in: query + name: date_from + schema: + type: string + format: date-time + description: Filter for notebooks created after this date & time + - in: query + name: date_to + schema: + type: string + format: date-time + description: Filter for notebooks created before this date & time + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: user + schema: + type: string + description: If any value is provided for this parameter, return notebooks + created by the logged in user. + tags: + - notebooks + security: + - PersonalAPIKeyAuth: + - notebook:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedNotebookMinimalList' + description: '' + post: + operationId: notebooks_create + description: The API for interacting with Notebooks. This feature is in early + access and the API can have breaking changes without announcement. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - notebooks + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Notebook' + security: + - PersonalAPIKeyAuth: + - notebook:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Notebook' + description: '' + /api/projects/{project_id}/notebooks/{short_id}/: + get: + operationId: notebooks_retrieve + description: The API for interacting with Notebooks. This feature is in early + access and the API can have breaking changes without announcement. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: short_id + schema: + type: string + required: true + tags: + - notebooks + security: + - PersonalAPIKeyAuth: + - notebook:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Notebook' + description: '' + put: + operationId: notebooks_update + description: The API for interacting with Notebooks. This feature is in early + access and the API can have breaking changes without announcement. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: short_id + schema: + type: string + required: true + tags: + - notebooks + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Notebook' + security: + - PersonalAPIKeyAuth: + - notebook:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Notebook' + description: '' + patch: + operationId: notebooks_partial_update + description: The API for interacting with Notebooks. This feature is in early + access and the API can have breaking changes without announcement. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: short_id + schema: + type: string + required: true + tags: + - notebooks + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedNotebook' + security: + - PersonalAPIKeyAuth: + - notebook:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Notebook' + description: '' + delete: + operationId: notebooks_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: short_id + schema: + type: string + required: true + tags: + - notebooks + security: + - PersonalAPIKeyAuth: + - notebook:write + responses: + '405': + description: No response body + /api/projects/{project_id}/notebooks/{short_id}/activity/: + get: + operationId: notebooks_activity_retrieve_2 + description: The API for interacting with Notebooks. This feature is in early + access and the API can have breaking changes without announcement. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: short_id + schema: + type: string + required: true + tags: + - notebooks + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/projects/{project_id}/notebooks/activity/: + get: + operationId: notebooks_activity_retrieve + description: The API for interacting with Notebooks. This feature is in early + access and the API can have breaking changes without announcement. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - notebooks + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/notebooks/recording_comments/: + get: + operationId: notebooks_recording_comments_retrieve + description: The API for interacting with Notebooks. This feature is in early + access and the API can have breaking changes without announcement. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - notebooks + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/: + get: + operationId: persons_list + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: distinct_id + schema: + type: string + description: Filter list by distinct id. + - in: query + name: email + schema: + type: string + description: Filter persons by email (exact match) + examples: + Email: + value: test@test.com + summary: email + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: properties + schema: + type: array + items: + $ref: '#/components/schemas/Property' + description: Filter Persons by person properties. + - in: query + name: search + schema: + type: string + description: Search persons, either by email (full text search) or distinct_id + (exact match). + tags: + - persons + security: + - PersonalAPIKeyAuth: + - person:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPersonList' + text/csv: + schema: + $ref: '#/components/schemas/PaginatedPersonList' + description: '' + /api/projects/{project_id}/persons/{id}/: + get: + operationId: persons_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + security: + - PersonalAPIKeyAuth: + - person:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + text/csv: + schema: + $ref: '#/components/schemas/Person' + description: '' + put: + operationId: persons_update + description: |- + Only for setting properties on the person. "properties" from the request data will be updated via a "$set" event. + This means that only the properties listed will be updated, but other properties won't be removed nor updated. + If you would like to remove a property use the `delete_property` endpoint. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + text/csv: + schema: + $ref: '#/components/schemas/Person' + description: '' + patch: + operationId: persons_partial_update + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedPerson' + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + text/csv: + schema: + $ref: '#/components/schemas/Person' + description: '' + delete: + operationId: persons_destroy + description: Use this endpoint to delete individual persons. For bulk deletion, + use the bulk_delete endpoint instead. + parameters: + - in: query + name: delete_events + schema: + type: boolean + default: false + description: If true, a task to delete all events associated with this person + will be created and queued. The task does not run immediately and instead + is batched together and at 5AM UTC every Sunday + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '204': + description: No response body + /api/projects/{project_id}/persons/{id}/activity/: + get: + operationId: persons_activity_retrieve_2 + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/{id}/delete_property/: + post: + operationId: persons_delete_property_create + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: $unset + schema: + type: string + description: Specify the property key to delete + required: true + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/{id}/properties_timeline/: + get: + operationId: persons_properties_timeline_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/{id}/split/: + post: + operationId: persons_split_create + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/{id}/update_property/: + post: + operationId: persons_update_property_create + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this person. + required: true + - in: query + name: key + schema: + type: string + description: Specify the property key + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: value + schema: {} + description: Specify the property value + required: true + tags: + - persons + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/activity/: + get: + operationId: persons_activity_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/bulk_delete/: + post: + operationId: persons_bulk_delete_create + description: This endpoint allows you to bulk delete persons, either by the + PostHog person IDs or by distinct IDs. You can pass in a maximum of 1000 IDs + per call. + parameters: + - in: query + name: delete_events + schema: + type: boolean + default: false + description: If true, a task to delete all events associated with this person + will be created and queued. The task does not run immediately and instead + is batched together and at 5AM UTC every Sunday + - in: query + name: distinct_ids + schema: + type: object + additionalProperties: {} + description: A list of distinct IDs, up to 100 of them. We'll delete all persons + associated with those distinct IDs. + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: query + name: ids + schema: + type: object + additionalProperties: {} + description: A list of PostHog person IDs, up to 100 of them. We'll delete + all the persons listed. + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: + - person:write + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/cohorts/: + get: + operationId: persons_cohorts_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + security: + - PersonalAPIKeyAuth: + - person:read + - cohort:read + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/funnel/: + get: + operationId: persons_funnel_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + post: + operationId: persons_funnel_create + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/funnel/correlation/: + get: + operationId: persons_funnel_correlation_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + post: + operationId: persons_funnel_correlation_create + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/lifecycle/: + get: + operationId: persons_lifecycle_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/stickiness/: + get: + operationId: persons_stickiness_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/trends/: + get: + operationId: persons_trends_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/persons/values/: + get: + operationId: persons_values_retrieve + description: This endpoint is meant for reading and deleting persons. To create + or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), + the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), + or one of our SDKs. + parameters: + - in: query + name: format + schema: + type: string + enum: + - csv + - json + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - persons + security: + - PersonalAPIKeyAuth: + - person:read + responses: + '200': + description: No response body + /api/projects/{project_id}/plugin_configs/{plugin_config_id}/logs/: + get: + operationId: plugin_configs_logs_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: plugin_config_id + schema: + type: string + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - plugin_configs + security: + - PersonalAPIKeyAuth: + - plugin:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPluginLogEntryList' + description: '' + /api/projects/{project_id}/property_definitions/: + get: + operationId: property_definitions_retrieve + parameters: + - in: query + name: event_names + schema: + type: string + minLength: 1 + description: If sent, response value will have `is_seen_on_filtered_events` + populated. JSON-encoded + - in: query + name: excluded_properties + schema: + type: string + minLength: 1 + description: JSON-encoded list of excluded properties + - in: query + name: filter_by_event_names + schema: + type: boolean + nullable: true + description: Whether to return only properties for events in `event_names` + - in: query + name: group_type_index + schema: + type: integer + description: What group type is the property for. Only should be set if `type=group` + - in: query + name: is_feature_flag + schema: + type: boolean + nullable: true + description: Whether to return only (or excluding) feature flag properties + - in: query + name: is_numerical + schema: + type: boolean + nullable: true + description: Whether to return only (or excluding) numerical property definitions + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: properties + schema: + type: string + minLength: 1 + description: Comma-separated list of properties to filter + - in: query + name: search + schema: + type: string + description: Searches properties by name + - in: query + name: type + schema: + enum: + - event + - person + - group + - session + type: string + default: event + minLength: 1 + description: |- + What property definitions to return + + * `event` - event + * `person` - person + * `group` - group + * `session` - session + tags: + - property_definitions + security: + - PersonalAPIKeyAuth: + - property_definition:read + responses: + '200': + description: No response body + /api/projects/{project_id}/property_definitions/{id}/: + get: + operationId: property_definitions_retrieve_2 + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this property definition. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - property_definitions + security: + - PersonalAPIKeyAuth: + - property_definition:read + responses: + '200': + description: No response body + put: + operationId: property_definitions_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this property definition. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - property_definitions + security: + - PersonalAPIKeyAuth: + - property_definition:write + responses: + '200': + description: No response body + patch: + operationId: property_definitions_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this property definition. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - property_definitions + security: + - PersonalAPIKeyAuth: + - property_definition:write + responses: + '200': + description: No response body + delete: + operationId: property_definitions_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this property definition. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - property_definitions + security: + - PersonalAPIKeyAuth: + - property_definition:write + responses: + '204': + description: No response body + /api/projects/{project_id}/property_definitions/seen_together/: + get: + operationId: property_definitions_seen_together_retrieve + description: |- + Allows a caller to provide a list of event names and a single property name + Returns a map of the event names to a boolean representing whether that property has ever been seen with that event_name + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - property_definitions + security: + - PersonalAPIKeyAuth: + - property_definition:read + responses: + '200': + description: No response body + /api/projects/{project_id}/query/: + post: + operationId: query_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - query + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueryRequest' + required: true + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponseAlternative' + description: '' + /api/projects/{project_id}/query/{id}/: + get: + operationId: query_retrieve + description: (Experimental) + parameters: + - in: path + name: id + schema: + type: string + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - query + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/QueryStatusResponse' + description: '' + delete: + operationId: query_destroy + description: (Experimental) + parameters: + - in: path + name: id + schema: + type: string + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - query + security: + - PersonalAPIKeyAuth: + - query:read + responses: + '204': + description: Query cancelled + /api/projects/{project_id}/query/check_auth_for_async/: + post: + operationId: query_check_auth_for_async_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - query + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/query/draft_sql/: + get: + operationId: query_draft_sql_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - query + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/session_recording_playlists/: + get: + operationId: session_recording_playlists_list + parameters: + - in: query + name: created_by + schema: + type: integer + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: query + name: short_id + schema: + type: string + tags: + - session_recording_playlists + security: + - PersonalAPIKeyAuth: + - session_recording_playlist:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSessionRecordingPlaylistList' + description: '' + post: + operationId: session_recording_playlists_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - session_recording_playlists + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecordingPlaylist' + security: + - PersonalAPIKeyAuth: + - session_recording_playlist:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecordingPlaylist' + description: '' + /api/projects/{project_id}/session_recording_playlists/{short_id}/: + get: + operationId: session_recording_playlists_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: short_id + schema: + type: string + required: true + tags: + - session_recording_playlists + security: + - PersonalAPIKeyAuth: + - session_recording_playlist:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecordingPlaylist' + description: '' + put: + operationId: session_recording_playlists_update + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: short_id + schema: + type: string + required: true + tags: + - session_recording_playlists + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecordingPlaylist' + security: + - PersonalAPIKeyAuth: + - session_recording_playlist:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecordingPlaylist' + description: '' + patch: + operationId: session_recording_playlists_partial_update + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: short_id + schema: + type: string + required: true + tags: + - session_recording_playlists + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedSessionRecordingPlaylist' + security: + - PersonalAPIKeyAuth: + - session_recording_playlist:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecordingPlaylist' + description: '' + delete: + operationId: session_recording_playlists_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: short_id + schema: + type: string + required: true + tags: + - session_recording_playlists + security: + - PersonalAPIKeyAuth: + - session_recording_playlist:write + responses: + '405': + description: No response body + /api/projects/{project_id}/session_recording_playlists/{short_id}/recordings/: + get: + operationId: session_recording_playlists_recordings_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: short_id + schema: + type: string + required: true + tags: + - session_recording_playlists + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/session_recording_playlists/{short_id}/recordings/{session_recording_id}/: + post: + operationId: session_recording_playlists_recordings_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: session_recording_id + schema: + type: string + required: true + - in: path + name: short_id + schema: + type: string + required: true + tags: + - session_recording_playlists + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecordingPlaylist' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + delete: + operationId: session_recording_playlists_recordings_destroy + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: session_recording_id + schema: + type: string + required: true + - in: path + name: short_id + schema: + type: string + required: true + tags: + - session_recording_playlists + security: + - PersonalAPIKeyAuth: [] + responses: + '204': + description: No response body + /api/projects/{project_id}/session_recordings/: + get: + operationId: session_recordings_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - session_recordings + security: + - PersonalAPIKeyAuth: + - session_recording:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSessionRecordingList' + description: '' + /api/projects/{project_id}/session_recordings/{id}/: + get: + operationId: session_recordings_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this session recording. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - session_recordings + security: + - PersonalAPIKeyAuth: + - session_recording:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecording' + description: '' + put: + operationId: session_recordings_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this session recording. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - session_recordings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecording' + security: + - PersonalAPIKeyAuth: + - session_recording:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecording' + description: '' + patch: + operationId: session_recordings_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this session recording. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - session_recordings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedSessionRecording' + security: + - PersonalAPIKeyAuth: + - session_recording:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecording' + description: '' + delete: + operationId: session_recordings_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this session recording. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - session_recordings + security: + - PersonalAPIKeyAuth: + - session_recording:write + responses: + '204': + description: No response body + /api/projects/{project_id}/session_recordings/{recording_id}/sharing/: + get: + operationId: session_recordings_sharing_list + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + - in: path + name: recording_id + schema: + type: string + required: true + tags: + - session_recordings + security: + - PersonalAPIKeyAuth: + - sharing_configuration:read + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SharingConfiguration' + description: '' + /api/projects/{project_id}/session_recordings/ai/filters/: + post: + operationId: session_recordings_ai_filters_create + description: Generate session recording filters using AI. This is in development + and likely to change, you should not depend on this API. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - session_recordings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecording' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/session_recordings/ai/regex/: + post: + operationId: session_recordings_ai_regex_create + description: Generate regex patterns using AI. This is in development and likely + to change, you should not depend on this API. + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - session_recordings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRecording' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/sessions/property_definitions/: + get: + operationId: sessions_property_definitions_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - sessions + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/sessions/values/: + get: + operationId: sessions_values_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - sessions + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/projects/{project_id}/subscriptions/: + get: + operationId: subscriptions_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - subscriptions + security: + - PersonalAPIKeyAuth: + - subscription:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSubscriptionList' + description: '' + post: + operationId: subscriptions_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - subscriptions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Subscription' + required: true + security: + - PersonalAPIKeyAuth: + - subscription:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Subscription' + description: '' + /api/projects/{project_id}/subscriptions/{id}/: + get: + operationId: subscriptions_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this subscription. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - subscriptions + security: + - PersonalAPIKeyAuth: + - subscription:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Subscription' + description: '' + put: + operationId: subscriptions_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this subscription. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - subscriptions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Subscription' + required: true + security: + - PersonalAPIKeyAuth: + - subscription:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Subscription' + description: '' + patch: + operationId: subscriptions_partial_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this subscription. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - subscriptions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedSubscription' + security: + - PersonalAPIKeyAuth: + - subscription:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Subscription' + description: '' + delete: + operationId: subscriptions_destroy + description: Hard delete of this model is not allowed. Use a patch API call + to set "deleted" to true + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this subscription. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - subscriptions + security: + - PersonalAPIKeyAuth: + - subscription:write + responses: + '405': + description: No response body + /api/projects/{project_id}/surveys/: + get: + operationId: surveys_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - surveys + security: + - PersonalAPIKeyAuth: + - survey:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSurveyList' + description: '' + post: + operationId: surveys_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - surveys + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly' + required: true + security: + - PersonalAPIKeyAuth: + - survey:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly' + description: '' + /api/projects/{project_id}/surveys/{id}/: + get: + operationId: surveys_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this survey. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - surveys + security: + - PersonalAPIKeyAuth: + - survey:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Survey' + description: '' + put: + operationId: surveys_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this survey. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - surveys + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Survey' + required: true + security: + - PersonalAPIKeyAuth: + - survey:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Survey' + description: '' + patch: + operationId: surveys_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this survey. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - surveys + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedSurveySerializerCreateUpdateOnly' + security: + - PersonalAPIKeyAuth: + - survey:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly' + description: '' + delete: + operationId: surveys_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this survey. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - surveys + security: + - PersonalAPIKeyAuth: + - survey:write + responses: + '204': + description: No response body + /api/projects/{project_id}/surveys/{id}/activity/: + get: + operationId: surveys_activity_retrieve_2 + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this survey. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - surveys + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/projects/{project_id}/surveys/{id}/summarize_responses/: + post: + operationId: surveys_summarize_responses_create + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this survey. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - surveys + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly' + required: true + security: + - PersonalAPIKeyAuth: + - survey:read + responses: + '200': + description: No response body + /api/projects/{project_id}/surveys/activity/: + get: + operationId: surveys_activity_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - surveys + security: + - PersonalAPIKeyAuth: + - activity_log:read + responses: + '200': + description: No response body + /api/projects/{project_id}/surveys/responses_count/: + get: + operationId: surveys_responses_count_retrieve + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - surveys + security: + - PersonalAPIKeyAuth: + - survey:read + responses: + '200': + description: No response body + /api/projects/{project_id}/web_experiments/: + get: + operationId: web_experiments_list + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - web_experiments + security: + - PersonalAPIKeyAuth: + - experiment:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedWebExperimentsAPIList' + description: '' + post: + operationId: web_experiments_create + parameters: + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - web_experiments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebExperimentsAPI' + required: true + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/WebExperimentsAPI' + description: '' + /api/projects/{project_id}/web_experiments/{id}/: + get: + operationId: web_experiments_retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this web experiment. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - web_experiments + security: + - PersonalAPIKeyAuth: + - experiment:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WebExperimentsAPI' + description: '' + put: + operationId: web_experiments_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this web experiment. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - web_experiments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebExperimentsAPI' + required: true + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WebExperimentsAPI' + description: '' + patch: + operationId: web_experiments_partial_update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this web experiment. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - web_experiments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedWebExperimentsAPI' + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WebExperimentsAPI' + description: '' + delete: + operationId: web_experiments_destroy + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this web experiment. + required: true + - in: path + name: project_id + required: true + schema: + type: string + description: Project ID of the project you're trying to access. To find the + ID of the project, make a call to /api/projects/. + tags: + - web_experiments + security: + - PersonalAPIKeyAuth: + - experiment:write + responses: + '204': + description: No response body + /api/users/: + get: + operationId: users_list + parameters: + - in: query + name: is_staff + schema: + type: boolean + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + tags: + - users + - users + security: + - PersonalAPIKeyAuth: + - user:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUserList' + description: '' + /api/users/{uuid}/: + get: + operationId: users_retrieve + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + security: + - PersonalAPIKeyAuth: + - user:read + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: '' + put: + operationId: users_update + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + security: + - PersonalAPIKeyAuth: + - user:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: '' + patch: + operationId: users_partial_update + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedUser' + security: + - PersonalAPIKeyAuth: + - user:write + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: '' + /api/users/{uuid}/hedgehog_config/: + get: + operationId: users_hedgehog_config_retrieve + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + patch: + operationId: users_hedgehog_config_partial_update + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedUser' + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/users/{uuid}/scene_personalisation/: + post: + operationId: users_scene_personalisation_create + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/users/{uuid}/start_2fa_setup/: + get: + operationId: users_start_2fa_setup_retrieve + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/users/{uuid}/two_factor_backup_codes/: + post: + operationId: users_two_factor_backup_codes_create + description: Generate new backup codes, invalidating any existing ones + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/users/{uuid}/two_factor_disable/: + post: + operationId: users_two_factor_disable_create + description: Disable 2FA and remove all related devices + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/users/{uuid}/two_factor_start_setup/: + get: + operationId: users_two_factor_start_setup_retrieve + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/users/{uuid}/two_factor_status/: + get: + operationId: users_two_factor_status_retrieve + description: Get current 2FA status including backup codes if enabled + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/users/{uuid}/two_factor_validate/: + post: + operationId: users_two_factor_validate_create + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/users/{uuid}/validate_2fa/: + post: + operationId: users_validate_2fa_create + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + required: true + tags: + - users + - users + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + security: + - PersonalAPIKeyAuth: [] + responses: + '200': + description: No response body + /api/users/request_email_verification/: + post: + operationId: users_request_email_verification_create + tags: + - users + - users + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + security: + - {} + responses: + '200': + description: No response body + /api/users/verify_email/: + post: + operationId: users_verify_email_create + tags: + - users + - users + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + security: + - {} + responses: + '200': + description: No response body +components: + schemas: + Action: + type: object + description: Serializer mixin that resolves appropriate response for tags depending + on license. + properties: + id: + type: integer + readOnly: true + name: + type: string + nullable: true + maxLength: 400 + description: + type: string + tags: + type: array + items: {} + post_to_slack: + type: boolean + slack_message_format: + type: string + maxLength: 1200 + steps: + type: array + items: + $ref: '#/components/schemas/ActionStepJSON' + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + deleted: + type: boolean + is_calculating: + type: boolean + readOnly: true + last_calculated_at: + type: string + format: date-time + team_id: + type: integer + readOnly: true + is_action: + type: boolean + readOnly: true + default: true + bytecode_error: + type: string + readOnly: true + nullable: true + pinned_at: + type: string + format: date-time + nullable: true + creation_context: + type: string + readOnly: true + required: + - bytecode_error + - created_at + - created_by + - creation_context + - id + - is_action + - is_calculating + - team_id + ActionConversionGoal: + additionalProperties: false + properties: + actionId: + title: Actionid + type: integer + required: + - actionId + title: ActionConversionGoal + type: object + ActionStepJSON: + type: object + properties: + event: + type: string + nullable: true + properties: + type: array + items: + type: object + additionalProperties: {} + nullable: true + selector: + type: string + nullable: true + tag_name: + type: string + nullable: true + text: + type: string + nullable: true + text_matching: + nullable: true + oneOf: + - $ref: '#/components/schemas/UrlMatchingEnum' + - $ref: '#/components/schemas/NullEnum' + href: + type: string + nullable: true + href_matching: + nullable: true + oneOf: + - $ref: '#/components/schemas/UrlMatchingEnum' + - $ref: '#/components/schemas/NullEnum' + url: + type: string + nullable: true + url_matching: + nullable: true + oneOf: + - $ref: '#/components/schemas/UrlMatchingEnum' + - $ref: '#/components/schemas/NullEnum' + ActionsNode: + additionalProperties: false + properties: + custom_name: + anyOf: + - type: string + default: null + title: Custom Name + fixedProperties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Fixed properties in the query, can't be edited in the interface + (e.g. scoping down by person) + title: Fixedproperties + id: + title: Id + type: integer + kind: + allOf: + - $ref: '#/components/schemas/KindCfaEnum' + + default: ActionsNode + title: Kind + math: + anyOf: + - $ref: '#/components/schemas/BaseMathType' + - $ref: '#/components/schemas/FunnelMathType' + - $ref: '#/components/schemas/PropertyMathType' + - $ref: '#/components/schemas/CountPerActorMathType' + - enum: + - unique_group + type: string + - enum: + - hogql + type: string + default: null + title: Math + math_group_type_index: + anyOf: + - $ref: '#/components/schemas/MathGroupTypeIndex' + default: null + math_hogql: + anyOf: + - type: string + default: null + title: Math Hogql + math_property: + anyOf: + - type: string + default: null + title: Math Property + math_property_type: + anyOf: + - type: string + default: null + title: Math Property Type + name: + anyOf: + - type: string + default: null + title: Name + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Properties configurable in the interface + title: Properties + response: + anyOf: + - type: object + default: null + title: Response + required: + - id + title: ActionsNode + type: object + ActivityLog: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + user: + $ref: '#/components/schemas/UserBasic' + unread: + type: boolean + description: is the date of this log item newer than the user's bookmark + readOnly: true + organization_id: + type: string + format: uuid + nullable: true + was_impersonated: + type: boolean + nullable: true + is_system: + type: boolean + nullable: true + activity: + type: string + maxLength: 79 + item_id: + type: string + nullable: true + maxLength: 72 + scope: + type: string + maxLength: 79 + detail: + nullable: true + created_at: + type: string + format: date-time + required: + - activity + - id + - scope + - unread + - user + ActorsPropertyTaxonomyQuery: + additionalProperties: false + properties: + group_type_index: + anyOf: + - type: integer + default: null + title: Group Type Index + kind: + allOf: + - $ref: '#/components/schemas/ActorsPropertyTaxonomyQueryKindEnum' + + default: ActorsPropertyTaxonomyQuery + title: Kind + maxPropertyValues: + anyOf: + - type: integer + default: null + title: Maxpropertyvalues + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + property: + title: Property + type: string + response: + anyOf: + - $ref: '#/components/schemas/ActorsPropertyTaxonomyQueryResponse' + default: null + required: + - property + title: ActorsPropertyTaxonomyQuery + type: object + ActorsPropertyTaxonomyQueryKindEnum: + enum: + - ActorsPropertyTaxonomyQuery + type: string + ActorsPropertyTaxonomyQueryResponse: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + $ref: '#/components/schemas/ActorsPropertyTaxonomyResponse' + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: ActorsPropertyTaxonomyQueryResponse + type: object + ActorsPropertyTaxonomyResponse: + additionalProperties: false + properties: + sample_count: + title: Sample Count + type: integer + sample_values: + items: + anyOf: + - type: string + - type: number + - type: boolean + - type: integer + title: Sample Values + type: array + required: + - sample_count + - sample_values + title: ActorsPropertyTaxonomyResponse + type: object + ActorsQuery: + additionalProperties: false + properties: + fixedProperties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + type: array + default: null + description: Currently only person filters supported. No filters for querying + groups. See `filter_conditions()` in actor_strategies.py. + title: Fixedproperties + kind: + allOf: + - $ref: '#/components/schemas/ActorsQueryKindEnum' + + default: ActorsQuery + title: Kind + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + orderBy: + anyOf: + - items: + type: string + type: array + default: null + title: Orderby + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + type: array + - $ref: '#/components/schemas/PropertyGroupFilterValue' + default: null + description: Currently only person filters supported. No filters for querying + groups. See `filter_conditions()` in actor_strategies.py. + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/ActorsQueryResponse' + default: null + search: + anyOf: + - type: string + default: null + title: Search + select: + anyOf: + - items: + type: string + type: array + default: null + title: Select + source: + anyOf: + - $ref: '#/components/schemas/InsightActorsQuery' + - $ref: '#/components/schemas/FunnelsActorsQuery' + - $ref: '#/components/schemas/FunnelCorrelationActorsQuery' + - $ref: '#/components/schemas/StickinessActorsQuery' + - $ref: '#/components/schemas/HogQLQuery' + default: null + title: Source + title: ActorsQuery + type: object + ActorsQueryKindEnum: + enum: + - ActorsQuery + type: string + ActorsQueryResponse: + additionalProperties: false + properties: + columns: + items: {} + title: Columns + type: array + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + description: Generated HogQL query. + title: Hogql + type: string + limit: + title: Limit + type: integer + missing_actors_count: + anyOf: + - type: integer + default: null + title: Missing Actors Count + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + title: Offset + type: integer + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + items: {} + type: array + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + items: + type: string + title: Types + type: array + required: + - columns + - hogql + - limit + - offset + - results + - types + title: ActorsQueryResponse + type: object + AggregationAxisFormat: + enum: + - numeric + - duration + - duration_ms + - percentage + - percentage_scaled + title: AggregationAxisFormat + type: string + Annotation: + type: object + properties: + id: + type: integer + readOnly: true + content: + type: string + nullable: true + maxLength: 400 + date_marker: + type: string + format: date-time + nullable: true + creation_type: + $ref: '#/components/schemas/CreationTypeEnum' + dashboard_item: + type: integer + nullable: true + dashboard_id: + type: integer + nullable: true + readOnly: true + dashboard_name: + type: string + nullable: true + readOnly: true + insight_short_id: + type: string + nullable: true + readOnly: true + insight_name: + type: string + nullable: true + readOnly: true + insight_derived_name: + type: string + nullable: true + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + nullable: true + updated_at: + type: string + format: date-time + readOnly: true + deleted: + type: boolean + scope: + $ref: '#/components/schemas/AnnotationScopeEnum' + required: + - created_at + - created_by + - dashboard_id + - dashboard_name + - id + - insight_derived_name + - insight_name + - insight_short_id + - updated_at + AnnotationScopeEnum: + enum: + - dashboard_item + - dashboard + - project + - organization + type: string + description: |- + * `dashboard_item` - insight + * `dashboard` - dashboard + * `project` - project + * `organization` - organization + AutocompleteCompletionItem: + additionalProperties: false + properties: + detail: + anyOf: + - type: string + default: null + description: A human-readable string with additional information about this + item, like type or symbol information. + title: Detail + documentation: + anyOf: + - type: string + default: null + description: A human-readable string that represents a doc-comment. + title: Documentation + insertText: + description: A string or snippet that should be inserted in a document when + selecting this completion. + title: Inserttext + type: string + kind: + $ref: '#/components/schemas/AutocompleteCompletionItemKind' + label: + description: The label of this completion item. By default this is also + the text that is inserted when selecting this completion. + title: Label + type: string + required: + - insertText + - kind + - label + title: AutocompleteCompletionItem + type: object + AutocompleteCompletionItemKind: + enum: + - Method + - Function + - Constructor + - Field + - Variable + - Class + - Struct + - Interface + - Module + - Property + - Event + - Operator + - Unit + - Value + - Constant + - Enum + - EnumMember + - Keyword + - Text + - Color + - File + - Reference + - Customcolor + - Folder + - TypeParameter + - User + - Issue + - Snippet + title: AutocompleteCompletionItemKind + type: string + BaseMathType: + enum: + - total + - dau + - weekly_active + - monthly_active + - unique_session + - first_time_for_user + - first_matching_event_for_user + title: BaseMathType + type: string + BatchExport: + type: object + description: Serializer for a BatchExport model. + properties: + id: + type: string + format: uuid + readOnly: true + team_id: + type: integer + description: The team this belongs to. + readOnly: true + name: + type: string + description: A human-readable name for this BatchExport. + model: + nullable: true + description: |- + Which model this BatchExport is exporting. + + * `events` - Events + * `persons` - Persons + * `sessions` - Sessions + oneOf: + - $ref: '#/components/schemas/ModelEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + destination: + $ref: '#/components/schemas/BatchExportDestination' + interval: + $ref: '#/components/schemas/IntervalEnum' + paused: + type: boolean + description: Whether this BatchExport is paused or not. + created_at: + type: string + format: date-time + readOnly: true + description: The timestamp at which this BatchExport was created. + last_updated_at: + type: string + format: date-time + readOnly: true + description: The timestamp at which this BatchExport was last updated. + last_paused_at: + type: string + format: date-time + nullable: true + description: The timestamp at which this BatchExport was last paused. + start_at: + type: string + format: date-time + nullable: true + description: Time before which any Batch Export runs won't be triggered. + end_at: + type: string + format: date-time + nullable: true + description: Time after which any Batch Export runs won't be triggered. + latest_runs: + type: array + items: + $ref: '#/components/schemas/BatchExportRun' + readOnly: true + hogql_query: + type: string + schema: + readOnly: true + nullable: true + description: A schema of custom fields to select when exporting data. + filters: + nullable: true + required: + - created_at + - destination + - id + - interval + - last_updated_at + - latest_runs + - name + - schema + - team_id + BatchExportBackfill: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + progress: + type: string + readOnly: true + start_at: + type: string + format: date-time + nullable: true + description: The start of the data interval. + end_at: + type: string + format: date-time + nullable: true + description: The end of the data interval. + status: + allOf: + - $ref: '#/components/schemas/StatusC1bEnum' + description: |- + The status of this backfill. + + * `Cancelled` - Cancelled + * `Completed` - Completed + * `ContinuedAsNew` - Continued As New + * `Failed` - Failed + * `FailedRetryable` - Failed Retryable + * `Terminated` - Terminated + * `TimedOut` - Timedout + * `Running` - Running + * `Starting` - Starting + created_at: + type: string + format: date-time + readOnly: true + description: The timestamp at which this BatchExportBackfill was created. + finished_at: + type: string + format: date-time + nullable: true + description: The timestamp at which this BatchExportBackfill finished, successfully + or not. + last_updated_at: + type: string + format: date-time + readOnly: true + description: The timestamp at which this BatchExportBackfill was last updated. + team: + type: integer + description: The team this belongs to. + batch_export: + type: string + format: uuid + description: The BatchExport this backfill belongs to. + required: + - batch_export + - created_at + - id + - last_updated_at + - progress + - status + - team + BatchExportDestination: + type: object + description: Serializer for an BatchExportDestination model. + properties: + type: + allOf: + - $ref: '#/components/schemas/BatchExportDestinationTypeEnum' + description: |- + A choice of supported BatchExportDestination types. + + * `S3` - S3 + * `Snowflake` - Snowflake + * `Postgres` - Postgres + * `Redshift` - Redshift + * `BigQuery` - Bigquery + * `HTTP` - Http + * `NoOp` - Noop + config: + description: A JSON field to store all configuration parameters required + to access a BatchExportDestination. + required: + - type + BatchExportDestinationTypeEnum: + enum: + - S3 + - Snowflake + - Postgres + - Redshift + - BigQuery + - HTTP + - NoOp + type: string + description: |- + * `S3` - S3 + * `Snowflake` - Snowflake + * `Postgres` - Postgres + * `Redshift` - Redshift + * `BigQuery` - Bigquery + * `HTTP` - Http + * `NoOp` - Noop + BatchExportRun: + type: object + description: Serializer for a BatchExportRun model. + properties: + id: + type: string + format: uuid + readOnly: true + status: + allOf: + - $ref: '#/components/schemas/StatusC1bEnum' + description: |- + The status of this run. + + * `Cancelled` - Cancelled + * `Completed` - Completed + * `ContinuedAsNew` - Continued As New + * `Failed` - Failed + * `FailedRetryable` - Failed Retryable + * `Terminated` - Terminated + * `TimedOut` - Timedout + * `Running` - Running + * `Starting` - Starting + records_completed: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + description: The number of records that have been exported. + latest_error: + type: string + nullable: true + description: The latest error that occurred during this run. + data_interval_start: + type: string + format: date-time + nullable: true + description: The start of the data interval. + data_interval_end: + type: string + format: date-time + description: The end of the data interval. + cursor: + type: string + nullable: true + description: An opaque cursor that may be used to resume. + created_at: + type: string + format: date-time + readOnly: true + description: The timestamp at which this BatchExportRun was created. + finished_at: + type: string + format: date-time + nullable: true + description: The timestamp at which this BatchExportRun finished, successfully + or not. + last_updated_at: + type: string + format: date-time + readOnly: true + description: The timestamp at which this BatchExportRun was last updated. + records_total_count: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + description: The total count of records that should be exported in this + BatchExportRun. + batch_export: + type: string + format: uuid + readOnly: true + description: The BatchExport this run belongs to. + backfill: + type: string + format: uuid + nullable: true + description: The backfill this run belongs to. + required: + - batch_export + - created_at + - data_interval_end + - id + - last_updated_at + - status + BlankEnum: + enum: + - '' + BounceRatePageViewMode: + enum: + - count_pageviews + - uniq_urls + - uniq_page_screen_autocaptures + title: BounceRatePageViewMode + type: string + Breakdown: + additionalProperties: false + properties: + group_type_index: + anyOf: + - type: integer + default: null + title: Group Type Index + histogram_bin_count: + anyOf: + - type: integer + default: null + title: Histogram Bin Count + normalize_url: + anyOf: + - type: boolean + default: null + title: Normalize Url + property: + title: Property + type: string + type: + anyOf: + - $ref: '#/components/schemas/MultipleBreakdownType' + default: null + required: + - property + title: Breakdown + type: object + BreakdownAttributionType: + enum: + - first_touch + - last_touch + - all_events + - step + title: BreakdownAttributionType + type: string + BreakdownFilter: + additionalProperties: false + properties: + breakdown: + anyOf: + - type: string + - items: + anyOf: + - type: string + - type: integer + type: array + - type: integer + default: null + title: Breakdown + breakdown_group_type_index: + anyOf: + - type: integer + default: null + title: Breakdown Group Type Index + breakdown_hide_other_aggregation: + anyOf: + - type: boolean + default: null + title: Breakdown Hide Other Aggregation + breakdown_histogram_bin_count: + anyOf: + - type: integer + default: null + title: Breakdown Histogram Bin Count + breakdown_limit: + anyOf: + - type: integer + default: null + title: Breakdown Limit + breakdown_normalize_url: + anyOf: + - type: boolean + default: null + title: Breakdown Normalize Url + breakdown_type: + anyOf: + - $ref: '#/components/schemas/BreakdownType' + default: event + breakdowns: + anyOf: + - items: + $ref: '#/components/schemas/Breakdown' + maxItems: 3 + type: array + default: null + title: Breakdowns + title: BreakdownFilter + type: object + BreakdownItem: + additionalProperties: false + properties: + label: + title: Label + type: string + value: + anyOf: + - type: string + - type: integer + title: Value + required: + - label + - value + title: BreakdownItem + type: object + BreakdownType: + enum: + - cohort + - person + - event + - group + - session + - hogql + - data_warehouse + - data_warehouse_person_property + title: BreakdownType + type: string + ByweekdayEnum: + enum: + - monday + - tuesday + - wednesday + - thursday + - friday + - saturday + - sunday + type: string + description: |- + * `monday` - Monday + * `tuesday` - Tuesday + * `wednesday` - Wednesday + * `thursday` - Thursday + * `friday` - Friday + * `saturday` - Saturday + * `sunday` - Sunday + ChartAxis: + additionalProperties: false + properties: + column: + title: Column + type: string + settings: + anyOf: + - $ref: '#/components/schemas/Settings' + default: null + required: + - column + title: ChartAxis + type: object + ChartDisplayType: + enum: + - ActionsLineGraph + - ActionsBar + - ActionsStackedBar + - ActionsAreaGraph + - ActionsLineGraphCumulative + - BoldNumber + - ActionsPie + - ActionsBarValue + - ActionsTable + - WorldMap + title: ChartDisplayType + type: string + ChartSettings: + additionalProperties: false + properties: + goalLines: + anyOf: + - items: + $ref: '#/components/schemas/GoalLine' + type: array + default: null + title: Goallines + leftYAxisSettings: + anyOf: + - $ref: '#/components/schemas/YAxisSettings' + default: null + rightYAxisSettings: + anyOf: + - $ref: '#/components/schemas/YAxisSettings' + default: null + seriesBreakdownColumn: + anyOf: + - type: string + default: null + title: Seriesbreakdowncolumn + showLegend: + anyOf: + - type: boolean + default: null + title: Showlegend + stackBars100: + anyOf: + - type: boolean + default: null + description: Whether we fill the bars to 100% in stacked mode + title: Stackbars100 + xAxis: + anyOf: + - $ref: '#/components/schemas/ChartAxis' + default: null + yAxis: + anyOf: + - items: + $ref: '#/components/schemas/ChartAxis' + type: array + default: null + title: Yaxis + yAxisAtZero: + anyOf: + - type: boolean + default: null + description: 'Deprecated: use `[left|right]YAxisSettings`. Whether the Y + axis should start at zero' + title: Yaxisatzero + title: ChartSettings + type: object + ChartSettingsDisplay: + additionalProperties: false + properties: + color: + anyOf: + - type: string + default: null + title: Color + displayType: + anyOf: + - $ref: '#/components/schemas/DisplayType' + default: null + label: + anyOf: + - type: string + default: null + title: Label + trendLine: + anyOf: + - type: boolean + default: null + title: Trendline + yAxisPosition: + anyOf: + - $ref: '#/components/schemas/YAxisPosition' + default: null + title: ChartSettingsDisplay + type: object + ChartSettingsFormatting: + additionalProperties: false + properties: + decimalPlaces: + anyOf: + - type: number + default: null + title: Decimalplaces + prefix: + anyOf: + - type: string + default: null + title: Prefix + style: + anyOf: + - $ref: '#/components/schemas/Style' + default: null + suffix: + anyOf: + - type: string + default: null + title: Suffix + title: ChartSettingsFormatting + type: object + ClickhouseEvent: + type: object + properties: + id: + type: string + readOnly: true + distinct_id: + type: string + readOnly: true + properties: + type: string + readOnly: true + event: + type: string + readOnly: true + timestamp: + type: string + readOnly: true + person: + type: string + readOnly: true + elements: + type: string + readOnly: true + elements_chain: + type: string + readOnly: true + required: + - distinct_id + - elements + - elements_chain + - event + - id + - person + - properties + - timestamp + ClickhouseQueryProgress: + additionalProperties: false + properties: + active_cpu_time: + title: Active Cpu Time + type: integer + bytes_read: + title: Bytes Read + type: integer + estimated_rows_total: + title: Estimated Rows Total + type: integer + rows_read: + title: Rows Read + type: integer + time_elapsed: + title: Time Elapsed + type: integer + required: + - active_cpu_time + - bytes_read + - estimated_rows_total + - rows_read + - time_elapsed + title: ClickhouseQueryProgress + type: object + Cohort: + type: object + properties: + id: + type: integer + readOnly: true + name: + type: string + nullable: true + maxLength: 400 + description: + type: string + maxLength: 1000 + groups: {} + deleted: + type: boolean + filters: + nullable: true + query: + nullable: true + is_calculating: + type: boolean + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + nullable: true + last_calculation: + type: string + format: date-time + readOnly: true + nullable: true + errors_calculating: + type: integer + readOnly: true + count: + type: integer + readOnly: true + nullable: true + is_static: + type: boolean + experiment_set: + type: array + items: + type: integer + readOnly: true + required: + - count + - created_at + - created_by + - errors_calculating + - experiment_set + - id + - is_calculating + - last_calculation + CohortPropertyFilter: + additionalProperties: false + properties: + cohort_name: + anyOf: + - type: string + default: null + title: Cohort Name + key: + allOf: + - $ref: '#/components/schemas/KeyEnum' + + default: id + title: Key + label: + anyOf: + - type: string + default: null + title: Label + operator: + anyOf: + - $ref: '#/components/schemas/PropertyOperator' + default: in + type: + allOf: + - $ref: '#/components/schemas/CohortPropertyFilterTypeEnum' + + default: cohort + title: Type + value: + title: Value + type: integer + required: + - value + title: CohortPropertyFilter + type: object + CohortPropertyFilterTypeEnum: + enum: + - cohort + type: string + ColorMode: + enum: + - light + - dark + title: ColorMode + type: string + Compare: + enum: + - current + - previous + title: Compare + type: string + CompareFilter: + additionalProperties: false + properties: + compare: + anyOf: + - type: boolean + default: false + description: Whether to compare the current date range to a previous date + range. + title: Compare + compare_to: + anyOf: + - type: string + default: null + description: 'The date range to compare to. The value is a relative date. + Examples of relative dates are: `-1y` for 1 year ago, `-14m` for 14 months + ago, `-100w` for 100 weeks ago, `-14d` for 14 days ago, `-30h` for 30 + hours ago.' + title: Compare To + title: CompareFilter + type: object + CompareItem: + additionalProperties: false + properties: + label: + title: Label + type: string + value: + title: Value + type: string + required: + - label + - value + title: CompareItem + type: object + ConditionalFormattingRule: + additionalProperties: false + properties: + bytecode: + items: {} + title: Bytecode + type: array + color: + title: Color + type: string + colorMode: + anyOf: + - $ref: '#/components/schemas/ColorMode' + default: null + columnName: + title: Columnname + type: string + id: + title: Id + type: string + input: + title: Input + type: string + templateId: + title: Templateid + type: string + required: + - bytecode + - color + - columnName + - id + - input + - templateId + title: ConditionalFormattingRule + type: object + CookielessServerHashModeEnum: + enum: + - 0 + - 1 + - 2 + type: integer + description: |- + * `0` - Disabled + * `1` - Stateless + * `2` - Stateful + CorrelationType: + enum: + - success + - failure + title: CorrelationType + type: string + CountPerActorMathType: + enum: + - avg_count_per_actor + - min_count_per_actor + - max_count_per_actor + - median_count_per_actor + - p75_count_per_actor + - p90_count_per_actor + - p95_count_per_actor + - p99_count_per_actor + title: CountPerActorMathType + type: string + CreationContextEnum: + enum: + - feature_flags + - experiments + - surveys + - early_access_features + - web_experiments + type: string + description: |- + * `feature_flags` - feature_flags + * `experiments` - experiments + * `surveys` - surveys + * `early_access_features` - early_access_features + * `web_experiments` - web_experiments + CreationModeEnum: + enum: + - default + - template + - duplicate + type: string + description: |- + * `default` - Default + * `template` - Template + * `duplicate` - Duplicate + CreationTypeEnum: + enum: + - USR + - GIT + type: string + description: |- + * `USR` - user + * `GIT` - GitHub + CustomChannelCondition: + additionalProperties: false + properties: + id: + title: Id + type: string + key: + $ref: '#/components/schemas/CustomChannelField' + op: + $ref: '#/components/schemas/CustomChannelOperator' + value: + anyOf: + - type: string + - items: + type: string + type: array + default: null + title: Value + required: + - id + - key + - op + title: CustomChannelCondition + type: object + CustomChannelField: + enum: + - utm_source + - utm_medium + - utm_campaign + - referring_domain + - url + - pathname + - hostname + title: CustomChannelField + type: string + CustomChannelOperator: + enum: + - exact + - is_not + - is_set + - is_not_set + - icontains + - not_icontains + - regex + - not_regex + title: CustomChannelOperator + type: string + CustomChannelRule: + additionalProperties: false + properties: + channel_type: + title: Channel Type + type: string + combiner: + $ref: '#/components/schemas/FilterLogicalOperator' + id: + title: Id + type: string + items: + items: + $ref: '#/components/schemas/CustomChannelCondition' + title: Items + type: array + required: + - channel_type + - combiner + - id + - items + title: CustomChannelRule + type: object + CustomEventConversionGoal: + additionalProperties: false + properties: + customEventName: + title: Customeventname + type: string + required: + - customEventName + title: CustomEventConversionGoal + type: object + Dashboard: + type: object + description: Serializer mixin that resolves appropriate response for tags depending + on license. + properties: + id: + type: integer + readOnly: true + name: + type: string + nullable: true + maxLength: 400 + description: + type: string + pinned: + type: boolean + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + is_shared: + type: boolean + readOnly: true + deleted: + type: boolean + creation_mode: + allOf: + - $ref: '#/components/schemas/CreationModeEnum' + readOnly: true + use_template: + type: string + writeOnly: true + use_dashboard: + type: integer + writeOnly: true + nullable: true + delete_insights: + type: boolean + writeOnly: true + default: false + filters: + type: object + additionalProperties: {} + readOnly: true + variables: + type: object + additionalProperties: {} + readOnly: true + tags: + type: array + items: {} + tiles: + type: array + items: + type: object + additionalProperties: {} + nullable: true + readOnly: true + restriction_level: + allOf: + - $ref: '#/components/schemas/DashboardRestrictionLevel' + minimum: 0 + maximum: 32767 + effective_restriction_level: + allOf: + - $ref: '#/components/schemas/EffectiveRestrictionLevelEnum' + readOnly: true + effective_privilege_level: + allOf: + - $ref: '#/components/schemas/EffectivePrivilegeLevelEnum' + readOnly: true + user_access_level: + type: string + nullable: true + readOnly: true + description: The effective access level the user has for this object + access_control_version: + type: string + readOnly: true + required: + - access_control_version + - created_at + - created_by + - creation_mode + - effective_privilege_level + - effective_restriction_level + - filters + - id + - is_shared + - tiles + - user_access_level + - variables + DashboardBasic: + type: object + description: Serializer mixin that resolves appropriate response for tags depending + on license. + properties: + id: + type: integer + readOnly: true + name: + type: string + readOnly: true + nullable: true + description: + type: string + readOnly: true + pinned: + type: boolean + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + is_shared: + type: boolean + readOnly: true + deleted: + type: boolean + readOnly: true + creation_mode: + allOf: + - $ref: '#/components/schemas/CreationModeEnum' + readOnly: true + tags: + type: array + items: {} + restriction_level: + allOf: + - $ref: '#/components/schemas/DashboardRestrictionLevel' + readOnly: true + effective_restriction_level: + allOf: + - $ref: '#/components/schemas/EffectiveRestrictionLevelEnum' + readOnly: true + effective_privilege_level: + allOf: + - $ref: '#/components/schemas/EffectivePrivilegeLevelEnum' + readOnly: true + user_access_level: + type: string + nullable: true + readOnly: true + description: The effective access level the user has for this object + access_control_version: + type: string + readOnly: true + required: + - access_control_version + - created_at + - created_by + - creation_mode + - deleted + - description + - effective_privilege_level + - effective_restriction_level + - id + - is_shared + - name + - pinned + - restriction_level + - user_access_level + DashboardCollaborator: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + dashboard_id: + type: integer + readOnly: true + user: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + level: + allOf: + - $ref: '#/components/schemas/DashboardRestrictionLevel' + minimum: 0 + maximum: 32767 + added_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + user_uuid: + type: string + format: uuid + writeOnly: true + required: + - added_at + - dashboard_id + - id + - level + - updated_at + - user + - user_uuid + DashboardFilter: + additionalProperties: false + properties: + breakdown_filter: + anyOf: + - $ref: '#/components/schemas/BreakdownFilter' + default: null + date_from: + anyOf: + - type: string + default: null + title: Date From + date_to: + anyOf: + - type: string + default: null + title: Date To + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + title: Properties + title: DashboardFilter + type: object + DashboardRestrictionLevel: + enum: + - 21 + - 37 + type: integer + description: |- + * `21` - Everyone in the project can edit + * `37` - Only those invited to this dashboard can edit + DashboardTemplate: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + template_name: + type: string + nullable: true + maxLength: 400 + dashboard_description: + type: string + nullable: true + maxLength: 400 + dashboard_filters: + nullable: true + tags: + type: array + items: + type: string + maxLength: 255 + nullable: true + tiles: + nullable: true + variables: + nullable: true + deleted: + type: boolean + nullable: true + created_at: + type: string + format: date-time + readOnly: true + nullable: true + created_by: + type: integer + nullable: true + image_url: + type: string + nullable: true + maxLength: 8201 + team_id: + type: integer + nullable: true + readOnly: true + scope: + nullable: true + oneOf: + - $ref: '#/components/schemas/DashboardTemplateScopeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + availability_contexts: + type: array + items: + type: string + maxLength: 255 + nullable: true + required: + - created_at + - id + - team_id + DashboardTemplateScopeEnum: + enum: + - team + - global + - feature_flag + type: string + description: |- + * `team` - Only team + * `global` - Global + * `feature_flag` - Feature Flag + DashboardTileBasic: + type: object + properties: + id: + type: integer + readOnly: true + dashboard_id: + type: integer + readOnly: true + deleted: + type: boolean + nullable: true + required: + - dashboard_id + - id + DataColorToken: + enum: + - preset-1 + - preset-2 + - preset-3 + - preset-4 + - preset-5 + - preset-6 + - preset-7 + - preset-8 + - preset-9 + - preset-10 + - preset-11 + - preset-12 + - preset-13 + - preset-14 + - preset-15 + title: DataColorToken + type: string + DataTableNode: + additionalProperties: false + properties: + allowSorting: + anyOf: + - type: boolean + default: null + description: 'Can the user click on column headers to sort the table? (default: + true)' + title: Allowsorting + columns: + anyOf: + - items: + type: string + type: array + default: null + description: Columns shown in the table, unless the `source` provides them. + title: Columns + embedded: + anyOf: + - type: boolean + default: null + description: Uses the embedded version of LemonTable + title: Embedded + expandable: + anyOf: + - type: boolean + default: null + description: 'Can expand row to show raw event data (default: true)' + title: Expandable + full: + anyOf: + - type: boolean + default: null + description: Show with most visual options enabled. Used in scenes. + title: Full + hiddenColumns: + anyOf: + - items: + type: string + type: array + default: null + description: Columns that aren't shown in the table, even if in columns + or returned data + title: Hiddencolumns + kind: + allOf: + - $ref: '#/components/schemas/DataTableNodeKindEnum' + + default: DataTableNode + title: Kind + propertiesViaUrl: + anyOf: + - type: boolean + default: null + description: 'Link properties via the URL (default: false)' + title: Propertiesviaurl + response: + anyOf: + - type: object + - $ref: '#/components/schemas/Response' + - $ref: '#/components/schemas/Response1' + - $ref: '#/components/schemas/Response2' + - $ref: '#/components/schemas/Response3' + - $ref: '#/components/schemas/Response4' + - $ref: '#/components/schemas/Response7' + - $ref: '#/components/schemas/Response8' + - $ref: '#/components/schemas/Response9' + - $ref: '#/components/schemas/Response10' + - $ref: '#/components/schemas/Response11' + - $ref: '#/components/schemas/Response12' + default: null + title: Response + showActions: + anyOf: + - type: boolean + default: null + description: Show the kebab menu at the end of the row + title: Showactions + showColumnConfigurator: + anyOf: + - type: boolean + default: null + description: Show a button to configure the table's columns if possible + title: Showcolumnconfigurator + showDateRange: + anyOf: + - type: boolean + default: null + description: Show date range selector + title: Showdaterange + showElapsedTime: + anyOf: + - type: boolean + default: null + description: Show the time it takes to run a query + title: Showelapsedtime + showEventFilter: + anyOf: + - type: boolean + default: null + description: Include an event filter above the table (EventsNode only) + title: Showeventfilter + showExport: + anyOf: + - type: boolean + default: null + description: Show the export button + title: Showexport + showHogQLEditor: + anyOf: + - type: boolean + default: null + description: Include a HogQL query editor above HogQL tables + title: Showhogqleditor + showOpenEditorButton: + anyOf: + - type: boolean + default: null + description: 'Show a button to open the current query as a new insight. + (default: true)' + title: Showopeneditorbutton + showPersistentColumnConfigurator: + anyOf: + - type: boolean + default: null + description: Show a button to configure and persist the table's default + columns if possible + title: Showpersistentcolumnconfigurator + showPropertyFilter: + anyOf: + - type: boolean + - items: + $ref: '#/components/schemas/TaxonomicFilterGroupType' + type: array + default: null + description: Include a property filter above the table + title: Showpropertyfilter + showReload: + anyOf: + - type: boolean + default: null + description: Show a reload button + title: Showreload + showResultsTable: + anyOf: + - type: boolean + default: null + description: Show a results table + title: Showresultstable + showSavedQueries: + anyOf: + - type: boolean + default: null + description: Shows a list of saved queries + title: Showsavedqueries + showSearch: + anyOf: + - type: boolean + default: null + description: Include a free text search field (PersonsNode only) + title: Showsearch + showTestAccountFilters: + anyOf: + - type: boolean + default: null + description: Show filter to exclude test accounts + title: Showtestaccountfilters + showTimings: + anyOf: + - type: boolean + default: null + description: Show a detailed query timing breakdown + title: Showtimings + source: + anyOf: + - $ref: '#/components/schemas/EventsNode' + - $ref: '#/components/schemas/EventsQuery' + - $ref: '#/components/schemas/PersonsNode' + - $ref: '#/components/schemas/ActorsQuery' + - $ref: '#/components/schemas/HogQLQuery' + - $ref: '#/components/schemas/WebOverviewQuery' + - $ref: '#/components/schemas/WebStatsTableQuery' + - $ref: '#/components/schemas/WebExternalClicksTableQuery' + - $ref: '#/components/schemas/WebGoalsQuery' + - $ref: '#/components/schemas/WebVitalsQuery' + - $ref: '#/components/schemas/WebVitalsPathBreakdownQuery' + - $ref: '#/components/schemas/SessionAttributionExplorerQuery' + - $ref: '#/components/schemas/ErrorTrackingQuery' + - $ref: '#/components/schemas/ExperimentFunnelsQuery' + - $ref: '#/components/schemas/ExperimentTrendsQuery' + - $ref: '#/components/schemas/TracesQuery' + description: Source of the events + title: Source + required: + - source + title: DataTableNode + type: object + DataTableNodeKindEnum: + enum: + - DataTableNode + type: string + DataVisualizationNode: + additionalProperties: false + properties: + chartSettings: + anyOf: + - $ref: '#/components/schemas/ChartSettings' + default: null + display: + anyOf: + - $ref: '#/components/schemas/ChartDisplayType' + default: null + kind: + allOf: + - $ref: '#/components/schemas/DataVisualizationNodeKindEnum' + + default: DataVisualizationNode + title: Kind + source: + $ref: '#/components/schemas/HogQLQuery' + tableSettings: + anyOf: + - $ref: '#/components/schemas/TableSettings' + default: null + required: + - source + title: DataVisualizationNode + type: object + DataVisualizationNodeKindEnum: + enum: + - DataVisualizationNode + type: string + DataWarehouseEventsModifier: + additionalProperties: false + properties: + distinct_id_field: + title: Distinct Id Field + type: string + id_field: + title: Id Field + type: string + table_name: + title: Table Name + type: string + timestamp_field: + title: Timestamp Field + type: string + required: + - distinct_id_field + - id_field + - table_name + - timestamp_field + title: DataWarehouseEventsModifier + type: object + DataWarehouseNode: + additionalProperties: false + properties: + custom_name: + anyOf: + - type: string + default: null + title: Custom Name + distinct_id_field: + title: Distinct Id Field + type: string + fixedProperties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Fixed properties in the query, can't be edited in the interface + (e.g. scoping down by person) + title: Fixedproperties + id: + title: Id + type: string + id_field: + title: Id Field + type: string + kind: + allOf: + - $ref: '#/components/schemas/DataWarehouseNodeKindEnum' + + default: DataWarehouseNode + title: Kind + math: + anyOf: + - $ref: '#/components/schemas/BaseMathType' + - $ref: '#/components/schemas/FunnelMathType' + - $ref: '#/components/schemas/PropertyMathType' + - $ref: '#/components/schemas/CountPerActorMathType' + - enum: + - unique_group + type: string + - enum: + - hogql + type: string + default: null + title: Math + math_group_type_index: + anyOf: + - $ref: '#/components/schemas/MathGroupTypeIndex' + default: null + math_hogql: + anyOf: + - type: string + default: null + title: Math Hogql + math_property: + anyOf: + - type: string + default: null + title: Math Property + math_property_type: + anyOf: + - type: string + default: null + title: Math Property Type + name: + anyOf: + - type: string + default: null + title: Name + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Properties configurable in the interface + title: Properties + response: + anyOf: + - type: object + default: null + title: Response + table_name: + title: Table Name + type: string + timestamp_field: + title: Timestamp Field + type: string + required: + - distinct_id_field + - id + - id_field + - table_name + - timestamp_field + title: DataWarehouseNode + type: object + DataWarehouseNodeKindEnum: + enum: + - DataWarehouseNode + type: string + DataWarehousePersonPropertyFilter: + additionalProperties: false + properties: + key: + title: Key + type: string + label: + anyOf: + - type: string + default: null + title: Label + operator: + $ref: '#/components/schemas/PropertyOperator' + type: + allOf: + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilterTypeEnum' + + default: data_warehouse_person_property + title: Type + value: + anyOf: + - type: string + - type: number + - items: + anyOf: + - type: string + - type: number + type: array + default: null + title: Value + required: + - key + - operator + title: DataWarehousePersonPropertyFilter + type: object + DataWarehousePersonPropertyFilterTypeEnum: + enum: + - data_warehouse_person_property + type: string + DataWarehousePropertyFilter: + additionalProperties: false + properties: + key: + title: Key + type: string + label: + anyOf: + - type: string + default: null + title: Label + operator: + $ref: '#/components/schemas/PropertyOperator' + type: + allOf: + - $ref: '#/components/schemas/TypeF73Enum' + + default: data_warehouse + title: Type + value: + anyOf: + - type: string + - type: number + - items: + anyOf: + - type: string + - type: number + type: array + default: null + title: Value + required: + - key + - operator + title: DataWarehousePropertyFilter + type: object + DatabaseSchemaBatchExportTable: + additionalProperties: false + properties: + fields: + additionalProperties: + $ref: '#/components/schemas/DatabaseSchemaField' + title: Fields + type: object + id: + title: Id + type: string + name: + title: Name + type: string + type: + allOf: + - $ref: '#/components/schemas/DatabaseSchemaBatchExportTableTypeEnum' + + default: batch_export + title: Type + required: + - fields + - id + - name + title: DatabaseSchemaBatchExportTable + type: object + DatabaseSchemaBatchExportTableTypeEnum: + enum: + - batch_export + type: string + DatabaseSchemaDataWarehouseTable: + additionalProperties: false + properties: + fields: + additionalProperties: + $ref: '#/components/schemas/DatabaseSchemaField' + title: Fields + type: object + format: + title: Format + type: string + id: + title: Id + type: string + name: + title: Name + type: string + schema: + anyOf: + - $ref: '#/components/schemas/DatabaseSchemaSchema' + default: null + source: + anyOf: + - $ref: '#/components/schemas/DatabaseSchemaSource' + default: null + type: + allOf: + - $ref: '#/components/schemas/TypeF73Enum' + + default: data_warehouse + title: Type + url_pattern: + title: Url Pattern + type: string + required: + - fields + - format + - id + - name + - url_pattern + title: DatabaseSchemaDataWarehouseTable + type: object + DatabaseSchemaField: + additionalProperties: false + properties: + chain: + anyOf: + - items: + anyOf: + - type: string + - type: integer + type: array + default: null + title: Chain + fields: + anyOf: + - items: + type: string + type: array + default: null + title: Fields + hogql_value: + title: Hogql Value + type: string + id: + anyOf: + - type: string + default: null + title: Id + name: + title: Name + type: string + schema_valid: + title: Schema Valid + type: boolean + table: + anyOf: + - type: string + default: null + title: Table + type: + $ref: '#/components/schemas/DatabaseSerializedFieldType' + required: + - hogql_value + - name + - schema_valid + - type + title: DatabaseSchemaField + type: object + DatabaseSchemaMaterializedViewTable: + additionalProperties: false + properties: + fields: + additionalProperties: + $ref: '#/components/schemas/DatabaseSchemaField' + title: Fields + type: object + id: + title: Id + type: string + last_run_at: + anyOf: + - type: string + default: null + title: Last Run At + name: + title: Name + type: string + query: + $ref: '#/components/schemas/HogQLQuery' + status: + anyOf: + - type: string + default: null + title: Status + type: + allOf: + - $ref: '#/components/schemas/DatabaseSchemaMaterializedViewTableTypeEnum' + + default: materialized_view + title: Type + required: + - fields + - id + - name + - query + title: DatabaseSchemaMaterializedViewTable + type: object + DatabaseSchemaMaterializedViewTableTypeEnum: + enum: + - materialized_view + type: string + DatabaseSchemaPostHogTable: + additionalProperties: false + properties: + fields: + additionalProperties: + $ref: '#/components/schemas/DatabaseSchemaField' + title: Fields + type: object + id: + title: Id + type: string + name: + title: Name + type: string + type: + allOf: + - $ref: '#/components/schemas/DatabaseSchemaPostHogTableTypeEnum' + + default: posthog + title: Type + required: + - fields + - id + - name + title: DatabaseSchemaPostHogTable + type: object + DatabaseSchemaPostHogTableTypeEnum: + enum: + - posthog + type: string + DatabaseSchemaQuery: + additionalProperties: false + properties: + kind: + allOf: + - $ref: '#/components/schemas/DatabaseSchemaQueryKindEnum' + + default: DatabaseSchemaQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + response: + anyOf: + - $ref: '#/components/schemas/DatabaseSchemaQueryResponse' + default: null + title: DatabaseSchemaQuery + type: object + DatabaseSchemaQueryKindEnum: + enum: + - DatabaseSchemaQuery + type: string + DatabaseSchemaQueryResponse: + additionalProperties: false + properties: + tables: + additionalProperties: + anyOf: + - $ref: '#/components/schemas/DatabaseSchemaPostHogTable' + - $ref: '#/components/schemas/DatabaseSchemaDataWarehouseTable' + - $ref: '#/components/schemas/DatabaseSchemaViewTable' + - $ref: '#/components/schemas/DatabaseSchemaBatchExportTable' + - $ref: '#/components/schemas/DatabaseSchemaMaterializedViewTable' + title: Tables + type: object + required: + - tables + title: DatabaseSchemaQueryResponse + type: object + DatabaseSchemaSchema: + additionalProperties: false + properties: + id: + title: Id + type: string + incremental: + title: Incremental + type: boolean + last_synced_at: + anyOf: + - type: string + default: null + title: Last Synced At + name: + title: Name + type: string + should_sync: + title: Should Sync + type: boolean + status: + anyOf: + - type: string + default: null + title: Status + required: + - id + - incremental + - name + - should_sync + title: DatabaseSchemaSchema + type: object + DatabaseSchemaSource: + additionalProperties: false + properties: + id: + title: Id + type: string + last_synced_at: + anyOf: + - type: string + default: null + title: Last Synced At + prefix: + title: Prefix + type: string + source_type: + title: Source Type + type: string + status: + title: Status + type: string + required: + - id + - prefix + - source_type + - status + title: DatabaseSchemaSource + type: object + DatabaseSchemaViewTable: + additionalProperties: false + properties: + fields: + additionalProperties: + $ref: '#/components/schemas/DatabaseSchemaField' + title: Fields + type: object + id: + title: Id + type: string + name: + title: Name + type: string + query: + $ref: '#/components/schemas/HogQLQuery' + type: + allOf: + - $ref: '#/components/schemas/DatabaseSchemaViewTableTypeEnum' + + default: view + title: Type + required: + - fields + - id + - name + - query + title: DatabaseSchemaViewTable + type: object + DatabaseSchemaViewTableTypeEnum: + enum: + - view + type: string + DatabaseSerializedFieldType: + enum: + - integer + - float + - string + - datetime + - date + - boolean + - array + - json + - lazy_table + - virtual_table + - field_traverser + - expression + - view + - materialized_view + title: DatabaseSerializedFieldType + type: string + DateRange: + additionalProperties: false + properties: + date_from: + anyOf: + - type: string + default: null + title: Date From + date_to: + anyOf: + - type: string + default: null + title: Date To + explicitDate: + anyOf: + - type: boolean + default: false + description: Whether the date_from and date_to should be used verbatim. + Disables rounding to the start and end of period. + title: Explicitdate + title: DateRange + type: object + DayItem: + additionalProperties: false + properties: + label: + title: Label + type: string + value: + anyOf: + - type: string + - format: date-time + type: string + - type: integer + title: Value + required: + - label + - value + title: DayItem + type: object + DisplayType: + enum: + - auto + - line + - bar + title: DisplayType + type: string + DurationType: + enum: + - duration + - active_seconds + - inactive_seconds + title: DurationType + type: string + EarlyAccessFeature: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + feature_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + name: + type: string + maxLength: 200 + description: + type: string + stage: + $ref: '#/components/schemas/StageEnum' + documentation_url: + type: string + format: uri + maxLength: 800 + created_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - feature_flag + - id + - name + - stage + EarlyAccessFeatureSerializerCreateOnly: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 200 + description: + type: string + stage: + $ref: '#/components/schemas/StageEnum' + documentation_url: + type: string + format: uri + maxLength: 800 + created_at: + type: string + format: date-time + readOnly: true + feature_flag_id: + type: integer + writeOnly: true + feature_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + required: + - created_at + - feature_flag + - id + - name + - stage + EffectiveMembershipLevelEnum: + enum: + - 1 + - 8 + - 15 + type: integer + EffectivePrivilegeLevelEnum: + enum: + - 21 + - 37 + type: integer + EffectiveRestrictionLevelEnum: + enum: + - 21 + - 37 + type: integer + ElementPropertyFilter: + additionalProperties: false + properties: + key: + $ref: '#/components/schemas/Key' + label: + anyOf: + - type: string + default: null + title: Label + operator: + $ref: '#/components/schemas/PropertyOperator' + type: + allOf: + - $ref: '#/components/schemas/ElementPropertyFilterTypeEnum' + + default: element + title: Type + value: + anyOf: + - type: string + - type: number + - items: + anyOf: + - type: string + - type: number + type: array + default: null + title: Value + required: + - key + - operator + title: ElementPropertyFilter + type: object + ElementPropertyFilterTypeEnum: + enum: + - element + type: string + ElementType: + additionalProperties: false + properties: + attr_class: + anyOf: + - items: + type: string + type: array + default: null + title: Attr Class + attr_id: + anyOf: + - type: string + default: null + title: Attr Id + attributes: + additionalProperties: + type: string + title: Attributes + type: object + href: + anyOf: + - type: string + default: null + title: Href + nth_child: + anyOf: + - type: number + default: null + title: Nth Child + nth_of_type: + anyOf: + - type: number + default: null + title: Nth Of Type + order: + anyOf: + - type: number + default: null + title: Order + tag_name: + title: Tag Name + type: string + text: + anyOf: + - type: string + default: null + title: Text + required: + - attributes + - tag_name + title: ElementType + type: object + EmptyPropertyFilter: + additionalProperties: false + properties: {} + title: EmptyPropertyFilter + type: object + EntityType: + enum: + - actions + - events + - data_warehouse + - new_entity + title: EntityType + type: string + ErrorTrackingIssue: + additionalProperties: false + properties: + aggregations: + anyOf: + - $ref: '#/components/schemas/ErrorTrackingIssueAggregations' + default: null + assignee: + anyOf: + - $ref: '#/components/schemas/ErrorTrackingIssueAssignee' + default: null + description: + anyOf: + - type: string + default: null + title: Description + earliest: + anyOf: + - type: string + default: null + title: Earliest + first_seen: + format: date-time + title: First Seen + type: string + id: + title: Id + type: string + last_seen: + anyOf: + - format: date-time + type: string + default: null + title: Last Seen + name: + anyOf: + - type: string + default: null + title: Name + status: + $ref: '#/components/schemas/Status' + required: + - first_seen + - id + - status + title: ErrorTrackingIssue + type: object + ErrorTrackingIssueAggregations: + additionalProperties: false + properties: + customVolume: + anyOf: + - items: + type: number + type: array + default: null + title: Customvolume + occurrences: + title: Occurrences + type: number + sessions: + title: Sessions + type: number + users: + title: Users + type: number + volumeDay: + items: + type: number + title: Volumeday + type: array + volumeMonth: + items: + type: number + title: Volumemonth + type: array + required: + - occurrences + - sessions + - users + - volumeDay + - volumeMonth + title: ErrorTrackingIssueAggregations + type: object + ErrorTrackingIssueAssignee: + additionalProperties: false + properties: + id: + anyOf: + - type: string + - type: integer + title: Id + type: + $ref: '#/components/schemas/Type1' + required: + - id + - type + title: ErrorTrackingIssueAssignee + type: object + ErrorTrackingQuery: + additionalProperties: false + properties: + assignee: + anyOf: + - $ref: '#/components/schemas/ErrorTrackingIssueAssignee' + default: null + customVolume: + anyOf: + - $ref: '#/components/schemas/ErrorTrackingSparklineConfig' + default: null + dateRange: + $ref: '#/components/schemas/DateRange' + filterGroup: + anyOf: + - $ref: '#/components/schemas/PropertyGroupFilter' + default: null + filterTestAccounts: + anyOf: + - type: boolean + default: null + title: Filtertestaccounts + issueId: + anyOf: + - type: string + default: null + title: Issueid + kind: + allOf: + - $ref: '#/components/schemas/ErrorTrackingQueryKindEnum' + + default: ErrorTrackingQuery + title: Kind + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + orderBy: + anyOf: + - $ref: '#/components/schemas/OrderBy' + default: null + response: + anyOf: + - $ref: '#/components/schemas/ErrorTrackingQueryResponse' + default: null + searchQuery: + anyOf: + - type: string + default: null + title: Searchquery + status: + anyOf: + - $ref: '#/components/schemas/Status1' + default: null + required: + - dateRange + title: ErrorTrackingQuery + type: object + ErrorTrackingQueryKindEnum: + enum: + - ErrorTrackingQuery + type: string + ErrorTrackingQueryResponse: + additionalProperties: false + properties: + columns: + anyOf: + - items: + type: string + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/ErrorTrackingIssue' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: ErrorTrackingQueryResponse + type: object + ErrorTrackingSparklineConfig: + additionalProperties: false + properties: + interval: + $ref: '#/components/schemas/Interval' + value: + title: Value + type: integer + required: + - interval + - value + title: ErrorTrackingSparklineConfig + type: object + EventDefinition: + additionalProperties: false + properties: + elements: + items: {} + title: Elements + type: array + event: + title: Event + type: string + properties: + type: object + title: Properties + required: + - elements + - event + - properties + title: EventDefinition + type: object + EventOddsRatioSerialized: + additionalProperties: false + properties: + correlation_type: + $ref: '#/components/schemas/CorrelationType' + event: + $ref: '#/components/schemas/EventDefinition' + failure_count: + title: Failure Count + type: integer + odds_ratio: + title: Odds Ratio + type: number + success_count: + title: Success Count + type: integer + required: + - correlation_type + - event + - failure_count + - odds_ratio + - success_count + title: EventOddsRatioSerialized + type: object + EventPropertyFilter: + additionalProperties: false + properties: + key: + title: Key + type: string + label: + anyOf: + - type: string + default: null + title: Label + operator: + anyOf: + - $ref: '#/components/schemas/PropertyOperator' + default: exact + type: + allOf: + - $ref: '#/components/schemas/EventPropertyFilterTypeEnum' + + default: event + description: Event properties + title: Type + value: + anyOf: + - type: string + - type: number + - items: + anyOf: + - type: string + - type: number + type: array + default: null + title: Value + required: + - key + title: EventPropertyFilter + type: object + EventPropertyFilterTypeEnum: + enum: + - event + type: string + EventTaxonomyItem: + additionalProperties: false + properties: + property: + title: Property + type: string + sample_count: + title: Sample Count + type: integer + sample_values: + items: + type: string + title: Sample Values + type: array + required: + - property + - sample_count + - sample_values + title: EventTaxonomyItem + type: object + EventTaxonomyQuery: + additionalProperties: false + properties: + event: + title: Event + type: string + kind: + allOf: + - $ref: '#/components/schemas/EventTaxonomyQueryKindEnum' + + default: EventTaxonomyQuery + title: Kind + maxPropertyValues: + anyOf: + - type: integer + default: null + title: Maxpropertyvalues + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + properties: + anyOf: + - items: + type: string + type: array + default: null + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/EventTaxonomyQueryResponse' + default: null + required: + - event + title: EventTaxonomyQuery + type: object + EventTaxonomyQueryKindEnum: + enum: + - EventTaxonomyQuery + type: string + EventTaxonomyQueryResponse: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/EventTaxonomyItem' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: EventTaxonomyQueryResponse + type: object + EventType: + additionalProperties: false + properties: + distinct_id: + title: Distinct Id + type: string + elements: + items: + $ref: '#/components/schemas/ElementType' + title: Elements + type: array + elements_chain: + anyOf: + - type: string + default: null + title: Elements Chain + event: + title: Event + type: string + id: + title: Id + type: string + person: + anyOf: + - $ref: '#/components/schemas/Person' + default: null + properties: + type: object + title: Properties + timestamp: + title: Timestamp + type: string + uuid: + anyOf: + - type: string + default: null + title: Uuid + required: + - distinct_id + - elements + - event + - id + - properties + - timestamp + title: EventType + type: object + EventsNode: + additionalProperties: false + properties: + custom_name: + anyOf: + - type: string + default: null + title: Custom Name + event: + anyOf: + - type: string + default: null + description: The event or `null` for all events. + title: Event + fixedProperties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Fixed properties in the query, can't be edited in the interface + (e.g. scoping down by person) + title: Fixedproperties + kind: + allOf: + - $ref: '#/components/schemas/Kind069Enum' + + default: EventsNode + title: Kind + limit: + anyOf: + - type: integer + default: null + title: Limit + math: + anyOf: + - $ref: '#/components/schemas/BaseMathType' + - $ref: '#/components/schemas/FunnelMathType' + - $ref: '#/components/schemas/PropertyMathType' + - $ref: '#/components/schemas/CountPerActorMathType' + - enum: + - unique_group + type: string + - enum: + - hogql + type: string + default: null + title: Math + math_group_type_index: + anyOf: + - $ref: '#/components/schemas/MathGroupTypeIndex' + default: null + math_hogql: + anyOf: + - type: string + default: null + title: Math Hogql + math_property: + anyOf: + - type: string + default: null + title: Math Property + math_property_type: + anyOf: + - type: string + default: null + title: Math Property Type + name: + anyOf: + - type: string + default: null + title: Name + orderBy: + anyOf: + - items: + type: string + type: array + default: null + description: Columns to order by + title: Orderby + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Properties configurable in the interface + title: Properties + response: + anyOf: + - type: object + default: null + title: Response + title: EventsNode + type: object + EventsQuery: + additionalProperties: false + properties: + actionId: + anyOf: + - type: integer + default: null + description: Show events matching a given action + title: Actionid + after: + anyOf: + - type: string + default: null + description: Only fetch events that happened after this timestamp + title: After + before: + anyOf: + - type: string + default: null + description: Only fetch events that happened before this timestamp + title: Before + event: + anyOf: + - type: string + default: null + description: Limit to events matching this string + title: Event + filterTestAccounts: + anyOf: + - type: boolean + default: null + description: Filter test accounts + title: Filtertestaccounts + fixedProperties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/PropertyGroupFilter' + - $ref: '#/components/schemas/PropertyGroupFilterValue' + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Fixed properties in the query, can't be edited in the interface + (e.g. scoping down by person) + title: Fixedproperties + kind: + allOf: + - $ref: '#/components/schemas/EventsQueryKindEnum' + + default: EventsQuery + title: Kind + limit: + anyOf: + - type: integer + default: null + description: Number of rows to return + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + description: Number of rows to skip before returning rows + title: Offset + orderBy: + anyOf: + - items: + type: string + type: array + default: null + description: Columns to order by + title: Orderby + personId: + anyOf: + - type: string + default: null + description: Show events for a given person + title: Personid + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Properties configurable in the interface + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/EventsQueryResponse' + default: null + select: + description: Return a limited set of data. Required. + items: + type: string + title: Select + type: array + where: + anyOf: + - items: + type: string + type: array + default: null + description: HogQL filters to apply on returned data + title: Where + required: + - select + title: EventsQuery + type: object + EventsQueryKindEnum: + enum: + - EventsQuery + type: string + EventsQueryResponse: + additionalProperties: false + properties: + columns: + items: {} + title: Columns + type: array + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + description: Generated HogQL query. + title: Hogql + type: string + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + items: {} + type: array + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + items: + type: string + title: Types + type: array + required: + - columns + - hogql + - results + - types + title: EventsQueryResponse + type: object + Experiment: + type: object + properties: + id: + type: integer + readOnly: true + name: + type: string + maxLength: 400 + description: + type: string + nullable: true + maxLength: 400 + start_date: + type: string + format: date-time + nullable: true + end_date: + type: string + format: date-time + nullable: true + feature_flag_key: + type: string + feature_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + holdout: + allOf: + - $ref: '#/components/schemas/ExperimentHoldout' + readOnly: true + holdout_id: + type: integer + nullable: true + exposure_cohort: + type: integer + readOnly: true + nullable: true + parameters: + nullable: true + secondary_metrics: + nullable: true + saved_metrics: + type: array + items: + $ref: '#/components/schemas/ExperimentToSavedMetric' + readOnly: true + saved_metrics_ids: + type: array + items: {} + nullable: true + filters: {} + archived: + type: boolean + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + type: + nullable: true + oneOf: + - $ref: '#/components/schemas/ExperimentTypeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + exposure_criteria: + nullable: true + metrics: + nullable: true + metrics_secondary: + nullable: true + stats_config: + nullable: true + required: + - created_at + - created_by + - exposure_cohort + - feature_flag + - feature_flag_key + - holdout + - id + - name + - saved_metrics + - updated_at + ExperimentActionMetricConfig: + additionalProperties: false + properties: + action: + title: Action + type: number + kind: + allOf: + - $ref: '#/components/schemas/ExperimentActionMetricConfigKindEnum' + + default: ExperimentActionMetricConfig + title: Kind + math: + anyOf: + - $ref: '#/components/schemas/ExperimentMetricMath' + default: null + math_hogql: + anyOf: + - type: string + default: null + title: Math Hogql + math_property: + anyOf: + - type: string + default: null + title: Math Property + name: + anyOf: + - type: string + default: null + title: Name + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Properties configurable in the interface + title: Properties + required: + - action + title: ExperimentActionMetricConfig + type: object + ExperimentActionMetricConfigKindEnum: + enum: + - ExperimentActionMetricConfig + type: string + ExperimentDataWarehouseMetricConfig: + additionalProperties: false + properties: + data_warehouse_join_key: + title: Data Warehouse Join Key + type: string + events_join_key: + title: Events Join Key + type: string + kind: + allOf: + - $ref: '#/components/schemas/ExperimentDataWarehouseMetricConfigKindEnum' + + default: ExperimentDataWarehouseMetricConfig + title: Kind + math: + anyOf: + - $ref: '#/components/schemas/ExperimentMetricMath' + default: null + math_hogql: + anyOf: + - type: string + default: null + title: Math Hogql + math_property: + anyOf: + - type: string + default: null + title: Math Property + name: + anyOf: + - type: string + default: null + title: Name + table_name: + title: Table Name + type: string + timestamp_field: + title: Timestamp Field + type: string + required: + - data_warehouse_join_key + - events_join_key + - table_name + - timestamp_field + title: ExperimentDataWarehouseMetricConfig + type: object + ExperimentDataWarehouseMetricConfigKindEnum: + enum: + - ExperimentDataWarehouseMetricConfig + type: string + ExperimentEventMetricConfig: + additionalProperties: false + properties: + event: + title: Event + type: string + kind: + allOf: + - $ref: '#/components/schemas/ExperimentEventMetricConfigKindEnum' + + default: ExperimentEventMetricConfig + title: Kind + math: + anyOf: + - $ref: '#/components/schemas/ExperimentMetricMath' + default: null + math_hogql: + anyOf: + - type: string + default: null + title: Math Hogql + math_property: + anyOf: + - type: string + default: null + title: Math Property + name: + anyOf: + - type: string + default: null + title: Name + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Properties configurable in the interface + title: Properties + required: + - event + title: ExperimentEventMetricConfig + type: object + ExperimentEventMetricConfigKindEnum: + enum: + - ExperimentEventMetricConfig + type: string + ExperimentExposureQuery: + additionalProperties: false + properties: + experiment_id: + anyOf: + - type: integer + default: null + title: Experiment Id + kind: + allOf: + - $ref: '#/components/schemas/Kind633Enum' + + default: ExperimentExposureQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + response: + anyOf: + - $ref: '#/components/schemas/ExperimentExposureQueryResponse' + default: null + title: ExperimentExposureQuery + type: object + ExperimentExposureQueryResponse: + additionalProperties: false + properties: + date_range: + $ref: '#/components/schemas/DateRange' + kind: + allOf: + - $ref: '#/components/schemas/Kind633Enum' + + default: ExperimentExposureQuery + title: Kind + timeseries: + items: + $ref: '#/components/schemas/ExperimentExposureTimeSeries' + title: Timeseries + type: array + total_exposures: + additionalProperties: + type: number + title: Total Exposures + type: object + required: + - date_range + - timeseries + - total_exposures + title: ExperimentExposureQueryResponse + type: object + ExperimentExposureTimeSeries: + additionalProperties: false + properties: + days: + items: + type: string + title: Days + type: array + exposure_counts: + items: + type: number + title: Exposure Counts + type: array + variant: + title: Variant + type: string + required: + - days + - exposure_counts + - variant + title: ExperimentExposureTimeSeries + type: object + ExperimentFunnelsQuery: + additionalProperties: false + properties: + experiment_id: + anyOf: + - type: integer + default: null + title: Experiment Id + funnels_query: + $ref: '#/components/schemas/FunnelsQuery' + kind: + allOf: + - $ref: '#/components/schemas/Kind0ddEnum' + + default: ExperimentFunnelsQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + name: + anyOf: + - type: string + default: null + title: Name + response: + anyOf: + - $ref: '#/components/schemas/ExperimentFunnelsQueryResponse' + default: null + required: + - funnels_query + title: ExperimentFunnelsQuery + type: object + ExperimentFunnelsQueryResponse: + additionalProperties: false + properties: + credible_intervals: + additionalProperties: + items: + type: number + type: array + title: Credible Intervals + type: object + expected_loss: + title: Expected Loss + type: number + funnels_query: + anyOf: + - $ref: '#/components/schemas/FunnelsQuery' + default: null + insight: + items: + items: + type: object + type: array + title: Insight + type: array + kind: + allOf: + - $ref: '#/components/schemas/Kind0ddEnum' + + default: ExperimentFunnelsQuery + title: Kind + probability: + additionalProperties: + type: number + title: Probability + type: object + significance_code: + $ref: '#/components/schemas/ExperimentSignificanceCode' + significant: + title: Significant + type: boolean + stats_version: + anyOf: + - type: integer + default: null + title: Stats Version + variants: + items: + $ref: '#/components/schemas/ExperimentVariantFunnelsBaseStats' + title: Variants + type: array + required: + - credible_intervals + - expected_loss + - insight + - probability + - significance_code + - significant + - variants + title: ExperimentFunnelsQueryResponse + type: object + ExperimentHoldout: + type: object + properties: + id: + type: integer + readOnly: true + name: + type: string + maxLength: 400 + description: + type: string + nullable: true + maxLength: 400 + filters: {} + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - created_by + - id + - name + - updated_at + ExperimentMetric: + additionalProperties: false + properties: + inverse: + anyOf: + - type: boolean + default: null + title: Inverse + kind: + allOf: + - $ref: '#/components/schemas/ExperimentMetricKindEnum' + + default: ExperimentMetric + title: Kind + metric_config: + anyOf: + - $ref: '#/components/schemas/ExperimentEventMetricConfig' + - $ref: '#/components/schemas/ExperimentActionMetricConfig' + - $ref: '#/components/schemas/ExperimentDataWarehouseMetricConfig' + title: Metric Config + metric_type: + $ref: '#/components/schemas/ExperimentMetricType' + name: + anyOf: + - type: string + default: null + title: Name + required: + - metric_config + - metric_type + title: ExperimentMetric + type: object + ExperimentMetricKindEnum: + enum: + - ExperimentMetric + type: string + ExperimentMetricMath: + enum: + - total + - sum + - avg + - median + - min + - max + title: ExperimentMetricMath + type: string + ExperimentMetricType: + enum: + - count + - continuous + - binomial + title: ExperimentMetricType + type: string + ExperimentQuery: + additionalProperties: false + properties: + experiment_id: + anyOf: + - type: integer + default: null + title: Experiment Id + kind: + allOf: + - $ref: '#/components/schemas/KindD52Enum' + + default: ExperimentQuery + title: Kind + metric: + $ref: '#/components/schemas/ExperimentMetric' + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + name: + anyOf: + - type: string + default: null + title: Name + response: + anyOf: + - $ref: '#/components/schemas/ExperimentQueryResponse' + default: null + required: + - metric + title: ExperimentQuery + type: object + ExperimentQueryResponse: + additionalProperties: false + properties: + credible_intervals: + additionalProperties: + items: + type: number + type: array + title: Credible Intervals + type: object + insight: + items: + type: object + title: Insight + type: array + kind: + allOf: + - $ref: '#/components/schemas/KindD52Enum' + + default: ExperimentQuery + title: Kind + metric: + $ref: '#/components/schemas/ExperimentMetric' + p_value: + title: P Value + type: number + probability: + additionalProperties: + type: number + title: Probability + type: object + significance_code: + $ref: '#/components/schemas/ExperimentSignificanceCode' + significant: + title: Significant + type: boolean + stats_version: + anyOf: + - type: integer + default: null + title: Stats Version + variants: + anyOf: + - items: + $ref: '#/components/schemas/ExperimentVariantTrendsBaseStats' + type: array + - items: + $ref: '#/components/schemas/ExperimentVariantFunnelsBaseStats' + type: array + title: Variants + required: + - credible_intervals + - insight + - metric + - p_value + - probability + - significance_code + - significant + - variants + title: ExperimentQueryResponse + type: object + ExperimentSavedMetric: + type: object + description: Serializer mixin that resolves appropriate response for tags depending + on license. + properties: + id: + type: integer + readOnly: true + name: + type: string + maxLength: 400 + description: + type: string + nullable: true + maxLength: 400 + query: {} + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + tags: + type: array + items: {} + required: + - created_at + - created_by + - id + - name + - query + - updated_at + ExperimentSignificanceCode: + enum: + - significant + - not_enough_exposure + - low_win_probability + - high_loss + - high_p_value + title: ExperimentSignificanceCode + type: string + ExperimentToSavedMetric: + type: object + properties: + id: + type: integer + readOnly: true + experiment: + type: integer + saved_metric: + type: integer + metadata: {} + created_at: + type: string + format: date-time + readOnly: true + query: + readOnly: true + name: + type: string + readOnly: true + required: + - created_at + - experiment + - id + - name + - query + - saved_metric + ExperimentTrendsQuery: + additionalProperties: false + properties: + count_query: + $ref: '#/components/schemas/TrendsQuery' + experiment_id: + anyOf: + - type: integer + default: null + title: Experiment Id + exposure_query: + anyOf: + - $ref: '#/components/schemas/TrendsQuery' + default: null + kind: + allOf: + - $ref: '#/components/schemas/Kind496Enum' + + default: ExperimentTrendsQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + name: + anyOf: + - type: string + default: null + title: Name + response: + anyOf: + - $ref: '#/components/schemas/ExperimentTrendsQueryResponse' + default: null + required: + - count_query + title: ExperimentTrendsQuery + type: object + ExperimentTrendsQueryResponse: + additionalProperties: false + properties: + count_query: + anyOf: + - $ref: '#/components/schemas/TrendsQuery' + default: null + credible_intervals: + additionalProperties: + items: + type: number + type: array + title: Credible Intervals + type: object + exposure_query: + anyOf: + - $ref: '#/components/schemas/TrendsQuery' + default: null + insight: + items: + type: object + title: Insight + type: array + kind: + allOf: + - $ref: '#/components/schemas/Kind496Enum' + + default: ExperimentTrendsQuery + title: Kind + p_value: + title: P Value + type: number + probability: + additionalProperties: + type: number + title: Probability + type: object + significance_code: + $ref: '#/components/schemas/ExperimentSignificanceCode' + significant: + title: Significant + type: boolean + stats_version: + anyOf: + - type: integer + default: null + title: Stats Version + variants: + items: + $ref: '#/components/schemas/ExperimentVariantTrendsBaseStats' + title: Variants + type: array + required: + - credible_intervals + - insight + - p_value + - probability + - significance_code + - significant + - variants + title: ExperimentTrendsQueryResponse + type: object + ExperimentTypeEnum: + enum: + - web + - product + type: string + description: |- + * `web` - web + * `product` - product + ExperimentVariantFunnelsBaseStats: + additionalProperties: false + properties: + failure_count: + title: Failure Count + type: number + key: + title: Key + type: string + success_count: + title: Success Count + type: number + required: + - failure_count + - key + - success_count + title: ExperimentVariantFunnelsBaseStats + type: object + ExperimentVariantTrendsBaseStats: + additionalProperties: false + properties: + absolute_exposure: + title: Absolute Exposure + type: number + count: + title: Count + type: number + exposure: + title: Exposure + type: number + key: + title: Key + type: string + required: + - absolute_exposure + - count + - exposure + - key + title: ExperimentVariantTrendsBaseStats + type: object + ExplicitTeamMember: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + level: + allOf: + - $ref: '#/components/schemas/ExplicitTeamMemberLevelEnum' + minimum: 0 + maximum: 32767 + parent_level: + type: integer + readOnly: true + parent_membership_id: + type: string + format: uuid + readOnly: true + joined_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + user: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + user_uuid: + type: string + format: uuid + writeOnly: true + effective_level: + allOf: + - $ref: '#/components/schemas/EffectiveMembershipLevelEnum' + description: If organization level is higher than project level, then that + takes precedence over explicit project level. + readOnly: true + required: + - effective_level + - id + - joined_at + - parent_level + - parent_membership_id + - updated_at + - user + - user_uuid + ExplicitTeamMemberLevelEnum: + enum: + - 1 + - 8 + type: integer + description: |- + * `1` - member + * `8` - administrator + ExportFormatEnum: + enum: + - image/png + - application/pdf + - text/csv + - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + type: string + description: |- + * `image/png` - image/png + * `application/pdf` - application/pdf + * `text/csv` - text/csv + * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + ExportedAsset: + type: object + description: Standard ExportedAsset serializer that doesn't return content. + properties: + id: + type: integer + readOnly: true + dashboard: + type: integer + nullable: true + insight: + type: integer + nullable: true + export_format: + $ref: '#/components/schemas/ExportFormatEnum' + created_at: + type: string + format: date-time + readOnly: true + has_content: + type: string + readOnly: true + export_context: + nullable: true + filename: + type: string + readOnly: true + expires_after: + type: string + format: date-time + nullable: true + required: + - created_at + - export_format + - filename + - has_content + - id + FeatureFlag: + type: object + description: Serializer mixin that resolves appropriate response for tags depending + on license. + properties: + id: + type: integer + readOnly: true + name: + type: string + description: contains the description for the flag (field name `name` is + kept for backwards-compatibility) + key: + type: string + maxLength: 400 + filters: + type: object + additionalProperties: {} + deleted: + type: boolean + active: + type: boolean + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + is_simple_flag: + type: boolean + readOnly: true + rollout_percentage: + type: integer + nullable: true + readOnly: true + ensure_experience_continuity: + type: boolean + nullable: true + experiment_set: + type: array + items: + type: integer + readOnly: true + surveys: + type: object + additionalProperties: {} + readOnly: true + features: + type: object + additionalProperties: {} + readOnly: true + rollback_conditions: + nullable: true + performed_rollback: + type: boolean + nullable: true + can_edit: + type: boolean + readOnly: true + tags: + type: array + items: {} + usage_dashboard: + type: integer + readOnly: true + analytics_dashboards: + type: array + items: + type: integer + has_enriched_analytics: + type: boolean + nullable: true + user_access_level: + type: string + nullable: true + readOnly: true + description: The effective access level the user has for this object + creation_context: + allOf: + - $ref: '#/components/schemas/CreationContextEnum' + writeOnly: true + description: |- + Indicates the origin product of the feature flag. Choices: 'feature_flags', 'experiments', 'surveys', 'early_access_features', 'web_experiments'. + + * `feature_flags` - feature_flags + * `experiments` - experiments + * `surveys` - surveys + * `early_access_features` - early_access_features + * `web_experiments` - web_experiments + is_remote_configuration: + type: boolean + nullable: true + has_encrypted_payloads: + type: boolean + nullable: true + status: + type: string + readOnly: true + required: + - can_edit + - created_by + - experiment_set + - features + - id + - is_simple_flag + - key + - rollout_percentage + - status + - surveys + - usage_dashboard + - user_access_level + FeatureFlagRoleAccess: + type: object + properties: + id: + type: integer + readOnly: true + feature_flag: + allOf: + - $ref: '#/components/schemas/FeatureFlag' + readOnly: true + role: + allOf: + - $ref: '#/components/schemas/Role' + readOnly: true + role_id: + type: string + format: uuid + writeOnly: true + added_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + required: + - added_at + - feature_flag + - id + - role + - role_id + - updated_at + FeatureFlagsAccessLevelEnum: + enum: + - 21 + - 37 + type: integer + description: |- + * `21` - Can only view + * `37` - Can always edit + FeaturePropertyFilter: + additionalProperties: false + properties: + key: + title: Key + type: string + label: + anyOf: + - type: string + default: null + title: Label + operator: + $ref: '#/components/schemas/PropertyOperator' + type: + allOf: + - $ref: '#/components/schemas/FeaturePropertyFilterTypeEnum' + + default: feature + description: Event property with "$feature/" prepended + title: Type + value: + anyOf: + - type: string + - type: number + - items: + anyOf: + - type: string + - type: number + type: array + default: null + title: Value + required: + - key + - operator + title: FeaturePropertyFilter + type: object + FeaturePropertyFilterTypeEnum: + enum: + - feature + type: string + FileSystem: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + path: + type: string + type: + type: string + maxLength: 100 + ref: + type: string + nullable: true + maxLength: 100 + href: + type: string + nullable: true + meta: + nullable: true + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + required: + - created_at + - created_by + - id + - path + FilterLogicalOperator: + enum: + - AND + - OR + title: FilterLogicalOperator + type: string + Filters: + additionalProperties: false + properties: + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + properties: + anyOf: + - items: + $ref: '#/components/schemas/SessionPropertyFilter' + type: array + default: null + title: Properties + title: Filters + type: object + FrequencyEnum: + enum: + - daily + - weekly + - monthly + - yearly + type: string + description: |- + * `daily` - Daily + * `weekly` - Weekly + * `monthly` - Monthly + * `yearly` - Yearly + FunnelConversionWindowTimeUnit: + enum: + - second + - minute + - hour + - day + - week + - month + title: FunnelConversionWindowTimeUnit + type: string + FunnelCorrelationActorsQuery: + additionalProperties: false + properties: + funnelCorrelationPersonConverted: + anyOf: + - type: boolean + default: null + title: Funnelcorrelationpersonconverted + funnelCorrelationPersonEntity: + anyOf: + - $ref: '#/components/schemas/EventsNode' + - $ref: '#/components/schemas/ActionsNode' + - $ref: '#/components/schemas/DataWarehouseNode' + default: null + title: Funnelcorrelationpersonentity + funnelCorrelationPropertyValues: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + title: Funnelcorrelationpropertyvalues + includeRecordings: + anyOf: + - type: boolean + default: null + title: Includerecordings + kind: + allOf: + - $ref: '#/components/schemas/FunnelCorrelationActorsQueryKindEnum' + + default: FunnelCorrelationActorsQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + response: + anyOf: + - $ref: '#/components/schemas/ActorsQueryResponse' + default: null + source: + $ref: '#/components/schemas/FunnelCorrelationQuery' + required: + - source + title: FunnelCorrelationActorsQuery + type: object + FunnelCorrelationActorsQueryKindEnum: + enum: + - FunnelCorrelationActorsQuery + type: string + FunnelCorrelationQuery: + additionalProperties: false + properties: + funnelCorrelationEventExcludePropertyNames: + anyOf: + - items: + type: string + type: array + default: null + title: Funnelcorrelationeventexcludepropertynames + funnelCorrelationEventNames: + anyOf: + - items: + type: string + type: array + default: null + title: Funnelcorrelationeventnames + funnelCorrelationExcludeEventNames: + anyOf: + - items: + type: string + type: array + default: null + title: Funnelcorrelationexcludeeventnames + funnelCorrelationExcludeNames: + anyOf: + - items: + type: string + type: array + default: null + title: Funnelcorrelationexcludenames + funnelCorrelationNames: + anyOf: + - items: + type: string + type: array + default: null + title: Funnelcorrelationnames + funnelCorrelationType: + $ref: '#/components/schemas/FunnelCorrelationResultsType' + kind: + allOf: + - $ref: '#/components/schemas/FunnelCorrelationQueryKindEnum' + + default: FunnelCorrelationQuery + title: Kind + response: + anyOf: + - $ref: '#/components/schemas/FunnelCorrelationResponse' + default: null + source: + $ref: '#/components/schemas/FunnelsActorsQuery' + required: + - funnelCorrelationType + - source + title: FunnelCorrelationQuery + type: object + FunnelCorrelationQueryKindEnum: + enum: + - FunnelCorrelationQuery + type: string + FunnelCorrelationResponse: + additionalProperties: false + properties: + columns: + anyOf: + - items: {} + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + $ref: '#/components/schemas/FunnelCorrelationResult' + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + title: Types + required: + - results + title: FunnelCorrelationResponse + type: object + FunnelCorrelationResult: + additionalProperties: false + properties: + events: + items: + $ref: '#/components/schemas/EventOddsRatioSerialized' + title: Events + type: array + skewed: + title: Skewed + type: boolean + required: + - events + - skewed + title: FunnelCorrelationResult + type: object + FunnelCorrelationResultsType: + enum: + - events + - properties + - event_with_properties + title: FunnelCorrelationResultsType + type: string + FunnelExclusionActionsNode: + additionalProperties: false + properties: + custom_name: + anyOf: + - type: string + default: null + title: Custom Name + fixedProperties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Fixed properties in the query, can't be edited in the interface + (e.g. scoping down by person) + title: Fixedproperties + funnelFromStep: + title: Funnelfromstep + type: integer + funnelToStep: + title: Funneltostep + type: integer + id: + title: Id + type: integer + kind: + allOf: + - $ref: '#/components/schemas/KindCfaEnum' + + default: ActionsNode + title: Kind + math: + anyOf: + - $ref: '#/components/schemas/BaseMathType' + - $ref: '#/components/schemas/FunnelMathType' + - $ref: '#/components/schemas/PropertyMathType' + - $ref: '#/components/schemas/CountPerActorMathType' + - enum: + - unique_group + type: string + - enum: + - hogql + type: string + default: null + title: Math + math_group_type_index: + anyOf: + - $ref: '#/components/schemas/MathGroupTypeIndex' + default: null + math_hogql: + anyOf: + - type: string + default: null + title: Math Hogql + math_property: + anyOf: + - type: string + default: null + title: Math Property + math_property_type: + anyOf: + - type: string + default: null + title: Math Property Type + name: + anyOf: + - type: string + default: null + title: Name + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Properties configurable in the interface + title: Properties + response: + anyOf: + - type: object + default: null + title: Response + required: + - funnelFromStep + - funnelToStep + - id + title: FunnelExclusionActionsNode + type: object + FunnelExclusionEventsNode: + additionalProperties: false + properties: + custom_name: + anyOf: + - type: string + default: null + title: Custom Name + event: + anyOf: + - type: string + default: null + description: The event or `null` for all events. + title: Event + fixedProperties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Fixed properties in the query, can't be edited in the interface + (e.g. scoping down by person) + title: Fixedproperties + funnelFromStep: + title: Funnelfromstep + type: integer + funnelToStep: + title: Funneltostep + type: integer + kind: + allOf: + - $ref: '#/components/schemas/Kind069Enum' + + default: EventsNode + title: Kind + limit: + anyOf: + - type: integer + default: null + title: Limit + math: + anyOf: + - $ref: '#/components/schemas/BaseMathType' + - $ref: '#/components/schemas/FunnelMathType' + - $ref: '#/components/schemas/PropertyMathType' + - $ref: '#/components/schemas/CountPerActorMathType' + - enum: + - unique_group + type: string + - enum: + - hogql + type: string + default: null + title: Math + math_group_type_index: + anyOf: + - $ref: '#/components/schemas/MathGroupTypeIndex' + default: null + math_hogql: + anyOf: + - type: string + default: null + title: Math Hogql + math_property: + anyOf: + - type: string + default: null + title: Math Property + math_property_type: + anyOf: + - type: string + default: null + title: Math Property Type + name: + anyOf: + - type: string + default: null + title: Name + orderBy: + anyOf: + - items: + type: string + type: array + default: null + description: Columns to order by + title: Orderby + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Properties configurable in the interface + title: Properties + response: + anyOf: + - type: object + default: null + title: Response + required: + - funnelFromStep + - funnelToStep + title: FunnelExclusionEventsNode + type: object + FunnelLayout: + enum: + - horizontal + - vertical + title: FunnelLayout + type: string + FunnelMathType: + enum: + - total + - first_time_for_user + - first_time_for_user_with_filters + title: FunnelMathType + type: string + FunnelPathType: + enum: + - funnel_path_before_step + - funnel_path_between_steps + - funnel_path_after_step + title: FunnelPathType + type: string + FunnelPathsFilter: + additionalProperties: false + properties: + funnelPathType: + anyOf: + - $ref: '#/components/schemas/FunnelPathType' + default: null + funnelSource: + $ref: '#/components/schemas/FunnelsQuery' + funnelStep: + anyOf: + - type: integer + default: null + title: Funnelstep + required: + - funnelSource + title: FunnelPathsFilter + type: object + FunnelStepReference: + enum: + - total + - previous + title: FunnelStepReference + type: string + FunnelTimeToConvertResults: + additionalProperties: false + properties: + average_conversion_time: + anyOf: + - type: number + default: null + title: Average Conversion Time + bins: + items: + items: + type: integer + type: array + title: Bins + type: array + required: + - bins + title: FunnelTimeToConvertResults + type: object + FunnelVizType: + enum: + - steps + - time_to_convert + - trends + title: FunnelVizType + type: string + FunnelsActorsQuery: + additionalProperties: false + properties: + funnelCustomSteps: + anyOf: + - items: + type: integer + type: array + default: null + description: Custom step numbers to get persons for. This overrides `funnelStep`. + Primarily for correlation use. + title: Funnelcustomsteps + funnelStep: + anyOf: + - type: integer + default: null + description: Index of the step for which we want to get the timestamp for, + per person. Positive for converted persons, negative for dropped of persons. + title: Funnelstep + funnelStepBreakdown: + anyOf: + - type: integer + - type: string + - type: number + - items: + anyOf: + - type: integer + - type: string + - type: number + type: array + default: null + description: The breakdown value for which to get persons for. This is an + array for person and event properties, a string for groups and an integer + for cohorts. + title: Funnelstepbreakdown + funnelTrendsDropOff: + anyOf: + - type: boolean + default: null + title: Funneltrendsdropoff + funnelTrendsEntrancePeriodStart: + anyOf: + - type: string + default: null + description: Used together with `funnelTrendsDropOff` for funnels time conversion + date for the persons modal. + title: Funneltrendsentranceperiodstart + includeRecordings: + anyOf: + - type: boolean + default: null + title: Includerecordings + kind: + allOf: + - $ref: '#/components/schemas/FunnelsActorsQueryKindEnum' + + default: FunnelsActorsQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + response: + anyOf: + - $ref: '#/components/schemas/ActorsQueryResponse' + default: null + source: + $ref: '#/components/schemas/FunnelsQuery' + required: + - source + title: FunnelsActorsQuery + type: object + FunnelsActorsQueryKindEnum: + enum: + - FunnelsActorsQuery + type: string + FunnelsFilter: + additionalProperties: false + properties: + binCount: + anyOf: + - type: integer + default: null + title: Bincount + breakdownAttributionType: + anyOf: + - $ref: '#/components/schemas/BreakdownAttributionType' + default: first_touch + breakdownAttributionValue: + anyOf: + - type: integer + default: null + title: Breakdownattributionvalue + exclusions: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/FunnelExclusionEventsNode' + - $ref: '#/components/schemas/FunnelExclusionActionsNode' + type: array + default: [] + title: Exclusions + funnelAggregateByHogQL: + anyOf: + - type: string + default: null + title: Funnelaggregatebyhogql + funnelFromStep: + anyOf: + - type: integer + default: null + title: Funnelfromstep + funnelOrderType: + anyOf: + - $ref: '#/components/schemas/StepOrderValue' + default: ordered + funnelStepReference: + anyOf: + - $ref: '#/components/schemas/FunnelStepReference' + default: total + funnelToStep: + anyOf: + - type: integer + default: null + title: Funneltostep + funnelVizType: + anyOf: + - $ref: '#/components/schemas/FunnelVizType' + default: steps + funnelWindowInterval: + anyOf: + - type: integer + default: 14 + title: Funnelwindowinterval + funnelWindowIntervalUnit: + anyOf: + - $ref: '#/components/schemas/FunnelConversionWindowTimeUnit' + default: day + hiddenLegendBreakdowns: + anyOf: + - items: + type: string + type: array + default: null + title: Hiddenlegendbreakdowns + layout: + anyOf: + - $ref: '#/components/schemas/FunnelLayout' + default: vertical + resultCustomizations: + anyOf: + - additionalProperties: + $ref: '#/components/schemas/ResultCustomizationByValue' + type: object + default: null + description: Customizations for the appearance of result datasets. + title: Resultcustomizations + useUdf: + anyOf: + - type: boolean + default: null + title: Useudf + title: FunnelsFilter + type: object + FunnelsQuery: + additionalProperties: false + properties: + aggregation_group_type_index: + anyOf: + - type: integer + default: null + description: Groups aggregation + title: Aggregation Group Type Index + breakdownFilter: + anyOf: + - $ref: '#/components/schemas/BreakdownFilter' + default: null + description: Breakdown of the events and actions + dataColorTheme: + anyOf: + - type: number + default: null + description: Colors used in the insight's visualization + title: Datacolortheme + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + description: Date range for the query + filterTestAccounts: + anyOf: + - type: boolean + default: false + description: Exclude internal and test users by applying the respective + filters + title: Filtertestaccounts + funnelsFilter: + anyOf: + - $ref: '#/components/schemas/FunnelsFilter' + default: null + description: Properties specific to the funnels insight + interval: + anyOf: + - $ref: '#/components/schemas/IntervalType' + default: null + description: Granularity of the response. Can be one of `hour`, `day`, `week` + or `month` + kind: + allOf: + - $ref: '#/components/schemas/FunnelsQueryKindEnum' + + default: FunnelsQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + - $ref: '#/components/schemas/PropertyGroupFilter' + default: [] + description: Property filters for all series + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/FunnelsQueryResponse' + default: null + samplingFactor: + anyOf: + - type: number + default: null + description: Sampling rate + title: Samplingfactor + series: + description: Events and actions to include + items: + anyOf: + - $ref: '#/components/schemas/EventsNode' + - $ref: '#/components/schemas/ActionsNode' + - $ref: '#/components/schemas/DataWarehouseNode' + title: Series + type: array + required: + - series + title: FunnelsQuery + type: object + FunnelsQueryKindEnum: + enum: + - FunnelsQuery + type: string + FunnelsQueryResponse: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + isUdf: + anyOf: + - type: boolean + default: null + title: Isudf + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + anyOf: + - $ref: '#/components/schemas/FunnelTimeToConvertResults' + - items: + type: object + type: array + - items: + items: + type: object + type: array + type: array + title: Results + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: FunnelsQueryResponse + type: object + GoalLine: + additionalProperties: false + properties: + borderColor: + anyOf: + - type: string + default: null + title: Bordercolor + displayLabel: + anyOf: + - type: boolean + default: null + title: Displaylabel + label: + title: Label + type: string + value: + title: Value + type: number + required: + - label + - value + title: GoalLine + type: object + Group: + type: object + properties: + group_type_index: + type: integer + maximum: 2147483647 + minimum: -2147483648 + group_key: + type: string + maxLength: 400 + group_properties: {} + created_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - group_key + - group_type_index + GroupPropertyFilter: + additionalProperties: false + properties: + group_type_index: + anyOf: + - type: integer + default: null + title: Group Type Index + key: + title: Key + type: string + label: + anyOf: + - type: string + default: null + title: Label + operator: + $ref: '#/components/schemas/PropertyOperator' + type: + allOf: + - $ref: '#/components/schemas/GroupPropertyFilterTypeEnum' + + default: group + title: Type + value: + anyOf: + - type: string + - type: number + - items: + anyOf: + - type: string + - type: number + type: array + default: null + title: Value + required: + - key + - operator + title: GroupPropertyFilter + type: object + GroupPropertyFilterTypeEnum: + enum: + - group + type: string + GroupType: + type: object + properties: + group_type: + type: string + readOnly: true + group_type_index: + type: integer + readOnly: true + name_singular: + type: string + nullable: true + maxLength: 400 + name_plural: + type: string + nullable: true + maxLength: 400 + required: + - group_type + - group_type_index + HogLanguage: + enum: + - hog + - hogJson + - hogQL + - hogQLExpr + - hogTemplate + title: HogLanguage + type: string + HogQLAutocomplete: + additionalProperties: false + properties: + endPosition: + description: End position of the editor word + title: Endposition + type: integer + filters: + anyOf: + - $ref: '#/components/schemas/HogQLFilters' + default: null + description: Table to validate the expression against + globals: + anyOf: + - type: object + default: null + description: Global values in scope + title: Globals + kind: + allOf: + - $ref: '#/components/schemas/HogQLAutocompleteKindEnum' + + default: HogQLAutocomplete + title: Kind + language: + $ref: '#/components/schemas/HogLanguage' + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query: + description: Query to validate + title: Query + type: string + response: + anyOf: + - $ref: '#/components/schemas/HogQLAutocompleteResponse' + default: null + sourceQuery: + anyOf: + - $ref: '#/components/schemas/EventsNode' + - $ref: '#/components/schemas/ActionsNode' + - $ref: '#/components/schemas/PersonsNode' + - $ref: '#/components/schemas/EventsQuery' + - $ref: '#/components/schemas/ActorsQuery' + - $ref: '#/components/schemas/InsightActorsQuery' + - $ref: '#/components/schemas/InsightActorsQueryOptions' + - $ref: '#/components/schemas/SessionsTimelineQuery' + - $ref: '#/components/schemas/HogQuery' + - $ref: '#/components/schemas/HogQLQuery' + - $ref: '#/components/schemas/HogQLMetadata' + - $ref: '#/components/schemas/HogQLAutocomplete' + - $ref: '#/components/schemas/WebOverviewQuery' + - $ref: '#/components/schemas/WebStatsTableQuery' + - $ref: '#/components/schemas/WebExternalClicksTableQuery' + - $ref: '#/components/schemas/WebGoalsQuery' + - $ref: '#/components/schemas/WebVitalsQuery' + - $ref: '#/components/schemas/WebVitalsPathBreakdownQuery' + - $ref: '#/components/schemas/SessionAttributionExplorerQuery' + - $ref: '#/components/schemas/ErrorTrackingQuery' + - $ref: '#/components/schemas/ExperimentFunnelsQuery' + - $ref: '#/components/schemas/ExperimentTrendsQuery' + - $ref: '#/components/schemas/RecordingsQuery' + - $ref: '#/components/schemas/TracesQuery' + default: null + description: Query in whose context to validate. + title: Sourcequery + startPosition: + description: Start position of the editor word + title: Startposition + type: integer + required: + - endPosition + - language + - query + - startPosition + title: HogQLAutocomplete + type: object + HogQLAutocompleteKindEnum: + enum: + - HogQLAutocomplete + type: string + HogQLAutocompleteResponse: + additionalProperties: false + properties: + incomplete_list: + description: Whether or not the suggestions returned are complete + title: Incomplete List + type: boolean + suggestions: + items: + $ref: '#/components/schemas/AutocompleteCompletionItem' + title: Suggestions + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - incomplete_list + - suggestions + title: HogQLAutocompleteResponse + type: object + HogQLFilters: + additionalProperties: false + properties: + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + filterTestAccounts: + anyOf: + - type: boolean + default: null + title: Filtertestaccounts + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + title: Properties + title: HogQLFilters + type: object + HogQLMetadata: + additionalProperties: false + properties: + debug: + anyOf: + - type: boolean + default: null + description: Enable more verbose output, usually run from the /debug page + title: Debug + filters: + anyOf: + - $ref: '#/components/schemas/HogQLFilters' + default: null + description: Extra filters applied to query via {filters} + globals: + anyOf: + - type: object + default: null + description: Extra globals for the query + title: Globals + kind: + allOf: + - $ref: '#/components/schemas/HogQLMetadataKindEnum' + + default: HogQLMetadata + title: Kind + language: + $ref: '#/components/schemas/HogLanguage' + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query: + description: Query to validate + title: Query + type: string + response: + anyOf: + - $ref: '#/components/schemas/HogQLMetadataResponse' + default: null + sourceQuery: + anyOf: + - $ref: '#/components/schemas/EventsNode' + - $ref: '#/components/schemas/ActionsNode' + - $ref: '#/components/schemas/PersonsNode' + - $ref: '#/components/schemas/EventsQuery' + - $ref: '#/components/schemas/ActorsQuery' + - $ref: '#/components/schemas/InsightActorsQuery' + - $ref: '#/components/schemas/InsightActorsQueryOptions' + - $ref: '#/components/schemas/SessionsTimelineQuery' + - $ref: '#/components/schemas/HogQuery' + - $ref: '#/components/schemas/HogQLQuery' + - $ref: '#/components/schemas/HogQLMetadata' + - $ref: '#/components/schemas/HogQLAutocomplete' + - $ref: '#/components/schemas/WebOverviewQuery' + - $ref: '#/components/schemas/WebStatsTableQuery' + - $ref: '#/components/schemas/WebExternalClicksTableQuery' + - $ref: '#/components/schemas/WebGoalsQuery' + - $ref: '#/components/schemas/WebVitalsQuery' + - $ref: '#/components/schemas/WebVitalsPathBreakdownQuery' + - $ref: '#/components/schemas/SessionAttributionExplorerQuery' + - $ref: '#/components/schemas/ErrorTrackingQuery' + - $ref: '#/components/schemas/ExperimentFunnelsQuery' + - $ref: '#/components/schemas/ExperimentTrendsQuery' + - $ref: '#/components/schemas/RecordingsQuery' + - $ref: '#/components/schemas/TracesQuery' + default: null + description: Query within which "expr" and "template" are validated. Defaults + to "select * from events" + title: Sourcequery + variables: + anyOf: + - additionalProperties: + $ref: '#/components/schemas/HogQLVariable' + type: object + default: null + description: Variables to be subsituted into the query + title: Variables + required: + - language + - query + title: HogQLMetadata + type: object + HogQLMetadataKindEnum: + enum: + - HogQLMetadata + type: string + HogQLMetadataResponse: + additionalProperties: false + properties: + errors: + items: + $ref: '#/components/schemas/HogQLNotice' + title: Errors + type: array + isValid: + anyOf: + - type: boolean + default: null + title: Isvalid + isValidView: + anyOf: + - type: boolean + default: null + title: Isvalidview + notices: + items: + $ref: '#/components/schemas/HogQLNotice' + title: Notices + type: array + query: + anyOf: + - type: string + default: null + title: Query + table_names: + anyOf: + - items: + type: string + type: array + default: null + title: Table Names + warnings: + items: + $ref: '#/components/schemas/HogQLNotice' + title: Warnings + type: array + required: + - errors + - notices + - warnings + title: HogQLMetadataResponse + type: object + HogQLNotice: + additionalProperties: false + properties: + end: + anyOf: + - type: integer + default: null + title: End + fix: + anyOf: + - type: string + default: null + title: Fix + message: + title: Message + type: string + start: + anyOf: + - type: integer + default: null + title: Start + required: + - message + title: HogQLNotice + type: object + HogQLPropertyFilter: + additionalProperties: false + properties: + key: + title: Key + type: string + label: + anyOf: + - type: string + default: null + title: Label + type: + allOf: + - $ref: '#/components/schemas/HogQLPropertyFilterTypeEnum' + + default: hogql + title: Type + value: + anyOf: + - type: string + - type: number + - items: + anyOf: + - type: string + - type: number + type: array + default: null + title: Value + required: + - key + title: HogQLPropertyFilter + type: object + HogQLPropertyFilterTypeEnum: + enum: + - hogql + type: string + HogQLQuery: + additionalProperties: false + properties: + explain: + anyOf: + - type: boolean + default: null + title: Explain + filters: + anyOf: + - $ref: '#/components/schemas/HogQLFilters' + default: null + kind: + allOf: + - $ref: '#/components/schemas/HogQLQueryKindEnum' + + default: HogQLQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + name: + anyOf: + - type: string + default: null + description: Client provided name of the query + title: Name + query: + title: Query + type: string + response: + anyOf: + - $ref: '#/components/schemas/HogQLQueryResponse' + default: null + values: + anyOf: + - type: object + default: null + description: Constant values that can be referenced with the {placeholder} + syntax in the query + title: Values + variables: + anyOf: + - additionalProperties: + $ref: '#/components/schemas/HogQLVariable' + type: object + default: null + description: Variables to be substituted into the query + title: Variables + required: + - query + title: HogQLQuery + type: object + HogQLQueryKindEnum: + enum: + - HogQLQuery + type: string + HogQLQueryModifiers: + additionalProperties: false + properties: + bounceRateDurationSeconds: + anyOf: + - type: number + default: null + title: Bounceratedurationseconds + bounceRatePageViewMode: + anyOf: + - $ref: '#/components/schemas/BounceRatePageViewMode' + default: null + customChannelTypeRules: + anyOf: + - items: + $ref: '#/components/schemas/CustomChannelRule' + type: array + default: null + title: Customchanneltyperules + dataWarehouseEventsModifiers: + anyOf: + - items: + $ref: '#/components/schemas/DataWarehouseEventsModifier' + type: array + default: null + title: Datawarehouseeventsmodifiers + debug: + anyOf: + - type: boolean + default: null + title: Debug + inCohortVia: + anyOf: + - $ref: '#/components/schemas/InCohortVia' + default: null + materializationMode: + anyOf: + - $ref: '#/components/schemas/MaterializationMode' + default: null + optimizeJoinedFilters: + anyOf: + - type: boolean + default: null + title: Optimizejoinedfilters + personsArgMaxVersion: + anyOf: + - $ref: '#/components/schemas/PersonsArgMaxVersion' + default: null + personsJoinMode: + anyOf: + - $ref: '#/components/schemas/PersonsJoinMode' + default: null + personsOnEventsMode: + anyOf: + - $ref: '#/components/schemas/PersonsOnEventsMode' + default: null + propertyGroupsMode: + anyOf: + - $ref: '#/components/schemas/PropertyGroupsMode' + default: null + s3TableUseInvalidColumns: + anyOf: + - type: boolean + default: null + title: S3Tableuseinvalidcolumns + sessionTableVersion: + anyOf: + - $ref: '#/components/schemas/SessionTableVersion' + default: null + useMaterializedViews: + anyOf: + - type: boolean + default: null + title: Usematerializedviews + title: HogQLQueryModifiers + type: object + HogQLQueryResponse: + additionalProperties: false + properties: + clickhouse: + anyOf: + - type: string + default: null + description: Executed ClickHouse query + title: Clickhouse + columns: + anyOf: + - items: {} + type: array + default: null + description: Returned columns + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + explain: + anyOf: + - items: + type: string + type: array + default: null + description: Query explanation output + title: Explain + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + metadata: + anyOf: + - $ref: '#/components/schemas/HogQLMetadataResponse' + default: null + description: Query metadata output + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query: + anyOf: + - type: string + default: null + description: Input query string + title: Query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: {} + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + description: Types of returned columns + title: Types + required: + - results + title: HogQLQueryResponse + type: object + HogQLVariable: + additionalProperties: false + properties: + code_name: + title: Code Name + type: string + isNull: + anyOf: + - type: boolean + default: null + title: Isnull + value: + anyOf: + - {} + default: null + title: Value + variableId: + title: Variableid + type: string + required: + - code_name + - variableId + title: HogQLVariable + type: object + HogQuery: + additionalProperties: false + properties: + code: + anyOf: + - type: string + default: null + title: Code + kind: + allOf: + - $ref: '#/components/schemas/HogQueryKindEnum' + + default: HogQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + response: + anyOf: + - $ref: '#/components/schemas/HogQueryResponse' + default: null + title: HogQuery + type: object + HogQueryKindEnum: + enum: + - HogQuery + type: string + HogQueryResponse: + additionalProperties: false + properties: + bytecode: + anyOf: + - items: {} + type: array + default: null + title: Bytecode + coloredBytecode: + anyOf: + - items: {} + type: array + default: null + title: Coloredbytecode + results: + title: Results + stdout: + anyOf: + - type: string + default: null + title: Stdout + required: + - results + title: HogQueryResponse + type: object + InCohortVia: + enum: + - auto + - leftjoin + - subquery + - leftjoin_conjoined + title: InCohortVia + type: string + Insight: + type: object + description: Simplified serializer to speed response times when loading large + amounts of objects. + properties: + id: + type: integer + readOnly: true + short_id: + type: string + readOnly: true + name: + type: string + nullable: true + maxLength: 400 + derived_name: + type: string + nullable: true + maxLength: 400 + filters: {} + query: + nullable: true + description: Query node JSON string + order: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + deleted: + type: boolean + dashboards: + type: array + items: + type: integer + description: "\n DEPRECATED. Will be removed in a future release.\ + \ Use dashboard_tiles instead.\n A dashboard ID for each of the\ + \ dashboards that this insight is displayed on.\n " + dashboard_tiles: + type: array + items: + $ref: '#/components/schemas/DashboardTileBasic' + readOnly: true + description: "\n A dashboard tile ID and dashboard_id for each of the\ + \ dashboards that this insight is displayed on.\n " + last_refresh: + type: string + readOnly: true + description: "\n The datetime this insight's results were generated.\n\ + \ If added to one or more dashboards the insight can be refreshed separately\ + \ on each.\n Returns the appropriate last_refresh datetime for the\ + \ context the insight is viewed in\n (see from_dashboard query parameter).\n\ + \ " + cache_target_age: + type: string + readOnly: true + description: The target age of the cached results for this insight. + next_allowed_client_refresh: + type: string + readOnly: true + description: "\n The earliest possible datetime at which we'll allow\ + \ the cached results for this insight to be refreshed\n by querying\ + \ the database.\n " + result: + type: string + readOnly: true + hasMore: + type: string + readOnly: true + columns: + type: string + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + nullable: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + description: + type: string + nullable: true + maxLength: 400 + updated_at: + type: string + format: date-time + readOnly: true + tags: + type: array + items: {} + favorited: + type: boolean + saved: + type: boolean + last_modified_at: + type: string + format: date-time + readOnly: true + last_modified_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + is_sample: + type: boolean + readOnly: true + effective_restriction_level: + allOf: + - $ref: '#/components/schemas/EffectiveRestrictionLevelEnum' + readOnly: true + effective_privilege_level: + allOf: + - $ref: '#/components/schemas/EffectivePrivilegeLevelEnum' + readOnly: true + user_access_level: + type: string + nullable: true + readOnly: true + description: The effective access level the user has for this object + timezone: + type: string + readOnly: true + description: The timezone this chart is displayed in. + is_cached: + type: string + readOnly: true + query_status: + type: string + readOnly: true + hogql: + type: string + readOnly: true + types: + type: string + readOnly: true + required: + - cache_target_age + - columns + - created_at + - created_by + - dashboard_tiles + - effective_privilege_level + - effective_restriction_level + - hasMore + - hogql + - id + - is_cached + - is_sample + - last_modified_at + - last_modified_by + - last_refresh + - next_allowed_client_refresh + - query_status + - result + - short_id + - timezone + - types + - updated_at + - user_access_level + InsightActorsQuery: + additionalProperties: false + properties: + breakdown: + anyOf: + - type: string + - items: + type: string + type: array + - type: integer + default: null + title: Breakdown + compare: + anyOf: + - $ref: '#/components/schemas/Compare' + default: null + day: + anyOf: + - type: string + - type: integer + default: null + title: Day + includeRecordings: + anyOf: + - type: boolean + default: null + title: Includerecordings + interval: + anyOf: + - type: integer + default: null + description: An interval selected out of available intervals in source query. + title: Interval + kind: + allOf: + - $ref: '#/components/schemas/Kind642Enum' + + default: InsightActorsQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + response: + anyOf: + - $ref: '#/components/schemas/ActorsQueryResponse' + default: null + series: + anyOf: + - type: integer + default: null + title: Series + source: + discriminator: + mapping: + FunnelsQuery: '#/components/schemas/FunnelsQuery' + LifecycleQuery: '#/components/schemas/LifecycleQuery' + PathsQuery: '#/components/schemas/PathsQuery' + RetentionQuery: '#/components/schemas/RetentionQuery' + StickinessQuery: '#/components/schemas/StickinessQuery' + TrendsQuery: '#/components/schemas/TrendsQuery' + propertyName: kind + oneOf: + - $ref: '#/components/schemas/TrendsQuery' + - $ref: '#/components/schemas/FunnelsQuery' + - $ref: '#/components/schemas/RetentionQuery' + - $ref: '#/components/schemas/PathsQuery' + - $ref: '#/components/schemas/StickinessQuery' + - $ref: '#/components/schemas/LifecycleQuery' + title: Source + status: + anyOf: + - type: string + default: null + title: Status + required: + - source + title: InsightActorsQuery + type: object + InsightActorsQueryOptions: + additionalProperties: false + properties: + kind: + allOf: + - $ref: '#/components/schemas/InsightActorsQueryOptionsKindEnum' + + default: InsightActorsQueryOptions + title: Kind + response: + anyOf: + - $ref: '#/components/schemas/InsightActorsQueryOptionsResponse' + default: null + source: + anyOf: + - $ref: '#/components/schemas/InsightActorsQuery' + - $ref: '#/components/schemas/FunnelsActorsQuery' + - $ref: '#/components/schemas/FunnelCorrelationActorsQuery' + - $ref: '#/components/schemas/StickinessActorsQuery' + title: Source + required: + - source + title: InsightActorsQueryOptions + type: object + InsightActorsQueryOptionsKindEnum: + enum: + - InsightActorsQueryOptions + type: string + InsightActorsQueryOptionsResponse: + additionalProperties: false + properties: + breakdown: + anyOf: + - items: + $ref: '#/components/schemas/BreakdownItem' + type: array + default: null + title: Breakdown + breakdowns: + anyOf: + - items: + $ref: '#/components/schemas/MultipleBreakdownOptions' + type: array + default: null + title: Breakdowns + compare: + anyOf: + - items: + $ref: '#/components/schemas/CompareItem' + type: array + default: null + title: Compare + day: + anyOf: + - items: + $ref: '#/components/schemas/DayItem' + type: array + default: null + title: Day + interval: + anyOf: + - items: + $ref: '#/components/schemas/IntervalItem' + type: array + default: null + title: Interval + series: + anyOf: + - items: + $ref: '#/components/schemas/Series' + type: array + default: null + title: Series + status: + anyOf: + - items: + $ref: '#/components/schemas/StatusItem' + type: array + default: null + title: Status + title: InsightActorsQueryOptionsResponse + type: object + InsightVizNode: + additionalProperties: false + properties: + embedded: + anyOf: + - type: boolean + default: null + description: Query is embedded inside another bordered component + title: Embedded + full: + anyOf: + - type: boolean + default: null + description: Show with most visual options enabled. Used in insight scene. + title: Full + hidePersonsModal: + anyOf: + - type: boolean + default: null + title: Hidepersonsmodal + kind: + allOf: + - $ref: '#/components/schemas/InsightVizNodeKindEnum' + + default: InsightVizNode + title: Kind + showCorrelationTable: + anyOf: + - type: boolean + default: null + title: Showcorrelationtable + showFilters: + anyOf: + - type: boolean + default: null + title: Showfilters + showHeader: + anyOf: + - type: boolean + default: null + title: Showheader + showLastComputation: + anyOf: + - type: boolean + default: null + title: Showlastcomputation + showLastComputationRefresh: + anyOf: + - type: boolean + default: null + title: Showlastcomputationrefresh + showResults: + anyOf: + - type: boolean + default: null + title: Showresults + showTable: + anyOf: + - type: boolean + default: null + title: Showtable + source: + discriminator: + mapping: + FunnelsQuery: '#/components/schemas/FunnelsQuery' + LifecycleQuery: '#/components/schemas/LifecycleQuery' + PathsQuery: '#/components/schemas/PathsQuery' + RetentionQuery: '#/components/schemas/RetentionQuery' + StickinessQuery: '#/components/schemas/StickinessQuery' + TrendsQuery: '#/components/schemas/TrendsQuery' + propertyName: kind + oneOf: + - $ref: '#/components/schemas/TrendsQuery' + - $ref: '#/components/schemas/FunnelsQuery' + - $ref: '#/components/schemas/RetentionQuery' + - $ref: '#/components/schemas/PathsQuery' + - $ref: '#/components/schemas/StickinessQuery' + - $ref: '#/components/schemas/LifecycleQuery' + title: Source + suppressSessionAnalysisWarning: + anyOf: + - type: boolean + default: null + title: Suppresssessionanalysiswarning + vizSpecificOptions: + anyOf: + - $ref: '#/components/schemas/VizSpecificOptions' + default: null + required: + - source + title: InsightVizNode + type: object + InsightVizNodeKindEnum: + enum: + - InsightVizNode + type: string + Interval: + enum: + - minute + - hour + - day + - week + - month + title: Interval + type: string + IntervalEnum: + enum: + - hour + - day + - week + - every 5 minutes + type: string + description: |- + * `hour` - hour + * `day` - day + * `week` - week + * `every 5 minutes` - every 5 minutes + IntervalItem: + additionalProperties: false + properties: + label: + title: Label + type: string + value: + description: An interval selected out of available intervals in source query + title: Value + type: integer + required: + - label + - value + title: IntervalItem + type: object + IntervalType: + enum: + - minute + - hour + - day + - week + - month + title: IntervalType + type: string + Key: + enum: + - tag_name + - text + - href + - selector + title: Key + type: string + KeyEnum: + enum: + - id + type: string + Kind069Enum: + enum: + - EventsNode + type: string + Kind0ddEnum: + enum: + - ExperimentFunnelsQuery + type: string + Kind496Enum: + enum: + - ExperimentTrendsQuery + type: string + Kind633Enum: + enum: + - ExperimentExposureQuery + type: string + Kind642Enum: + enum: + - InsightActorsQuery + type: string + KindCfaEnum: + enum: + - ActionsNode + type: string + KindD52Enum: + enum: + - ExperimentQuery + type: string + LLMTrace: + additionalProperties: false + properties: + createdAt: + title: Createdat + type: string + events: + items: + $ref: '#/components/schemas/LLMTraceEvent' + title: Events + type: array + id: + title: Id + type: string + inputCost: + anyOf: + - type: number + default: null + title: Inputcost + inputState: + anyOf: + - {} + default: null + title: Inputstate + inputTokens: + anyOf: + - type: number + default: null + title: Inputtokens + outputCost: + anyOf: + - type: number + default: null + title: Outputcost + outputState: + anyOf: + - {} + default: null + title: Outputstate + outputTokens: + anyOf: + - type: number + default: null + title: Outputtokens + person: + $ref: '#/components/schemas/LLMTracePerson' + totalCost: + anyOf: + - type: number + default: null + title: Totalcost + totalLatency: + anyOf: + - type: number + default: null + title: Totallatency + traceName: + anyOf: + - type: string + default: null + title: Tracename + required: + - createdAt + - events + - id + - person + title: LLMTrace + type: object + LLMTraceEvent: + additionalProperties: false + properties: + createdAt: + title: Createdat + type: string + event: + title: Event + type: string + id: + title: Id + type: string + properties: + type: object + title: Properties + required: + - createdAt + - event + - id + - properties + title: LLMTraceEvent + type: object + LLMTracePerson: + additionalProperties: false + properties: + created_at: + title: Created At + type: string + distinct_id: + title: Distinct Id + type: string + properties: + type: object + title: Properties + uuid: + title: Uuid + type: string + required: + - created_at + - distinct_id + - properties + - uuid + title: LLMTracePerson + type: object + LifecycleFilter: + additionalProperties: false + properties: + showLegend: + anyOf: + - type: boolean + default: false + title: Showlegend + showValuesOnSeries: + anyOf: + - type: boolean + default: null + title: Showvaluesonseries + toggledLifecycles: + anyOf: + - items: + $ref: '#/components/schemas/LifecycleToggle' + type: array + default: null + title: Toggledlifecycles + title: LifecycleFilter + type: object + LifecycleQuery: + additionalProperties: false + properties: + aggregation_group_type_index: + anyOf: + - type: integer + default: null + description: Groups aggregation + title: Aggregation Group Type Index + dataColorTheme: + anyOf: + - type: number + default: null + description: Colors used in the insight's visualization + title: Datacolortheme + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + description: Date range for the query + filterTestAccounts: + anyOf: + - type: boolean + default: false + description: Exclude internal and test users by applying the respective + filters + title: Filtertestaccounts + interval: + anyOf: + - $ref: '#/components/schemas/IntervalType' + default: day + description: Granularity of the response. Can be one of `hour`, `day`, `week` + or `month` + kind: + allOf: + - $ref: '#/components/schemas/LifecycleQueryKindEnum' + + default: LifecycleQuery + title: Kind + lifecycleFilter: + anyOf: + - $ref: '#/components/schemas/LifecycleFilter' + default: null + description: Properties specific to the lifecycle insight + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + - $ref: '#/components/schemas/PropertyGroupFilter' + default: [] + description: Property filters for all series + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/LifecycleQueryResponse' + default: null + samplingFactor: + anyOf: + - type: number + default: null + description: Sampling rate + title: Samplingfactor + series: + description: Events and actions to include + items: + anyOf: + - $ref: '#/components/schemas/EventsNode' + - $ref: '#/components/schemas/ActionsNode' + - $ref: '#/components/schemas/DataWarehouseNode' + title: Series + type: array + required: + - series + title: LifecycleQuery + type: object + LifecycleQueryKindEnum: + enum: + - LifecycleQuery + type: string + LifecycleQueryResponse: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + type: object + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: LifecycleQueryResponse + type: object + LifecycleToggle: + enum: + - new + - resurrecting + - returning + - dormant + title: LifecycleToggle + type: string + LogEntryPropertyFilter: + additionalProperties: false + properties: + key: + title: Key + type: string + label: + anyOf: + - type: string + default: null + title: Label + operator: + $ref: '#/components/schemas/PropertyOperator' + type: + allOf: + - $ref: '#/components/schemas/LogEntryPropertyFilterTypeEnum' + + default: log_entry + title: Type + value: + anyOf: + - type: string + - type: number + - items: + anyOf: + - type: string + - type: number + type: array + default: null + title: Value + required: + - key + - operator + title: LogEntryPropertyFilter + type: object + LogEntryPropertyFilterTypeEnum: + enum: + - log_entry + type: string + MatchedRecording: + additionalProperties: false + properties: + events: + items: + $ref: '#/components/schemas/MatchedRecordingEvent' + title: Events + type: array + session_id: + anyOf: + - type: string + default: null + title: Session Id + required: + - events + title: MatchedRecording + type: object + MatchedRecordingEvent: + additionalProperties: false + properties: + uuid: + title: Uuid + type: string + required: + - uuid + title: MatchedRecordingEvent + type: object + MaterializationMode: + enum: + - auto + - legacy_null_as_string + - legacy_null_as_null + - disabled + title: MaterializationMode + type: string + MathGroupTypeIndex: + enum: + - 0.0 + - 1.0 + - 2.0 + - 3.0 + - 4.0 + title: MathGroupTypeIndex + type: number + MinimalFeatureFlag: + type: object + properties: + id: + type: integer + readOnly: true + team_id: + type: integer + readOnly: true + name: + type: string + key: + type: string + maxLength: 400 + filters: + type: object + additionalProperties: {} + deleted: + type: boolean + active: + type: boolean + ensure_experience_continuity: + type: boolean + nullable: true + has_encrypted_payloads: + type: boolean + nullable: true + required: + - id + - key + - team_id + MinimalPerson: + type: object + properties: + id: + type: integer + readOnly: true + name: + type: string + readOnly: true + distinct_ids: + type: string + readOnly: true + properties: {} + created_at: + type: string + format: date-time + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + required: + - created_at + - distinct_ids + - id + - name + - uuid + ModelEnum: + enum: + - events + - persons + - sessions + type: string + description: |- + * `events` - Events + * `persons` - Persons + * `sessions` - Sessions + MultipleBreakdownOptions: + additionalProperties: false + properties: + values: + items: + $ref: '#/components/schemas/BreakdownItem' + title: Values + type: array + required: + - values + title: MultipleBreakdownOptions + type: object + MultipleBreakdownType: + enum: + - person + - event + - group + - session + - hogql + title: MultipleBreakdownType + type: string + Notebook: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + short_id: + type: string + readOnly: true + title: + type: string + nullable: true + maxLength: 256 + content: + nullable: true + text_content: + type: string + nullable: true + version: + type: integer + maximum: 2147483647 + minimum: -2147483648 + deleted: + type: boolean + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + last_modified_at: + type: string + format: date-time + readOnly: true + last_modified_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + user_access_level: + type: string + nullable: true + readOnly: true + description: The effective access level the user has for this object + required: + - created_at + - created_by + - id + - last_modified_at + - last_modified_by + - short_id + - user_access_level + NotebookMinimal: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + short_id: + type: string + readOnly: true + title: + type: string + readOnly: true + nullable: true + deleted: + type: boolean + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + last_modified_at: + type: string + format: date-time + readOnly: true + last_modified_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + required: + - created_at + - created_by + - deleted + - id + - last_modified_at + - last_modified_by + - short_id + - title + NullEnum: + enum: + - null + OperatorEnum: + enum: + - exact + - is_not + - icontains + - not_icontains + - regex + - not_regex + - gt + - lt + - gte + - lte + - is_set + - is_not_set + - is_date_exact + - is_date_after + - is_date_before + - in + - not_in + type: string + description: |- + * `exact` - exact + * `is_not` - is_not + * `icontains` - icontains + * `not_icontains` - not_icontains + * `regex` - regex + * `not_regex` - not_regex + * `gt` - gt + * `lt` - lt + * `gte` - gte + * `lte` - lte + * `is_set` - is_set + * `is_not_set` - is_not_set + * `is_date_exact` - is_date_exact + * `is_date_after` - is_date_after + * `is_date_before` - is_date_before + * `in` - in + * `not_in` - not_in + OrderBy: + enum: + - last_seen + - first_seen + - occurrences + - users + - sessions + title: OrderBy + type: string + Organization: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 64 + slug: + type: string + readOnly: true + pattern: ^[-a-zA-Z0-9_]+$ + logo_media_id: + type: string + format: uuid + nullable: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + membership_level: + allOf: + - $ref: '#/components/schemas/EffectiveMembershipLevelEnum' + nullable: true + readOnly: true + plugins_access_level: + allOf: + - $ref: '#/components/schemas/PluginsAccessLevelEnum' + readOnly: true + teams: + type: array + items: + type: object + additionalProperties: {} + readOnly: true + projects: + type: array + items: + type: object + additionalProperties: {} + readOnly: true + available_product_features: + type: array + items: {} + readOnly: true + nullable: true + is_member_join_email_enabled: + type: boolean + metadata: + type: string + readOnly: true + customer_id: + type: string + readOnly: true + nullable: true + enforce_2fa: + type: boolean + nullable: true + member_count: + type: string + readOnly: true + is_ai_data_processing_approved: + type: boolean + nullable: true + required: + - available_product_features + - created_at + - customer_id + - id + - member_count + - membership_level + - metadata + - name + - plugins_access_level + - projects + - slug + - teams + - updated_at + OrganizationBasic: + type: object + description: |- + Serializer for `Organization` model with minimal attributes to speeed up loading and transfer times. + Also used for nested serializers. + properties: + id: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 64 + slug: + type: string + maxLength: 48 + pattern: ^[-a-zA-Z0-9_]+$ + logo_media_id: + type: string + format: uuid + nullable: true + readOnly: true + membership_level: + allOf: + - $ref: '#/components/schemas/EffectiveMembershipLevelEnum' + nullable: true + readOnly: true + required: + - id + - logo_media_id + - membership_level + - name + - slug + OrganizationDomain: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + domain: + type: string + maxLength: 128 + is_verified: + type: boolean + description: Determines whether a domain is verified or not. + readOnly: true + verified_at: + type: string + format: date-time + readOnly: true + nullable: true + verification_challenge: + type: string + readOnly: true + jit_provisioning_enabled: + type: boolean + sso_enforcement: + type: string + maxLength: 28 + has_saml: + type: boolean + description: Returns whether SAML is configured for the instance. Does not + validate the user has the required license (that check is performed in + other places). + readOnly: true + saml_entity_id: + type: string + nullable: true + maxLength: 512 + saml_acs_url: + type: string + nullable: true + maxLength: 512 + saml_x509_cert: + type: string + nullable: true + required: + - domain + - has_saml + - id + - is_verified + - verification_challenge + - verified_at + OrganizationInvite: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + target_email: + type: string + format: email + maxLength: 254 + first_name: + type: string + maxLength: 30 + emailing_attempt_made: + type: boolean + readOnly: true + level: + allOf: + - $ref: '#/components/schemas/OrganizationMembershipLevel' + minimum: 0 + maximum: 32767 + is_expired: + type: boolean + description: Check if invite is older than INVITE_DAYS_VALIDITY days. + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + message: + type: string + nullable: true + private_project_access: + nullable: true + description: List of team IDs and corresponding access levels to private + projects. + send_email: + type: boolean + writeOnly: true + default: true + combine_pending_invites: + type: boolean + writeOnly: true + default: false + required: + - created_at + - created_by + - emailing_attempt_made + - id + - is_expired + - target_email + - updated_at + OrganizationMember: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + user: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + level: + allOf: + - $ref: '#/components/schemas/OrganizationMembershipLevel' + minimum: 0 + maximum: 32767 + joined_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + is_2fa_enabled: + type: boolean + readOnly: true + has_social_auth: + type: boolean + readOnly: true + last_login: + type: string + format: date-time + readOnly: true + required: + - has_social_auth + - id + - is_2fa_enabled + - joined_at + - last_login + - updated_at + - user + OrganizationMembershipLevel: + enum: + - 1 + - 8 + - 15 + type: integer + description: |- + * `1` - member + * `8` - administrator + * `15` - owner + PaginatedActionList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/Action' + PaginatedActivityLogList: + type: array + items: + $ref: '#/components/schemas/ActivityLog' + PaginatedAnnotationList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/Annotation' + PaginatedBatchExportBackfillList: + type: object + required: + - results + properties: + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?cursor=cD00ODY%3D" + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3 + results: + type: array + items: + $ref: '#/components/schemas/BatchExportBackfill' + PaginatedBatchExportList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/BatchExport' + PaginatedBatchExportRunList: + type: object + required: + - results + properties: + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?cursor=cD00ODY%3D" + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3 + results: + type: array + items: + $ref: '#/components/schemas/BatchExportRun' + PaginatedClickhouseEventList: + type: object + properties: + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/ClickhouseEvent' + PaginatedCohortList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/Cohort' + PaginatedDashboardBasicList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/DashboardBasic' + PaginatedDashboardTemplateList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/DashboardTemplate' + PaginatedEarlyAccessFeatureList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/EarlyAccessFeature' + PaginatedExperimentHoldoutList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/ExperimentHoldout' + PaginatedExperimentList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/Experiment' + PaginatedExperimentSavedMetricList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/ExperimentSavedMetric' + PaginatedExportedAssetList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/ExportedAsset' + PaginatedFeatureFlagList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/FeatureFlag' + PaginatedFeatureFlagRoleAccessList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/FeatureFlagRoleAccess' + PaginatedFileSystemList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/FileSystem' + PaginatedGroupList: + type: object + required: + - results + properties: + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?cursor=cD00ODY%3D" + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3 + results: + type: array + items: + $ref: '#/components/schemas/Group' + PaginatedInsightList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/Insight' + PaginatedNotebookMinimalList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/NotebookMinimal' + PaginatedOrganizationDomainList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/OrganizationDomain' + PaginatedOrganizationInviteList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/OrganizationInvite' + PaginatedOrganizationList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/Organization' + PaginatedOrganizationMemberList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/OrganizationMember' + PaginatedPersonList: + type: object + properties: + next: + type: string + nullable: true + format: uri + example: https://app.posthog.com/api/projects/{project_id}/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: https://app.posthog.com/api/projects/{project_id}/accounts/?offset=400&limit=100 + count: + type: integer + example: 400 + results: + type: array + items: + $ref: '#/components/schemas/Person' + PaginatedPluginLogEntryList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/PluginLogEntry' + PaginatedProjectBackwardCompatBasicList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/ProjectBackwardCompatBasic' + PaginatedProxyRecordList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/ProxyRecord' + PaginatedRoleList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/Role' + PaginatedRoleMembershipList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/RoleMembership' + PaginatedSessionRecordingList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/SessionRecording' + PaginatedSessionRecordingPlaylistList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/SessionRecordingPlaylist' + PaginatedSubscriptionList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/Subscription' + PaginatedSurveyList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/Survey' + PaginatedTeamBasicList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/TeamBasic' + PaginatedUserList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/User' + PaginatedWebExperimentsAPIList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/WebExperimentsAPI' + PatchedAction: + type: object + description: Serializer mixin that resolves appropriate response for tags depending + on license. + properties: + id: + type: integer + readOnly: true + name: + type: string + nullable: true + maxLength: 400 + description: + type: string + tags: + type: array + items: {} + post_to_slack: + type: boolean + slack_message_format: + type: string + maxLength: 1200 + steps: + type: array + items: + $ref: '#/components/schemas/ActionStepJSON' + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + deleted: + type: boolean + is_calculating: + type: boolean + readOnly: true + last_calculated_at: + type: string + format: date-time + team_id: + type: integer + readOnly: true + is_action: + type: boolean + readOnly: true + default: true + bytecode_error: + type: string + readOnly: true + nullable: true + pinned_at: + type: string + format: date-time + nullable: true + creation_context: + type: string + readOnly: true + PatchedAnnotation: + type: object + properties: + id: + type: integer + readOnly: true + content: + type: string + nullable: true + maxLength: 400 + date_marker: + type: string + format: date-time + nullable: true + creation_type: + $ref: '#/components/schemas/CreationTypeEnum' + dashboard_item: + type: integer + nullable: true + dashboard_id: + type: integer + nullable: true + readOnly: true + dashboard_name: + type: string + nullable: true + readOnly: true + insight_short_id: + type: string + nullable: true + readOnly: true + insight_name: + type: string + nullable: true + readOnly: true + insight_derived_name: + type: string + nullable: true + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + nullable: true + updated_at: + type: string + format: date-time + readOnly: true + deleted: + type: boolean + scope: + $ref: '#/components/schemas/AnnotationScopeEnum' + PatchedBatchExport: + type: object + description: Serializer for a BatchExport model. + properties: + id: + type: string + format: uuid + readOnly: true + team_id: + type: integer + description: The team this belongs to. + readOnly: true + name: + type: string + description: A human-readable name for this BatchExport. + model: + nullable: true + description: |- + Which model this BatchExport is exporting. + + * `events` - Events + * `persons` - Persons + * `sessions` - Sessions + oneOf: + - $ref: '#/components/schemas/ModelEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + destination: + $ref: '#/components/schemas/BatchExportDestination' + interval: + $ref: '#/components/schemas/IntervalEnum' + paused: + type: boolean + description: Whether this BatchExport is paused or not. + created_at: + type: string + format: date-time + readOnly: true + description: The timestamp at which this BatchExport was created. + last_updated_at: + type: string + format: date-time + readOnly: true + description: The timestamp at which this BatchExport was last updated. + last_paused_at: + type: string + format: date-time + nullable: true + description: The timestamp at which this BatchExport was last paused. + start_at: + type: string + format: date-time + nullable: true + description: Time before which any Batch Export runs won't be triggered. + end_at: + type: string + format: date-time + nullable: true + description: Time after which any Batch Export runs won't be triggered. + latest_runs: + type: array + items: + $ref: '#/components/schemas/BatchExportRun' + readOnly: true + hogql_query: + type: string + schema: + readOnly: true + nullable: true + description: A schema of custom fields to select when exporting data. + filters: + nullable: true + PatchedCohort: + type: object + properties: + id: + type: integer + readOnly: true + name: + type: string + nullable: true + maxLength: 400 + description: + type: string + maxLength: 1000 + groups: {} + deleted: + type: boolean + filters: + nullable: true + query: + nullable: true + is_calculating: + type: boolean + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + nullable: true + last_calculation: + type: string + format: date-time + readOnly: true + nullable: true + errors_calculating: + type: integer + readOnly: true + count: + type: integer + readOnly: true + nullable: true + is_static: + type: boolean + experiment_set: + type: array + items: + type: integer + readOnly: true + PatchedDashboard: + type: object + description: Serializer mixin that resolves appropriate response for tags depending + on license. + properties: + id: + type: integer + readOnly: true + name: + type: string + nullable: true + maxLength: 400 + description: + type: string + pinned: + type: boolean + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + is_shared: + type: boolean + readOnly: true + deleted: + type: boolean + creation_mode: + allOf: + - $ref: '#/components/schemas/CreationModeEnum' + readOnly: true + use_template: + type: string + writeOnly: true + use_dashboard: + type: integer + writeOnly: true + nullable: true + delete_insights: + type: boolean + writeOnly: true + default: false + filters: + type: object + additionalProperties: {} + readOnly: true + variables: + type: object + additionalProperties: {} + readOnly: true + tags: + type: array + items: {} + tiles: + type: array + items: + type: object + additionalProperties: {} + nullable: true + readOnly: true + restriction_level: + allOf: + - $ref: '#/components/schemas/DashboardRestrictionLevel' + minimum: 0 + maximum: 32767 + effective_restriction_level: + allOf: + - $ref: '#/components/schemas/EffectiveRestrictionLevelEnum' + readOnly: true + effective_privilege_level: + allOf: + - $ref: '#/components/schemas/EffectivePrivilegeLevelEnum' + readOnly: true + user_access_level: + type: string + nullable: true + readOnly: true + description: The effective access level the user has for this object + access_control_version: + type: string + readOnly: true + PatchedDashboardTemplate: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + template_name: + type: string + nullable: true + maxLength: 400 + dashboard_description: + type: string + nullable: true + maxLength: 400 + dashboard_filters: + nullable: true + tags: + type: array + items: + type: string + maxLength: 255 + nullable: true + tiles: + nullable: true + variables: + nullable: true + deleted: + type: boolean + nullable: true + created_at: + type: string + format: date-time + readOnly: true + nullable: true + created_by: + type: integer + nullable: true + image_url: + type: string + nullable: true + maxLength: 8201 + team_id: + type: integer + nullable: true + readOnly: true + scope: + nullable: true + oneOf: + - $ref: '#/components/schemas/DashboardTemplateScopeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + availability_contexts: + type: array + items: + type: string + maxLength: 255 + nullable: true + PatchedEarlyAccessFeature: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + feature_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + name: + type: string + maxLength: 200 + description: + type: string + stage: + $ref: '#/components/schemas/StageEnum' + documentation_url: + type: string + format: uri + maxLength: 800 + created_at: + type: string + format: date-time + readOnly: true + PatchedExperiment: + type: object + properties: + id: + type: integer + readOnly: true + name: + type: string + maxLength: 400 + description: + type: string + nullable: true + maxLength: 400 + start_date: + type: string + format: date-time + nullable: true + end_date: + type: string + format: date-time + nullable: true + feature_flag_key: + type: string + feature_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + holdout: + allOf: + - $ref: '#/components/schemas/ExperimentHoldout' + readOnly: true + holdout_id: + type: integer + nullable: true + exposure_cohort: + type: integer + readOnly: true + nullable: true + parameters: + nullable: true + secondary_metrics: + nullable: true + saved_metrics: + type: array + items: + $ref: '#/components/schemas/ExperimentToSavedMetric' + readOnly: true + saved_metrics_ids: + type: array + items: {} + nullable: true + filters: {} + archived: + type: boolean + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + type: + nullable: true + oneOf: + - $ref: '#/components/schemas/ExperimentTypeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + exposure_criteria: + nullable: true + metrics: + nullable: true + metrics_secondary: + nullable: true + stats_config: + nullable: true + PatchedExperimentHoldout: + type: object + properties: + id: + type: integer + readOnly: true + name: + type: string + maxLength: 400 + description: + type: string + nullable: true + maxLength: 400 + filters: {} + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + PatchedExperimentSavedMetric: + type: object + description: Serializer mixin that resolves appropriate response for tags depending + on license. + properties: + id: + type: integer + readOnly: true + name: + type: string + maxLength: 400 + description: + type: string + nullable: true + maxLength: 400 + query: {} + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + tags: + type: array + items: {} + PatchedExplicitTeamMember: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + level: + allOf: + - $ref: '#/components/schemas/ExplicitTeamMemberLevelEnum' + minimum: 0 + maximum: 32767 + parent_level: + type: integer + readOnly: true + parent_membership_id: + type: string + format: uuid + readOnly: true + joined_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + user: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + user_uuid: + type: string + format: uuid + writeOnly: true + effective_level: + allOf: + - $ref: '#/components/schemas/EffectiveMembershipLevelEnum' + description: If organization level is higher than project level, then that + takes precedence over explicit project level. + readOnly: true + PatchedFeatureFlag: + type: object + description: Serializer mixin that resolves appropriate response for tags depending + on license. + properties: + id: + type: integer + readOnly: true + name: + type: string + description: contains the description for the flag (field name `name` is + kept for backwards-compatibility) + key: + type: string + maxLength: 400 + filters: + type: object + additionalProperties: {} + deleted: + type: boolean + active: + type: boolean + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + created_at: + type: string + format: date-time + is_simple_flag: + type: boolean + readOnly: true + rollout_percentage: + type: integer + nullable: true + readOnly: true + ensure_experience_continuity: + type: boolean + nullable: true + experiment_set: + type: array + items: + type: integer + readOnly: true + surveys: + type: object + additionalProperties: {} + readOnly: true + features: + type: object + additionalProperties: {} + readOnly: true + rollback_conditions: + nullable: true + performed_rollback: + type: boolean + nullable: true + can_edit: + type: boolean + readOnly: true + tags: + type: array + items: {} + usage_dashboard: + type: integer + readOnly: true + analytics_dashboards: + type: array + items: + type: integer + has_enriched_analytics: + type: boolean + nullable: true + user_access_level: + type: string + nullable: true + readOnly: true + description: The effective access level the user has for this object + creation_context: + allOf: + - $ref: '#/components/schemas/CreationContextEnum' + writeOnly: true + description: |- + Indicates the origin product of the feature flag. Choices: 'feature_flags', 'experiments', 'surveys', 'early_access_features', 'web_experiments'. + + * `feature_flags` - feature_flags + * `experiments` - experiments + * `surveys` - surveys + * `early_access_features` - early_access_features + * `web_experiments` - web_experiments + is_remote_configuration: + type: boolean + nullable: true + has_encrypted_payloads: + type: boolean + nullable: true + status: + type: string + readOnly: true + PatchedFileSystem: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + path: + type: string + type: + type: string + maxLength: 100 + ref: + type: string + nullable: true + maxLength: 100 + href: + type: string + nullable: true + meta: + nullable: true + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + PatchedGroupType: + type: object + properties: + group_type: + type: string + readOnly: true + group_type_index: + type: integer + readOnly: true + name_singular: + type: string + nullable: true + maxLength: 400 + name_plural: + type: string + nullable: true + maxLength: 400 + PatchedInsight: + type: object + description: Simplified serializer to speed response times when loading large + amounts of objects. + properties: + id: + type: integer + readOnly: true + short_id: + type: string + readOnly: true + name: + type: string + nullable: true + maxLength: 400 + derived_name: + type: string + nullable: true + maxLength: 400 + filters: {} + query: + nullable: true + description: Query node JSON string + order: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + deleted: + type: boolean + dashboards: + type: array + items: + type: integer + description: "\n DEPRECATED. Will be removed in a future release.\ + \ Use dashboard_tiles instead.\n A dashboard ID for each of the\ + \ dashboards that this insight is displayed on.\n " + dashboard_tiles: + type: array + items: + $ref: '#/components/schemas/DashboardTileBasic' + readOnly: true + description: "\n A dashboard tile ID and dashboard_id for each of the\ + \ dashboards that this insight is displayed on.\n " + last_refresh: + type: string + readOnly: true + description: "\n The datetime this insight's results were generated.\n\ + \ If added to one or more dashboards the insight can be refreshed separately\ + \ on each.\n Returns the appropriate last_refresh datetime for the\ + \ context the insight is viewed in\n (see from_dashboard query parameter).\n\ + \ " + cache_target_age: + type: string + readOnly: true + description: The target age of the cached results for this insight. + next_allowed_client_refresh: + type: string + readOnly: true + description: "\n The earliest possible datetime at which we'll allow\ + \ the cached results for this insight to be refreshed\n by querying\ + \ the database.\n " + result: + type: string + readOnly: true + hasMore: + type: string + readOnly: true + columns: + type: string + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + nullable: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + description: + type: string + nullable: true + maxLength: 400 + updated_at: + type: string + format: date-time + readOnly: true + tags: + type: array + items: {} + favorited: + type: boolean + saved: + type: boolean + last_modified_at: + type: string + format: date-time + readOnly: true + last_modified_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + is_sample: + type: boolean + readOnly: true + effective_restriction_level: + allOf: + - $ref: '#/components/schemas/EffectiveRestrictionLevelEnum' + readOnly: true + effective_privilege_level: + allOf: + - $ref: '#/components/schemas/EffectivePrivilegeLevelEnum' + readOnly: true + user_access_level: + type: string + nullable: true + readOnly: true + description: The effective access level the user has for this object + timezone: + type: string + readOnly: true + description: The timezone this chart is displayed in. + is_cached: + type: string + readOnly: true + query_status: + type: string + readOnly: true + hogql: + type: string + readOnly: true + types: + type: string + readOnly: true + PatchedNotebook: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + short_id: + type: string + readOnly: true + title: + type: string + nullable: true + maxLength: 256 + content: + nullable: true + text_content: + type: string + nullable: true + version: + type: integer + maximum: 2147483647 + minimum: -2147483648 + deleted: + type: boolean + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + last_modified_at: + type: string + format: date-time + readOnly: true + last_modified_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + user_access_level: + type: string + nullable: true + readOnly: true + description: The effective access level the user has for this object + PatchedOrganization: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 64 + slug: + type: string + readOnly: true + pattern: ^[-a-zA-Z0-9_]+$ + logo_media_id: + type: string + format: uuid + nullable: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + membership_level: + allOf: + - $ref: '#/components/schemas/EffectiveMembershipLevelEnum' + nullable: true + readOnly: true + plugins_access_level: + allOf: + - $ref: '#/components/schemas/PluginsAccessLevelEnum' + readOnly: true + teams: + type: array + items: + type: object + additionalProperties: {} + readOnly: true + projects: + type: array + items: + type: object + additionalProperties: {} + readOnly: true + available_product_features: + type: array + items: {} + readOnly: true + nullable: true + is_member_join_email_enabled: + type: boolean + metadata: + type: string + readOnly: true + customer_id: + type: string + readOnly: true + nullable: true + enforce_2fa: + type: boolean + nullable: true + member_count: + type: string + readOnly: true + is_ai_data_processing_approved: + type: boolean + nullable: true + PatchedOrganizationDomain: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + domain: + type: string + maxLength: 128 + is_verified: + type: boolean + description: Determines whether a domain is verified or not. + readOnly: true + verified_at: + type: string + format: date-time + readOnly: true + nullable: true + verification_challenge: + type: string + readOnly: true + jit_provisioning_enabled: + type: boolean + sso_enforcement: + type: string + maxLength: 28 + has_saml: + type: boolean + description: Returns whether SAML is configured for the instance. Does not + validate the user has the required license (that check is performed in + other places). + readOnly: true + saml_entity_id: + type: string + nullable: true + maxLength: 512 + saml_acs_url: + type: string + nullable: true + maxLength: 512 + saml_x509_cert: + type: string + nullable: true + PatchedOrganizationMember: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + user: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + level: + allOf: + - $ref: '#/components/schemas/OrganizationMembershipLevel' + minimum: 0 + maximum: 32767 + joined_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + is_2fa_enabled: + type: boolean + readOnly: true + has_social_auth: + type: boolean + readOnly: true + last_login: + type: string + format: date-time + readOnly: true + PatchedPerson: + type: object + properties: + id: + type: integer + readOnly: true + name: + type: string + readOnly: true + distinct_ids: + type: array + items: + type: string + readOnly: true + properties: {} + created_at: + type: string + format: date-time + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + PatchedProjectBackwardCompat: + type: object + description: |- + Like `ProjectBasicSerializer`, but also works as a drop-in replacement for `TeamBasicSerializer` by way of + passthrough fields. This allows the meaning of `Team` to change from "project" to "environment" without breaking + backward compatibility of the REST API. + Do not use this in greenfield endpoints! + properties: + id: + type: integer + readOnly: true + organization: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 200 + minLength: 1 + product_description: + type: string + nullable: true + maxLength: 1000 + created_at: + type: string + format: date-time + readOnly: true + effective_membership_level: + allOf: + - $ref: '#/components/schemas/EffectiveMembershipLevelEnum' + nullable: true + readOnly: true + has_group_types: + type: boolean + readOnly: true + live_events_token: + type: string + nullable: true + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + api_token: + type: string + readOnly: true + app_urls: + type: array + items: + type: string + nullable: true + maxLength: 200 + slack_incoming_webhook: + type: string + nullable: true + maxLength: 500 + anonymize_ips: + type: boolean + completed_snippet_onboarding: + type: boolean + ingested_event: + type: boolean + readOnly: true + test_account_filters: {} + test_account_filters_default_checked: + type: boolean + nullable: true + path_cleaning_filters: + nullable: true + is_demo: + type: boolean + timezone: + $ref: '#/components/schemas/TimezoneEnum' + data_attributes: {} + person_display_name_properties: + type: array + items: + type: string + maxLength: 400 + nullable: true + correlation_config: + nullable: true + autocapture_opt_out: + type: boolean + nullable: true + autocapture_exceptions_opt_in: + type: boolean + nullable: true + autocapture_web_vitals_opt_in: + type: boolean + nullable: true + autocapture_web_vitals_allowed_metrics: + nullable: true + autocapture_exceptions_errors_to_ignore: + nullable: true + capture_console_log_opt_in: + type: boolean + nullable: true + capture_performance_opt_in: + type: boolean + nullable: true + session_recording_opt_in: + type: boolean + session_recording_sample_rate: + type: string + format: decimal + pattern: ^-?\d{0,1}(?:\.\d{0,2})?$ + nullable: true + session_recording_minimum_duration_milliseconds: + type: integer + maximum: 15000 + minimum: 0 + nullable: true + session_recording_linked_flag: + nullable: true + session_recording_network_payload_capture_config: + nullable: true + session_replay_config: + nullable: true + survey_config: + nullable: true + access_control: + type: boolean + week_start_day: + nullable: true + minimum: -32768 + maximum: 32767 + oneOf: + - $ref: '#/components/schemas/WeekStartDayEnum' + - $ref: '#/components/schemas/NullEnum' + primary_dashboard: + type: integer + nullable: true + live_events_columns: + type: array + items: + type: string + nullable: true + recording_domains: + type: array + items: + type: string + nullable: true + maxLength: 200 + nullable: true + person_on_events_querying_enabled: + type: string + readOnly: true + inject_web_apps: + type: boolean + nullable: true + extra_settings: + nullable: true + modifiers: + nullable: true + default_modifiers: + type: string + readOnly: true + has_completed_onboarding_for: + nullable: true + surveys_opt_in: + type: boolean + nullable: true + heatmaps_opt_in: + type: boolean + nullable: true + product_intents: + type: string + readOnly: true + flags_persistence_default: + type: boolean + nullable: true + PatchedProxyRecord: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + domain: + type: string + maxLength: 64 + target_cname: + type: string + readOnly: true + status: + allOf: + - $ref: '#/components/schemas/ProxyRecordStatusEnum' + readOnly: true + message: + type: string + readOnly: true + nullable: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + created_by: + type: integer + readOnly: true + nullable: true + PatchedRole: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 200 + feature_flags_access_level: + allOf: + - $ref: '#/components/schemas/FeatureFlagsAccessLevelEnum' + minimum: 0 + maximum: 32767 + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + members: + type: string + readOnly: true + PatchedSessionRecording: + type: object + properties: + id: + type: string + readOnly: true + distinct_id: + type: string + readOnly: true + nullable: true + viewed: + type: boolean + readOnly: true + viewers: + type: array + items: + type: string + readOnly: true + recording_duration: + type: integer + readOnly: true + active_seconds: + type: integer + readOnly: true + nullable: true + inactive_seconds: + type: integer + readOnly: true + nullable: true + start_time: + type: string + format: date-time + readOnly: true + nullable: true + end_time: + type: string + format: date-time + readOnly: true + nullable: true + click_count: + type: integer + readOnly: true + nullable: true + keypress_count: + type: integer + readOnly: true + nullable: true + mouse_activity_count: + type: integer + readOnly: true + nullable: true + console_log_count: + type: integer + readOnly: true + nullable: true + console_warn_count: + type: integer + readOnly: true + nullable: true + console_error_count: + type: integer + readOnly: true + nullable: true + start_url: + type: string + readOnly: true + nullable: true + person: + $ref: '#/components/schemas/MinimalPerson' + storage: + type: string + readOnly: true + snapshot_source: + type: string + nullable: true + readOnly: true + ongoing: + type: boolean + readOnly: true + activity_score: + type: number + format: double + nullable: true + readOnly: true + PatchedSessionRecordingPlaylist: + type: object + properties: + id: + type: integer + readOnly: true + short_id: + type: string + readOnly: true + name: + type: string + nullable: true + maxLength: 400 + derived_name: + type: string + nullable: true + maxLength: 400 + description: + type: string + pinned: + type: boolean + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + deleted: + type: boolean + filters: {} + last_modified_at: + type: string + format: date-time + readOnly: true + last_modified_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + PatchedSubscription: + type: object + description: Standard Subscription serializer. + properties: + id: + type: integer + readOnly: true + dashboard: + type: integer + nullable: true + insight: + type: integer + nullable: true + target_type: + $ref: '#/components/schemas/TargetTypeEnum' + target_value: + type: string + frequency: + $ref: '#/components/schemas/FrequencyEnum' + interval: + type: integer + maximum: 2147483647 + minimum: -2147483648 + byweekday: + type: array + items: + $ref: '#/components/schemas/ByweekdayEnum' + nullable: true + bysetpos: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + count: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + start_date: + type: string + format: date-time + until_date: + type: string + format: date-time + nullable: true + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + deleted: + type: boolean + title: + type: string + nullable: true + maxLength: 100 + summary: + type: string + readOnly: true + next_delivery_date: + type: string + format: date-time + readOnly: true + nullable: true + invite_message: + type: string + nullable: true + PatchedSurveySerializerCreateUpdateOnly: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 400 + description: + type: string + type: + $ref: '#/components/schemas/SurveyType' + schedule: + type: string + nullable: true + linked_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + linked_flag_id: + type: integer + writeOnly: true + nullable: true + targeting_flag_id: + type: integer + writeOnly: true + targeting_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + internal_targeting_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + targeting_flag_filters: + writeOnly: true + nullable: true + remove_targeting_flag: + type: boolean + writeOnly: true + nullable: true + questions: + nullable: true + description: "\n The `array` of questions included in the survey.\ + \ Each question must conform to one of the defined question types: Basic,\ + \ Link, Rating, or Multiple Choice.\n\n Basic (open-ended question)\n\ + \ - `type`: `open`\n - `question`: The text of the question.\n\ + \ - `description`: Optional description of the question.\n \ + \ - `descriptionContentType`: Content type of the description (`html`\ + \ or `text`).\n - `optional`: Whether the question is optional\ + \ (`boolean`).\n - `buttonText`: Text displayed on the submit button.\n\ + \ - `branching`: Branching logic for the question. See branching\ + \ types below for details.\n\n Link (a question with a link)\n\ + \ - `type`: `link`\n - `question`: The text of the question.\n\ + \ - `description`: Optional description of the question.\n \ + \ - `descriptionContentType`: Content type of the description (`html`\ + \ or `text`).\n - `optional`: Whether the question is optional\ + \ (`boolean`).\n - `buttonText`: Text displayed on the submit button.\n\ + \ - `link`: The URL associated with the question.\n - `branching`:\ + \ Branching logic for the question. See branching types below for details.\n\ + \n Rating (a question with a rating scale)\n - `type`: `rating`\n\ + \ - `question`: The text of the question.\n - `description`:\ + \ Optional description of the question.\n - `descriptionContentType`:\ + \ Content type of the description (`html` or `text`).\n - `optional`:\ + \ Whether the question is optional (`boolean`).\n - `buttonText`:\ + \ Text displayed on the submit button.\n - `display`: Display style\ + \ of the rating (`number` or `emoji`).\n - `scale`: The scale of\ + \ the rating (`number`).\n - `lowerBoundLabel`: Label for the lower\ + \ bound of the scale.\n - `upperBoundLabel`: Label for the upper\ + \ bound of the scale.\n - `branching`: Branching logic for the\ + \ question. See branching types below for details.\n\n Multiple\ + \ choice\n - `type`: `single_choice` or `multiple_choice`\n \ + \ - `question`: The text of the question.\n - `description`:\ + \ Optional description of the question.\n - `descriptionContentType`:\ + \ Content type of the description (`html` or `text`).\n - `optional`:\ + \ Whether the question is optional (`boolean`).\n - `buttonText`:\ + \ Text displayed on the submit button.\n - `choices`: An array\ + \ of choices for the question.\n - `shuffleOptions`: Whether to\ + \ shuffle the order of the choices (`boolean`).\n - `hasOpenChoice`:\ + \ Whether the question allows an open-ended response (`boolean`).\n \ + \ - `branching`: Branching logic for the question. See branching\ + \ types below for details.\n\n Branching logic can be one of the\ + \ following types:\n\n Next question: Proceeds to the next question\n\ + \ ```json\n {\n \"type\": \"next_question\"\n\ + \ }\n ```\n\n End: Ends the survey, optionally displaying\ + \ a confirmation message.\n ```json\n {\n \"\ + type\": \"end\"\n }\n ```\n\n Response-based: Branches\ + \ based on the response values. Available for the `rating` and `single_choice`\ + \ question types.\n ```json\n {\n \"type\": \"\ + response_based\",\n \"responseValues\": {\n \ + \ \"responseKey\": \"value\"\n }\n }\n ```\n\n\ + \ Specific question: Proceeds to a specific question by index.\n\ + \ ```json\n {\n \"type\": \"specific_question\"\ + ,\n \"index\": 2\n }\n ```\n " + conditions: + nullable: true + appearance: + nullable: true + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + start_date: + type: string + format: date-time + nullable: true + end_date: + type: string + format: date-time + nullable: true + archived: + type: boolean + responses_limit: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + iteration_count: + type: integer + maximum: 500 + minimum: 0 + nullable: true + iteration_frequency_days: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + iteration_start_dates: + type: array + items: + type: string + format: date-time + nullable: true + nullable: true + current_iteration: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + current_iteration_start_date: + type: string + format: date-time + nullable: true + response_sampling_start_date: + type: string + format: date-time + nullable: true + response_sampling_interval_type: + nullable: true + oneOf: + - $ref: '#/components/schemas/ResponseSamplingIntervalTypeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + response_sampling_interval: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + response_sampling_limit: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + response_sampling_daily_limits: + nullable: true + PatchedTeam: + type: object + properties: + id: + type: integer + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + organization: + type: string + format: uuid + readOnly: true + project_id: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + readOnly: true + api_token: + type: string + readOnly: true + app_urls: + type: array + items: + type: string + nullable: true + maxLength: 200 + name: + type: string + maxLength: 200 + minLength: 1 + slack_incoming_webhook: + type: string + nullable: true + maxLength: 500 + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + anonymize_ips: + type: boolean + completed_snippet_onboarding: + type: boolean + ingested_event: + type: boolean + readOnly: true + test_account_filters: {} + test_account_filters_default_checked: + type: boolean + nullable: true + path_cleaning_filters: + nullable: true + is_demo: + type: boolean + timezone: + $ref: '#/components/schemas/TimezoneEnum' + data_attributes: {} + person_display_name_properties: + type: array + items: + type: string + maxLength: 400 + nullable: true + correlation_config: + nullable: true + autocapture_opt_out: + type: boolean + nullable: true + autocapture_exceptions_opt_in: + type: boolean + nullable: true + autocapture_web_vitals_opt_in: + type: boolean + nullable: true + autocapture_web_vitals_allowed_metrics: + nullable: true + autocapture_exceptions_errors_to_ignore: + nullable: true + capture_console_log_opt_in: + type: boolean + nullable: true + capture_performance_opt_in: + type: boolean + nullable: true + session_recording_opt_in: + type: boolean + session_recording_sample_rate: + type: string + format: decimal + pattern: ^-?\d{0,1}(?:\.\d{0,2})?$ + nullable: true + session_recording_minimum_duration_milliseconds: + type: integer + maximum: 15000 + minimum: 0 + nullable: true + session_recording_linked_flag: + nullable: true + session_recording_network_payload_capture_config: + nullable: true + session_recording_url_trigger_config: + type: array + items: + nullable: true + nullable: true + session_recording_url_blocklist_config: + type: array + items: + nullable: true + nullable: true + session_recording_event_trigger_config: + type: array + items: + type: string + nullable: true + nullable: true + session_replay_config: + nullable: true + survey_config: + nullable: true + effective_membership_level: + allOf: + - $ref: '#/components/schemas/EffectiveMembershipLevelEnum' + nullable: true + readOnly: true + access_control: + type: boolean + week_start_day: + nullable: true + minimum: -32768 + maximum: 32767 + oneOf: + - $ref: '#/components/schemas/WeekStartDayEnum' + - $ref: '#/components/schemas/NullEnum' + has_group_types: + type: boolean + readOnly: true + primary_dashboard: + type: integer + nullable: true + live_events_columns: + type: array + items: + type: string + nullable: true + recording_domains: + type: array + items: + type: string + nullable: true + maxLength: 200 + nullable: true + cookieless_server_hash_mode: + nullable: true + minimum: -32768 + maximum: 32767 + oneOf: + - $ref: '#/components/schemas/CookielessServerHashModeEnum' + - $ref: '#/components/schemas/NullEnum' + human_friendly_comparison_periods: + type: boolean + nullable: true + person_on_events_querying_enabled: + type: boolean + readOnly: true + inject_web_apps: + type: boolean + nullable: true + extra_settings: + nullable: true + modifiers: + nullable: true + default_modifiers: + type: object + additionalProperties: {} + readOnly: true + has_completed_onboarding_for: + nullable: true + surveys_opt_in: + type: boolean + nullable: true + heatmaps_opt_in: + type: boolean + nullable: true + flags_persistence_default: + type: boolean + nullable: true + live_events_token: + type: string + nullable: true + readOnly: true + product_intents: + type: string + readOnly: true + capture_dead_clicks: + type: boolean + nullable: true + user_access_level: + type: string + nullable: true + readOnly: true + description: The effective access level the user has for this object + default_data_theme: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + revenue_tracking_config: + nullable: true + access_control_version: + type: string + readOnly: true + onboarding_tasks: + nullable: true + PatchedUser: + type: object + properties: + date_joined: + type: string + format: date-time + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + distinct_id: + type: string + readOnly: true + nullable: true + first_name: + type: string + maxLength: 150 + last_name: + type: string + maxLength: 150 + email: + type: string + format: email + title: Email address + maxLength: 254 + pending_email: + type: string + format: email + readOnly: true + nullable: true + title: Pending email address awaiting verification + is_email_verified: + type: boolean + readOnly: true + nullable: true + notification_settings: + type: object + additionalProperties: {} + anonymize_data: + type: boolean + nullable: true + toolbar_mode: + nullable: true + oneOf: + - $ref: '#/components/schemas/ToolbarModeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + has_password: + type: boolean + readOnly: true + is_staff: + type: boolean + title: Staff status + description: Designates whether the user can log into this admin site. + is_impersonated: + type: boolean + nullable: true + readOnly: true + is_impersonated_until: + type: string + nullable: true + readOnly: true + sensitive_session_expires_at: + type: string + nullable: true + readOnly: true + team: + allOf: + - $ref: '#/components/schemas/TeamBasic' + readOnly: true + organization: + allOf: + - $ref: '#/components/schemas/Organization' + readOnly: true + organizations: + type: array + items: + $ref: '#/components/schemas/OrganizationBasic' + readOnly: true + set_current_organization: + type: string + writeOnly: true + set_current_team: + type: string + writeOnly: true + password: + type: string + writeOnly: true + maxLength: 128 + current_password: + type: string + writeOnly: true + events_column_config: {} + is_2fa_enabled: + type: boolean + readOnly: true + has_social_auth: + type: boolean + readOnly: true + has_seen_product_intro_for: + nullable: true + scene_personalisation: + type: array + items: + $ref: '#/components/schemas/ScenePersonalisationBasic' + readOnly: true + theme_mode: + nullable: true + oneOf: + - $ref: '#/components/schemas/ThemeModeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + hedgehog_config: + nullable: true + role_at_organization: + $ref: '#/components/schemas/RoleAtOrganizationEnum' + PatchedWebExperimentsAPI: + type: object + description: Serializer for the exposed /api/web_experiments endpoint, to be + used in posthog-js and for headless APIs. + properties: + id: + type: integer + readOnly: true + name: + type: string + maxLength: 400 + created_at: + type: string + format: date-time + feature_flag_key: + type: string + readOnly: true + variants: + nullable: true + PathCleaningFilter: + additionalProperties: false + properties: + alias: + anyOf: + - type: string + default: null + title: Alias + regex: + anyOf: + - type: string + default: null + title: Regex + title: PathCleaningFilter + type: object + PathType: + enum: + - $pageview + - $screen + - custom_event + - hogql + title: PathType + type: string + PathsFilter: + additionalProperties: false + properties: + edgeLimit: + anyOf: + - type: integer + default: 50 + title: Edgelimit + endPoint: + anyOf: + - type: string + default: null + title: Endpoint + excludeEvents: + anyOf: + - items: + type: string + type: array + default: null + title: Excludeevents + includeEventTypes: + anyOf: + - items: + $ref: '#/components/schemas/PathType' + type: array + default: null + title: Includeeventtypes + localPathCleaningFilters: + anyOf: + - items: + $ref: '#/components/schemas/PathCleaningFilter' + type: array + default: null + title: Localpathcleaningfilters + maxEdgeWeight: + anyOf: + - type: integer + default: null + title: Maxedgeweight + minEdgeWeight: + anyOf: + - type: integer + default: null + title: Minedgeweight + pathDropoffKey: + anyOf: + - type: string + default: null + description: Relevant only within actors query + title: Pathdropoffkey + pathEndKey: + anyOf: + - type: string + default: null + description: Relevant only within actors query + title: Pathendkey + pathGroupings: + anyOf: + - items: + type: string + type: array + default: null + title: Pathgroupings + pathReplacements: + anyOf: + - type: boolean + default: null + title: Pathreplacements + pathStartKey: + anyOf: + - type: string + default: null + description: Relevant only within actors query + title: Pathstartkey + pathsHogQLExpression: + anyOf: + - type: string + default: null + title: Pathshogqlexpression + startPoint: + anyOf: + - type: string + default: null + title: Startpoint + stepLimit: + anyOf: + - type: integer + default: 5 + title: Steplimit + title: PathsFilter + type: object + PathsLink: + additionalProperties: false + properties: + average_conversion_time: + title: Average Conversion Time + type: number + source: + title: Source + type: string + target: + title: Target + type: string + value: + title: Value + type: number + required: + - average_conversion_time + - source + - target + - value + title: PathsLink + type: object + PathsQuery: + additionalProperties: false + properties: + aggregation_group_type_index: + anyOf: + - type: integer + default: null + description: Groups aggregation + title: Aggregation Group Type Index + dataColorTheme: + anyOf: + - type: number + default: null + description: Colors used in the insight's visualization + title: Datacolortheme + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + description: Date range for the query + filterTestAccounts: + anyOf: + - type: boolean + default: false + description: Exclude internal and test users by applying the respective + filters + title: Filtertestaccounts + funnelPathsFilter: + anyOf: + - $ref: '#/components/schemas/FunnelPathsFilter' + default: null + description: Used for displaying paths in relation to funnel steps. + kind: + allOf: + - $ref: '#/components/schemas/PathsQueryKindEnum' + + default: PathsQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + pathsFilter: + $ref: '#/components/schemas/PathsFilter' + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + - $ref: '#/components/schemas/PropertyGroupFilter' + default: [] + description: Property filters for all series + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/PathsQueryResponse' + default: null + samplingFactor: + anyOf: + - type: number + default: null + description: Sampling rate + title: Samplingfactor + required: + - pathsFilter + title: PathsQuery + type: object + PathsQueryKindEnum: + enum: + - PathsQuery + type: string + PathsQueryResponse: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/PathsLink' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: PathsQueryResponse + type: object + Person: + type: object + properties: + id: + type: integer + readOnly: true + name: + type: string + readOnly: true + distinct_ids: + type: array + items: + type: string + readOnly: true + properties: {} + created_at: + type: string + format: date-time + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + required: + - created_at + - distinct_ids + - id + - name + - uuid + PersonPropertyFilter: + additionalProperties: false + properties: + key: + title: Key + type: string + label: + anyOf: + - type: string + default: null + title: Label + operator: + $ref: '#/components/schemas/PropertyOperator' + type: + allOf: + - $ref: '#/components/schemas/PersonPropertyFilterTypeEnum' + + default: person + description: Person properties + title: Type + value: + anyOf: + - type: string + - type: number + - items: + anyOf: + - type: string + - type: number + type: array + default: null + title: Value + required: + - key + - operator + title: PersonPropertyFilter + type: object + PersonPropertyFilterTypeEnum: + enum: + - person + type: string + PersonType: + additionalProperties: false + properties: + created_at: + anyOf: + - type: string + default: null + title: Created At + distinct_ids: + items: + type: string + title: Distinct Ids + type: array + id: + anyOf: + - type: string + default: null + title: Id + is_identified: + anyOf: + - type: boolean + default: null + title: Is Identified + name: + anyOf: + - type: string + default: null + title: Name + properties: + type: object + title: Properties + uuid: + anyOf: + - type: string + default: null + title: Uuid + required: + - distinct_ids + - properties + title: PersonType + type: object + PersonsArgMaxVersion: + enum: + - auto + - v1 + - v2 + title: PersonsArgMaxVersion + type: string + PersonsJoinMode: + enum: + - inner + - left + title: PersonsJoinMode + type: string + PersonsNode: + additionalProperties: false + properties: + cohort: + anyOf: + - type: integer + default: null + title: Cohort + distinctId: + anyOf: + - type: string + default: null + title: Distinctid + fixedProperties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Fixed properties in the query, can't be edited in the interface + (e.g. scoping down by person) + title: Fixedproperties + kind: + allOf: + - $ref: '#/components/schemas/PersonsNodeKindEnum' + + default: PersonsNode + title: Kind + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Properties configurable in the interface + title: Properties + response: + anyOf: + - type: object + default: null + title: Response + search: + anyOf: + - type: string + default: null + title: Search + title: PersonsNode + type: object + PersonsNodeKindEnum: + enum: + - PersonsNode + type: string + PersonsOnEventsMode: + enum: + - disabled + - person_id_no_override_properties_on_events + - person_id_override_properties_on_events + - person_id_override_properties_joined + title: PersonsOnEventsMode + type: string + PluginLogEntry: + type: object + properties: + id: + type: string + format: uuid + team_id: + type: integer + plugin_id: + type: integer + plugin_config_id: + type: integer + timestamp: + type: string + format: date-time + source: + $ref: '#/components/schemas/SourceEnum' + type: + $ref: '#/components/schemas/PluginLogEntryTypeEnum' + message: + type: string + instance_id: + type: string + format: uuid + required: + - id + - instance_id + - message + - plugin_config_id + - plugin_id + - source + - team_id + - timestamp + - type + PluginLogEntryTypeEnum: + enum: + - DEBUG + - LOG + - INFO + - WARN + - ERROR + type: string + description: |- + * `DEBUG` - DEBUG + * `LOG` - LOG + * `INFO` - INFO + * `WARN` - WARN + * `ERROR` - ERROR + PluginsAccessLevelEnum: + enum: + - 0 + - 3 + - 6 + - 9 + type: integer + description: |- + * `0` - none + * `3` - config + * `6` - install + * `9` - root + ProjectBackwardCompat: + type: object + description: |- + Like `ProjectBasicSerializer`, but also works as a drop-in replacement for `TeamBasicSerializer` by way of + passthrough fields. This allows the meaning of `Team` to change from "project" to "environment" without breaking + backward compatibility of the REST API. + Do not use this in greenfield endpoints! + properties: + id: + type: integer + readOnly: true + organization: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 200 + minLength: 1 + product_description: + type: string + nullable: true + maxLength: 1000 + created_at: + type: string + format: date-time + readOnly: true + effective_membership_level: + allOf: + - $ref: '#/components/schemas/EffectiveMembershipLevelEnum' + nullable: true + readOnly: true + has_group_types: + type: boolean + readOnly: true + live_events_token: + type: string + nullable: true + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + api_token: + type: string + readOnly: true + app_urls: + type: array + items: + type: string + nullable: true + maxLength: 200 + slack_incoming_webhook: + type: string + nullable: true + maxLength: 500 + anonymize_ips: + type: boolean + completed_snippet_onboarding: + type: boolean + ingested_event: + type: boolean + readOnly: true + test_account_filters: {} + test_account_filters_default_checked: + type: boolean + nullable: true + path_cleaning_filters: + nullable: true + is_demo: + type: boolean + timezone: + $ref: '#/components/schemas/TimezoneEnum' + data_attributes: {} + person_display_name_properties: + type: array + items: + type: string + maxLength: 400 + nullable: true + correlation_config: + nullable: true + autocapture_opt_out: + type: boolean + nullable: true + autocapture_exceptions_opt_in: + type: boolean + nullable: true + autocapture_web_vitals_opt_in: + type: boolean + nullable: true + autocapture_web_vitals_allowed_metrics: + nullable: true + autocapture_exceptions_errors_to_ignore: + nullable: true + capture_console_log_opt_in: + type: boolean + nullable: true + capture_performance_opt_in: + type: boolean + nullable: true + session_recording_opt_in: + type: boolean + session_recording_sample_rate: + type: string + format: decimal + pattern: ^-?\d{0,1}(?:\.\d{0,2})?$ + nullable: true + session_recording_minimum_duration_milliseconds: + type: integer + maximum: 15000 + minimum: 0 + nullable: true + session_recording_linked_flag: + nullable: true + session_recording_network_payload_capture_config: + nullable: true + session_replay_config: + nullable: true + survey_config: + nullable: true + access_control: + type: boolean + week_start_day: + nullable: true + minimum: -32768 + maximum: 32767 + oneOf: + - $ref: '#/components/schemas/WeekStartDayEnum' + - $ref: '#/components/schemas/NullEnum' + primary_dashboard: + type: integer + nullable: true + live_events_columns: + type: array + items: + type: string + nullable: true + recording_domains: + type: array + items: + type: string + nullable: true + maxLength: 200 + nullable: true + person_on_events_querying_enabled: + type: string + readOnly: true + inject_web_apps: + type: boolean + nullable: true + extra_settings: + nullable: true + modifiers: + nullable: true + default_modifiers: + type: string + readOnly: true + has_completed_onboarding_for: + nullable: true + surveys_opt_in: + type: boolean + nullable: true + heatmaps_opt_in: + type: boolean + nullable: true + product_intents: + type: string + readOnly: true + flags_persistence_default: + type: boolean + nullable: true + required: + - api_token + - created_at + - default_modifiers + - effective_membership_level + - has_group_types + - id + - ingested_event + - live_events_token + - organization + - person_on_events_querying_enabled + - product_intents + - updated_at + - uuid + ProjectBackwardCompatBasic: + type: object + description: |- + Like `ProjectBasicSerializer`, but also works as a drop-in replacement for `TeamBasicSerializer` by way of + passthrough fields. This allows the meaning of `Team` to change from "project" to "environment" without breaking + backward compatibility of the REST API. + Do not use this in greenfield endpoints! + properties: + id: + type: integer + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + organization: + type: string + format: uuid + readOnly: true + api_token: + type: string + readOnly: true + name: + type: string + readOnly: true + completed_snippet_onboarding: + type: boolean + readOnly: true + has_completed_onboarding_for: + readOnly: true + nullable: true + ingested_event: + type: boolean + readOnly: true + is_demo: + type: boolean + readOnly: true + timezone: + allOf: + - $ref: '#/components/schemas/TimezoneEnum' + readOnly: true + access_control: + type: boolean + readOnly: true + required: + - access_control + - api_token + - completed_snippet_onboarding + - has_completed_onboarding_for + - id + - ingested_event + - is_demo + - name + - organization + - timezone + - uuid + Property: + type: object + properties: + type: + allOf: + - $ref: '#/components/schemas/PropertyTypeEnum' + default: AND + description: |2- + + You can use a simplified version: + ```json + { + "properties": [ + { + "key": "email", + "value": "x@y.com", + "operator": "exact", + "type": "event" + } + ] + } + ``` + + Or you can create more complicated queries with AND and OR: + ```json + { + "properties": { + "type": "AND", + "values": [ + { + "type": "OR", + "values": [ + {"key": "email", ...}, + {"key": "email", ...} + ] + }, + { + "type": "AND", + "values": [ + {"key": "email", ...}, + {"key": "email", ...} + ] + } + ] + ] + } + ``` + + + * `AND` - AND + * `OR` - OR + values: + type: array + items: + $ref: '#/components/schemas/PropertyItem' + required: + - values + PropertyGroupFilter: + additionalProperties: false + properties: + type: + $ref: '#/components/schemas/FilterLogicalOperator' + values: + items: + $ref: '#/components/schemas/PropertyGroupFilterValue' + title: Values + type: array + required: + - type + - values + title: PropertyGroupFilter + type: object + PropertyGroupFilterValue: + additionalProperties: false + properties: + type: + $ref: '#/components/schemas/FilterLogicalOperator' + values: + items: + anyOf: + - $ref: '#/components/schemas/PropertyGroupFilterValue' + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + title: Values + type: array + required: + - type + - values + title: PropertyGroupFilterValue + type: object + PropertyGroupsMode: + enum: + - enabled + - disabled + - optimized + title: PropertyGroupsMode + type: string + PropertyItem: + type: object + properties: + key: + type: string + description: Key of the property you're filtering on. For example `email` + or `$current_url` + value: + type: string + description: Value of your filter. For example `test@example.com` or `https://example.com/test/`. + Can be an array for an OR query, like `["test@example.com","ok@example.com"]` + operator: + nullable: true + default: exact + oneOf: + - $ref: '#/components/schemas/OperatorEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + type: + default: event + oneOf: + - $ref: '#/components/schemas/PropertyItemTypeEnum' + - $ref: '#/components/schemas/BlankEnum' + required: + - key + - value + PropertyItemTypeEnum: + enum: + - event + - feature + - person + - cohort + - element + - static-cohort + - precalculated-cohort + - group + - recording + - log_entry + - behavioral + - session + - hogql + - data_warehouse + - data_warehouse_person_property + type: string + description: |- + * `event` - event + * `feature` - feature + * `person` - person + * `cohort` - cohort + * `element` - element + * `static-cohort` - static-cohort + * `precalculated-cohort` - precalculated-cohort + * `group` - group + * `recording` - recording + * `log_entry` - log_entry + * `behavioral` - behavioral + * `session` - session + * `hogql` - hogql + * `data_warehouse` - data_warehouse + * `data_warehouse_person_property` - data_warehouse_person_property + PropertyMathType: + enum: + - avg + - sum + - min + - max + - median + - p75 + - p90 + - p95 + - p99 + title: PropertyMathType + type: string + PropertyOperator: + enum: + - exact + - is_not + - icontains + - not_icontains + - regex + - not_regex + - gt + - gte + - lt + - lte + - is_set + - is_not_set + - is_date_exact + - is_date_before + - is_date_after + - between + - not_between + - min + - max + - in + - not_in + - is_cleaned_path_exact + title: PropertyOperator + type: string + PropertyTypeEnum: + enum: + - AND + - OR + type: string + description: |- + * `AND` - AND + * `OR` - OR + ProxyRecord: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + domain: + type: string + maxLength: 64 + target_cname: + type: string + readOnly: true + status: + allOf: + - $ref: '#/components/schemas/ProxyRecordStatusEnum' + readOnly: true + message: + type: string + readOnly: true + nullable: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + created_by: + type: integer + readOnly: true + nullable: true + required: + - created_at + - created_by + - domain + - id + - message + - status + - target_cname + - updated_at + ProxyRecordStatusEnum: + enum: + - waiting + - issuing + - valid + - erroring + - deleting + - timed_out + type: string + description: |- + * `waiting` - Waiting + * `issuing` - Issuing + * `valid` - Valid + * `erroring` - Erroring + * `deleting` - Deleting + * `timed_out` - Timed Out + QueryAsyncEnum: + enum: + - true + type: boolean + QueryRequest: + additionalProperties: false + properties: + async: + anyOf: + - type: boolean + default: null + title: Async + client_query_id: + anyOf: + - type: string + default: null + description: Client provided query ID. Can be used to retrieve the status + or cancel the query. + title: Client Query Id + filters_override: + anyOf: + - $ref: '#/components/schemas/DashboardFilter' + default: null + query: + description: |- + Submit a JSON string representing a query for PostHog data analysis, for example a HogQL query. + + Example payload: + + ``` + + {"query": {"kind": "HogQLQuery", "query": "select * from events limit 100"}} + + ``` + + For more details on HogQL queries, see the [PostHog HogQL documentation](/docs/hogql#api-access). + discriminator: + mapping: + ActionsNode: '#/components/schemas/ActionsNode' + ActorsPropertyTaxonomyQuery: '#/components/schemas/ActorsPropertyTaxonomyQuery' + ActorsQuery: '#/components/schemas/ActorsQuery' + DataTableNode: '#/components/schemas/DataTableNode' + DataVisualizationNode: '#/components/schemas/DataVisualizationNode' + DataWarehouseNode: '#/components/schemas/DataWarehouseNode' + DatabaseSchemaQuery: '#/components/schemas/DatabaseSchemaQuery' + ErrorTrackingQuery: '#/components/schemas/ErrorTrackingQuery' + EventTaxonomyQuery: '#/components/schemas/EventTaxonomyQuery' + EventsNode: '#/components/schemas/EventsNode' + EventsQuery: '#/components/schemas/EventsQuery' + ExperimentExposureQuery: '#/components/schemas/ExperimentExposureQuery' + ExperimentFunnelsQuery: '#/components/schemas/ExperimentFunnelsQuery' + ExperimentQuery: '#/components/schemas/ExperimentQuery' + ExperimentTrendsQuery: '#/components/schemas/ExperimentTrendsQuery' + FunnelCorrelationQuery: '#/components/schemas/FunnelCorrelationQuery' + FunnelsQuery: '#/components/schemas/FunnelsQuery' + HogQLAutocomplete: '#/components/schemas/HogQLAutocomplete' + HogQLMetadata: '#/components/schemas/HogQLMetadata' + HogQLQuery: '#/components/schemas/HogQLQuery' + HogQuery: '#/components/schemas/HogQuery' + InsightActorsQuery: '#/components/schemas/InsightActorsQuery' + InsightActorsQueryOptions: '#/components/schemas/InsightActorsQueryOptions' + InsightVizNode: '#/components/schemas/InsightVizNode' + LifecycleQuery: '#/components/schemas/LifecycleQuery' + PathsQuery: '#/components/schemas/PathsQuery' + PersonsNode: '#/components/schemas/PersonsNode' + RetentionQuery: '#/components/schemas/RetentionQuery' + SavedInsightNode: '#/components/schemas/SavedInsightNode' + SessionAttributionExplorerQuery: '#/components/schemas/SessionAttributionExplorerQuery' + SessionsTimelineQuery: '#/components/schemas/SessionsTimelineQuery' + StickinessQuery: '#/components/schemas/StickinessQuery' + SuggestedQuestionsQuery: '#/components/schemas/SuggestedQuestionsQuery' + TeamTaxonomyQuery: '#/components/schemas/TeamTaxonomyQuery' + TracesQuery: '#/components/schemas/TracesQuery' + TrendsQuery: '#/components/schemas/TrendsQuery' + WebExternalClicksTableQuery: '#/components/schemas/WebExternalClicksTableQuery' + WebGoalsQuery: '#/components/schemas/WebGoalsQuery' + WebOverviewQuery: '#/components/schemas/WebOverviewQuery' + WebStatsTableQuery: '#/components/schemas/WebStatsTableQuery' + WebVitalsPathBreakdownQuery: '#/components/schemas/WebVitalsPathBreakdownQuery' + WebVitalsQuery: '#/components/schemas/WebVitalsQuery' + propertyName: kind + oneOf: + - $ref: '#/components/schemas/EventsNode' + - $ref: '#/components/schemas/ActionsNode' + - $ref: '#/components/schemas/PersonsNode' + - $ref: '#/components/schemas/DataWarehouseNode' + - $ref: '#/components/schemas/EventsQuery' + - $ref: '#/components/schemas/ActorsQuery' + - $ref: '#/components/schemas/InsightActorsQuery' + - $ref: '#/components/schemas/InsightActorsQueryOptions' + - $ref: '#/components/schemas/SessionsTimelineQuery' + - $ref: '#/components/schemas/HogQuery' + - $ref: '#/components/schemas/HogQLQuery' + - $ref: '#/components/schemas/HogQLMetadata' + - $ref: '#/components/schemas/HogQLAutocomplete' + - $ref: '#/components/schemas/SessionAttributionExplorerQuery' + - $ref: '#/components/schemas/ErrorTrackingQuery' + - $ref: '#/components/schemas/ExperimentFunnelsQuery' + - $ref: '#/components/schemas/ExperimentTrendsQuery' + - $ref: '#/components/schemas/ExperimentQuery' + - $ref: '#/components/schemas/ExperimentExposureQuery' + - $ref: '#/components/schemas/WebOverviewQuery' + - $ref: '#/components/schemas/WebStatsTableQuery' + - $ref: '#/components/schemas/WebExternalClicksTableQuery' + - $ref: '#/components/schemas/WebGoalsQuery' + - $ref: '#/components/schemas/WebVitalsQuery' + - $ref: '#/components/schemas/WebVitalsPathBreakdownQuery' + - $ref: '#/components/schemas/DataVisualizationNode' + - $ref: '#/components/schemas/DataTableNode' + - $ref: '#/components/schemas/SavedInsightNode' + - $ref: '#/components/schemas/InsightVizNode' + - $ref: '#/components/schemas/TrendsQuery' + - $ref: '#/components/schemas/FunnelsQuery' + - $ref: '#/components/schemas/RetentionQuery' + - $ref: '#/components/schemas/PathsQuery' + - $ref: '#/components/schemas/StickinessQuery' + - $ref: '#/components/schemas/LifecycleQuery' + - $ref: '#/components/schemas/FunnelCorrelationQuery' + - $ref: '#/components/schemas/DatabaseSchemaQuery' + - $ref: '#/components/schemas/SuggestedQuestionsQuery' + - $ref: '#/components/schemas/TeamTaxonomyQuery' + - $ref: '#/components/schemas/EventTaxonomyQuery' + - $ref: '#/components/schemas/ActorsPropertyTaxonomyQuery' + - $ref: '#/components/schemas/TracesQuery' + title: Query + refresh: + anyOf: + - type: boolean + - type: string + default: blocking + description: |- + Whether results should be calculated sync or async, and how much to rely on the cache: + - `'blocking'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache + - `'async'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache + - `'lazy_async'` - kick off background calculation, UNLESS there are somewhat fresh results in the cache + - `'force_blocking'` - calculate synchronously, even if fresh results are already cached + - `'force_async'` - kick off background calculation, even if fresh results are already cached + - `'force_cache'` - return cached data or a cache miss; always completes immediately as it never calculates Background calculation can be tracked using the `query_status` response field. + title: Refresh + variables_override: + anyOf: + - additionalProperties: + type: object + type: object + default: null + title: Variables Override + required: + - query + title: QueryRequest + type: object + QueryResponseAlternative: + anyOf: + - type: object + - $ref: '#/components/schemas/QueryResponseAlternative1' + - $ref: '#/components/schemas/QueryResponseAlternative2' + - $ref: '#/components/schemas/QueryResponseAlternative3' + - $ref: '#/components/schemas/QueryResponseAlternative4' + - $ref: '#/components/schemas/QueryResponseAlternative5' + - $ref: '#/components/schemas/QueryResponseAlternative6' + - $ref: '#/components/schemas/QueryResponseAlternative7' + - $ref: '#/components/schemas/QueryResponseAlternative8' + - $ref: '#/components/schemas/QueryResponseAlternative9' + - $ref: '#/components/schemas/QueryResponseAlternative10' + - $ref: '#/components/schemas/QueryResponseAlternative11' + - $ref: '#/components/schemas/QueryResponseAlternative12' + - $ref: '#/components/schemas/QueryResponseAlternative13' + - $ref: '#/components/schemas/QueryResponseAlternative14' + - $ref: '#/components/schemas/QueryResponseAlternative15' + - $ref: '#/components/schemas/QueryResponseAlternative16' + - $ref: '#/components/schemas/QueryResponseAlternative19' + - {} + - $ref: '#/components/schemas/QueryResponseAlternative20' + - $ref: '#/components/schemas/QueryResponseAlternative21' + - $ref: '#/components/schemas/QueryResponseAlternative22' + - $ref: '#/components/schemas/QueryResponseAlternative23' + - $ref: '#/components/schemas/QueryResponseAlternative24' + - $ref: '#/components/schemas/QueryResponseAlternative27' + - $ref: '#/components/schemas/QueryResponseAlternative28' + - $ref: '#/components/schemas/QueryResponseAlternative29' + - $ref: '#/components/schemas/QueryResponseAlternative30' + - $ref: '#/components/schemas/QueryResponseAlternative31' + - $ref: '#/components/schemas/QueryResponseAlternative32' + - $ref: '#/components/schemas/QueryResponseAlternative33' + - $ref: '#/components/schemas/QueryResponseAlternative34' + - $ref: '#/components/schemas/QueryResponseAlternative35' + - $ref: '#/components/schemas/QueryResponseAlternative36' + - $ref: '#/components/schemas/QueryResponseAlternative37' + - $ref: '#/components/schemas/QueryResponseAlternative39' + - $ref: '#/components/schemas/QueryResponseAlternative40' + - $ref: '#/components/schemas/QueryResponseAlternative41' + - $ref: '#/components/schemas/QueryResponseAlternative42' + - $ref: '#/components/schemas/QueryResponseAlternative43' + - $ref: '#/components/schemas/QueryResponseAlternative44' + - $ref: '#/components/schemas/QueryResponseAlternative45' + title: QueryResponseAlternative + QueryResponseAlternative1: + additionalProperties: false + properties: + columns: + items: {} + title: Columns + type: array + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + description: Generated HogQL query. + title: Hogql + type: string + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + items: {} + type: array + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + items: + type: string + title: Types + type: array + required: + - columns + - hogql + - results + - types + title: QueryResponseAlternative1 + type: object + QueryResponseAlternative10: + additionalProperties: false + properties: + columns: + anyOf: + - items: + type: string + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/ErrorTrackingIssue' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative10 + type: object + QueryResponseAlternative11: + additionalProperties: false + properties: + credible_intervals: + additionalProperties: + items: + type: number + type: array + title: Credible Intervals + type: object + expected_loss: + title: Expected Loss + type: number + funnels_query: + anyOf: + - $ref: '#/components/schemas/FunnelsQuery' + default: null + insight: + items: + items: + type: object + type: array + title: Insight + type: array + kind: + allOf: + - $ref: '#/components/schemas/Kind0ddEnum' + + default: ExperimentFunnelsQuery + title: Kind + probability: + additionalProperties: + type: number + title: Probability + type: object + significance_code: + $ref: '#/components/schemas/ExperimentSignificanceCode' + significant: + title: Significant + type: boolean + stats_version: + anyOf: + - type: integer + default: null + title: Stats Version + variants: + items: + $ref: '#/components/schemas/ExperimentVariantFunnelsBaseStats' + title: Variants + type: array + required: + - credible_intervals + - expected_loss + - insight + - probability + - significance_code + - significant + - variants + title: QueryResponseAlternative11 + type: object + QueryResponseAlternative12: + additionalProperties: false + properties: + count_query: + anyOf: + - $ref: '#/components/schemas/TrendsQuery' + default: null + credible_intervals: + additionalProperties: + items: + type: number + type: array + title: Credible Intervals + type: object + exposure_query: + anyOf: + - $ref: '#/components/schemas/TrendsQuery' + default: null + insight: + items: + type: object + title: Insight + type: array + kind: + allOf: + - $ref: '#/components/schemas/Kind496Enum' + + default: ExperimentTrendsQuery + title: Kind + p_value: + title: P Value + type: number + probability: + additionalProperties: + type: number + title: Probability + type: object + significance_code: + $ref: '#/components/schemas/ExperimentSignificanceCode' + significant: + title: Significant + type: boolean + stats_version: + anyOf: + - type: integer + default: null + title: Stats Version + variants: + items: + $ref: '#/components/schemas/ExperimentVariantTrendsBaseStats' + title: Variants + type: array + required: + - credible_intervals + - insight + - p_value + - probability + - significance_code + - significant + - variants + title: QueryResponseAlternative12 + type: object + QueryResponseAlternative13: + additionalProperties: false + properties: + credible_intervals: + additionalProperties: + items: + type: number + type: array + title: Credible Intervals + type: object + insight: + items: + type: object + title: Insight + type: array + kind: + allOf: + - $ref: '#/components/schemas/KindD52Enum' + + default: ExperimentQuery + title: Kind + metric: + $ref: '#/components/schemas/ExperimentMetric' + p_value: + title: P Value + type: number + probability: + additionalProperties: + type: number + title: Probability + type: object + significance_code: + $ref: '#/components/schemas/ExperimentSignificanceCode' + significant: + title: Significant + type: boolean + stats_version: + anyOf: + - type: integer + default: null + title: Stats Version + variants: + anyOf: + - items: + $ref: '#/components/schemas/ExperimentVariantTrendsBaseStats' + type: array + - items: + $ref: '#/components/schemas/ExperimentVariantFunnelsBaseStats' + type: array + title: Variants + required: + - credible_intervals + - insight + - metric + - p_value + - probability + - significance_code + - significant + - variants + title: QueryResponseAlternative13 + type: object + QueryResponseAlternative14: + additionalProperties: false + properties: + date_range: + $ref: '#/components/schemas/DateRange' + kind: + allOf: + - $ref: '#/components/schemas/Kind633Enum' + + default: ExperimentExposureQuery + title: Kind + timeseries: + items: + $ref: '#/components/schemas/ExperimentExposureTimeSeries' + title: Timeseries + type: array + total_exposures: + additionalProperties: + type: number + title: Total Exposures + type: object + required: + - date_range + - timeseries + - total_exposures + title: QueryResponseAlternative14 + type: object + QueryResponseAlternative15: + additionalProperties: false + properties: + dateFrom: + anyOf: + - type: string + default: null + title: Datefrom + dateTo: + anyOf: + - type: string + default: null + title: Dateto + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/WebOverviewItem' + title: Results + type: array + samplingRate: + anyOf: + - $ref: '#/components/schemas/SamplingRate' + default: null + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative15 + type: object + QueryResponseAlternative16: + additionalProperties: false + properties: + columns: + anyOf: + - items: {} + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: {} + title: Results + type: array + samplingRate: + anyOf: + - $ref: '#/components/schemas/SamplingRate' + default: null + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + title: Types + required: + - results + title: QueryResponseAlternative16 + type: object + QueryResponseAlternative19: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/WebVitalsPathBreakdownResult' + maxItems: 1 + minItems: 1 + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative19 + type: object + QueryResponseAlternative2: + additionalProperties: false + properties: + columns: + items: {} + title: Columns + type: array + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + description: Generated HogQL query. + title: Hogql + type: string + limit: + title: Limit + type: integer + missing_actors_count: + anyOf: + - type: integer + default: null + title: Missing Actors Count + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + title: Offset + type: integer + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + items: {} + type: array + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + items: + type: string + title: Types + type: array + required: + - columns + - hogql + - limit + - offset + - results + - types + title: QueryResponseAlternative2 + type: object + QueryResponseAlternative20: + additionalProperties: false + properties: + columns: + items: {} + title: Columns + type: array + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + description: Generated HogQL query. + title: Hogql + type: string + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + items: {} + type: array + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + items: + type: string + title: Types + type: array + required: + - columns + - hogql + - results + - types + title: QueryResponseAlternative20 + type: object + QueryResponseAlternative21: + additionalProperties: false + properties: + columns: + items: {} + title: Columns + type: array + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + description: Generated HogQL query. + title: Hogql + type: string + limit: + title: Limit + type: integer + missing_actors_count: + anyOf: + - type: integer + default: null + title: Missing Actors Count + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + title: Offset + type: integer + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + items: {} + type: array + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + items: + type: string + title: Types + type: array + required: + - columns + - hogql + - limit + - offset + - results + - types + title: QueryResponseAlternative21 + type: object + QueryResponseAlternative22: + additionalProperties: false + properties: + clickhouse: + anyOf: + - type: string + default: null + description: Executed ClickHouse query + title: Clickhouse + columns: + anyOf: + - items: {} + type: array + default: null + description: Returned columns + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + explain: + anyOf: + - items: + type: string + type: array + default: null + description: Query explanation output + title: Explain + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + metadata: + anyOf: + - $ref: '#/components/schemas/HogQLMetadataResponse' + default: null + description: Query metadata output + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query: + anyOf: + - type: string + default: null + description: Input query string + title: Query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: {} + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + description: Types of returned columns + title: Types + required: + - results + title: QueryResponseAlternative22 + type: object + QueryResponseAlternative23: + additionalProperties: false + properties: + dateFrom: + anyOf: + - type: string + default: null + title: Datefrom + dateTo: + anyOf: + - type: string + default: null + title: Dateto + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/WebOverviewItem' + title: Results + type: array + samplingRate: + anyOf: + - $ref: '#/components/schemas/SamplingRate' + default: null + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative23 + type: object + QueryResponseAlternative24: + additionalProperties: false + properties: + columns: + anyOf: + - items: {} + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: {} + title: Results + type: array + samplingRate: + anyOf: + - $ref: '#/components/schemas/SamplingRate' + default: null + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + title: Types + required: + - results + title: QueryResponseAlternative24 + type: object + QueryResponseAlternative27: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/WebVitalsPathBreakdownResult' + maxItems: 1 + minItems: 1 + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative27 + type: object + QueryResponseAlternative28: + additionalProperties: false + properties: + columns: + anyOf: + - items: {} + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + title: Results + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + title: Types + required: + - results + title: QueryResponseAlternative28 + type: object + QueryResponseAlternative29: + additionalProperties: false + properties: + columns: + anyOf: + - items: + type: string + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/ErrorTrackingIssue' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative29 + type: object + QueryResponseAlternative3: + additionalProperties: false + properties: + breakdown: + anyOf: + - items: + $ref: '#/components/schemas/BreakdownItem' + type: array + default: null + title: Breakdown + breakdowns: + anyOf: + - items: + $ref: '#/components/schemas/MultipleBreakdownOptions' + type: array + default: null + title: Breakdowns + compare: + anyOf: + - items: + $ref: '#/components/schemas/CompareItem' + type: array + default: null + title: Compare + day: + anyOf: + - items: + $ref: '#/components/schemas/DayItem' + type: array + default: null + title: Day + interval: + anyOf: + - items: + $ref: '#/components/schemas/IntervalItem' + type: array + default: null + title: Interval + series: + anyOf: + - items: + $ref: '#/components/schemas/Series' + type: array + default: null + title: Series + status: + anyOf: + - items: + $ref: '#/components/schemas/StatusItem' + type: array + default: null + title: Status + title: QueryResponseAlternative3 + type: object + QueryResponseAlternative30: + additionalProperties: false + properties: + credible_intervals: + additionalProperties: + items: + type: number + type: array + title: Credible Intervals + type: object + expected_loss: + title: Expected Loss + type: number + funnels_query: + anyOf: + - $ref: '#/components/schemas/FunnelsQuery' + default: null + insight: + items: + items: + type: object + type: array + title: Insight + type: array + kind: + allOf: + - $ref: '#/components/schemas/Kind0ddEnum' + + default: ExperimentFunnelsQuery + title: Kind + probability: + additionalProperties: + type: number + title: Probability + type: object + significance_code: + $ref: '#/components/schemas/ExperimentSignificanceCode' + significant: + title: Significant + type: boolean + stats_version: + anyOf: + - type: integer + default: null + title: Stats Version + variants: + items: + $ref: '#/components/schemas/ExperimentVariantFunnelsBaseStats' + title: Variants + type: array + required: + - credible_intervals + - expected_loss + - insight + - probability + - significance_code + - significant + - variants + title: QueryResponseAlternative30 + type: object + QueryResponseAlternative31: + additionalProperties: false + properties: + count_query: + anyOf: + - $ref: '#/components/schemas/TrendsQuery' + default: null + credible_intervals: + additionalProperties: + items: + type: number + type: array + title: Credible Intervals + type: object + exposure_query: + anyOf: + - $ref: '#/components/schemas/TrendsQuery' + default: null + insight: + items: + type: object + title: Insight + type: array + kind: + allOf: + - $ref: '#/components/schemas/Kind496Enum' + + default: ExperimentTrendsQuery + title: Kind + p_value: + title: P Value + type: number + probability: + additionalProperties: + type: number + title: Probability + type: object + significance_code: + $ref: '#/components/schemas/ExperimentSignificanceCode' + significant: + title: Significant + type: boolean + stats_version: + anyOf: + - type: integer + default: null + title: Stats Version + variants: + items: + $ref: '#/components/schemas/ExperimentVariantTrendsBaseStats' + title: Variants + type: array + required: + - credible_intervals + - insight + - p_value + - probability + - significance_code + - significant + - variants + title: QueryResponseAlternative31 + type: object + QueryResponseAlternative32: + additionalProperties: false + properties: + columns: + anyOf: + - items: + type: string + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/LLMTrace' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative32 + type: object + QueryResponseAlternative33: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + description: Wether more breakdown values are available. + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + type: object + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative33 + type: object + QueryResponseAlternative34: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + isUdf: + anyOf: + - type: boolean + default: null + title: Isudf + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + anyOf: + - $ref: '#/components/schemas/FunnelTimeToConvertResults' + - items: + type: object + type: array + - items: + items: + type: object + type: array + type: array + title: Results + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative34 + type: object + QueryResponseAlternative35: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/RetentionResult' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative35 + type: object + QueryResponseAlternative36: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/PathsLink' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative36 + type: object + QueryResponseAlternative37: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + type: object + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative37 + type: object + QueryResponseAlternative39: + additionalProperties: false + properties: + columns: + anyOf: + - items: {} + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + $ref: '#/components/schemas/FunnelCorrelationResult' + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + title: Types + required: + - results + title: QueryResponseAlternative39 + type: object + QueryResponseAlternative4: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/TimelineEntry' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative4 + type: object + QueryResponseAlternative40: + additionalProperties: false + properties: + tables: + additionalProperties: + anyOf: + - $ref: '#/components/schemas/DatabaseSchemaPostHogTable' + - $ref: '#/components/schemas/DatabaseSchemaDataWarehouseTable' + - $ref: '#/components/schemas/DatabaseSchemaViewTable' + - $ref: '#/components/schemas/DatabaseSchemaBatchExportTable' + - $ref: '#/components/schemas/DatabaseSchemaMaterializedViewTable' + title: Tables + type: object + required: + - tables + title: QueryResponseAlternative40 + type: object + QueryResponseAlternative41: + additionalProperties: false + properties: + questions: + items: + type: string + title: Questions + type: array + required: + - questions + title: QueryResponseAlternative41 + type: object + QueryResponseAlternative42: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/TeamTaxonomyItem' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative42 + type: object + QueryResponseAlternative43: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/EventTaxonomyItem' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative43 + type: object + QueryResponseAlternative44: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + $ref: '#/components/schemas/ActorsPropertyTaxonomyResponse' + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative44 + type: object + QueryResponseAlternative45: + additionalProperties: false + properties: + columns: + anyOf: + - items: + type: string + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/LLMTrace' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: QueryResponseAlternative45 + type: object + QueryResponseAlternative5: + additionalProperties: false + properties: + bytecode: + anyOf: + - items: {} + type: array + default: null + title: Bytecode + coloredBytecode: + anyOf: + - items: {} + type: array + default: null + title: Coloredbytecode + results: + title: Results + stdout: + anyOf: + - type: string + default: null + title: Stdout + required: + - results + title: QueryResponseAlternative5 + type: object + QueryResponseAlternative6: + additionalProperties: false + properties: + clickhouse: + anyOf: + - type: string + default: null + description: Executed ClickHouse query + title: Clickhouse + columns: + anyOf: + - items: {} + type: array + default: null + description: Returned columns + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + explain: + anyOf: + - items: + type: string + type: array + default: null + description: Query explanation output + title: Explain + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + metadata: + anyOf: + - $ref: '#/components/schemas/HogQLMetadataResponse' + default: null + description: Query metadata output + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query: + anyOf: + - type: string + default: null + description: Input query string + title: Query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: {} + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + description: Types of returned columns + title: Types + required: + - results + title: QueryResponseAlternative6 + type: object + QueryResponseAlternative7: + additionalProperties: false + properties: + errors: + items: + $ref: '#/components/schemas/HogQLNotice' + title: Errors + type: array + isValid: + anyOf: + - type: boolean + default: null + title: Isvalid + isValidView: + anyOf: + - type: boolean + default: null + title: Isvalidview + notices: + items: + $ref: '#/components/schemas/HogQLNotice' + title: Notices + type: array + query: + anyOf: + - type: string + default: null + title: Query + table_names: + anyOf: + - items: + type: string + type: array + default: null + title: Table Names + warnings: + items: + $ref: '#/components/schemas/HogQLNotice' + title: Warnings + type: array + required: + - errors + - notices + - warnings + title: QueryResponseAlternative7 + type: object + QueryResponseAlternative8: + additionalProperties: false + properties: + incomplete_list: + description: Whether or not the suggestions returned are complete + title: Incomplete List + type: boolean + suggestions: + items: + $ref: '#/components/schemas/AutocompleteCompletionItem' + title: Suggestions + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - incomplete_list + - suggestions + title: QueryResponseAlternative8 + type: object + QueryResponseAlternative9: + additionalProperties: false + properties: + columns: + anyOf: + - items: {} + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + title: Results + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + title: Types + required: + - results + title: QueryResponseAlternative9 + type: object + QueryStatus: + additionalProperties: false + properties: + complete: + anyOf: + - type: boolean + default: false + description: Whether the query is still running. Will be true if the query + is complete, even if it errored. Either result or error will be set. + title: Complete + dashboard_id: + anyOf: + - type: integer + default: null + title: Dashboard Id + end_time: + anyOf: + - format: date-time + type: string + default: null + description: When did the query execution task finish (whether successfully + or not). + title: End Time + error: + anyOf: + - type: boolean + default: false + description: If the query failed, this will be set to true. More information + can be found in the error_message field. + title: Error + error_message: + anyOf: + - type: string + default: null + title: Error Message + expiration_time: + anyOf: + - format: date-time + type: string + default: null + title: Expiration Time + id: + title: Id + type: string + insight_id: + anyOf: + - type: integer + default: null + title: Insight Id + labels: + anyOf: + - items: + type: string + type: array + default: null + title: Labels + pickup_time: + anyOf: + - format: date-time + type: string + default: null + description: When was the query execution task picked up by a worker. + title: Pickup Time + query_async: + allOf: + - $ref: '#/components/schemas/QueryAsyncEnum' + + default: true + description: ONLY async queries use QueryStatus. + title: Query Async + query_progress: + anyOf: + - $ref: '#/components/schemas/ClickhouseQueryProgress' + default: null + results: + anyOf: + - {} + default: null + title: Results + start_time: + anyOf: + - format: date-time + type: string + default: null + description: When was query execution task enqueued. + title: Start Time + task_id: + anyOf: + - type: string + default: null + title: Task Id + team_id: + title: Team Id + type: integer + required: + - id + - team_id + title: QueryStatus + type: object + QueryStatusResponse: + additionalProperties: false + properties: + query_status: + $ref: '#/components/schemas/QueryStatus' + required: + - query_status + title: QueryStatusResponse + type: object + QueryTiming: + additionalProperties: false + properties: + k: + description: Key. Shortened to 'k' to save on data. + title: K + type: string + t: + description: Time in seconds. Shortened to 't' to save on data. + title: T + type: number + required: + - k + - t + title: QueryTiming + type: object + RecordingOrder: + enum: + - duration + - recording_duration + - inactive_seconds + - active_seconds + - start_time + - console_error_count + - click_count + - keypress_count + - mouse_activity_count + - activity_score + title: RecordingOrder + type: string + RecordingPropertyFilter: + additionalProperties: false + properties: + key: + anyOf: + - $ref: '#/components/schemas/DurationType' + - type: string + title: Key + label: + anyOf: + - type: string + default: null + title: Label + operator: + $ref: '#/components/schemas/PropertyOperator' + type: + allOf: + - $ref: '#/components/schemas/RecordingPropertyFilterTypeEnum' + + default: recording + title: Type + value: + anyOf: + - type: string + - type: number + - items: + anyOf: + - type: string + - type: number + type: array + default: null + title: Value + required: + - key + - operator + title: RecordingPropertyFilter + type: object + RecordingPropertyFilterTypeEnum: + enum: + - recording + type: string + RecordingsQuery: + additionalProperties: false + properties: + actions: + anyOf: + - items: + type: object + type: array + default: null + title: Actions + console_log_filters: + anyOf: + - items: + $ref: '#/components/schemas/LogEntryPropertyFilter' + type: array + default: null + title: Console Log Filters + date_from: + anyOf: + - type: string + default: -3d + title: Date From + date_to: + anyOf: + - type: string + default: null + title: Date To + events: + anyOf: + - items: + type: object + type: array + default: null + title: Events + filter_test_accounts: + anyOf: + - type: boolean + default: null + title: Filter Test Accounts + having_predicates: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + title: Having Predicates + kind: + allOf: + - $ref: '#/components/schemas/RecordingsQueryKindEnum' + + default: RecordingsQuery + title: Kind + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + operand: + anyOf: + - $ref: '#/components/schemas/FilterLogicalOperator' + default: AND + order: + anyOf: + - $ref: '#/components/schemas/RecordingOrder' + default: start_time + person_uuid: + anyOf: + - type: string + default: null + title: Person Uuid + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/RecordingsQueryResponse' + default: null + session_ids: + anyOf: + - items: + type: string + type: array + default: null + title: Session Ids + user_modified_filters: + anyOf: + - type: object + default: null + title: User Modified Filters + title: RecordingsQuery + type: object + RecordingsQueryKindEnum: + enum: + - RecordingsQuery + type: string + RecordingsQueryResponse: + additionalProperties: false + properties: + has_next: + title: Has Next + type: boolean + results: + items: + $ref: '#/components/schemas/SessionRecordingType' + title: Results + type: array + required: + - has_next + - results + title: RecordingsQueryResponse + type: object + Response: + additionalProperties: false + properties: + columns: + items: {} + title: Columns + type: array + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + description: Generated HogQL query. + title: Hogql + type: string + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + items: {} + type: array + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + items: + type: string + title: Types + type: array + required: + - columns + - hogql + - results + - types + title: Response + type: object + Response1: + additionalProperties: false + properties: + columns: + items: {} + title: Columns + type: array + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + description: Generated HogQL query. + title: Hogql + type: string + limit: + title: Limit + type: integer + missing_actors_count: + anyOf: + - type: integer + default: null + title: Missing Actors Count + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + title: Offset + type: integer + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + items: {} + type: array + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + items: + type: string + title: Types + type: array + required: + - columns + - hogql + - limit + - offset + - results + - types + title: Response1 + type: object + Response10: + additionalProperties: false + properties: + credible_intervals: + additionalProperties: + items: + type: number + type: array + title: Credible Intervals + type: object + expected_loss: + title: Expected Loss + type: number + funnels_query: + anyOf: + - $ref: '#/components/schemas/FunnelsQuery' + default: null + insight: + items: + items: + type: object + type: array + title: Insight + type: array + kind: + allOf: + - $ref: '#/components/schemas/Kind0ddEnum' + + default: ExperimentFunnelsQuery + title: Kind + probability: + additionalProperties: + type: number + title: Probability + type: object + significance_code: + $ref: '#/components/schemas/ExperimentSignificanceCode' + significant: + title: Significant + type: boolean + stats_version: + anyOf: + - type: integer + default: null + title: Stats Version + variants: + items: + $ref: '#/components/schemas/ExperimentVariantFunnelsBaseStats' + title: Variants + type: array + required: + - credible_intervals + - expected_loss + - insight + - probability + - significance_code + - significant + - variants + title: Response10 + type: object + Response11: + additionalProperties: false + properties: + count_query: + anyOf: + - $ref: '#/components/schemas/TrendsQuery' + default: null + credible_intervals: + additionalProperties: + items: + type: number + type: array + title: Credible Intervals + type: object + exposure_query: + anyOf: + - $ref: '#/components/schemas/TrendsQuery' + default: null + insight: + items: + type: object + title: Insight + type: array + kind: + allOf: + - $ref: '#/components/schemas/Kind496Enum' + + default: ExperimentTrendsQuery + title: Kind + p_value: + title: P Value + type: number + probability: + additionalProperties: + type: number + title: Probability + type: object + significance_code: + $ref: '#/components/schemas/ExperimentSignificanceCode' + significant: + title: Significant + type: boolean + stats_version: + anyOf: + - type: integer + default: null + title: Stats Version + variants: + items: + $ref: '#/components/schemas/ExperimentVariantTrendsBaseStats' + title: Variants + type: array + required: + - credible_intervals + - insight + - p_value + - probability + - significance_code + - significant + - variants + title: Response11 + type: object + Response12: + additionalProperties: false + properties: + columns: + anyOf: + - items: + type: string + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/LLMTrace' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: Response12 + type: object + Response2: + additionalProperties: false + properties: + clickhouse: + anyOf: + - type: string + default: null + description: Executed ClickHouse query + title: Clickhouse + columns: + anyOf: + - items: {} + type: array + default: null + description: Returned columns + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + explain: + anyOf: + - items: + type: string + type: array + default: null + description: Query explanation output + title: Explain + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + metadata: + anyOf: + - $ref: '#/components/schemas/HogQLMetadataResponse' + default: null + description: Query metadata output + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query: + anyOf: + - type: string + default: null + description: Input query string + title: Query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: {} + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + description: Types of returned columns + title: Types + required: + - results + title: Response2 + type: object + Response3: + additionalProperties: false + properties: + dateFrom: + anyOf: + - type: string + default: null + title: Datefrom + dateTo: + anyOf: + - type: string + default: null + title: Dateto + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/WebOverviewItem' + title: Results + type: array + samplingRate: + anyOf: + - $ref: '#/components/schemas/SamplingRate' + default: null + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: Response3 + type: object + Response4: + additionalProperties: false + properties: + columns: + anyOf: + - items: {} + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: {} + title: Results + type: array + samplingRate: + anyOf: + - $ref: '#/components/schemas/SamplingRate' + default: null + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + title: Types + required: + - results + title: Response4 + type: object + Response7: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/WebVitalsPathBreakdownResult' + maxItems: 1 + minItems: 1 + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: Response7 + type: object + Response8: + additionalProperties: false + properties: + columns: + anyOf: + - items: {} + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + title: Results + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + title: Types + required: + - results + title: Response8 + type: object + Response9: + additionalProperties: false + properties: + columns: + anyOf: + - items: + type: string + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/ErrorTrackingIssue' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: Response9 + type: object + ResponseSamplingIntervalTypeEnum: + enum: + - day + - week + - month + type: string + description: |- + * `day` - day + * `week` - week + * `month` - month + ResultCustomizationBy: + enum: + - value + - position + title: ResultCustomizationBy + type: string + ResultCustomizationByPosition: + additionalProperties: false + properties: + assignmentBy: + allOf: + - $ref: '#/components/schemas/ResultCustomizationByPositionAssignmentByEnum' + + default: position + title: Assignmentby + color: + $ref: '#/components/schemas/DataColorToken' + required: + - color + title: ResultCustomizationByPosition + type: object + ResultCustomizationByPositionAssignmentByEnum: + enum: + - position + type: string + ResultCustomizationByValue: + additionalProperties: false + properties: + assignmentBy: + allOf: + - $ref: '#/components/schemas/ResultCustomizationByValueAssignmentByEnum' + + default: value + title: Assignmentby + color: + $ref: '#/components/schemas/DataColorToken' + required: + - color + title: ResultCustomizationByValue + type: object + ResultCustomizationByValueAssignmentByEnum: + enum: + - value + type: string + RetentionEntity: + additionalProperties: false + properties: + custom_name: + anyOf: + - type: string + default: null + title: Custom Name + id: + anyOf: + - type: string + - type: number + default: null + title: Id + kind: + anyOf: + - $ref: '#/components/schemas/RetentionEntityKind' + default: null + name: + anyOf: + - type: string + default: null + title: Name + order: + anyOf: + - type: integer + default: null + title: Order + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: filters on the event + title: Properties + type: + anyOf: + - $ref: '#/components/schemas/EntityType' + default: null + uuid: + anyOf: + - type: string + default: null + title: Uuid + title: RetentionEntity + type: object + RetentionEntityKind: + enum: + - ActionsNode + - EventsNode + title: RetentionEntityKind + type: string + RetentionFilter: + additionalProperties: false + properties: + cumulative: + anyOf: + - type: boolean + default: null + title: Cumulative + period: + anyOf: + - $ref: '#/components/schemas/RetentionPeriod' + default: Day + retentionReference: + anyOf: + - $ref: '#/components/schemas/RetentionReference' + default: null + description: Whether retention is with regard to initial cohort size, or + that of the previous period. + retentionType: + anyOf: + - $ref: '#/components/schemas/RetentionType' + default: null + returningEntity: + anyOf: + - $ref: '#/components/schemas/RetentionEntity' + default: null + showMean: + anyOf: + - type: boolean + default: null + title: Showmean + targetEntity: + anyOf: + - $ref: '#/components/schemas/RetentionEntity' + default: null + totalIntervals: + anyOf: + - type: integer + default: 11 + title: Totalintervals + title: RetentionFilter + type: object + RetentionPeriod: + enum: + - Hour + - Day + - Week + - Month + title: RetentionPeriod + type: string + RetentionQuery: + additionalProperties: false + properties: + aggregation_group_type_index: + anyOf: + - type: integer + default: null + description: Groups aggregation + title: Aggregation Group Type Index + dataColorTheme: + anyOf: + - type: number + default: null + description: Colors used in the insight's visualization + title: Datacolortheme + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + description: Date range for the query + filterTestAccounts: + anyOf: + - type: boolean + default: false + description: Exclude internal and test users by applying the respective + filters + title: Filtertestaccounts + kind: + allOf: + - $ref: '#/components/schemas/RetentionQueryKindEnum' + + default: RetentionQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + - $ref: '#/components/schemas/PropertyGroupFilter' + default: [] + description: Property filters for all series + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/RetentionQueryResponse' + default: null + retentionFilter: + $ref: '#/components/schemas/RetentionFilter' + samplingFactor: + anyOf: + - type: number + default: null + description: Sampling rate + title: Samplingfactor + required: + - retentionFilter + title: RetentionQuery + type: object + RetentionQueryKindEnum: + enum: + - RetentionQuery + type: string + RetentionQueryResponse: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/RetentionResult' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: RetentionQueryResponse + type: object + RetentionReference: + enum: + - total + - previous + title: RetentionReference + type: string + RetentionResult: + additionalProperties: false + properties: + date: + format: date-time + title: Date + type: string + label: + title: Label + type: string + values: + items: + $ref: '#/components/schemas/RetentionValue' + title: Values + type: array + required: + - date + - label + - values + title: RetentionResult + type: object + RetentionType: + enum: + - retention_recurring + - retention_first_time + title: RetentionType + type: string + RetentionValue: + additionalProperties: false + properties: + count: + title: Count + type: integer + required: + - count + title: RetentionValue + type: object + Role: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 200 + feature_flags_access_level: + allOf: + - $ref: '#/components/schemas/FeatureFlagsAccessLevelEnum' + minimum: 0 + maximum: 32767 + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + members: + type: string + readOnly: true + required: + - created_at + - created_by + - id + - members + - name + RoleAtOrganizationEnum: + enum: + - engineering + - data + - product + - founder + - leadership + - marketing + - sales + - other + type: string + description: |- + * `engineering` - Engineering + * `data` - Data + * `product` - Product Management + * `founder` - Founder + * `leadership` - Leadership + * `marketing` - Marketing + * `sales` - Sales / Success + * `other` - Other + RoleMembership: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + role_id: + type: string + format: uuid + readOnly: true + organization_member: + allOf: + - $ref: '#/components/schemas/OrganizationMember' + readOnly: true + user: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + joined_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + user_uuid: + type: string + format: uuid + writeOnly: true + required: + - id + - joined_at + - organization_member + - role_id + - updated_at + - user + - user_uuid + Sampling: + additionalProperties: false + properties: + enabled: + anyOf: + - type: boolean + default: null + title: Enabled + forceSamplingRate: + anyOf: + - $ref: '#/components/schemas/SamplingRate' + default: null + title: Sampling + type: object + SamplingRate: + additionalProperties: false + properties: + denominator: + anyOf: + - type: number + default: null + title: Denominator + numerator: + title: Numerator + type: number + required: + - numerator + title: SamplingRate + type: object + SavedInsightNode: + additionalProperties: false + properties: + allowSorting: + anyOf: + - type: boolean + default: null + description: 'Can the user click on column headers to sort the table? (default: + true)' + title: Allowsorting + embedded: + anyOf: + - type: boolean + default: null + description: Query is embedded inside another bordered component + title: Embedded + expandable: + anyOf: + - type: boolean + default: null + description: 'Can expand row to show raw event data (default: true)' + title: Expandable + full: + anyOf: + - type: boolean + default: null + description: Show with most visual options enabled. Used in insight scene. + title: Full + hidePersonsModal: + anyOf: + - type: boolean + default: null + title: Hidepersonsmodal + kind: + allOf: + - $ref: '#/components/schemas/SavedInsightNodeKindEnum' + + default: SavedInsightNode + title: Kind + propertiesViaUrl: + anyOf: + - type: boolean + default: null + description: 'Link properties via the URL (default: false)' + title: Propertiesviaurl + shortId: + title: Shortid + type: string + showActions: + anyOf: + - type: boolean + default: null + description: Show the kebab menu at the end of the row + title: Showactions + showColumnConfigurator: + anyOf: + - type: boolean + default: null + description: Show a button to configure the table's columns if possible + title: Showcolumnconfigurator + showCorrelationTable: + anyOf: + - type: boolean + default: null + title: Showcorrelationtable + showDateRange: + anyOf: + - type: boolean + default: null + description: Show date range selector + title: Showdaterange + showElapsedTime: + anyOf: + - type: boolean + default: null + description: Show the time it takes to run a query + title: Showelapsedtime + showEventFilter: + anyOf: + - type: boolean + default: null + description: Include an event filter above the table (EventsNode only) + title: Showeventfilter + showExport: + anyOf: + - type: boolean + default: null + description: Show the export button + title: Showexport + showFilters: + anyOf: + - type: boolean + default: null + title: Showfilters + showHeader: + anyOf: + - type: boolean + default: null + title: Showheader + showHogQLEditor: + anyOf: + - type: boolean + default: null + description: Include a HogQL query editor above HogQL tables + title: Showhogqleditor + showLastComputation: + anyOf: + - type: boolean + default: null + title: Showlastcomputation + showLastComputationRefresh: + anyOf: + - type: boolean + default: null + title: Showlastcomputationrefresh + showOpenEditorButton: + anyOf: + - type: boolean + default: null + description: 'Show a button to open the current query as a new insight. + (default: true)' + title: Showopeneditorbutton + showPersistentColumnConfigurator: + anyOf: + - type: boolean + default: null + description: Show a button to configure and persist the table's default + columns if possible + title: Showpersistentcolumnconfigurator + showPropertyFilter: + anyOf: + - type: boolean + - items: + $ref: '#/components/schemas/TaxonomicFilterGroupType' + type: array + default: null + description: Include a property filter above the table + title: Showpropertyfilter + showReload: + anyOf: + - type: boolean + default: null + description: Show a reload button + title: Showreload + showResults: + anyOf: + - type: boolean + default: null + title: Showresults + showResultsTable: + anyOf: + - type: boolean + default: null + description: Show a results table + title: Showresultstable + showSavedQueries: + anyOf: + - type: boolean + default: null + description: Shows a list of saved queries + title: Showsavedqueries + showSearch: + anyOf: + - type: boolean + default: null + description: Include a free text search field (PersonsNode only) + title: Showsearch + showTable: + anyOf: + - type: boolean + default: null + title: Showtable + showTestAccountFilters: + anyOf: + - type: boolean + default: null + description: Show filter to exclude test accounts + title: Showtestaccountfilters + showTimings: + anyOf: + - type: boolean + default: null + description: Show a detailed query timing breakdown + title: Showtimings + suppressSessionAnalysisWarning: + anyOf: + - type: boolean + default: null + title: Suppresssessionanalysiswarning + vizSpecificOptions: + anyOf: + - $ref: '#/components/schemas/VizSpecificOptions' + default: null + required: + - shortId + title: SavedInsightNode + type: object + SavedInsightNodeKindEnum: + enum: + - SavedInsightNode + type: string + Scale: + enum: + - linear + - logarithmic + title: Scale + type: string + ScenePersonalisationBasic: + type: object + properties: + scene: + type: string + maxLength: 200 + dashboard: + type: integer + nullable: true + required: + - scene + Series: + additionalProperties: false + properties: + label: + title: Label + type: string + value: + title: Value + type: integer + required: + - label + - value + title: Series + type: object + SessionAttributionExplorerQuery: + additionalProperties: false + properties: + filters: + anyOf: + - $ref: '#/components/schemas/Filters' + default: null + groupBy: + items: + $ref: '#/components/schemas/SessionAttributionGroupBy' + title: Groupby + type: array + kind: + allOf: + - $ref: '#/components/schemas/SessionAttributionExplorerQueryKindEnum' + + default: SessionAttributionExplorerQuery + title: Kind + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + response: + anyOf: + - $ref: '#/components/schemas/SessionAttributionExplorerQueryResponse' + default: null + required: + - groupBy + title: SessionAttributionExplorerQuery + type: object + SessionAttributionExplorerQueryKindEnum: + enum: + - SessionAttributionExplorerQuery + type: string + SessionAttributionExplorerQueryResponse: + additionalProperties: false + properties: + columns: + anyOf: + - items: {} + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + title: Results + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + title: Types + required: + - results + title: SessionAttributionExplorerQueryResponse + type: object + SessionAttributionGroupBy: + enum: + - ChannelType + - Medium + - Source + - Campaign + - AdIds + - ReferringDomain + - InitialURL + title: SessionAttributionGroupBy + type: string + SessionPropertyFilter: + additionalProperties: false + properties: + key: + title: Key + type: string + label: + anyOf: + - type: string + default: null + title: Label + operator: + $ref: '#/components/schemas/PropertyOperator' + type: + allOf: + - $ref: '#/components/schemas/SessionPropertyFilterTypeEnum' + + default: session + title: Type + value: + anyOf: + - type: string + - type: number + - items: + anyOf: + - type: string + - type: number + type: array + default: null + title: Value + required: + - key + - operator + title: SessionPropertyFilter + type: object + SessionPropertyFilterTypeEnum: + enum: + - session + type: string + SessionRecording: + type: object + properties: + id: + type: string + readOnly: true + distinct_id: + type: string + readOnly: true + nullable: true + viewed: + type: boolean + readOnly: true + viewers: + type: array + items: + type: string + readOnly: true + recording_duration: + type: integer + readOnly: true + active_seconds: + type: integer + readOnly: true + nullable: true + inactive_seconds: + type: integer + readOnly: true + nullable: true + start_time: + type: string + format: date-time + readOnly: true + nullable: true + end_time: + type: string + format: date-time + readOnly: true + nullable: true + click_count: + type: integer + readOnly: true + nullable: true + keypress_count: + type: integer + readOnly: true + nullable: true + mouse_activity_count: + type: integer + readOnly: true + nullable: true + console_log_count: + type: integer + readOnly: true + nullable: true + console_warn_count: + type: integer + readOnly: true + nullable: true + console_error_count: + type: integer + readOnly: true + nullable: true + start_url: + type: string + readOnly: true + nullable: true + person: + $ref: '#/components/schemas/MinimalPerson' + storage: + type: string + readOnly: true + snapshot_source: + type: string + nullable: true + readOnly: true + ongoing: + type: boolean + readOnly: true + activity_score: + type: number + format: double + nullable: true + readOnly: true + required: + - active_seconds + - activity_score + - click_count + - console_error_count + - console_log_count + - console_warn_count + - distinct_id + - end_time + - id + - inactive_seconds + - keypress_count + - mouse_activity_count + - ongoing + - recording_duration + - snapshot_source + - start_time + - start_url + - storage + - viewed + - viewers + SessionRecordingPlaylist: + type: object + properties: + id: + type: integer + readOnly: true + short_id: + type: string + readOnly: true + name: + type: string + nullable: true + maxLength: 400 + derived_name: + type: string + nullable: true + maxLength: 400 + description: + type: string + pinned: + type: boolean + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + deleted: + type: boolean + filters: {} + last_modified_at: + type: string + format: date-time + readOnly: true + last_modified_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + required: + - created_at + - created_by + - id + - last_modified_at + - last_modified_by + - short_id + SessionRecordingType: + additionalProperties: false + properties: + active_seconds: + anyOf: + - type: number + default: null + title: Active Seconds + activity_score: + anyOf: + - type: number + default: null + description: calculated on the backend so that we can sort by it, definition + may change over time + title: Activity Score + click_count: + anyOf: + - type: number + default: null + title: Click Count + console_error_count: + anyOf: + - type: number + default: null + title: Console Error Count + console_log_count: + anyOf: + - type: number + default: null + title: Console Log Count + console_warn_count: + anyOf: + - type: number + default: null + title: Console Warn Count + distinct_id: + anyOf: + - type: string + default: null + title: Distinct Id + email: + anyOf: + - type: string + default: null + title: Email + end_time: + description: When the recording ends in ISO format. + title: End Time + type: string + id: + title: Id + type: string + inactive_seconds: + anyOf: + - type: number + default: null + title: Inactive Seconds + keypress_count: + anyOf: + - type: number + default: null + title: Keypress Count + matching_events: + anyOf: + - items: + $ref: '#/components/schemas/MatchedRecording' + type: array + default: null + description: List of matching events. * + title: Matching Events + mouse_activity_count: + anyOf: + - type: number + default: null + description: count of all mouse activity in the recording, not just clicks + title: Mouse Activity Count + ongoing: + anyOf: + - type: boolean + default: null + description: |- + whether we have received data for this recording in the last 5 minutes (assumes the recording was loaded from ClickHouse) + * + title: Ongoing + person: + anyOf: + - $ref: '#/components/schemas/PersonType' + default: null + recording_duration: + description: Length of recording in seconds. + title: Recording Duration + type: number + snapshot_source: + $ref: '#/components/schemas/SnapshotSource' + start_time: + description: When the recording starts in ISO format. + title: Start Time + type: string + start_url: + anyOf: + - type: string + default: null + title: Start Url + storage: + anyOf: + - $ref: '#/components/schemas/Storage' + default: null + description: Where this recording information was loaded from + summary: + anyOf: + - type: string + default: null + title: Summary + viewed: + description: Whether this recording has been viewed by you already. + title: Viewed + type: boolean + viewers: + description: user ids of other users who have viewed this recording + items: + type: string + title: Viewers + type: array + required: + - end_time + - id + - recording_duration + - snapshot_source + - start_time + - viewed + - viewers + title: SessionRecordingType + type: object + SessionTableVersion: + enum: + - auto + - v1 + - v2 + title: SessionTableVersion + type: string + SessionsTimelineQuery: + additionalProperties: false + properties: + after: + anyOf: + - type: string + default: null + description: 'Only fetch sessions that started after this timestamp (default: + ''-24h'')' + title: After + before: + anyOf: + - type: string + default: null + description: 'Only fetch sessions that started before this timestamp (default: + ''+5s'')' + title: Before + kind: + allOf: + - $ref: '#/components/schemas/SessionsTimelineQueryKindEnum' + + default: SessionsTimelineQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + personId: + anyOf: + - type: string + default: null + description: Fetch sessions only for a given person + title: Personid + response: + anyOf: + - $ref: '#/components/schemas/SessionsTimelineQueryResponse' + default: null + title: SessionsTimelineQuery + type: object + SessionsTimelineQueryKindEnum: + enum: + - SessionsTimelineQuery + type: string + SessionsTimelineQueryResponse: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/TimelineEntry' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: SessionsTimelineQueryResponse + type: object + Settings: + additionalProperties: false + properties: + display: + anyOf: + - $ref: '#/components/schemas/ChartSettingsDisplay' + default: null + formatting: + anyOf: + - $ref: '#/components/schemas/ChartSettingsFormatting' + default: null + title: Settings + type: object + SharingConfiguration: + type: object + properties: + created_at: + type: string + format: date-time + readOnly: true + enabled: + type: boolean + access_token: + type: string + readOnly: true + nullable: true + required: + - access_token + - created_at + SnapshotSource: + enum: + - web + - mobile + - unknown + title: SnapshotSource + type: string + SourceEnum: + enum: + - SYSTEM + - PLUGIN + - CONSOLE + type: string + description: |- + * `SYSTEM` - SYSTEM + * `PLUGIN` - PLUGIN + * `CONSOLE` - CONSOLE + StageEnum: + enum: + - draft + - concept + - alpha + - beta + - general-availability + - archived + type: string + description: |- + * `draft` - draft + * `concept` - concept + * `alpha` - alpha + * `beta` - beta + * `general-availability` - general availability + * `archived` - archived + Status: + enum: + - archived + - active + - resolved + - pending_release + title: Status + type: string + Status1: + enum: + - archived + - active + - resolved + - pending_release + - all + title: Status1 + type: string + StatusC1bEnum: + enum: + - Cancelled + - Completed + - ContinuedAsNew + - Failed + - FailedRetryable + - Terminated + - TimedOut + - Running + - Starting + type: string + description: |- + * `Cancelled` - Cancelled + * `Completed` - Completed + * `ContinuedAsNew` - Continued As New + * `Failed` - Failed + * `FailedRetryable` - Failed Retryable + * `Terminated` - Terminated + * `TimedOut` - Timedout + * `Running` - Running + * `Starting` - Starting + StatusItem: + additionalProperties: false + properties: + label: + title: Label + type: string + value: + title: Value + type: string + required: + - label + - value + title: StatusItem + type: object + StepOrderValue: + enum: + - strict + - unordered + - ordered + title: StepOrderValue + type: string + StickinessActorsQuery: + additionalProperties: false + properties: + breakdown: + anyOf: + - type: string + - items: + type: string + type: array + - type: integer + default: null + title: Breakdown + compare: + anyOf: + - $ref: '#/components/schemas/Compare' + default: null + day: + anyOf: + - type: string + - type: integer + default: null + title: Day + includeRecordings: + anyOf: + - type: boolean + default: null + title: Includerecordings + interval: + anyOf: + - type: integer + default: null + description: An interval selected out of available intervals in source query. + title: Interval + kind: + allOf: + - $ref: '#/components/schemas/Kind642Enum' + + default: InsightActorsQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + operator: + anyOf: + - $ref: '#/components/schemas/StickinessOperator' + default: null + response: + anyOf: + - $ref: '#/components/schemas/ActorsQueryResponse' + default: null + series: + anyOf: + - type: integer + default: null + title: Series + source: + discriminator: + mapping: + FunnelsQuery: '#/components/schemas/FunnelsQuery' + LifecycleQuery: '#/components/schemas/LifecycleQuery' + PathsQuery: '#/components/schemas/PathsQuery' + RetentionQuery: '#/components/schemas/RetentionQuery' + StickinessQuery: '#/components/schemas/StickinessQuery' + TrendsQuery: '#/components/schemas/TrendsQuery' + propertyName: kind + oneOf: + - $ref: '#/components/schemas/TrendsQuery' + - $ref: '#/components/schemas/FunnelsQuery' + - $ref: '#/components/schemas/RetentionQuery' + - $ref: '#/components/schemas/PathsQuery' + - $ref: '#/components/schemas/StickinessQuery' + - $ref: '#/components/schemas/LifecycleQuery' + title: Source + status: + anyOf: + - type: string + default: null + title: Status + required: + - source + title: StickinessActorsQuery + type: object + StickinessCriteria: + additionalProperties: false + properties: + operator: + $ref: '#/components/schemas/StickinessOperator' + value: + title: Value + type: integer + required: + - operator + - value + title: StickinessCriteria + type: object + StickinessFilter: + additionalProperties: false + properties: + display: + anyOf: + - $ref: '#/components/schemas/ChartDisplayType' + default: null + hiddenLegendIndexes: + anyOf: + - items: + type: integer + type: array + default: null + title: Hiddenlegendindexes + showLegend: + anyOf: + - type: boolean + default: null + title: Showlegend + showMultipleYAxes: + anyOf: + - type: boolean + default: null + title: Showmultipleyaxes + showValuesOnSeries: + anyOf: + - type: boolean + default: null + title: Showvaluesonseries + stickinessCriteria: + anyOf: + - $ref: '#/components/schemas/StickinessCriteria' + default: null + title: StickinessFilter + type: object + StickinessOperator: + enum: + - gte + - lte + - exact + title: StickinessOperator + type: string + StickinessQuery: + additionalProperties: false + properties: + compareFilter: + anyOf: + - $ref: '#/components/schemas/CompareFilter' + default: null + description: Compare to date range + dataColorTheme: + anyOf: + - type: number + default: null + description: Colors used in the insight's visualization + title: Datacolortheme + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + description: Date range for the query + filterTestAccounts: + anyOf: + - type: boolean + default: false + description: Exclude internal and test users by applying the respective + filters + title: Filtertestaccounts + interval: + anyOf: + - $ref: '#/components/schemas/IntervalType' + default: day + description: Granularity of the response. Can be one of `hour`, `day`, `week` + or `month` + intervalCount: + anyOf: + - type: integer + default: null + description: How many intervals comprise a period. Only used for cohorts, + otherwise default 1. + title: Intervalcount + kind: + allOf: + - $ref: '#/components/schemas/StickinessQueryKindEnum' + + default: StickinessQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + - $ref: '#/components/schemas/PropertyGroupFilter' + default: [] + description: Property filters for all series + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/StickinessQueryResponse' + default: null + samplingFactor: + anyOf: + - type: number + default: null + description: Sampling rate + title: Samplingfactor + series: + description: Events and actions to include + items: + anyOf: + - $ref: '#/components/schemas/EventsNode' + - $ref: '#/components/schemas/ActionsNode' + - $ref: '#/components/schemas/DataWarehouseNode' + title: Series + type: array + stickinessFilter: + anyOf: + - $ref: '#/components/schemas/StickinessFilter' + default: null + description: Properties specific to the stickiness insight + required: + - series + title: StickinessQuery + type: object + StickinessQueryKindEnum: + enum: + - StickinessQuery + type: string + StickinessQueryResponse: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + type: object + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: StickinessQueryResponse + type: object + Storage: + enum: + - object_storage_lts + - object_storage + title: Storage + type: string + Style: + enum: + - none + - number + - percent + title: Style + type: string + Subscription: + type: object + description: Standard Subscription serializer. + properties: + id: + type: integer + readOnly: true + dashboard: + type: integer + nullable: true + insight: + type: integer + nullable: true + target_type: + $ref: '#/components/schemas/TargetTypeEnum' + target_value: + type: string + frequency: + $ref: '#/components/schemas/FrequencyEnum' + interval: + type: integer + maximum: 2147483647 + minimum: -2147483648 + byweekday: + type: array + items: + $ref: '#/components/schemas/ByweekdayEnum' + nullable: true + bysetpos: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + count: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + start_date: + type: string + format: date-time + until_date: + type: string + format: date-time + nullable: true + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + deleted: + type: boolean + title: + type: string + nullable: true + maxLength: 100 + summary: + type: string + readOnly: true + next_delivery_date: + type: string + format: date-time + readOnly: true + nullable: true + invite_message: + type: string + nullable: true + required: + - created_at + - created_by + - frequency + - id + - next_delivery_date + - start_date + - summary + - target_type + - target_value + SuggestedQuestionsQuery: + additionalProperties: false + properties: + kind: + allOf: + - $ref: '#/components/schemas/SuggestedQuestionsQueryKindEnum' + + default: SuggestedQuestionsQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + response: + anyOf: + - $ref: '#/components/schemas/SuggestedQuestionsQueryResponse' + default: null + title: SuggestedQuestionsQuery + type: object + SuggestedQuestionsQueryKindEnum: + enum: + - SuggestedQuestionsQuery + type: string + SuggestedQuestionsQueryResponse: + additionalProperties: false + properties: + questions: + items: + type: string + title: Questions + type: array + required: + - questions + title: SuggestedQuestionsQueryResponse + type: object + Survey: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 400 + description: + type: string + type: + $ref: '#/components/schemas/SurveyType' + schedule: + type: string + nullable: true + linked_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + linked_flag_id: + type: integer + nullable: true + targeting_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + internal_targeting_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + questions: + nullable: true + description: "\n The `array` of questions included in the survey.\ + \ Each question must conform to one of the defined question types: Basic,\ + \ Link, Rating, or Multiple Choice.\n\n Basic (open-ended question)\n\ + \ - `type`: `open`\n - `question`: The text of the question.\n\ + \ - `description`: Optional description of the question.\n \ + \ - `descriptionContentType`: Content type of the description (`html`\ + \ or `text`).\n - `optional`: Whether the question is optional\ + \ (`boolean`).\n - `buttonText`: Text displayed on the submit button.\n\ + \ - `branching`: Branching logic for the question. See branching\ + \ types below for details.\n\n Link (a question with a link)\n\ + \ - `type`: `link`\n - `question`: The text of the question.\n\ + \ - `description`: Optional description of the question.\n \ + \ - `descriptionContentType`: Content type of the description (`html`\ + \ or `text`).\n - `optional`: Whether the question is optional\ + \ (`boolean`).\n - `buttonText`: Text displayed on the submit button.\n\ + \ - `link`: The URL associated with the question.\n - `branching`:\ + \ Branching logic for the question. See branching types below for details.\n\ + \n Rating (a question with a rating scale)\n - `type`: `rating`\n\ + \ - `question`: The text of the question.\n - `description`:\ + \ Optional description of the question.\n - `descriptionContentType`:\ + \ Content type of the description (`html` or `text`).\n - `optional`:\ + \ Whether the question is optional (`boolean`).\n - `buttonText`:\ + \ Text displayed on the submit button.\n - `display`: Display style\ + \ of the rating (`number` or `emoji`).\n - `scale`: The scale of\ + \ the rating (`number`).\n - `lowerBoundLabel`: Label for the lower\ + \ bound of the scale.\n - `upperBoundLabel`: Label for the upper\ + \ bound of the scale.\n - `branching`: Branching logic for the\ + \ question. See branching types below for details.\n\n Multiple\ + \ choice\n - `type`: `single_choice` or `multiple_choice`\n \ + \ - `question`: The text of the question.\n - `description`:\ + \ Optional description of the question.\n - `descriptionContentType`:\ + \ Content type of the description (`html` or `text`).\n - `optional`:\ + \ Whether the question is optional (`boolean`).\n - `buttonText`:\ + \ Text displayed on the submit button.\n - `choices`: An array\ + \ of choices for the question.\n - `shuffleOptions`: Whether to\ + \ shuffle the order of the choices (`boolean`).\n - `hasOpenChoice`:\ + \ Whether the question allows an open-ended response (`boolean`).\n \ + \ - `branching`: Branching logic for the question. See branching\ + \ types below for details.\n\n Branching logic can be one of the\ + \ following types:\n\n Next question: Proceeds to the next question\n\ + \ ```json\n {\n \"type\": \"next_question\"\n\ + \ }\n ```\n\n End: Ends the survey, optionally displaying\ + \ a confirmation message.\n ```json\n {\n \"\ + type\": \"end\"\n }\n ```\n\n Response-based: Branches\ + \ based on the response values. Available for the `rating` and `single_choice`\ + \ question types.\n ```json\n {\n \"type\": \"\ + response_based\",\n \"responseValues\": {\n \ + \ \"responseKey\": \"value\"\n }\n }\n ```\n\n\ + \ Specific question: Proceeds to a specific question by index.\n\ + \ ```json\n {\n \"type\": \"specific_question\"\ + ,\n \"index\": 2\n }\n ```\n " + conditions: + type: string + readOnly: true + appearance: + nullable: true + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + start_date: + type: string + format: date-time + nullable: true + end_date: + type: string + format: date-time + nullable: true + archived: + type: boolean + responses_limit: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + feature_flag_keys: + type: array + items: {} + readOnly: true + iteration_count: + type: integer + maximum: 500 + minimum: 0 + nullable: true + iteration_frequency_days: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + iteration_start_dates: + type: array + items: + type: string + format: date-time + nullable: true + nullable: true + current_iteration: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + current_iteration_start_date: + type: string + format: date-time + nullable: true + response_sampling_start_date: + type: string + format: date-time + nullable: true + response_sampling_interval_type: + nullable: true + oneOf: + - $ref: '#/components/schemas/ResponseSamplingIntervalTypeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + response_sampling_interval: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + response_sampling_limit: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + response_sampling_daily_limits: + nullable: true + required: + - conditions + - created_at + - created_by + - feature_flag_keys + - id + - internal_targeting_flag + - linked_flag + - name + - targeting_flag + - type + SurveySerializerCreateUpdateOnly: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 400 + description: + type: string + type: + $ref: '#/components/schemas/SurveyType' + schedule: + type: string + nullable: true + linked_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + linked_flag_id: + type: integer + writeOnly: true + nullable: true + targeting_flag_id: + type: integer + writeOnly: true + targeting_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + internal_targeting_flag: + allOf: + - $ref: '#/components/schemas/MinimalFeatureFlag' + readOnly: true + targeting_flag_filters: + writeOnly: true + nullable: true + remove_targeting_flag: + type: boolean + writeOnly: true + nullable: true + questions: + nullable: true + description: "\n The `array` of questions included in the survey.\ + \ Each question must conform to one of the defined question types: Basic,\ + \ Link, Rating, or Multiple Choice.\n\n Basic (open-ended question)\n\ + \ - `type`: `open`\n - `question`: The text of the question.\n\ + \ - `description`: Optional description of the question.\n \ + \ - `descriptionContentType`: Content type of the description (`html`\ + \ or `text`).\n - `optional`: Whether the question is optional\ + \ (`boolean`).\n - `buttonText`: Text displayed on the submit button.\n\ + \ - `branching`: Branching logic for the question. See branching\ + \ types below for details.\n\n Link (a question with a link)\n\ + \ - `type`: `link`\n - `question`: The text of the question.\n\ + \ - `description`: Optional description of the question.\n \ + \ - `descriptionContentType`: Content type of the description (`html`\ + \ or `text`).\n - `optional`: Whether the question is optional\ + \ (`boolean`).\n - `buttonText`: Text displayed on the submit button.\n\ + \ - `link`: The URL associated with the question.\n - `branching`:\ + \ Branching logic for the question. See branching types below for details.\n\ + \n Rating (a question with a rating scale)\n - `type`: `rating`\n\ + \ - `question`: The text of the question.\n - `description`:\ + \ Optional description of the question.\n - `descriptionContentType`:\ + \ Content type of the description (`html` or `text`).\n - `optional`:\ + \ Whether the question is optional (`boolean`).\n - `buttonText`:\ + \ Text displayed on the submit button.\n - `display`: Display style\ + \ of the rating (`number` or `emoji`).\n - `scale`: The scale of\ + \ the rating (`number`).\n - `lowerBoundLabel`: Label for the lower\ + \ bound of the scale.\n - `upperBoundLabel`: Label for the upper\ + \ bound of the scale.\n - `branching`: Branching logic for the\ + \ question. See branching types below for details.\n\n Multiple\ + \ choice\n - `type`: `single_choice` or `multiple_choice`\n \ + \ - `question`: The text of the question.\n - `description`:\ + \ Optional description of the question.\n - `descriptionContentType`:\ + \ Content type of the description (`html` or `text`).\n - `optional`:\ + \ Whether the question is optional (`boolean`).\n - `buttonText`:\ + \ Text displayed on the submit button.\n - `choices`: An array\ + \ of choices for the question.\n - `shuffleOptions`: Whether to\ + \ shuffle the order of the choices (`boolean`).\n - `hasOpenChoice`:\ + \ Whether the question allows an open-ended response (`boolean`).\n \ + \ - `branching`: Branching logic for the question. See branching\ + \ types below for details.\n\n Branching logic can be one of the\ + \ following types:\n\n Next question: Proceeds to the next question\n\ + \ ```json\n {\n \"type\": \"next_question\"\n\ + \ }\n ```\n\n End: Ends the survey, optionally displaying\ + \ a confirmation message.\n ```json\n {\n \"\ + type\": \"end\"\n }\n ```\n\n Response-based: Branches\ + \ based on the response values. Available for the `rating` and `single_choice`\ + \ question types.\n ```json\n {\n \"type\": \"\ + response_based\",\n \"responseValues\": {\n \ + \ \"responseKey\": \"value\"\n }\n }\n ```\n\n\ + \ Specific question: Proceeds to a specific question by index.\n\ + \ ```json\n {\n \"type\": \"specific_question\"\ + ,\n \"index\": 2\n }\n ```\n " + conditions: + nullable: true + appearance: + nullable: true + created_at: + type: string + format: date-time + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/UserBasic' + readOnly: true + start_date: + type: string + format: date-time + nullable: true + end_date: + type: string + format: date-time + nullable: true + archived: + type: boolean + responses_limit: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + iteration_count: + type: integer + maximum: 500 + minimum: 0 + nullable: true + iteration_frequency_days: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + iteration_start_dates: + type: array + items: + type: string + format: date-time + nullable: true + nullable: true + current_iteration: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + current_iteration_start_date: + type: string + format: date-time + nullable: true + response_sampling_start_date: + type: string + format: date-time + nullable: true + response_sampling_interval_type: + nullable: true + oneOf: + - $ref: '#/components/schemas/ResponseSamplingIntervalTypeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + response_sampling_interval: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + response_sampling_limit: + type: integer + maximum: 2147483647 + minimum: 0 + nullable: true + response_sampling_daily_limits: + nullable: true + required: + - created_at + - created_by + - id + - internal_targeting_flag + - linked_flag + - name + - targeting_flag + - type + SurveyType: + enum: + - popover + - widget + - button + - email + - full_screen + - api + type: string + description: |- + * `popover` - popover + * `widget` - widget + * `button` - button + * `email` - email + * `full_screen` - full screen + * `api` - api + TableSettings: + additionalProperties: false + properties: + columns: + anyOf: + - items: + $ref: '#/components/schemas/ChartAxis' + type: array + default: null + title: Columns + conditionalFormatting: + anyOf: + - items: + $ref: '#/components/schemas/ConditionalFormattingRule' + type: array + default: null + title: Conditionalformatting + title: TableSettings + type: object + TargetTypeEnum: + enum: + - email + - slack + - webhook + type: string + description: |- + * `email` - Email + * `slack` - Slack + * `webhook` - Webhook + TaxonomicFilterGroupType: + enum: + - metadata + - actions + - cohorts + - cohorts_with_all + - data_warehouse + - data_warehouse_properties + - data_warehouse_person_properties + - elements + - events + - event_properties + - event_feature_flags + - numerical_event_properties + - person_properties + - pageview_urls + - screens + - custom_events + - wildcard + - groups + - persons + - feature_flags + - insights + - experiments + - plugins + - dashboards + - name_groups + - session_properties + - hogql_expression + - notebooks + - log_entries + - replay + title: TaxonomicFilterGroupType + type: string + Team: + type: object + properties: + id: + type: integer + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + organization: + type: string + format: uuid + readOnly: true + project_id: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + readOnly: true + api_token: + type: string + readOnly: true + app_urls: + type: array + items: + type: string + nullable: true + maxLength: 200 + name: + type: string + maxLength: 200 + minLength: 1 + slack_incoming_webhook: + type: string + nullable: true + maxLength: 500 + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + anonymize_ips: + type: boolean + completed_snippet_onboarding: + type: boolean + ingested_event: + type: boolean + readOnly: true + test_account_filters: {} + test_account_filters_default_checked: + type: boolean + nullable: true + path_cleaning_filters: + nullable: true + is_demo: + type: boolean + timezone: + $ref: '#/components/schemas/TimezoneEnum' + data_attributes: {} + person_display_name_properties: + type: array + items: + type: string + maxLength: 400 + nullable: true + correlation_config: + nullable: true + autocapture_opt_out: + type: boolean + nullable: true + autocapture_exceptions_opt_in: + type: boolean + nullable: true + autocapture_web_vitals_opt_in: + type: boolean + nullable: true + autocapture_web_vitals_allowed_metrics: + nullable: true + autocapture_exceptions_errors_to_ignore: + nullable: true + capture_console_log_opt_in: + type: boolean + nullable: true + capture_performance_opt_in: + type: boolean + nullable: true + session_recording_opt_in: + type: boolean + session_recording_sample_rate: + type: string + format: decimal + pattern: ^-?\d{0,1}(?:\.\d{0,2})?$ + nullable: true + session_recording_minimum_duration_milliseconds: + type: integer + maximum: 15000 + minimum: 0 + nullable: true + session_recording_linked_flag: + nullable: true + session_recording_network_payload_capture_config: + nullable: true + session_recording_url_trigger_config: + type: array + items: + nullable: true + nullable: true + session_recording_url_blocklist_config: + type: array + items: + nullable: true + nullable: true + session_recording_event_trigger_config: + type: array + items: + type: string + nullable: true + nullable: true + session_replay_config: + nullable: true + survey_config: + nullable: true + effective_membership_level: + allOf: + - $ref: '#/components/schemas/EffectiveMembershipLevelEnum' + nullable: true + readOnly: true + access_control: + type: boolean + week_start_day: + nullable: true + minimum: -32768 + maximum: 32767 + oneOf: + - $ref: '#/components/schemas/WeekStartDayEnum' + - $ref: '#/components/schemas/NullEnum' + has_group_types: + type: boolean + readOnly: true + primary_dashboard: + type: integer + nullable: true + live_events_columns: + type: array + items: + type: string + nullable: true + recording_domains: + type: array + items: + type: string + nullable: true + maxLength: 200 + nullable: true + cookieless_server_hash_mode: + nullable: true + minimum: -32768 + maximum: 32767 + oneOf: + - $ref: '#/components/schemas/CookielessServerHashModeEnum' + - $ref: '#/components/schemas/NullEnum' + human_friendly_comparison_periods: + type: boolean + nullable: true + person_on_events_querying_enabled: + type: boolean + readOnly: true + inject_web_apps: + type: boolean + nullable: true + extra_settings: + nullable: true + modifiers: + nullable: true + default_modifiers: + type: object + additionalProperties: {} + readOnly: true + has_completed_onboarding_for: + nullable: true + surveys_opt_in: + type: boolean + nullable: true + heatmaps_opt_in: + type: boolean + nullable: true + flags_persistence_default: + type: boolean + nullable: true + live_events_token: + type: string + nullable: true + readOnly: true + product_intents: + type: string + readOnly: true + capture_dead_clicks: + type: boolean + nullable: true + user_access_level: + type: string + nullable: true + readOnly: true + description: The effective access level the user has for this object + default_data_theme: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + revenue_tracking_config: + nullable: true + access_control_version: + type: string + readOnly: true + onboarding_tasks: + nullable: true + required: + - access_control_version + - api_token + - created_at + - default_modifiers + - effective_membership_level + - has_group_types + - id + - ingested_event + - live_events_token + - organization + - person_on_events_querying_enabled + - product_intents + - project_id + - updated_at + - user_access_level + - uuid + TeamBasic: + type: object + description: |- + Serializer for `Team` model with minimal attributes to speeed up loading and transfer times. + Also used for nested serializers. + properties: + id: + type: integer + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + organization: + type: string + format: uuid + readOnly: true + project_id: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + readOnly: true + api_token: + type: string + readOnly: true + name: + type: string + readOnly: true + completed_snippet_onboarding: + type: boolean + readOnly: true + has_completed_onboarding_for: + readOnly: true + nullable: true + ingested_event: + type: boolean + readOnly: true + is_demo: + type: boolean + readOnly: true + timezone: + allOf: + - $ref: '#/components/schemas/TimezoneEnum' + readOnly: true + access_control: + type: boolean + readOnly: true + required: + - access_control + - api_token + - completed_snippet_onboarding + - has_completed_onboarding_for + - id + - ingested_event + - is_demo + - name + - organization + - project_id + - timezone + - uuid + TeamTaxonomyItem: + additionalProperties: false + properties: + count: + title: Count + type: integer + event: + title: Event + type: string + required: + - count + - event + title: TeamTaxonomyItem + type: object + TeamTaxonomyQuery: + additionalProperties: false + properties: + kind: + allOf: + - $ref: '#/components/schemas/TeamTaxonomyQueryKindEnum' + + default: TeamTaxonomyQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + response: + anyOf: + - $ref: '#/components/schemas/TeamTaxonomyQueryResponse' + default: null + title: TeamTaxonomyQuery + type: object + TeamTaxonomyQueryKindEnum: + enum: + - TeamTaxonomyQuery + type: string + TeamTaxonomyQueryResponse: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/TeamTaxonomyItem' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: TeamTaxonomyQueryResponse + type: object + ThemeModeEnum: + enum: + - light + - dark + - system + type: string + description: |- + * `light` - Light + * `dark` - Dark + * `system` - System + TimelineEntry: + additionalProperties: false + properties: + events: + items: + $ref: '#/components/schemas/EventType' + title: Events + type: array + recording_duration_s: + anyOf: + - type: number + default: null + description: Duration of the recording in seconds. + title: Recording Duration S + sessionId: + anyOf: + - type: string + default: null + description: Session ID. None means out-of-session events + title: Sessionid + required: + - events + title: TimelineEntry + type: object + TimezoneEnum: + enum: + - Africa/Abidjan + - Africa/Accra + - Africa/Addis_Ababa + - Africa/Algiers + - Africa/Asmara + - Africa/Asmera + - Africa/Bamako + - Africa/Bangui + - Africa/Banjul + - Africa/Bissau + - Africa/Blantyre + - Africa/Brazzaville + - Africa/Bujumbura + - Africa/Cairo + - Africa/Casablanca + - Africa/Ceuta + - Africa/Conakry + - Africa/Dakar + - Africa/Dar_es_Salaam + - Africa/Djibouti + - Africa/Douala + - Africa/El_Aaiun + - Africa/Freetown + - Africa/Gaborone + - Africa/Harare + - Africa/Johannesburg + - Africa/Juba + - Africa/Kampala + - Africa/Khartoum + - Africa/Kigali + - Africa/Kinshasa + - Africa/Lagos + - Africa/Libreville + - Africa/Lome + - Africa/Luanda + - Africa/Lubumbashi + - Africa/Lusaka + - Africa/Malabo + - Africa/Maputo + - Africa/Maseru + - Africa/Mbabane + - Africa/Mogadishu + - Africa/Monrovia + - Africa/Nairobi + - Africa/Ndjamena + - Africa/Niamey + - Africa/Nouakchott + - Africa/Ouagadougou + - Africa/Porto-Novo + - Africa/Sao_Tome + - Africa/Timbuktu + - Africa/Tripoli + - Africa/Tunis + - Africa/Windhoek + - America/Adak + - America/Anchorage + - America/Anguilla + - America/Antigua + - America/Araguaina + - America/Argentina/Buenos_Aires + - America/Argentina/Catamarca + - America/Argentina/ComodRivadavia + - America/Argentina/Cordoba + - America/Argentina/Jujuy + - America/Argentina/La_Rioja + - America/Argentina/Mendoza + - America/Argentina/Rio_Gallegos + - America/Argentina/Salta + - America/Argentina/San_Juan + - America/Argentina/San_Luis + - America/Argentina/Tucuman + - America/Argentina/Ushuaia + - America/Aruba + - America/Asuncion + - America/Atikokan + - America/Atka + - America/Bahia + - America/Bahia_Banderas + - America/Barbados + - America/Belem + - America/Belize + - America/Blanc-Sablon + - America/Boa_Vista + - America/Bogota + - America/Boise + - America/Buenos_Aires + - America/Cambridge_Bay + - America/Campo_Grande + - America/Cancun + - America/Caracas + - America/Catamarca + - America/Cayenne + - America/Cayman + - America/Chicago + - America/Chihuahua + - America/Ciudad_Juarez + - America/Coral_Harbour + - America/Cordoba + - America/Costa_Rica + - America/Creston + - America/Cuiaba + - America/Curacao + - America/Danmarkshavn + - America/Dawson + - America/Dawson_Creek + - America/Denver + - America/Detroit + - America/Dominica + - America/Edmonton + - America/Eirunepe + - America/El_Salvador + - America/Ensenada + - America/Fort_Nelson + - America/Fort_Wayne + - America/Fortaleza + - America/Glace_Bay + - America/Godthab + - America/Goose_Bay + - America/Grand_Turk + - America/Grenada + - America/Guadeloupe + - America/Guatemala + - America/Guayaquil + - America/Guyana + - America/Halifax + - America/Havana + - America/Hermosillo + - America/Indiana/Indianapolis + - America/Indiana/Knox + - America/Indiana/Marengo + - America/Indiana/Petersburg + - America/Indiana/Tell_City + - America/Indiana/Vevay + - America/Indiana/Vincennes + - America/Indiana/Winamac + - America/Indianapolis + - America/Inuvik + - America/Iqaluit + - America/Jamaica + - America/Jujuy + - America/Juneau + - America/Kentucky/Louisville + - America/Kentucky/Monticello + - America/Knox_IN + - America/Kralendijk + - America/La_Paz + - America/Lima + - America/Los_Angeles + - America/Louisville + - America/Lower_Princes + - America/Maceio + - America/Managua + - America/Manaus + - America/Marigot + - America/Martinique + - America/Matamoros + - America/Mazatlan + - America/Mendoza + - America/Menominee + - America/Merida + - America/Metlakatla + - America/Mexico_City + - America/Miquelon + - America/Moncton + - America/Monterrey + - America/Montevideo + - America/Montreal + - America/Montserrat + - America/Nassau + - America/New_York + - America/Nipigon + - America/Nome + - America/Noronha + - America/North_Dakota/Beulah + - America/North_Dakota/Center + - America/North_Dakota/New_Salem + - America/Nuuk + - America/Ojinaga + - America/Panama + - America/Pangnirtung + - America/Paramaribo + - America/Phoenix + - America/Port-au-Prince + - America/Port_of_Spain + - America/Porto_Acre + - America/Porto_Velho + - America/Puerto_Rico + - America/Punta_Arenas + - America/Rainy_River + - America/Rankin_Inlet + - America/Recife + - America/Regina + - America/Resolute + - America/Rio_Branco + - America/Rosario + - America/Santa_Isabel + - America/Santarem + - America/Santiago + - America/Santo_Domingo + - America/Sao_Paulo + - America/Scoresbysund + - America/Shiprock + - America/Sitka + - America/St_Barthelemy + - America/St_Johns + - America/St_Kitts + - America/St_Lucia + - America/St_Thomas + - America/St_Vincent + - America/Swift_Current + - America/Tegucigalpa + - America/Thule + - America/Thunder_Bay + - America/Tijuana + - America/Toronto + - America/Tortola + - America/Vancouver + - America/Virgin + - America/Whitehorse + - America/Winnipeg + - America/Yakutat + - America/Yellowknife + - Antarctica/Casey + - Antarctica/Davis + - Antarctica/DumontDUrville + - Antarctica/Macquarie + - Antarctica/Mawson + - Antarctica/McMurdo + - Antarctica/Palmer + - Antarctica/Rothera + - Antarctica/South_Pole + - Antarctica/Syowa + - Antarctica/Troll + - Antarctica/Vostok + - Arctic/Longyearbyen + - Asia/Aden + - Asia/Almaty + - Asia/Amman + - Asia/Anadyr + - Asia/Aqtau + - Asia/Aqtobe + - Asia/Ashgabat + - Asia/Ashkhabad + - Asia/Atyrau + - Asia/Baghdad + - Asia/Bahrain + - Asia/Baku + - Asia/Bangkok + - Asia/Barnaul + - Asia/Beirut + - Asia/Bishkek + - Asia/Brunei + - Asia/Calcutta + - Asia/Chita + - Asia/Choibalsan + - Asia/Chongqing + - Asia/Chungking + - Asia/Colombo + - Asia/Dacca + - Asia/Damascus + - Asia/Dhaka + - Asia/Dili + - Asia/Dubai + - Asia/Dushanbe + - Asia/Famagusta + - Asia/Gaza + - Asia/Harbin + - Asia/Hebron + - Asia/Ho_Chi_Minh + - Asia/Hong_Kong + - Asia/Hovd + - Asia/Irkutsk + - Asia/Istanbul + - Asia/Jakarta + - Asia/Jayapura + - Asia/Jerusalem + - Asia/Kabul + - Asia/Kamchatka + - Asia/Karachi + - Asia/Kashgar + - Asia/Kathmandu + - Asia/Katmandu + - Asia/Khandyga + - Asia/Kolkata + - Asia/Krasnoyarsk + - Asia/Kuala_Lumpur + - Asia/Kuching + - Asia/Kuwait + - Asia/Macao + - Asia/Macau + - Asia/Magadan + - Asia/Makassar + - Asia/Manila + - Asia/Muscat + - Asia/Nicosia + - Asia/Novokuznetsk + - Asia/Novosibirsk + - Asia/Omsk + - Asia/Oral + - Asia/Phnom_Penh + - Asia/Pontianak + - Asia/Pyongyang + - Asia/Qatar + - Asia/Qostanay + - Asia/Qyzylorda + - Asia/Rangoon + - Asia/Riyadh + - Asia/Saigon + - Asia/Sakhalin + - Asia/Samarkand + - Asia/Seoul + - Asia/Shanghai + - Asia/Singapore + - Asia/Srednekolymsk + - Asia/Taipei + - Asia/Tashkent + - Asia/Tbilisi + - Asia/Tehran + - Asia/Tel_Aviv + - Asia/Thimbu + - Asia/Thimphu + - Asia/Tokyo + - Asia/Tomsk + - Asia/Ujung_Pandang + - Asia/Ulaanbaatar + - Asia/Ulan_Bator + - Asia/Urumqi + - Asia/Ust-Nera + - Asia/Vientiane + - Asia/Vladivostok + - Asia/Yakutsk + - Asia/Yangon + - Asia/Yekaterinburg + - Asia/Yerevan + - Atlantic/Azores + - Atlantic/Bermuda + - Atlantic/Canary + - Atlantic/Cape_Verde + - Atlantic/Faeroe + - Atlantic/Faroe + - Atlantic/Jan_Mayen + - Atlantic/Madeira + - Atlantic/Reykjavik + - Atlantic/South_Georgia + - Atlantic/St_Helena + - Atlantic/Stanley + - Australia/ACT + - Australia/Adelaide + - Australia/Brisbane + - Australia/Broken_Hill + - Australia/Canberra + - Australia/Currie + - Australia/Darwin + - Australia/Eucla + - Australia/Hobart + - Australia/LHI + - Australia/Lindeman + - Australia/Lord_Howe + - Australia/Melbourne + - Australia/NSW + - Australia/North + - Australia/Perth + - Australia/Queensland + - Australia/South + - Australia/Sydney + - Australia/Tasmania + - Australia/Victoria + - Australia/West + - Australia/Yancowinna + - Brazil/Acre + - Brazil/DeNoronha + - Brazil/East + - Brazil/West + - CET + - CST6CDT + - Canada/Atlantic + - Canada/Central + - Canada/Eastern + - Canada/Mountain + - Canada/Newfoundland + - Canada/Pacific + - Canada/Saskatchewan + - Canada/Yukon + - Chile/Continental + - Chile/EasterIsland + - Cuba + - EET + - EST + - EST5EDT + - Egypt + - Eire + - Etc/GMT + - Etc/GMT+0 + - Etc/GMT+1 + - Etc/GMT+10 + - Etc/GMT+11 + - Etc/GMT+12 + - Etc/GMT+2 + - Etc/GMT+3 + - Etc/GMT+4 + - Etc/GMT+5 + - Etc/GMT+6 + - Etc/GMT+7 + - Etc/GMT+8 + - Etc/GMT+9 + - Etc/GMT-0 + - Etc/GMT-1 + - Etc/GMT-10 + - Etc/GMT-11 + - Etc/GMT-12 + - Etc/GMT-13 + - Etc/GMT-14 + - Etc/GMT-2 + - Etc/GMT-3 + - Etc/GMT-4 + - Etc/GMT-5 + - Etc/GMT-6 + - Etc/GMT-7 + - Etc/GMT-8 + - Etc/GMT-9 + - Etc/GMT0 + - Etc/Greenwich + - Etc/UCT + - Etc/UTC + - Etc/Universal + - Etc/Zulu + - Europe/Amsterdam + - Europe/Andorra + - Europe/Astrakhan + - Europe/Athens + - Europe/Belfast + - Europe/Belgrade + - Europe/Berlin + - Europe/Bratislava + - Europe/Brussels + - Europe/Bucharest + - Europe/Budapest + - Europe/Busingen + - Europe/Chisinau + - Europe/Copenhagen + - Europe/Dublin + - Europe/Gibraltar + - Europe/Guernsey + - Europe/Helsinki + - Europe/Isle_of_Man + - Europe/Istanbul + - Europe/Jersey + - Europe/Kaliningrad + - Europe/Kiev + - Europe/Kirov + - Europe/Kyiv + - Europe/Lisbon + - Europe/Ljubljana + - Europe/London + - Europe/Luxembourg + - Europe/Madrid + - Europe/Malta + - Europe/Mariehamn + - Europe/Minsk + - Europe/Monaco + - Europe/Moscow + - Europe/Nicosia + - Europe/Oslo + - Europe/Paris + - Europe/Podgorica + - Europe/Prague + - Europe/Riga + - Europe/Rome + - Europe/Samara + - Europe/San_Marino + - Europe/Sarajevo + - Europe/Saratov + - Europe/Simferopol + - Europe/Skopje + - Europe/Sofia + - Europe/Stockholm + - Europe/Tallinn + - Europe/Tirane + - Europe/Tiraspol + - Europe/Ulyanovsk + - Europe/Uzhgorod + - Europe/Vaduz + - Europe/Vatican + - Europe/Vienna + - Europe/Vilnius + - Europe/Volgograd + - Europe/Warsaw + - Europe/Zagreb + - Europe/Zaporozhye + - Europe/Zurich + - GB + - GB-Eire + - GMT + - GMT+0 + - GMT-0 + - GMT0 + - Greenwich + - HST + - Hongkong + - Iceland + - Indian/Antananarivo + - Indian/Chagos + - Indian/Christmas + - Indian/Cocos + - Indian/Comoro + - Indian/Kerguelen + - Indian/Mahe + - Indian/Maldives + - Indian/Mauritius + - Indian/Mayotte + - Indian/Reunion + - Iran + - Israel + - Jamaica + - Japan + - Kwajalein + - Libya + - MET + - MST + - MST7MDT + - Mexico/BajaNorte + - Mexico/BajaSur + - Mexico/General + - NZ + - NZ-CHAT + - Navajo + - PRC + - PST8PDT + - Pacific/Apia + - Pacific/Auckland + - Pacific/Bougainville + - Pacific/Chatham + - Pacific/Chuuk + - Pacific/Easter + - Pacific/Efate + - Pacific/Enderbury + - Pacific/Fakaofo + - Pacific/Fiji + - Pacific/Funafuti + - Pacific/Galapagos + - Pacific/Gambier + - Pacific/Guadalcanal + - Pacific/Guam + - Pacific/Honolulu + - Pacific/Johnston + - Pacific/Kanton + - Pacific/Kiritimati + - Pacific/Kosrae + - Pacific/Kwajalein + - Pacific/Majuro + - Pacific/Marquesas + - Pacific/Midway + - Pacific/Nauru + - Pacific/Niue + - Pacific/Norfolk + - Pacific/Noumea + - Pacific/Pago_Pago + - Pacific/Palau + - Pacific/Pitcairn + - Pacific/Pohnpei + - Pacific/Ponape + - Pacific/Port_Moresby + - Pacific/Rarotonga + - Pacific/Saipan + - Pacific/Samoa + - Pacific/Tahiti + - Pacific/Tarawa + - Pacific/Tongatapu + - Pacific/Truk + - Pacific/Wake + - Pacific/Wallis + - Pacific/Yap + - Poland + - Portugal + - ROC + - ROK + - Singapore + - Turkey + - UCT + - US/Alaska + - US/Aleutian + - US/Arizona + - US/Central + - US/East-Indiana + - US/Eastern + - US/Hawaii + - US/Indiana-Starke + - US/Michigan + - US/Mountain + - US/Pacific + - US/Samoa + - UTC + - Universal + - W-SU + - WET + - Zulu + type: string + description: |- + * `Africa/Abidjan` - Africa/Abidjan + * `Africa/Accra` - Africa/Accra + * `Africa/Addis_Ababa` - Africa/Addis_Ababa + * `Africa/Algiers` - Africa/Algiers + * `Africa/Asmara` - Africa/Asmara + * `Africa/Asmera` - Africa/Asmera + * `Africa/Bamako` - Africa/Bamako + * `Africa/Bangui` - Africa/Bangui + * `Africa/Banjul` - Africa/Banjul + * `Africa/Bissau` - Africa/Bissau + * `Africa/Blantyre` - Africa/Blantyre + * `Africa/Brazzaville` - Africa/Brazzaville + * `Africa/Bujumbura` - Africa/Bujumbura + * `Africa/Cairo` - Africa/Cairo + * `Africa/Casablanca` - Africa/Casablanca + * `Africa/Ceuta` - Africa/Ceuta + * `Africa/Conakry` - Africa/Conakry + * `Africa/Dakar` - Africa/Dakar + * `Africa/Dar_es_Salaam` - Africa/Dar_es_Salaam + * `Africa/Djibouti` - Africa/Djibouti + * `Africa/Douala` - Africa/Douala + * `Africa/El_Aaiun` - Africa/El_Aaiun + * `Africa/Freetown` - Africa/Freetown + * `Africa/Gaborone` - Africa/Gaborone + * `Africa/Harare` - Africa/Harare + * `Africa/Johannesburg` - Africa/Johannesburg + * `Africa/Juba` - Africa/Juba + * `Africa/Kampala` - Africa/Kampala + * `Africa/Khartoum` - Africa/Khartoum + * `Africa/Kigali` - Africa/Kigali + * `Africa/Kinshasa` - Africa/Kinshasa + * `Africa/Lagos` - Africa/Lagos + * `Africa/Libreville` - Africa/Libreville + * `Africa/Lome` - Africa/Lome + * `Africa/Luanda` - Africa/Luanda + * `Africa/Lubumbashi` - Africa/Lubumbashi + * `Africa/Lusaka` - Africa/Lusaka + * `Africa/Malabo` - Africa/Malabo + * `Africa/Maputo` - Africa/Maputo + * `Africa/Maseru` - Africa/Maseru + * `Africa/Mbabane` - Africa/Mbabane + * `Africa/Mogadishu` - Africa/Mogadishu + * `Africa/Monrovia` - Africa/Monrovia + * `Africa/Nairobi` - Africa/Nairobi + * `Africa/Ndjamena` - Africa/Ndjamena + * `Africa/Niamey` - Africa/Niamey + * `Africa/Nouakchott` - Africa/Nouakchott + * `Africa/Ouagadougou` - Africa/Ouagadougou + * `Africa/Porto-Novo` - Africa/Porto-Novo + * `Africa/Sao_Tome` - Africa/Sao_Tome + * `Africa/Timbuktu` - Africa/Timbuktu + * `Africa/Tripoli` - Africa/Tripoli + * `Africa/Tunis` - Africa/Tunis + * `Africa/Windhoek` - Africa/Windhoek + * `America/Adak` - America/Adak + * `America/Anchorage` - America/Anchorage + * `America/Anguilla` - America/Anguilla + * `America/Antigua` - America/Antigua + * `America/Araguaina` - America/Araguaina + * `America/Argentina/Buenos_Aires` - America/Argentina/Buenos_Aires + * `America/Argentina/Catamarca` - America/Argentina/Catamarca + * `America/Argentina/ComodRivadavia` - America/Argentina/ComodRivadavia + * `America/Argentina/Cordoba` - America/Argentina/Cordoba + * `America/Argentina/Jujuy` - America/Argentina/Jujuy + * `America/Argentina/La_Rioja` - America/Argentina/La_Rioja + * `America/Argentina/Mendoza` - America/Argentina/Mendoza + * `America/Argentina/Rio_Gallegos` - America/Argentina/Rio_Gallegos + * `America/Argentina/Salta` - America/Argentina/Salta + * `America/Argentina/San_Juan` - America/Argentina/San_Juan + * `America/Argentina/San_Luis` - America/Argentina/San_Luis + * `America/Argentina/Tucuman` - America/Argentina/Tucuman + * `America/Argentina/Ushuaia` - America/Argentina/Ushuaia + * `America/Aruba` - America/Aruba + * `America/Asuncion` - America/Asuncion + * `America/Atikokan` - America/Atikokan + * `America/Atka` - America/Atka + * `America/Bahia` - America/Bahia + * `America/Bahia_Banderas` - America/Bahia_Banderas + * `America/Barbados` - America/Barbados + * `America/Belem` - America/Belem + * `America/Belize` - America/Belize + * `America/Blanc-Sablon` - America/Blanc-Sablon + * `America/Boa_Vista` - America/Boa_Vista + * `America/Bogota` - America/Bogota + * `America/Boise` - America/Boise + * `America/Buenos_Aires` - America/Buenos_Aires + * `America/Cambridge_Bay` - America/Cambridge_Bay + * `America/Campo_Grande` - America/Campo_Grande + * `America/Cancun` - America/Cancun + * `America/Caracas` - America/Caracas + * `America/Catamarca` - America/Catamarca + * `America/Cayenne` - America/Cayenne + * `America/Cayman` - America/Cayman + * `America/Chicago` - America/Chicago + * `America/Chihuahua` - America/Chihuahua + * `America/Ciudad_Juarez` - America/Ciudad_Juarez + * `America/Coral_Harbour` - America/Coral_Harbour + * `America/Cordoba` - America/Cordoba + * `America/Costa_Rica` - America/Costa_Rica + * `America/Creston` - America/Creston + * `America/Cuiaba` - America/Cuiaba + * `America/Curacao` - America/Curacao + * `America/Danmarkshavn` - America/Danmarkshavn + * `America/Dawson` - America/Dawson + * `America/Dawson_Creek` - America/Dawson_Creek + * `America/Denver` - America/Denver + * `America/Detroit` - America/Detroit + * `America/Dominica` - America/Dominica + * `America/Edmonton` - America/Edmonton + * `America/Eirunepe` - America/Eirunepe + * `America/El_Salvador` - America/El_Salvador + * `America/Ensenada` - America/Ensenada + * `America/Fort_Nelson` - America/Fort_Nelson + * `America/Fort_Wayne` - America/Fort_Wayne + * `America/Fortaleza` - America/Fortaleza + * `America/Glace_Bay` - America/Glace_Bay + * `America/Godthab` - America/Godthab + * `America/Goose_Bay` - America/Goose_Bay + * `America/Grand_Turk` - America/Grand_Turk + * `America/Grenada` - America/Grenada + * `America/Guadeloupe` - America/Guadeloupe + * `America/Guatemala` - America/Guatemala + * `America/Guayaquil` - America/Guayaquil + * `America/Guyana` - America/Guyana + * `America/Halifax` - America/Halifax + * `America/Havana` - America/Havana + * `America/Hermosillo` - America/Hermosillo + * `America/Indiana/Indianapolis` - America/Indiana/Indianapolis + * `America/Indiana/Knox` - America/Indiana/Knox + * `America/Indiana/Marengo` - America/Indiana/Marengo + * `America/Indiana/Petersburg` - America/Indiana/Petersburg + * `America/Indiana/Tell_City` - America/Indiana/Tell_City + * `America/Indiana/Vevay` - America/Indiana/Vevay + * `America/Indiana/Vincennes` - America/Indiana/Vincennes + * `America/Indiana/Winamac` - America/Indiana/Winamac + * `America/Indianapolis` - America/Indianapolis + * `America/Inuvik` - America/Inuvik + * `America/Iqaluit` - America/Iqaluit + * `America/Jamaica` - America/Jamaica + * `America/Jujuy` - America/Jujuy + * `America/Juneau` - America/Juneau + * `America/Kentucky/Louisville` - America/Kentucky/Louisville + * `America/Kentucky/Monticello` - America/Kentucky/Monticello + * `America/Knox_IN` - America/Knox_IN + * `America/Kralendijk` - America/Kralendijk + * `America/La_Paz` - America/La_Paz + * `America/Lima` - America/Lima + * `America/Los_Angeles` - America/Los_Angeles + * `America/Louisville` - America/Louisville + * `America/Lower_Princes` - America/Lower_Princes + * `America/Maceio` - America/Maceio + * `America/Managua` - America/Managua + * `America/Manaus` - America/Manaus + * `America/Marigot` - America/Marigot + * `America/Martinique` - America/Martinique + * `America/Matamoros` - America/Matamoros + * `America/Mazatlan` - America/Mazatlan + * `America/Mendoza` - America/Mendoza + * `America/Menominee` - America/Menominee + * `America/Merida` - America/Merida + * `America/Metlakatla` - America/Metlakatla + * `America/Mexico_City` - America/Mexico_City + * `America/Miquelon` - America/Miquelon + * `America/Moncton` - America/Moncton + * `America/Monterrey` - America/Monterrey + * `America/Montevideo` - America/Montevideo + * `America/Montreal` - America/Montreal + * `America/Montserrat` - America/Montserrat + * `America/Nassau` - America/Nassau + * `America/New_York` - America/New_York + * `America/Nipigon` - America/Nipigon + * `America/Nome` - America/Nome + * `America/Noronha` - America/Noronha + * `America/North_Dakota/Beulah` - America/North_Dakota/Beulah + * `America/North_Dakota/Center` - America/North_Dakota/Center + * `America/North_Dakota/New_Salem` - America/North_Dakota/New_Salem + * `America/Nuuk` - America/Nuuk + * `America/Ojinaga` - America/Ojinaga + * `America/Panama` - America/Panama + * `America/Pangnirtung` - America/Pangnirtung + * `America/Paramaribo` - America/Paramaribo + * `America/Phoenix` - America/Phoenix + * `America/Port-au-Prince` - America/Port-au-Prince + * `America/Port_of_Spain` - America/Port_of_Spain + * `America/Porto_Acre` - America/Porto_Acre + * `America/Porto_Velho` - America/Porto_Velho + * `America/Puerto_Rico` - America/Puerto_Rico + * `America/Punta_Arenas` - America/Punta_Arenas + * `America/Rainy_River` - America/Rainy_River + * `America/Rankin_Inlet` - America/Rankin_Inlet + * `America/Recife` - America/Recife + * `America/Regina` - America/Regina + * `America/Resolute` - America/Resolute + * `America/Rio_Branco` - America/Rio_Branco + * `America/Rosario` - America/Rosario + * `America/Santa_Isabel` - America/Santa_Isabel + * `America/Santarem` - America/Santarem + * `America/Santiago` - America/Santiago + * `America/Santo_Domingo` - America/Santo_Domingo + * `America/Sao_Paulo` - America/Sao_Paulo + * `America/Scoresbysund` - America/Scoresbysund + * `America/Shiprock` - America/Shiprock + * `America/Sitka` - America/Sitka + * `America/St_Barthelemy` - America/St_Barthelemy + * `America/St_Johns` - America/St_Johns + * `America/St_Kitts` - America/St_Kitts + * `America/St_Lucia` - America/St_Lucia + * `America/St_Thomas` - America/St_Thomas + * `America/St_Vincent` - America/St_Vincent + * `America/Swift_Current` - America/Swift_Current + * `America/Tegucigalpa` - America/Tegucigalpa + * `America/Thule` - America/Thule + * `America/Thunder_Bay` - America/Thunder_Bay + * `America/Tijuana` - America/Tijuana + * `America/Toronto` - America/Toronto + * `America/Tortola` - America/Tortola + * `America/Vancouver` - America/Vancouver + * `America/Virgin` - America/Virgin + * `America/Whitehorse` - America/Whitehorse + * `America/Winnipeg` - America/Winnipeg + * `America/Yakutat` - America/Yakutat + * `America/Yellowknife` - America/Yellowknife + * `Antarctica/Casey` - Antarctica/Casey + * `Antarctica/Davis` - Antarctica/Davis + * `Antarctica/DumontDUrville` - Antarctica/DumontDUrville + * `Antarctica/Macquarie` - Antarctica/Macquarie + * `Antarctica/Mawson` - Antarctica/Mawson + * `Antarctica/McMurdo` - Antarctica/McMurdo + * `Antarctica/Palmer` - Antarctica/Palmer + * `Antarctica/Rothera` - Antarctica/Rothera + * `Antarctica/South_Pole` - Antarctica/South_Pole + * `Antarctica/Syowa` - Antarctica/Syowa + * `Antarctica/Troll` - Antarctica/Troll + * `Antarctica/Vostok` - Antarctica/Vostok + * `Arctic/Longyearbyen` - Arctic/Longyearbyen + * `Asia/Aden` - Asia/Aden + * `Asia/Almaty` - Asia/Almaty + * `Asia/Amman` - Asia/Amman + * `Asia/Anadyr` - Asia/Anadyr + * `Asia/Aqtau` - Asia/Aqtau + * `Asia/Aqtobe` - Asia/Aqtobe + * `Asia/Ashgabat` - Asia/Ashgabat + * `Asia/Ashkhabad` - Asia/Ashkhabad + * `Asia/Atyrau` - Asia/Atyrau + * `Asia/Baghdad` - Asia/Baghdad + * `Asia/Bahrain` - Asia/Bahrain + * `Asia/Baku` - Asia/Baku + * `Asia/Bangkok` - Asia/Bangkok + * `Asia/Barnaul` - Asia/Barnaul + * `Asia/Beirut` - Asia/Beirut + * `Asia/Bishkek` - Asia/Bishkek + * `Asia/Brunei` - Asia/Brunei + * `Asia/Calcutta` - Asia/Calcutta + * `Asia/Chita` - Asia/Chita + * `Asia/Choibalsan` - Asia/Choibalsan + * `Asia/Chongqing` - Asia/Chongqing + * `Asia/Chungking` - Asia/Chungking + * `Asia/Colombo` - Asia/Colombo + * `Asia/Dacca` - Asia/Dacca + * `Asia/Damascus` - Asia/Damascus + * `Asia/Dhaka` - Asia/Dhaka + * `Asia/Dili` - Asia/Dili + * `Asia/Dubai` - Asia/Dubai + * `Asia/Dushanbe` - Asia/Dushanbe + * `Asia/Famagusta` - Asia/Famagusta + * `Asia/Gaza` - Asia/Gaza + * `Asia/Harbin` - Asia/Harbin + * `Asia/Hebron` - Asia/Hebron + * `Asia/Ho_Chi_Minh` - Asia/Ho_Chi_Minh + * `Asia/Hong_Kong` - Asia/Hong_Kong + * `Asia/Hovd` - Asia/Hovd + * `Asia/Irkutsk` - Asia/Irkutsk + * `Asia/Istanbul` - Asia/Istanbul + * `Asia/Jakarta` - Asia/Jakarta + * `Asia/Jayapura` - Asia/Jayapura + * `Asia/Jerusalem` - Asia/Jerusalem + * `Asia/Kabul` - Asia/Kabul + * `Asia/Kamchatka` - Asia/Kamchatka + * `Asia/Karachi` - Asia/Karachi + * `Asia/Kashgar` - Asia/Kashgar + * `Asia/Kathmandu` - Asia/Kathmandu + * `Asia/Katmandu` - Asia/Katmandu + * `Asia/Khandyga` - Asia/Khandyga + * `Asia/Kolkata` - Asia/Kolkata + * `Asia/Krasnoyarsk` - Asia/Krasnoyarsk + * `Asia/Kuala_Lumpur` - Asia/Kuala_Lumpur + * `Asia/Kuching` - Asia/Kuching + * `Asia/Kuwait` - Asia/Kuwait + * `Asia/Macao` - Asia/Macao + * `Asia/Macau` - Asia/Macau + * `Asia/Magadan` - Asia/Magadan + * `Asia/Makassar` - Asia/Makassar + * `Asia/Manila` - Asia/Manila + * `Asia/Muscat` - Asia/Muscat + * `Asia/Nicosia` - Asia/Nicosia + * `Asia/Novokuznetsk` - Asia/Novokuznetsk + * `Asia/Novosibirsk` - Asia/Novosibirsk + * `Asia/Omsk` - Asia/Omsk + * `Asia/Oral` - Asia/Oral + * `Asia/Phnom_Penh` - Asia/Phnom_Penh + * `Asia/Pontianak` - Asia/Pontianak + * `Asia/Pyongyang` - Asia/Pyongyang + * `Asia/Qatar` - Asia/Qatar + * `Asia/Qostanay` - Asia/Qostanay + * `Asia/Qyzylorda` - Asia/Qyzylorda + * `Asia/Rangoon` - Asia/Rangoon + * `Asia/Riyadh` - Asia/Riyadh + * `Asia/Saigon` - Asia/Saigon + * `Asia/Sakhalin` - Asia/Sakhalin + * `Asia/Samarkand` - Asia/Samarkand + * `Asia/Seoul` - Asia/Seoul + * `Asia/Shanghai` - Asia/Shanghai + * `Asia/Singapore` - Asia/Singapore + * `Asia/Srednekolymsk` - Asia/Srednekolymsk + * `Asia/Taipei` - Asia/Taipei + * `Asia/Tashkent` - Asia/Tashkent + * `Asia/Tbilisi` - Asia/Tbilisi + * `Asia/Tehran` - Asia/Tehran + * `Asia/Tel_Aviv` - Asia/Tel_Aviv + * `Asia/Thimbu` - Asia/Thimbu + * `Asia/Thimphu` - Asia/Thimphu + * `Asia/Tokyo` - Asia/Tokyo + * `Asia/Tomsk` - Asia/Tomsk + * `Asia/Ujung_Pandang` - Asia/Ujung_Pandang + * `Asia/Ulaanbaatar` - Asia/Ulaanbaatar + * `Asia/Ulan_Bator` - Asia/Ulan_Bator + * `Asia/Urumqi` - Asia/Urumqi + * `Asia/Ust-Nera` - Asia/Ust-Nera + * `Asia/Vientiane` - Asia/Vientiane + * `Asia/Vladivostok` - Asia/Vladivostok + * `Asia/Yakutsk` - Asia/Yakutsk + * `Asia/Yangon` - Asia/Yangon + * `Asia/Yekaterinburg` - Asia/Yekaterinburg + * `Asia/Yerevan` - Asia/Yerevan + * `Atlantic/Azores` - Atlantic/Azores + * `Atlantic/Bermuda` - Atlantic/Bermuda + * `Atlantic/Canary` - Atlantic/Canary + * `Atlantic/Cape_Verde` - Atlantic/Cape_Verde + * `Atlantic/Faeroe` - Atlantic/Faeroe + * `Atlantic/Faroe` - Atlantic/Faroe + * `Atlantic/Jan_Mayen` - Atlantic/Jan_Mayen + * `Atlantic/Madeira` - Atlantic/Madeira + * `Atlantic/Reykjavik` - Atlantic/Reykjavik + * `Atlantic/South_Georgia` - Atlantic/South_Georgia + * `Atlantic/St_Helena` - Atlantic/St_Helena + * `Atlantic/Stanley` - Atlantic/Stanley + * `Australia/ACT` - Australia/ACT + * `Australia/Adelaide` - Australia/Adelaide + * `Australia/Brisbane` - Australia/Brisbane + * `Australia/Broken_Hill` - Australia/Broken_Hill + * `Australia/Canberra` - Australia/Canberra + * `Australia/Currie` - Australia/Currie + * `Australia/Darwin` - Australia/Darwin + * `Australia/Eucla` - Australia/Eucla + * `Australia/Hobart` - Australia/Hobart + * `Australia/LHI` - Australia/LHI + * `Australia/Lindeman` - Australia/Lindeman + * `Australia/Lord_Howe` - Australia/Lord_Howe + * `Australia/Melbourne` - Australia/Melbourne + * `Australia/NSW` - Australia/NSW + * `Australia/North` - Australia/North + * `Australia/Perth` - Australia/Perth + * `Australia/Queensland` - Australia/Queensland + * `Australia/South` - Australia/South + * `Australia/Sydney` - Australia/Sydney + * `Australia/Tasmania` - Australia/Tasmania + * `Australia/Victoria` - Australia/Victoria + * `Australia/West` - Australia/West + * `Australia/Yancowinna` - Australia/Yancowinna + * `Brazil/Acre` - Brazil/Acre + * `Brazil/DeNoronha` - Brazil/DeNoronha + * `Brazil/East` - Brazil/East + * `Brazil/West` - Brazil/West + * `CET` - CET + * `CST6CDT` - CST6CDT + * `Canada/Atlantic` - Canada/Atlantic + * `Canada/Central` - Canada/Central + * `Canada/Eastern` - Canada/Eastern + * `Canada/Mountain` - Canada/Mountain + * `Canada/Newfoundland` - Canada/Newfoundland + * `Canada/Pacific` - Canada/Pacific + * `Canada/Saskatchewan` - Canada/Saskatchewan + * `Canada/Yukon` - Canada/Yukon + * `Chile/Continental` - Chile/Continental + * `Chile/EasterIsland` - Chile/EasterIsland + * `Cuba` - Cuba + * `EET` - EET + * `EST` - EST + * `EST5EDT` - EST5EDT + * `Egypt` - Egypt + * `Eire` - Eire + * `Etc/GMT` - Etc/GMT + * `Etc/GMT+0` - Etc/GMT+0 + * `Etc/GMT+1` - Etc/GMT+1 + * `Etc/GMT+10` - Etc/GMT+10 + * `Etc/GMT+11` - Etc/GMT+11 + * `Etc/GMT+12` - Etc/GMT+12 + * `Etc/GMT+2` - Etc/GMT+2 + * `Etc/GMT+3` - Etc/GMT+3 + * `Etc/GMT+4` - Etc/GMT+4 + * `Etc/GMT+5` - Etc/GMT+5 + * `Etc/GMT+6` - Etc/GMT+6 + * `Etc/GMT+7` - Etc/GMT+7 + * `Etc/GMT+8` - Etc/GMT+8 + * `Etc/GMT+9` - Etc/GMT+9 + * `Etc/GMT-0` - Etc/GMT-0 + * `Etc/GMT-1` - Etc/GMT-1 + * `Etc/GMT-10` - Etc/GMT-10 + * `Etc/GMT-11` - Etc/GMT-11 + * `Etc/GMT-12` - Etc/GMT-12 + * `Etc/GMT-13` - Etc/GMT-13 + * `Etc/GMT-14` - Etc/GMT-14 + * `Etc/GMT-2` - Etc/GMT-2 + * `Etc/GMT-3` - Etc/GMT-3 + * `Etc/GMT-4` - Etc/GMT-4 + * `Etc/GMT-5` - Etc/GMT-5 + * `Etc/GMT-6` - Etc/GMT-6 + * `Etc/GMT-7` - Etc/GMT-7 + * `Etc/GMT-8` - Etc/GMT-8 + * `Etc/GMT-9` - Etc/GMT-9 + * `Etc/GMT0` - Etc/GMT0 + * `Etc/Greenwich` - Etc/Greenwich + * `Etc/UCT` - Etc/UCT + * `Etc/UTC` - Etc/UTC + * `Etc/Universal` - Etc/Universal + * `Etc/Zulu` - Etc/Zulu + * `Europe/Amsterdam` - Europe/Amsterdam + * `Europe/Andorra` - Europe/Andorra + * `Europe/Astrakhan` - Europe/Astrakhan + * `Europe/Athens` - Europe/Athens + * `Europe/Belfast` - Europe/Belfast + * `Europe/Belgrade` - Europe/Belgrade + * `Europe/Berlin` - Europe/Berlin + * `Europe/Bratislava` - Europe/Bratislava + * `Europe/Brussels` - Europe/Brussels + * `Europe/Bucharest` - Europe/Bucharest + * `Europe/Budapest` - Europe/Budapest + * `Europe/Busingen` - Europe/Busingen + * `Europe/Chisinau` - Europe/Chisinau + * `Europe/Copenhagen` - Europe/Copenhagen + * `Europe/Dublin` - Europe/Dublin + * `Europe/Gibraltar` - Europe/Gibraltar + * `Europe/Guernsey` - Europe/Guernsey + * `Europe/Helsinki` - Europe/Helsinki + * `Europe/Isle_of_Man` - Europe/Isle_of_Man + * `Europe/Istanbul` - Europe/Istanbul + * `Europe/Jersey` - Europe/Jersey + * `Europe/Kaliningrad` - Europe/Kaliningrad + * `Europe/Kiev` - Europe/Kiev + * `Europe/Kirov` - Europe/Kirov + * `Europe/Kyiv` - Europe/Kyiv + * `Europe/Lisbon` - Europe/Lisbon + * `Europe/Ljubljana` - Europe/Ljubljana + * `Europe/London` - Europe/London + * `Europe/Luxembourg` - Europe/Luxembourg + * `Europe/Madrid` - Europe/Madrid + * `Europe/Malta` - Europe/Malta + * `Europe/Mariehamn` - Europe/Mariehamn + * `Europe/Minsk` - Europe/Minsk + * `Europe/Monaco` - Europe/Monaco + * `Europe/Moscow` - Europe/Moscow + * `Europe/Nicosia` - Europe/Nicosia + * `Europe/Oslo` - Europe/Oslo + * `Europe/Paris` - Europe/Paris + * `Europe/Podgorica` - Europe/Podgorica + * `Europe/Prague` - Europe/Prague + * `Europe/Riga` - Europe/Riga + * `Europe/Rome` - Europe/Rome + * `Europe/Samara` - Europe/Samara + * `Europe/San_Marino` - Europe/San_Marino + * `Europe/Sarajevo` - Europe/Sarajevo + * `Europe/Saratov` - Europe/Saratov + * `Europe/Simferopol` - Europe/Simferopol + * `Europe/Skopje` - Europe/Skopje + * `Europe/Sofia` - Europe/Sofia + * `Europe/Stockholm` - Europe/Stockholm + * `Europe/Tallinn` - Europe/Tallinn + * `Europe/Tirane` - Europe/Tirane + * `Europe/Tiraspol` - Europe/Tiraspol + * `Europe/Ulyanovsk` - Europe/Ulyanovsk + * `Europe/Uzhgorod` - Europe/Uzhgorod + * `Europe/Vaduz` - Europe/Vaduz + * `Europe/Vatican` - Europe/Vatican + * `Europe/Vienna` - Europe/Vienna + * `Europe/Vilnius` - Europe/Vilnius + * `Europe/Volgograd` - Europe/Volgograd + * `Europe/Warsaw` - Europe/Warsaw + * `Europe/Zagreb` - Europe/Zagreb + * `Europe/Zaporozhye` - Europe/Zaporozhye + * `Europe/Zurich` - Europe/Zurich + * `GB` - GB + * `GB-Eire` - GB-Eire + * `GMT` - GMT + * `GMT+0` - GMT+0 + * `GMT-0` - GMT-0 + * `GMT0` - GMT0 + * `Greenwich` - Greenwich + * `HST` - HST + * `Hongkong` - Hongkong + * `Iceland` - Iceland + * `Indian/Antananarivo` - Indian/Antananarivo + * `Indian/Chagos` - Indian/Chagos + * `Indian/Christmas` - Indian/Christmas + * `Indian/Cocos` - Indian/Cocos + * `Indian/Comoro` - Indian/Comoro + * `Indian/Kerguelen` - Indian/Kerguelen + * `Indian/Mahe` - Indian/Mahe + * `Indian/Maldives` - Indian/Maldives + * `Indian/Mauritius` - Indian/Mauritius + * `Indian/Mayotte` - Indian/Mayotte + * `Indian/Reunion` - Indian/Reunion + * `Iran` - Iran + * `Israel` - Israel + * `Jamaica` - Jamaica + * `Japan` - Japan + * `Kwajalein` - Kwajalein + * `Libya` - Libya + * `MET` - MET + * `MST` - MST + * `MST7MDT` - MST7MDT + * `Mexico/BajaNorte` - Mexico/BajaNorte + * `Mexico/BajaSur` - Mexico/BajaSur + * `Mexico/General` - Mexico/General + * `NZ` - NZ + * `NZ-CHAT` - NZ-CHAT + * `Navajo` - Navajo + * `PRC` - PRC + * `PST8PDT` - PST8PDT + * `Pacific/Apia` - Pacific/Apia + * `Pacific/Auckland` - Pacific/Auckland + * `Pacific/Bougainville` - Pacific/Bougainville + * `Pacific/Chatham` - Pacific/Chatham + * `Pacific/Chuuk` - Pacific/Chuuk + * `Pacific/Easter` - Pacific/Easter + * `Pacific/Efate` - Pacific/Efate + * `Pacific/Enderbury` - Pacific/Enderbury + * `Pacific/Fakaofo` - Pacific/Fakaofo + * `Pacific/Fiji` - Pacific/Fiji + * `Pacific/Funafuti` - Pacific/Funafuti + * `Pacific/Galapagos` - Pacific/Galapagos + * `Pacific/Gambier` - Pacific/Gambier + * `Pacific/Guadalcanal` - Pacific/Guadalcanal + * `Pacific/Guam` - Pacific/Guam + * `Pacific/Honolulu` - Pacific/Honolulu + * `Pacific/Johnston` - Pacific/Johnston + * `Pacific/Kanton` - Pacific/Kanton + * `Pacific/Kiritimati` - Pacific/Kiritimati + * `Pacific/Kosrae` - Pacific/Kosrae + * `Pacific/Kwajalein` - Pacific/Kwajalein + * `Pacific/Majuro` - Pacific/Majuro + * `Pacific/Marquesas` - Pacific/Marquesas + * `Pacific/Midway` - Pacific/Midway + * `Pacific/Nauru` - Pacific/Nauru + * `Pacific/Niue` - Pacific/Niue + * `Pacific/Norfolk` - Pacific/Norfolk + * `Pacific/Noumea` - Pacific/Noumea + * `Pacific/Pago_Pago` - Pacific/Pago_Pago + * `Pacific/Palau` - Pacific/Palau + * `Pacific/Pitcairn` - Pacific/Pitcairn + * `Pacific/Pohnpei` - Pacific/Pohnpei + * `Pacific/Ponape` - Pacific/Ponape + * `Pacific/Port_Moresby` - Pacific/Port_Moresby + * `Pacific/Rarotonga` - Pacific/Rarotonga + * `Pacific/Saipan` - Pacific/Saipan + * `Pacific/Samoa` - Pacific/Samoa + * `Pacific/Tahiti` - Pacific/Tahiti + * `Pacific/Tarawa` - Pacific/Tarawa + * `Pacific/Tongatapu` - Pacific/Tongatapu + * `Pacific/Truk` - Pacific/Truk + * `Pacific/Wake` - Pacific/Wake + * `Pacific/Wallis` - Pacific/Wallis + * `Pacific/Yap` - Pacific/Yap + * `Poland` - Poland + * `Portugal` - Portugal + * `ROC` - ROC + * `ROK` - ROK + * `Singapore` - Singapore + * `Turkey` - Turkey + * `UCT` - UCT + * `US/Alaska` - US/Alaska + * `US/Aleutian` - US/Aleutian + * `US/Arizona` - US/Arizona + * `US/Central` - US/Central + * `US/East-Indiana` - US/East-Indiana + * `US/Eastern` - US/Eastern + * `US/Hawaii` - US/Hawaii + * `US/Indiana-Starke` - US/Indiana-Starke + * `US/Michigan` - US/Michigan + * `US/Mountain` - US/Mountain + * `US/Pacific` - US/Pacific + * `US/Samoa` - US/Samoa + * `UTC` - UTC + * `Universal` - Universal + * `W-SU` - W-SU + * `WET` - WET + * `Zulu` - Zulu + ToolbarModeEnum: + enum: + - disabled + - toolbar + type: string + description: |- + * `disabled` - disabled + * `toolbar` - toolbar + TracesQuery: + additionalProperties: false + properties: + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + filterTestAccounts: + anyOf: + - type: boolean + default: null + title: Filtertestaccounts + kind: + allOf: + - $ref: '#/components/schemas/TracesQueryKindEnum' + + default: TracesQuery + title: Kind + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + default: null + description: Properties configurable in the interface + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/TracesQueryResponse' + default: null + traceId: + anyOf: + - type: string + default: null + title: Traceid + title: TracesQuery + type: object + TracesQueryKindEnum: + enum: + - TracesQuery + type: string + TracesQueryResponse: + additionalProperties: false + properties: + columns: + anyOf: + - items: + type: string + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/LLMTrace' + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: TracesQueryResponse + type: object + TrendsFilter: + additionalProperties: false + properties: + aggregationAxisFormat: + anyOf: + - $ref: '#/components/schemas/AggregationAxisFormat' + default: numeric + aggregationAxisPostfix: + anyOf: + - type: string + default: null + title: Aggregationaxispostfix + aggregationAxisPrefix: + anyOf: + - type: string + default: null + title: Aggregationaxisprefix + breakdown_histogram_bin_count: + anyOf: + - type: number + default: null + title: Breakdown Histogram Bin Count + decimalPlaces: + anyOf: + - type: number + default: null + title: Decimalplaces + display: + anyOf: + - $ref: '#/components/schemas/ChartDisplayType' + default: ActionsLineGraph + formula: + anyOf: + - type: string + default: null + title: Formula + formulas: + anyOf: + - items: + type: string + type: array + default: null + description: List of formulas to apply to the data. Takes precedence over + formula if both are set. + title: Formulas + goalLines: + anyOf: + - items: + $ref: '#/components/schemas/GoalLine' + type: array + default: null + description: Goal Lines + title: Goallines + hiddenLegendIndexes: + anyOf: + - items: + type: integer + type: array + default: null + title: Hiddenlegendindexes + resultCustomizationBy: + anyOf: + - $ref: '#/components/schemas/ResultCustomizationBy' + default: value + description: Wether result datasets are associated by their values or by + their order. + resultCustomizations: + anyOf: + - additionalProperties: + $ref: '#/components/schemas/ResultCustomizationByValue' + type: object + - additionalProperties: + $ref: '#/components/schemas/ResultCustomizationByPosition' + type: object + default: null + description: Customizations for the appearance of result datasets. + title: Resultcustomizations + showAlertThresholdLines: + anyOf: + - type: boolean + default: false + title: Showalertthresholdlines + showLabelsOnSeries: + anyOf: + - type: boolean + default: null + title: Showlabelsonseries + showLegend: + anyOf: + - type: boolean + default: false + title: Showlegend + showMultipleYAxes: + anyOf: + - type: boolean + default: false + title: Showmultipleyaxes + showPercentStackView: + anyOf: + - type: boolean + default: false + title: Showpercentstackview + showValuesOnSeries: + anyOf: + - type: boolean + default: false + title: Showvaluesonseries + smoothingIntervals: + anyOf: + - type: integer + default: 1 + title: Smoothingintervals + yAxisScaleType: + anyOf: + - $ref: '#/components/schemas/YAxisScaleType' + default: linear + title: TrendsFilter + type: object + TrendsQuery: + additionalProperties: false + properties: + aggregation_group_type_index: + anyOf: + - type: integer + default: null + description: Groups aggregation + title: Aggregation Group Type Index + breakdownFilter: + anyOf: + - $ref: '#/components/schemas/BreakdownFilter' + default: null + description: Breakdown of the events and actions + compareFilter: + anyOf: + - $ref: '#/components/schemas/CompareFilter' + default: null + description: Compare to date range + conversionGoal: + anyOf: + - $ref: '#/components/schemas/ActionConversionGoal' + - $ref: '#/components/schemas/CustomEventConversionGoal' + default: null + description: Whether we should be comparing against a specific conversion + goal + title: Conversiongoal + dataColorTheme: + anyOf: + - type: number + default: null + description: Colors used in the insight's visualization + title: Datacolortheme + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + description: Date range for the query + filterTestAccounts: + anyOf: + - type: boolean + default: false + description: Exclude internal and test users by applying the respective + filters + title: Filtertestaccounts + interval: + anyOf: + - $ref: '#/components/schemas/IntervalType' + default: day + description: Granularity of the response. Can be one of `hour`, `day`, `week` + or `month` + kind: + allOf: + - $ref: '#/components/schemas/TrendsQueryKindEnum' + + default: TrendsQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + properties: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/ElementPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + - $ref: '#/components/schemas/CohortPropertyFilter' + - $ref: '#/components/schemas/RecordingPropertyFilter' + - $ref: '#/components/schemas/LogEntryPropertyFilter' + - $ref: '#/components/schemas/GroupPropertyFilter' + - $ref: '#/components/schemas/FeaturePropertyFilter' + - $ref: '#/components/schemas/HogQLPropertyFilter' + - $ref: '#/components/schemas/EmptyPropertyFilter' + - $ref: '#/components/schemas/DataWarehousePropertyFilter' + - $ref: '#/components/schemas/DataWarehousePersonPropertyFilter' + type: array + - $ref: '#/components/schemas/PropertyGroupFilter' + default: [] + description: Property filters for all series + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/TrendsQueryResponse' + default: null + samplingFactor: + anyOf: + - type: number + default: null + description: Sampling rate + title: Samplingfactor + series: + description: Events and actions to include + items: + anyOf: + - $ref: '#/components/schemas/EventsNode' + - $ref: '#/components/schemas/ActionsNode' + - $ref: '#/components/schemas/DataWarehouseNode' + title: Series + type: array + trendsFilter: + anyOf: + - $ref: '#/components/schemas/TrendsFilter' + default: null + description: Properties specific to the trends insight + required: + - series + title: TrendsQuery + type: object + TrendsQueryKindEnum: + enum: + - TrendsQuery + type: string + TrendsQueryResponse: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + description: Wether more breakdown values are available. + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + type: object + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: TrendsQueryResponse + type: object + Type1: + enum: + - user_group + - user + title: Type1 + type: string + TypeF73Enum: + enum: + - data_warehouse + type: string + UrlMatchingEnum: + enum: + - contains + - regex + - exact + type: string + description: |- + * `contains` - contains + * `regex` - regex + * `exact` - exact + User: + type: object + properties: + date_joined: + type: string + format: date-time + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + distinct_id: + type: string + readOnly: true + nullable: true + first_name: + type: string + maxLength: 150 + last_name: + type: string + maxLength: 150 + email: + type: string + format: email + title: Email address + maxLength: 254 + pending_email: + type: string + format: email + readOnly: true + nullable: true + title: Pending email address awaiting verification + is_email_verified: + type: boolean + readOnly: true + nullable: true + notification_settings: + type: object + additionalProperties: {} + anonymize_data: + type: boolean + nullable: true + toolbar_mode: + nullable: true + oneOf: + - $ref: '#/components/schemas/ToolbarModeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + has_password: + type: boolean + readOnly: true + is_staff: + type: boolean + title: Staff status + description: Designates whether the user can log into this admin site. + is_impersonated: + type: boolean + nullable: true + readOnly: true + is_impersonated_until: + type: string + nullable: true + readOnly: true + sensitive_session_expires_at: + type: string + nullable: true + readOnly: true + team: + allOf: + - $ref: '#/components/schemas/TeamBasic' + readOnly: true + organization: + allOf: + - $ref: '#/components/schemas/Organization' + readOnly: true + organizations: + type: array + items: + $ref: '#/components/schemas/OrganizationBasic' + readOnly: true + set_current_organization: + type: string + writeOnly: true + set_current_team: + type: string + writeOnly: true + password: + type: string + writeOnly: true + maxLength: 128 + current_password: + type: string + writeOnly: true + events_column_config: {} + is_2fa_enabled: + type: boolean + readOnly: true + has_social_auth: + type: boolean + readOnly: true + has_seen_product_intro_for: + nullable: true + scene_personalisation: + type: array + items: + $ref: '#/components/schemas/ScenePersonalisationBasic' + readOnly: true + theme_mode: + nullable: true + oneOf: + - $ref: '#/components/schemas/ThemeModeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + hedgehog_config: + nullable: true + role_at_organization: + $ref: '#/components/schemas/RoleAtOrganizationEnum' + required: + - date_joined + - distinct_id + - email + - has_password + - has_social_auth + - is_2fa_enabled + - is_email_verified + - is_impersonated + - is_impersonated_until + - organization + - organizations + - password + - pending_email + - scene_personalisation + - sensitive_session_expires_at + - team + - uuid + UserBasic: + type: object + properties: + id: + type: integer + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + distinct_id: + type: string + nullable: true + maxLength: 200 + first_name: + type: string + maxLength: 150 + last_name: + type: string + maxLength: 150 + email: + type: string + format: email + title: Email address + maxLength: 254 + is_email_verified: + type: boolean + nullable: true + hedgehog_config: + type: object + additionalProperties: {} + nullable: true + readOnly: true + role_at_organization: + nullable: true + oneOf: + - $ref: '#/components/schemas/RoleAtOrganizationEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + required: + - email + - hedgehog_config + - id + - uuid + VizSpecificOptions: + additionalProperties: false + properties: + ActionsPie: + default: null + title: Actionspie + RETENTION: + default: null + title: Retention + title: VizSpecificOptions + type: object + WebAnalyticsOrderByDirection: + enum: + - ASC + - DESC + title: WebAnalyticsOrderByDirection + type: string + WebAnalyticsOrderByFields: + enum: + - Visitors + - Views + - Clicks + - BounceRate + - AverageScrollPercentage + - ScrollGt80Percentage + - TotalConversions + - UniqueConversions + - ConversionRate + - ConvertingUsers + title: WebAnalyticsOrderByFields + type: string + WebExperimentsAPI: + type: object + description: Serializer for the exposed /api/web_experiments endpoint, to be + used in posthog-js and for headless APIs. + properties: + id: + type: integer + readOnly: true + name: + type: string + maxLength: 400 + created_at: + type: string + format: date-time + feature_flag_key: + type: string + readOnly: true + variants: + nullable: true + required: + - feature_flag_key + - id + - name + WebExternalClicksTableQuery: + additionalProperties: false + properties: + compareFilter: + anyOf: + - $ref: '#/components/schemas/CompareFilter' + default: null + conversionGoal: + anyOf: + - $ref: '#/components/schemas/ActionConversionGoal' + - $ref: '#/components/schemas/CustomEventConversionGoal' + default: null + title: Conversiongoal + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + doPathCleaning: + anyOf: + - type: boolean + default: null + title: Dopathcleaning + filterTestAccounts: + anyOf: + - type: boolean + default: null + title: Filtertestaccounts + includeRevenue: + anyOf: + - type: boolean + default: null + title: Includerevenue + kind: + allOf: + - $ref: '#/components/schemas/WebExternalClicksTableQueryKindEnum' + + default: WebExternalClicksTableQuery + title: Kind + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + orderBy: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/WebAnalyticsOrderByFields' + - $ref: '#/components/schemas/WebAnalyticsOrderByDirection' + type: array + default: null + title: Orderby + properties: + type: array + items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/WebExternalClicksTableQueryResponse' + default: null + sampling: + anyOf: + - $ref: '#/components/schemas/Sampling' + default: null + stripQueryParams: + anyOf: + - type: boolean + default: null + title: Stripqueryparams + useSessionsTable: + anyOf: + - type: boolean + default: null + title: Usesessionstable + required: + - properties + title: WebExternalClicksTableQuery + type: object + WebExternalClicksTableQueryKindEnum: + enum: + - WebExternalClicksTableQuery + type: string + WebExternalClicksTableQueryResponse: + additionalProperties: false + properties: + columns: + anyOf: + - items: {} + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: {} + title: Results + type: array + samplingRate: + anyOf: + - $ref: '#/components/schemas/SamplingRate' + default: null + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + title: Types + required: + - results + title: WebExternalClicksTableQueryResponse + type: object + WebGoalsQuery: + additionalProperties: false + properties: + compareFilter: + anyOf: + - $ref: '#/components/schemas/CompareFilter' + default: null + conversionGoal: + anyOf: + - $ref: '#/components/schemas/ActionConversionGoal' + - $ref: '#/components/schemas/CustomEventConversionGoal' + default: null + title: Conversiongoal + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + doPathCleaning: + anyOf: + - type: boolean + default: null + title: Dopathcleaning + filterTestAccounts: + anyOf: + - type: boolean + default: null + title: Filtertestaccounts + includeRevenue: + anyOf: + - type: boolean + default: null + title: Includerevenue + kind: + allOf: + - $ref: '#/components/schemas/WebGoalsQueryKindEnum' + + default: WebGoalsQuery + title: Kind + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + orderBy: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/WebAnalyticsOrderByFields' + - $ref: '#/components/schemas/WebAnalyticsOrderByDirection' + type: array + default: null + title: Orderby + properties: + type: array + items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/WebGoalsQueryResponse' + default: null + sampling: + anyOf: + - $ref: '#/components/schemas/Sampling' + default: null + useSessionsTable: + anyOf: + - type: boolean + default: null + title: Usesessionstable + required: + - properties + title: WebGoalsQuery + type: object + WebGoalsQueryKindEnum: + enum: + - WebGoalsQuery + type: string + WebGoalsQueryResponse: + additionalProperties: false + properties: + columns: + anyOf: + - items: {} + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: {} + title: Results + type: array + samplingRate: + anyOf: + - $ref: '#/components/schemas/SamplingRate' + default: null + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + title: Types + required: + - results + title: WebGoalsQueryResponse + type: object + WebOverviewItem: + additionalProperties: false + properties: + changeFromPreviousPct: + anyOf: + - type: number + default: null + title: Changefrompreviouspct + isIncreaseBad: + anyOf: + - type: boolean + default: null + title: Isincreasebad + key: + title: Key + type: string + kind: + $ref: '#/components/schemas/WebOverviewItemKind' + previous: + anyOf: + - type: number + default: null + title: Previous + value: + anyOf: + - type: number + default: null + title: Value + required: + - key + - kind + title: WebOverviewItem + type: object + WebOverviewItemKind: + enum: + - unit + - duration_s + - percentage + - currency + title: WebOverviewItemKind + type: string + WebOverviewQuery: + additionalProperties: false + properties: + compareFilter: + anyOf: + - $ref: '#/components/schemas/CompareFilter' + default: null + conversionGoal: + anyOf: + - $ref: '#/components/schemas/ActionConversionGoal' + - $ref: '#/components/schemas/CustomEventConversionGoal' + default: null + title: Conversiongoal + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + doPathCleaning: + anyOf: + - type: boolean + default: null + title: Dopathcleaning + filterTestAccounts: + anyOf: + - type: boolean + default: null + title: Filtertestaccounts + includeRevenue: + anyOf: + - type: boolean + default: null + title: Includerevenue + kind: + allOf: + - $ref: '#/components/schemas/WebOverviewQueryKindEnum' + + default: WebOverviewQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + orderBy: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/WebAnalyticsOrderByFields' + - $ref: '#/components/schemas/WebAnalyticsOrderByDirection' + type: array + default: null + title: Orderby + properties: + type: array + items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/WebOverviewQueryResponse' + default: null + sampling: + anyOf: + - $ref: '#/components/schemas/Sampling' + default: null + useSessionsTable: + anyOf: + - type: boolean + default: null + title: Usesessionstable + required: + - properties + title: WebOverviewQuery + type: object + WebOverviewQueryKindEnum: + enum: + - WebOverviewQuery + type: string + WebOverviewQueryResponse: + additionalProperties: false + properties: + dateFrom: + anyOf: + - type: string + default: null + title: Datefrom + dateTo: + anyOf: + - type: string + default: null + title: Dateto + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/WebOverviewItem' + title: Results + type: array + samplingRate: + anyOf: + - $ref: '#/components/schemas/SamplingRate' + default: null + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: WebOverviewQueryResponse + type: object + WebStatsBreakdown: + enum: + - Page + - InitialPage + - ExitPage + - ExitClick + - ScreenName + - InitialChannelType + - InitialReferringDomain + - InitialUTMSource + - InitialUTMCampaign + - InitialUTMMedium + - InitialUTMTerm + - InitialUTMContent + - InitialUTMSourceMediumCampaign + - Browser + - OS + - Viewport + - DeviceType + - Country + - Region + - City + - Timezone + - Language + title: WebStatsBreakdown + type: string + WebStatsTableQuery: + additionalProperties: false + properties: + breakdownBy: + $ref: '#/components/schemas/WebStatsBreakdown' + compareFilter: + anyOf: + - $ref: '#/components/schemas/CompareFilter' + default: null + conversionGoal: + anyOf: + - $ref: '#/components/schemas/ActionConversionGoal' + - $ref: '#/components/schemas/CustomEventConversionGoal' + default: null + title: Conversiongoal + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + doPathCleaning: + anyOf: + - type: boolean + default: null + title: Dopathcleaning + filterTestAccounts: + anyOf: + - type: boolean + default: null + title: Filtertestaccounts + includeBounceRate: + anyOf: + - type: boolean + default: null + title: Includebouncerate + includeRevenue: + anyOf: + - type: boolean + default: null + title: Includerevenue + includeScrollDepth: + anyOf: + - type: boolean + default: null + title: Includescrolldepth + kind: + allOf: + - $ref: '#/components/schemas/WebStatsTableQueryKindEnum' + + default: WebStatsTableQuery + title: Kind + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + orderBy: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/WebAnalyticsOrderByFields' + - $ref: '#/components/schemas/WebAnalyticsOrderByDirection' + type: array + default: null + title: Orderby + properties: + type: array + items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/WebStatsTableQueryResponse' + default: null + sampling: + anyOf: + - $ref: '#/components/schemas/Sampling' + default: null + useSessionsTable: + anyOf: + - type: boolean + default: null + title: Usesessionstable + required: + - breakdownBy + - properties + title: WebStatsTableQuery + type: object + WebStatsTableQueryKindEnum: + enum: + - WebStatsTableQuery + type: string + WebStatsTableQueryResponse: + additionalProperties: false + properties: + columns: + anyOf: + - items: {} + type: array + default: null + title: Columns + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hasMore: + anyOf: + - type: boolean + default: null + title: Hasmore + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + limit: + anyOf: + - type: integer + default: null + title: Limit + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + offset: + anyOf: + - type: integer + default: null + title: Offset + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: {} + title: Results + type: array + samplingRate: + anyOf: + - $ref: '#/components/schemas/SamplingRate' + default: null + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + types: + anyOf: + - items: {} + type: array + default: null + title: Types + required: + - results + title: WebStatsTableQueryResponse + type: object + WebVitalsMetric: + enum: + - INP + - LCP + - CLS + - FCP + title: WebVitalsMetric + type: string + WebVitalsPathBreakdownQuery: + additionalProperties: false + properties: + compareFilter: + anyOf: + - $ref: '#/components/schemas/CompareFilter' + default: null + conversionGoal: + anyOf: + - $ref: '#/components/schemas/ActionConversionGoal' + - $ref: '#/components/schemas/CustomEventConversionGoal' + default: null + title: Conversiongoal + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + doPathCleaning: + anyOf: + - type: boolean + default: null + title: Dopathcleaning + filterTestAccounts: + anyOf: + - type: boolean + default: null + title: Filtertestaccounts + includeRevenue: + anyOf: + - type: boolean + default: null + title: Includerevenue + kind: + allOf: + - $ref: '#/components/schemas/WebVitalsPathBreakdownQueryKindEnum' + + default: WebVitalsPathBreakdownQuery + title: Kind + metric: + $ref: '#/components/schemas/WebVitalsMetric' + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + orderBy: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/WebAnalyticsOrderByFields' + - $ref: '#/components/schemas/WebAnalyticsOrderByDirection' + type: array + default: null + title: Orderby + percentile: + $ref: '#/components/schemas/WebVitalsPercentile' + properties: + type: array + items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/WebVitalsPathBreakdownQueryResponse' + default: null + sampling: + anyOf: + - $ref: '#/components/schemas/Sampling' + default: null + thresholds: + items: + type: number + maxItems: 2 + minItems: 2 + title: Thresholds + type: array + useSessionsTable: + anyOf: + - type: boolean + default: null + title: Usesessionstable + required: + - metric + - percentile + - properties + - thresholds + title: WebVitalsPathBreakdownQuery + type: object + WebVitalsPathBreakdownQueryKindEnum: + enum: + - WebVitalsPathBreakdownQuery + type: string + WebVitalsPathBreakdownQueryResponse: + additionalProperties: false + properties: + error: + anyOf: + - type: string + default: null + description: Query error. Returned only if 'explain' or `modifiers.debug` + is true. Throws an error otherwise. + title: Error + hogql: + anyOf: + - type: string + default: null + description: Generated HogQL query. + title: Hogql + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + query_status: + anyOf: + - $ref: '#/components/schemas/QueryStatus' + default: null + description: Query status indicates whether next to the provided data, a + query is still running. + results: + items: + $ref: '#/components/schemas/WebVitalsPathBreakdownResult' + maxItems: 1 + minItems: 1 + title: Results + type: array + timings: + anyOf: + - items: + $ref: '#/components/schemas/QueryTiming' + type: array + default: null + description: Measured timings for different parts of the query generation + process + title: Timings + required: + - results + title: WebVitalsPathBreakdownQueryResponse + type: object + WebVitalsPathBreakdownResult: + additionalProperties: false + properties: + good: + items: + $ref: '#/components/schemas/WebVitalsPathBreakdownResultItem' + title: Good + type: array + needs_improvements: + items: + $ref: '#/components/schemas/WebVitalsPathBreakdownResultItem' + title: Needs Improvements + type: array + poor: + items: + $ref: '#/components/schemas/WebVitalsPathBreakdownResultItem' + title: Poor + type: array + required: + - good + - needs_improvements + - poor + title: WebVitalsPathBreakdownResult + type: object + WebVitalsPathBreakdownResultItem: + additionalProperties: false + properties: + path: + title: Path + type: string + value: + title: Value + type: number + required: + - path + - value + title: WebVitalsPathBreakdownResultItem + type: object + WebVitalsPercentile: + enum: + - p75 + - p90 + - p99 + title: WebVitalsPercentile + type: string + WebVitalsQuery: + additionalProperties: false + properties: + compareFilter: + anyOf: + - $ref: '#/components/schemas/CompareFilter' + default: null + conversionGoal: + anyOf: + - $ref: '#/components/schemas/ActionConversionGoal' + - $ref: '#/components/schemas/CustomEventConversionGoal' + default: null + title: Conversiongoal + dateRange: + anyOf: + - $ref: '#/components/schemas/DateRange' + default: null + doPathCleaning: + anyOf: + - type: boolean + default: null + title: Dopathcleaning + filterTestAccounts: + anyOf: + - type: boolean + default: null + title: Filtertestaccounts + includeRevenue: + anyOf: + - type: boolean + default: null + title: Includerevenue + kind: + allOf: + - $ref: '#/components/schemas/WebVitalsQueryKindEnum' + + default: WebVitalsQuery + title: Kind + modifiers: + anyOf: + - $ref: '#/components/schemas/HogQLQueryModifiers' + default: null + description: Modifiers used when performing the query + orderBy: + anyOf: + - items: + anyOf: + - $ref: '#/components/schemas/WebAnalyticsOrderByFields' + - $ref: '#/components/schemas/WebAnalyticsOrderByDirection' + type: array + default: null + title: Orderby + properties: + type: array + items: + anyOf: + - $ref: '#/components/schemas/EventPropertyFilter' + - $ref: '#/components/schemas/PersonPropertyFilter' + - $ref: '#/components/schemas/SessionPropertyFilter' + title: Properties + response: + anyOf: + - $ref: '#/components/schemas/WebGoalsQueryResponse' + default: null + sampling: + anyOf: + - $ref: '#/components/schemas/Sampling' + default: null + source: + discriminator: + mapping: + FunnelsQuery: '#/components/schemas/FunnelsQuery' + LifecycleQuery: '#/components/schemas/LifecycleQuery' + PathsQuery: '#/components/schemas/PathsQuery' + RetentionQuery: '#/components/schemas/RetentionQuery' + StickinessQuery: '#/components/schemas/StickinessQuery' + TrendsQuery: '#/components/schemas/TrendsQuery' + propertyName: kind + oneOf: + - $ref: '#/components/schemas/TrendsQuery' + - $ref: '#/components/schemas/FunnelsQuery' + - $ref: '#/components/schemas/RetentionQuery' + - $ref: '#/components/schemas/PathsQuery' + - $ref: '#/components/schemas/StickinessQuery' + - $ref: '#/components/schemas/LifecycleQuery' + title: Source + useSessionsTable: + anyOf: + - type: boolean + default: null + title: Usesessionstable + required: + - properties + - source + title: WebVitalsQuery + type: object + WebVitalsQueryKindEnum: + enum: + - WebVitalsQuery + type: string + WeekStartDayEnum: + enum: + - 0 + - 1 + type: integer + description: |- + * `0` - Sunday + * `1` - Monday + YAxisPosition: + enum: + - left + - right + title: YAxisPosition + type: string + YAxisScaleType: + enum: + - log10 + - linear + title: YAxisScaleType + type: string + YAxisSettings: + additionalProperties: false + properties: + scale: + anyOf: + - $ref: '#/components/schemas/Scale' + default: null + startAtZero: + anyOf: + - type: boolean + default: null + description: Whether the Y axis should start at zero + title: Startatzero + title: YAxisSettings + type: object + securitySchemes: + PersonalAPIKeyAuth: + type: http + scheme: bearer +x-tagGroups: +- name: All endpoints + tags: + - actions + - activity_log + - annotations + - app_metrics + - batch_exports + - cohorts + - dashboard_templates + - dashboards + - domains + - early_access_feature + - environments + - event_definitions + - events + - experiment_holdouts + - experiment_saved_metrics + - experiments + - explicit_members + - exports + - feature_flags + - file_system + - groups + - groups_types + - insights + - invites + - members + - notebooks + - organizations + - persons + - plugin_configs + - projects + - property_definitions + - proxy_records + - query + - roles + - session_recording_playlists + - session_recordings + - sessions + - subscriptions + - surveys + - users + - web_experiments diff --git a/posthog-rs/src/api/client.rs b/posthog-rs/src/api/client.rs new file mode 100644 index 0000000..b72610e --- /dev/null +++ b/posthog-rs/src/api/client.rs @@ -0,0 +1,157 @@ +use reqwest::{Method, StatusCode}; +use serde::{de::DeserializeOwned, Serialize}; +use std::time::Duration; + +use super::PostHogApiError; + +const RATE_LIMIT_WAIT_TIME: Duration = Duration::from_secs(5); +const MAX_RETRIES: u32 = 3; + +pub struct PostHogAPIClient { + pub client: reqwest::Client, + pub api_key: String, + pub base_url: String, +} + +impl PostHogAPIClient { + pub fn new(api_key: String, base_url: impl Into>) -> Result { + let base_url = base_url.into().unwrap_or_else(|| "https://us.posthog.com".to_string()); + + let client = reqwest::Client::builder() + .timeout(Duration::from_secs(60)) + .default_headers({ + let mut headers = reqwest::header::HeaderMap::new(); + headers.insert( + reqwest::header::AUTHORIZATION, + format!("Bearer {}", api_key).parse().unwrap(), + ); + headers + }) + .build()?; + + Ok(Self { + client, + api_key, + base_url, + }) + } + + /// Makes an API request with automatic rate limit handling and retries + pub(crate) async fn api_request( + &self, + method: Method, + endpoint: &str, + body: Option<&T>, + ) -> Result + where + T: Serialize + ?Sized, + R: DeserializeOwned, + { + let url = format!("{}{}", self.base_url.trim_end_matches("/"), endpoint); + let mut retries = 0; + + loop { + let request = self.client + .request(method.clone(), &url) + .header("Authorization", format!("Bearer {}", self.api_key)); + + let request = if let Some(body) = body { + request.json(body) + } else { + request + }; + + let response = request.send().await?; + let status = response.status(); + + match status { + // Success case + s if s.is_success() => { + return Ok(response.json().await?); + } + // Rate limit case + StatusCode::TOO_MANY_REQUESTS => { + if retries >= MAX_RETRIES { + let error = response.json().await?; + return Err(PostHogApiError::ResponseError(status, error)); + } + // Get retry-after header if available, otherwise use default wait time + let wait_time = response + .headers() + .get("retry-after") + .and_then(|h| h.to_str().ok()) + .and_then(|s| s.parse::().ok()) + .map(Duration::from_secs) + .unwrap_or(RATE_LIMIT_WAIT_TIME); + + tokio::time::sleep(wait_time).await; + retries += 1; + continue; + } + // Other error cases + _ => { + let error = response.json().await?; + return Err(PostHogApiError::ResponseError(status, error)); + } + } + } + } + + /// Makes an API request that returns no content (204 response) + pub(crate) async fn api_request_no_response_content( + &self, + method: Method, + endpoint: &str, + body: Option<&T>, + ) -> Result<(), PostHogApiError> + where + T: Serialize + ?Sized, + { + let url = format!("{}{}", self.base_url, endpoint); + let mut retries = 0; + + loop { + let request = self.client + .request(method.clone(), &url) + .header("Authorization", format!("Bearer {}", self.api_key)); + + let request = if let Some(body) = body { + request.json(body) + } else { + request + }; + + let response = request.send().await?; + let status = response.status(); + + match status { + // Success case + s if s.is_success() => return Ok(()), + // Rate limit case + StatusCode::TOO_MANY_REQUESTS => { + if retries >= MAX_RETRIES { + let error = response.json().await?; + return Err(PostHogApiError::ResponseError(status, error)); + } + // Get retry-after header if available, otherwise use default wait time + let wait_time = response + .headers() + .get("retry-after") + .and_then(|h| h.to_str().ok()) + .and_then(|s| s.parse::().ok()) + .map(Duration::from_secs) + .unwrap_or(RATE_LIMIT_WAIT_TIME); + + tokio::time::sleep(wait_time).await; + retries += 1; + continue; + } + // Other error cases + _ => { + let error = response.json().await?; + return Err(PostHogApiError::ResponseError(status, error)); + } + } + } + } +} \ No newline at end of file diff --git a/posthog-rs/src/api/mod.rs b/posthog-rs/src/api/mod.rs new file mode 100644 index 0000000..0135568 --- /dev/null +++ b/posthog-rs/src/api/mod.rs @@ -0,0 +1,13 @@ +pub mod client; +pub mod query; + +pub use client::PostHogAPIClient; +pub use query::{QueryRequest, QueryResponse}; +pub use super::error::PostHogApiError; + +// Not ready yet +// mod openapi { +// use progenitor::generate_api; + +// generate_api!("./schema.yaml"); +// } diff --git a/posthog-rs/src/api/query.rs b/posthog-rs/src/api/query.rs new file mode 100644 index 0000000..cbb1a5d --- /dev/null +++ b/posthog-rs/src/api/query.rs @@ -0,0 +1,106 @@ +use reqwest::Method; +use serde::{Deserialize, Serialize}; +use serde_json::Value; + +use super::PostHogApiError; +use crate::api::client::PostHogAPIClient; + +#[derive(Default, Debug, Serialize, Deserialize)] +pub struct QueryRequest { + pub query: Value, + #[serde(skip_serializing_if = "Option::is_none")] + pub async_: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub filters_override: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub refresh: Option, +} +impl QueryRequest { + pub fn with_query(mut self, query: Value) -> Self { + self.query = query; + self + } +} + +#[derive(Debug, Serialize, Deserialize)] +pub struct QueryResponse { + pub results: Value, + #[serde(skip_serializing_if = "Option::is_none")] + pub query_status: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub task_id: Option, +} + +impl PostHogAPIClient { + /// Execute a query against the PostHog Query API + pub async fn query( + &self, + project_id: &str, + request: QueryRequest, + ) -> Result { + let endpoint = format!("/api/projects/{}/query", project_id); + self.api_request(Method::POST, &endpoint, Some(&request)) + .await + } + + /// Get the status or result of a previously executed query + pub async fn get_query_status( + &self, + project_id: &str, + query_id: &str, + ) -> Result { + let endpoint = format!("/api/projects/{}/query/{}", project_id, query_id); + self.api_request(Method::GET, &endpoint, None::<&()>).await + } + + /// Cancel an ongoing query + pub async fn cancel_query( + &self, + project_id: &str, + query_id: &str, + ) -> Result<(), PostHogApiError> { + let endpoint = format!("/api/projects/{}/query/{}", project_id, query_id); + self.api_request_no_response_content(Method::DELETE, &endpoint, None::<&()>) + .await + } + + /// Check authorization for executing asynchronous queries + pub async fn check_async_query_auth(&self, project_id: &str) -> Result<(), PostHogApiError> { + let endpoint = format!("/api/projects/{}/query/check_auth_for_async", project_id); + self.api_request_no_response_content(Method::POST, &endpoint, None::<&()>) + .await + } +} + +#[cfg(test)] +mod tests { + use serde_json::json; + + use super::*; + + fn client() -> PostHogAPIClient { + dotenvy::dotenv().unwrap(); + + let api_key = std::env::var("POSTHOG_API_KEY").unwrap(); + let base_url = std::env::var("POSTHOG_API_URL").unwrap(); + + PostHogAPIClient::new(api_key, base_url).unwrap() + } + + #[tokio::test] + async fn test_query() { + let client = client(); + let request = QueryRequest::default() + .with_query(json!({ + "kind": "HogQLQuery", + "query": "select `distinct_id` from person_distinct_ids" + })); + + let project_id = std::env::var("POSTHOG_PROJECT_ID").unwrap(); + + let response = client.query(&project_id, request).await; + println!("{:#?}", response); + + assert!(response.is_ok()); + } +} diff --git a/posthog-rs/src/error.rs b/posthog-rs/src/error.rs new file mode 100644 index 0000000..0ae94e9 --- /dev/null +++ b/posthog-rs/src/error.rs @@ -0,0 +1,38 @@ +use std::fmt::Display; + +use reqwest::StatusCode; +use serde::{Deserialize, Serialize}; +use thiserror::Error; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PostHogServerError { + pub r#type: String, + pub code: String, + pub detail: String, + pub attr: serde_json::Value, +} + +impl Display for PostHogServerError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "type: {}, code: {}, detail: {}, attr: {:?}", self.r#type, self.code, self.detail, self.attr) + } +} + +#[derive(Error, Debug)] +pub enum PostHogApiError { + #[error("Request failed: {0}")] + HttpClientError(#[from] reqwest::Error), + #[error("JSON serialization failed: {0}")] + JsonError(#[from] serde_json::Error), + #[error("API returned error status: {0}: {1}")] + ResponseError(StatusCode, PostHogServerError), + + #[error("Request compression failed: {0}")] + RequestCompressionError(#[from] std::io::Error), + + // ! Feature flag specific errors + #[error("Feature flag not found: {0}")] + FeatureFlagNotFound(String), + #[error("Feature flag not enabled: {0}")] + FeatureFlagNotEnabled(String), +} \ No newline at end of file diff --git a/posthog-rs/src/lib.rs b/posthog-rs/src/lib.rs new file mode 100644 index 0000000..a0dc338 --- /dev/null +++ b/posthog-rs/src/lib.rs @@ -0,0 +1,7 @@ +#[cfg(feature = "sdk")] +pub mod sdk; + +#[cfg(feature = "api")] +pub mod api; + +mod error; diff --git a/posthog-rs/src/sdk/capture.rs b/posthog-rs/src/sdk/capture.rs new file mode 100644 index 0000000..41b624b --- /dev/null +++ b/posthog-rs/src/sdk/capture.rs @@ -0,0 +1,201 @@ +use super::client::PostHogSDKClient; +use super::PostHogApiError; +use reqwest::Method; +use serde::{Deserialize, Serialize}; +use serde_json::{json, Value}; + +/// Response from the /capture/ endpoint. +/// +/// Contains the status of the capture operation. A successful capture returns status 1, +/// while a failed capture will return a different status code along with an error message +/// in the ResponseError. +#[derive(Debug, Serialize, Deserialize)] +pub struct CaptureResponse { + pub status: i32, +} + +/// Response from the /batch/ endpoint for batch event capture. +/// +/// Contains the status of the batch capture operation as a string. +/// A successful batch capture typically returns status "ok". +#[derive(Debug, Serialize, Deserialize)] +pub struct CaptureBatchResponse { + pub status: String, +} + +impl PostHogSDKClient { + /// Captures an event in PostHog. + /// + /// This method sends event data to PostHog's /capture/ endpoint. The event data can include + /// user identification, properties, and other metadata. + /// + /// # Arguments + /// * `req` - A JSON Value containing the event data to capture + /// + /// # Returns + /// Returns a Result containing the CaptureResponse or an error + /// + /// # Example + /// ```rust + /// # async fn example() -> anyhow::Result<()> { + /// use serde_json::json; + /// + /// let client = posthog_rs::sdk::PostHogSDKClient::new( + /// "your-api-key".to_string(), + /// "your-public-key".to_string(), + /// "https://app.posthog.com".to_string(), + /// )?; + /// + /// // You may also use the Event Builder to create the event data: + /// let event = json!({ + /// "event": "user.signed_up", + /// "distinct_id": "user-123", + /// "properties": { + /// "plan": "premium", + /// "source": "website" + /// } + /// }); + /// + /// let response = client.capture(event).await?; + /// assert_eq!(response.status, 1); + /// # Ok(()) + /// # } + /// ``` + pub async fn capture(&self, mut req: Value) -> Result { + req["api_key"] = self.public_key.clone().into(); + let (status, res) = self + .api_request(Method::POST, "/capture/", Some(req), true) + .await?; + + if !status.is_success() { + let res = serde_json::from_value(res)?; + return Err(PostHogApiError::ResponseError(status, res)); + } + + let res = serde_json::from_value(res)?; + + Ok(res) + } + + /// Captures multiple events in PostHog in a single batch request. + /// + /// This method sends multiple events to PostHog's /batch/ endpoint. This is more efficient + /// than sending events individually when you need to capture many events at once. + /// + /// # Arguments + /// * `historical_migration` - If true, events will be processed as historical data + /// * `events` - A vector of JSON Values containing the event data to capture + /// + /// # Returns + /// Returns a Result containing the CaptureBatchResponse or an error + /// + /// # Example + /// ```rust + /// # async fn example() -> anyhow::Result<()> { + /// use serde_json::json; + /// + /// let client = posthog_rs::sdk::PostHogSDKClient::new( + /// "your-api-key".to_string(), + /// "your-public-key".to_string(), + /// "https://app.posthog.com".to_string(), + /// )?; + /// + /// let events = vec![ + /// json!({ + /// "event": "user.signed_up", + /// "distinct_id": "user-123", + /// "properties": { "plan": "premium" } + /// }), + /// json!({ + /// "event": "dashboard.viewed", + /// "distinct_id": "user-123", + /// "properties": { "dashboard_id": "123" } + /// }) + /// ]; + /// + /// let response = client.capture_batch(false, events).await?; + /// assert_eq!(response.status, "ok"); + /// # Ok(()) + /// # } + /// ``` + pub async fn capture_batch( + &self, + historical_migration: bool, + events: Vec, + ) -> Result { + let req = json!({ + "api_key": self.public_key.clone(), + "historical_migration": historical_migration, + "batch": events + }); + + let (status, res) = self + .api_request(Method::POST, "/batch/", Some(req), true) + .await?; + + if !status.is_success() { + let res = serde_json::from_value(res)?; + return Err(PostHogApiError::ResponseError(status, res)); + } + + let res = serde_json::from_value(res)?; + + Ok(res) + } +} + +#[cfg(test)] +mod tests { + use serde_json::json; + + use crate::sdk::models::event::EventBuilder; + + use super::*; + + #[tokio::test] + async fn test_capture() -> anyhow::Result<()> { + let _ = tracing_subscriber::fmt() + .with_max_level(tracing::Level::DEBUG) + .compact() + .try_init(); + dotenvy::dotenv()?; + let public_key = std::env::var("POSTHOG_PUBLIC_KEY").unwrap(); + let base_url = std::env::var("POSTHOG_BASE_URL").unwrap(); + + let client = PostHogSDKClient::new(public_key, base_url)?; + + let req = EventBuilder::new("test") + .distinct_id("user123".to_string()) + .properties(json!({"key": "value"})) + .timestamp_now() + .build(); + let res = client.capture(req).await.unwrap(); + + assert_eq!(res.status, 1); + Ok(()) + } + + #[tokio::test] + pub async fn test_capture_batch() -> anyhow::Result<()> { + let _ = tracing_subscriber::fmt() + .with_max_level(tracing::Level::DEBUG) + .compact() + .try_init(); + dotenvy::dotenv()?; + let public_key = std::env::var("POSTHOG_PUBLIC_KEY").unwrap(); + let base_url = std::env::var("POSTHOG_BASE_URL").unwrap(); + + let client = PostHogSDKClient::new(public_key, base_url)?; + let req = EventBuilder::new("test") + .distinct_id("user123".to_string()) + .properties(json!({"key": "value"})) + .timestamp_now() + .build(); + let res = client.capture_batch(false, vec![req.clone(), req]).await; + println!("{:?}", res); + assert!(res.is_ok()); + + assert_eq!(res.unwrap().status, "Ok".to_string()); + Ok(()) + } +} diff --git a/posthog-rs/src/sdk/client.rs b/posthog-rs/src/sdk/client.rs new file mode 100644 index 0000000..a22b3b6 --- /dev/null +++ b/posthog-rs/src/sdk/client.rs @@ -0,0 +1,180 @@ +use crate::error::PostHogServerError; +use std::iter::FromIterator; + +use super::PostHogApiError; + +use anyhow::Context; +use reqwest::{ + header::{self, HeaderMap}, + Client, Method, StatusCode, +}; +use serde_json::Value; +use tokio::io::AsyncWriteExt; +use tracing::debug; + +/// PostHog API client for interacting with the PostHog analytics service. +/// +/// This client provides methods to send analytics events and interact with various PostHog features. +/// It handles authentication, request formatting, and error handling for the PostHog API. +/// +/// # Fields +/// * `client` - The underlying HTTP client used for making requests +/// * `public_key` - The PostHog public key used for client-side features +/// * `base_url` - The base URL of the PostHog API +pub struct PostHogSDKClient { + pub client: Client, + pub public_key: String, + pub base_url: String, +} + +impl PostHogSDKClient { + /// Creates a new PostHog client with default configuration. + /// + /// # Arguments + /// * `public_key` - The PostHog public key for client-side features + /// * `base_url` - The base URL of the PostHog API + /// + /// # Returns + /// Returns a Result containing the configured PostHogClient or an error if initialization fails + /// + /// # Errors + /// * If the API key is invalid for header creation + /// * If the HTTP client creation fails + pub fn new(public_key: String, base_url: String) -> anyhow::Result { + let headers = HeaderMap::from_iter([( + reqwest::header::CONTENT_TYPE, + header::HeaderValue::from_static("application/json"), + )]); + + let client = Client::builder() + .default_headers(headers) + .build() + .context("Failed to create reqwest client")?; + + Ok(Self { + client, + public_key, + base_url, + }) + } + + /// Creates a new PostHog client with a custom HTTP client. + /// + /// This method allows you to provide your own configured reqwest Client instance, + /// which can be useful for custom configurations like proxies or custom TLS settings. + /// + /// # Arguments + /// * `client` - A pre-configured reqwest Client instance + /// * `public_key` - The PostHog public key for client-side features + /// * `base_url` - The base URL of the PostHog API + /// + /// # Returns + /// Returns a configured PostHogClient instance + pub fn with_client(client: Client, public_key: String, base_url: String) -> Self { + Self { + client, + base_url, + public_key, + } + } + + /// Makes an HTTP request to the PostHog API. + /// + /// This internal method handles the common logic for all API requests, including: + /// - URL construction + /// - Request method and body setup + /// - Error handling and response parsing + /// - Public key injection for client-side endpoints + /// + /// # Arguments + /// * `method` - The HTTP method to use (e.g., "GET", "POST") + /// * `path` - The API endpoint path + /// * `body` - Optional JSON body to send with the request + /// * `requires_public_key` - Whether to inject the public key into the request body + /// + /// # Returns + /// Returns a Result containing a tuple of (StatusCode, JSON Value) or a PostHogError + /// + /// # Errors + /// * `RequestError` - If the HTTP request fails + /// * `JsonError` - If response parsing fails + /// * `ResponseError` - If the API returns an error status code + pub(crate) async fn api_request( + &self, + method: Method, + path: &str, + body: Option, + requires_public_key: bool, + ) -> Result<(StatusCode, serde_json::Value), PostHogApiError> { + let url = format!("{}{}", self.base_url.trim_end_matches('/'), path); + debug!("Sending {} request to {}", method, url); + + let mut request = self.client.request(method, &url); + + if let Some(mut body) = body { + if requires_public_key { + body["api_key"] = self.public_key.clone().into(); + } + + // Encode body to JSON then compress it + let body = serde_json::to_vec(&body)?; + + let mut writer = async_compression::tokio::write::GzipEncoder::new(Vec::::new()); + writer.write_all(body.as_slice()).await?; + writer.shutdown().await?; + + let body = writer.into_inner(); + + request = request + .header("Content-Encoding", "gzip") + .header("Content-Type", "application/json") + .body(body); + } + + let response = request.send().await?; + let status = response.status(); + + if !status.is_success() { + let res = response.bytes().await?; + let res = res.to_vec(); + let res = serde_json::from_slice(&res).unwrap_or(PostHogServerError { + r#type: "unknown".to_string(), + code: "unknown".to_string(), + detail: String::from_utf8_lossy(&res).to_string(), + attr: serde_json::Value::Null, + }); + debug!("Response {}:\n{:?}", status, res); + return Err(PostHogApiError::ResponseError(status, res)); + } + + let response = response.bytes().await?; + + let res = serde_json::from_slice(&response.to_vec())?; + + Ok((status, res)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[tokio::test] + async fn test_compression() -> anyhow::Result<()> { + let input = "helloooooooooooooooooooo o o o o o ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo world!".to_string(); + + let mut writer = async_compression::tokio::write::GzipEncoder::new(Vec::::new()); + writer.write_all(input.as_bytes()).await?; + writer.flush().await?; + + let output = writer.into_inner(); + + let og_size = input.as_bytes().len(); + let compressed_size = output.len(); + + println!("Original Size: {}", og_size); + println!("Compressed Size: {}", compressed_size); + assert!(compressed_size < og_size); + Ok(()) + } +} diff --git a/posthog-rs/src/sdk/decide.rs b/posthog-rs/src/sdk/decide.rs new file mode 100644 index 0000000..8ab10dd --- /dev/null +++ b/posthog-rs/src/sdk/decide.rs @@ -0,0 +1,481 @@ +use reqwest::Method; +use serde::{Deserialize, Serialize}; +use serde_json::Value; +use std::collections::HashMap; +use tracing::debug; + +use super::{PostHogSDKClient, PostHogApiError}; + +/// Builder for constructing requests to the /decide/ endpoint. +/// +/// This builder helps create properly structured requests for feature flag evaluation +/// and targeting. It supports setting user identification, groups, and properties. +/// +/// # Example +/// ```rust +/// use std::collections::HashMap; +/// use serde_json::json; +/// use posthog_rs::sdk::decide::DecideRequestBuilder; +/// +/// let request = DecideRequestBuilder::new("user-123".to_string()) +/// .with_groups([("company".to_string(), json!("acme-corp"))].into()) +/// .with_person_properties([("plan".to_string(), json!("premium"))].into()) +/// .build(); +/// ``` +#[derive(Debug, Serialize)] +pub struct DecideRequestBuilder { + /// The unique identifier for the user + pub distinct_id: String, + /// Optional group mappings for flag targeting + #[serde(skip_serializing_if = "Option::is_none")] + pub groups: Option>, + /// Optional user properties for flag targeting + #[serde(skip_serializing_if = "Option::is_none")] + pub person_properties: Option>, + /// Optional group properties for flag targeting + #[serde(skip_serializing_if = "Option::is_none")] + pub group_properties: Option>>, +} + +impl DecideRequestBuilder { + pub fn new(distinct_id: String) -> Self { + Self { + distinct_id, + groups: None, + person_properties: None, + group_properties: None, + } + } + + pub fn build(self) -> Value { + serde_json::json!(self) + } + + pub fn with_groups(mut self, groups: HashMap) -> Self { + self.groups = Some(groups); + self + } + + pub fn with_person_properties( + mut self, + person_properties: HashMap, + ) -> Self { + self.person_properties = Some(person_properties); + self + } + + pub fn with_group_properties( + mut self, + group_properties: HashMap>, + ) -> Self { + self.group_properties = Some(group_properties); + self + } +} + +/// Response from the /decide/ endpoint containing feature flag states and configurations. +/// +/// This struct contains all feature flag related data including: +/// - Feature flag states (boolean or multi-variant) in the `feature_flags` field +/// - Feature flag payloads (additional configuration data) in the `feature_flag_payloads` field +/// - Toolbar configuration for the PostHog toolbar in the `toolbar_params` field +/// - Configuration settings in the `config` field +/// - Error state indicator in the `errors_while_computing_flags` field +/// +/// # Example Response Structure +/// ```json +/// { +/// "featureFlags": { +/// "my-feature": true, +/// "awesome-multivariant": "var2" +/// }, +/// "featureFlagPayloads": { +/// "awesome-multivariant": "{\"hello\": \"world\"}", +/// "config-example": "{\"version\": \"1\", \"example\": \"hello\"}" +/// }, +/// "config": {}, +/// "toolbarParams": {}, +/// "errorsWhileComputingFlags": false +/// } +/// ``` +#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct DecideResponse { + pub config: Value, + pub toolbar_params: Value, + pub errors_while_computing_flags: bool, + pub is_authenticated: bool, + pub supported_compression: Vec, + pub feature_flags: HashMap, + pub feature_flag_payloads: HashMap, +} + +impl PostHogSDKClient { + /// Fetches feature flag states for a given user from the /decide/ endpoint. + /// + /// This method evaluates feature flags based on the provided request data and returns + /// the current state of all flags for the user, including any associated payloads. + /// The response includes boolean flags, multi-variant flags, and their associated + /// configuration payloads. + /// + /// # Arguments + /// * `request` - A JSON Value containing the decide request data, typically created using `DecideRequestBuilder` + /// + /// # Returns + /// Returns a Result containing the DecideResponse or an error + /// + /// # Example + /// ```rust + /// use std::collections::HashMap; + /// use posthog_rs::sdk::decide::{DecideRequestBuilder, DecideResponse}; + /// + /// # async fn example() -> anyhow::Result<()> { + /// let client = posthog_rs::sdk::PostHogSDKClient::new( + /// "your-api-key".to_string(), + /// "your-public-key".to_string(), + /// "https://app.posthog.com".to_string(), + /// )?; + /// + /// let request = DecideRequestBuilder::new("user123".to_string()) + /// .build(); + /// + /// let response = client.decide(request).await?; + /// println!("Feature flags: {:?}", response.feature_flags); + /// # Ok(()) + /// # } + /// ``` + pub async fn decide(&self, mut request: Value) -> Result { + debug!("Decide Endpoint called"); + // Serialize the request data + request["api_key"] = self.public_key.clone().into(); + + // Construct the query URL with the encoded data + debug!("Sending Decide Request: {:?}", request); + let (_status, response) = self + .api_request( + Method::POST, + format!("/decide/?v=3").as_str(), + Some(request), + false, + ) + .await?; + + debug!("Got Response: {:#?}", response); + // Deserialize the response + let response = serde_json::from_value(response).map_err(PostHogApiError::JsonError)?; + + debug!("Returning response"); + Ok(response) + } + + // ! feature flags helpers + + /// Checks if a specific feature flag is enabled for a user. + /// + /// # Arguments + /// * `request` - The decide request data + /// * `key` - The feature flag key to check + /// + /// # Returns + /// * `Ok(true)` - If the flag exists and is enabled + /// * `Ok(false)` - If the flag exists but is disabled + /// * `Err(PostHogError::FeatureFlagNotFound)` - If the flag doesn't exist + /// + /// # Example + /// ```rust + /// use posthog_rs::sdk::decide::DecideRequestBuilder; + /// # async fn example() -> anyhow::Result<()> { + /// let client = posthog_rs::sdk::PostHogSDKClient::new( + /// "your-api-key".to_string(), + /// "your-public-key".to_string(), + /// "https://app.posthog.com".to_string(), + /// )?; + /// + /// let request = DecideRequestBuilder::new("user123".to_string()).build(); + /// let is_enabled = client.get_feature_flag_enabled(request, "my-feature".to_string()).await?; + /// # Ok(()) + /// # } + /// ``` + pub async fn get_feature_flag_enabled( + &self, + request: Value, + key: String, + ) -> Result { + let res = self.decide(request).await?; + + let Some(feature_flag) = res.feature_flags.get(&key) else { + return Err(PostHogApiError::FeatureFlagNotFound(key)); + }; + + Ok(feature_flag == &Value::Bool(true)) + } + + /// Gets the variant value for a multi-variant feature flag. + /// + /// Multi-variant feature flags can return different values for different users based on + /// the flag's rollout rules. This method fetches the specific variant assigned to the user. + /// Common use cases include A/B testing, gradual rollouts, or serving different configurations + /// to different user segments. + /// + /// # Arguments + /// * `request` - The decide request data + /// * `key` - The feature flag key to check + /// + /// # Returns + /// * `Ok((key, value))` - The flag key and its variant value (e.g., "var1", "var2") + /// * `Err(PostHogError::FeatureFlagNotFound)` - If the flag doesn't exist + /// + /// # Example + /// ```rust + /// use posthog_rs::sdk::decide::DecideRequestBuilder; + /// # async fn example() -> anyhow::Result<()> { + /// let client = posthog_rs::sdk::PostHogSDKClient::new( + /// "your-api-key".to_string(), + /// "your-public-key".to_string(), + /// "https://app.posthog.com".to_string(), + /// )?; + /// + /// let request = DecideRequestBuilder::new("user123".to_string()).build(); + /// let (key, variant) = client.get_feature_flag_multi_variant(request, "awesome-multivariant".to_string()).await?; + /// // variant might be "var1", "var2", etc. + /// # Ok(()) + /// # } + /// ``` + pub async fn get_feature_flag_multi_variant( + &self, + request: Value, + key: String, + ) -> Result<(String, Value), PostHogApiError> { + let res = self.decide(request).await?; + + let payload = res + .feature_flags + .get(&key) + .cloned() + .ok_or(PostHogApiError::FeatureFlagNotFound(key.clone()))?; + + Ok((key, payload)) + } + + /// Gets the payload data associated with a feature flag. + /// + /// # Arguments + /// * `request` - The decide request data + /// * `key` - The feature flag key to get the payload for + /// + /// # Returns + /// * `Ok(String)` - The payload data as a JSON string + /// * `Err(PostHogError::FeatureFlagNotFound)` - If the flag doesn't exist + /// * `Err(PostHogError::FeatureFlagNotEnabled)` - If the flag exists but is disabled + /// + /// # Example + /// ```rust + /// # async fn example() -> anyhow::Result<()> { + /// use posthog_rs::sdk::decide::DecideRequestBuilder; + /// let client = posthog_rs::sdk::PostHogSDKClient::new( + /// "your-api-key".to_string(), + /// "your-public-key".to_string(), + /// "https://app.posthog.com".to_string(), + /// )?; + /// + /// let request = DecideRequestBuilder::new("user123".to_string()).build(); + /// let payload = client.get_feature_flag_payload(request, "config-example".to_string()).await?; + /// let payload_json: serde_json::Value = serde_json::from_str(&payload)?; + /// // Access payload data: payload_json["version"], payload_json["example"], etc. + /// # Ok(()) + /// # } + /// ``` + pub async fn get_feature_flag_payload( + &self, + request: Value, + key: String, + ) -> Result { + let res = self.decide(request).await?; + + let enabled = res + .feature_flags + .get(&key) + .cloned() + .ok_or(PostHogApiError::FeatureFlagNotFound(key.clone()))?; + + if enabled == Value::Bool(false) { + return Err(PostHogApiError::FeatureFlagNotEnabled(key.clone())); + } + + let payload = res + .feature_flag_payloads + .get(&key) + .cloned() + .ok_or(PostHogApiError::FeatureFlagNotFound(key.clone()))?; + + Ok(payload) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use serde_json::json; + use std::{collections::HashMap, iter::FromIterator}; + + fn client() -> PostHogSDKClient { + let _ = tracing_subscriber::fmt() + .with_max_level(tracing::Level::DEBUG) + .compact() + .try_init() + .ok(); + dotenvy::dotenv().ok(); + + let endpoint = std::env::var("POSTHOG_BASE_URL").unwrap(); + let public_key = std::env::var("POSTHOG_PUBLIC_KEY").unwrap(); + + let client = PostHogSDKClient::new(public_key, endpoint).unwrap(); + + client + } + + #[tokio::test] + async fn test_decide_basic_request() { + let client = client(); + + let request = DecideRequestBuilder::new("test-user-123".to_string()).build(); + + let response = client.decide(request).await.unwrap(); + + assert_eq!(response.feature_flags.len(), 3); + assert!(response + .feature_flags + .contains_key(&"config-example".to_string())); + assert!(response + .feature_flags + .contains_key(&"awesome-multivariant".to_string())); + assert!(response + .feature_flags + .contains_key(&"my-feature".to_string())); + assert!(!response.errors_while_computing_flags); + assert_eq!(response.feature_flag_payloads.len(), 2); + } + + #[tokio::test] + async fn test_decide_with_groups() { + let client = client(); + + let mut groups = HashMap::new(); + groups.insert("company".to_string(), "acme-corp".to_string().into()); + + let request = DecideRequestBuilder::new("test-user-123".to_string()) + .with_groups(groups) + .build(); + + let response = client.decide(request).await.unwrap(); + assert!(!response.errors_while_computing_flags); + } + + #[tokio::test] + async fn test_decide_with_properties() { + let client = client(); + + let mut person_props = HashMap::new(); + person_props.insert("email".to_string(), json!("test@example.com")); + person_props.insert("plan".to_string(), json!("premium")); + + let mut group_props = HashMap::new(); + let mut company_props = HashMap::new(); + company_props.insert("name".to_string(), json!("Acme Corp")); + group_props.insert("company".to_string(), company_props); + + let request = DecideRequestBuilder::new("test-user-123".to_string()) + .with_groups(HashMap::from_iter([( + "company".to_string(), + "acme-corp-id".to_string().into(), + )])) + .with_person_properties(person_props) + .with_group_properties(group_props) + .build(); + + let response = client.decide(request).await.unwrap(); + assert!(!response.errors_while_computing_flags); + } + + #[tokio::test] + async fn test_decide_error_response() { + let client = client(); + let result = client.decide(json!({"bad": "request"})).await; + assert!(result.is_err()); + } + + #[tokio::test] + async fn test_get_feature_flag_enabled() { + let client = client(); + let request = DecideRequestBuilder::new("test-user-123".to_string()).build(); + + // Test enabled flag + let enabled = client + .get_feature_flag_enabled(request.clone(), "my-feature".to_string()) + .await + .unwrap(); + assert!(enabled); + + // Test non-existent flag + let result = client + .get_feature_flag_enabled(request.clone(), "non-existent".to_string()) + .await; + assert!(matches!(result, Err(PostHogApiError::FeatureFlagNotFound(_)))); + } + + #[tokio::test] + async fn test_get_feature_flag_multi_variant() { + let client = client(); + let request = DecideRequestBuilder::new("test-user-123".to_string()).build(); + + // Test multi-variant flag + let (key, variant) = client + .get_feature_flag_multi_variant(request.clone(), "awesome-multivariant".to_string()) + .await + .unwrap(); + assert_eq!(key, "awesome-multivariant"); + assert_eq!(variant, Value::String("var2".to_string())); + + // Test non-existent flag + let result = client + .get_feature_flag_multi_variant(request.clone(), "non-existent".to_string()) + .await; + assert!(matches!(result, Err(PostHogApiError::FeatureFlagNotFound(_)))); + } + + #[tokio::test] + async fn test_get_feature_flag_payload() { + let client = client(); + let request = DecideRequestBuilder::new("test-user-123".to_string()).build(); + + // Test config flag payload + let payload = client + .get_feature_flag_payload(request.clone(), "config-example".to_string()) + .await + .unwrap(); + let payload_json: Value = serde_json::from_str(&payload).unwrap(); + assert_eq!(payload_json["version"], "1"); + assert_eq!(payload_json["example"], "hello"); + + // Test multi-variant flag payload + let payload = client + .get_feature_flag_payload(request.clone(), "awesome-multivariant".to_string()) + .await + .unwrap(); + let payload_json: Value = serde_json::from_str(&payload).unwrap(); + assert_eq!(payload_json["hello"], "world"); + + // Test non-existent flag + let result = client + .get_feature_flag_payload(request.clone(), "non-existent".to_string()) + .await; + assert!(matches!(result, Err(PostHogApiError::FeatureFlagNotFound(_)))); + + // Test disabled flag + let request = DecideRequestBuilder::new("test-user-with-disabled-flag".to_string()).build(); + let result = client + .get_feature_flag_payload(request, "disabled-flag".to_string()) + .await; + assert!(matches!(result, Err(PostHogApiError::FeatureFlagNotFound(_)))); + } +} diff --git a/posthog-rs/src/sdk/mod.rs b/posthog-rs/src/sdk/mod.rs new file mode 100644 index 0000000..120dff2 --- /dev/null +++ b/posthog-rs/src/sdk/mod.rs @@ -0,0 +1,14 @@ +pub mod capture; +pub mod decide; + +pub mod client; +pub mod models; + +#[cfg(feature = "service")] +pub mod service; + +#[cfg(feature = "service")] +pub use service::PostHogServiceActor; + +pub use client::PostHogSDKClient; +pub use super::error::PostHogApiError; \ No newline at end of file diff --git a/posthog-rs/src/sdk/models/event.rs b/posthog-rs/src/sdk/models/event.rs new file mode 100644 index 0000000..3f1f184 --- /dev/null +++ b/posthog-rs/src/sdk/models/event.rs @@ -0,0 +1,173 @@ +use chrono::Utc; +use serde::{Deserialize, Serialize}; +use serde_json::{json, Value}; + +#[derive(Debug, Default, Serialize, Deserialize)] +pub struct EventBuilder { + properties: Value, + event: String, + distinct_id: Option, + timestamp: Option, +} + +impl EventBuilder { + // ! Base Properties + pub fn new(name: &str) -> Self { + Self { + event: name.to_string(), + properties: json!({}), + ..Default::default() + } + } + + pub fn distinct_id(mut self, distinct_id: String) -> Self { + self.distinct_id = Some(distinct_id); + self + } + + pub fn timestamp(mut self, timestamp: String) -> Self { + self.timestamp = Some(timestamp); + self + } + + pub fn timestamp_now(mut self) -> Self { + self.timestamp = Some(Utc::now().to_rfc3339()); + self + } + + /// Sets event properties, this will overwrite any existing properties + /// Call it first + pub fn properties(mut self, properties: Value) -> Self { + self.properties = properties; + self + } + + // ! Build + pub fn build(self) -> Value { + json!(self) + } + + // ! Optional Fields + /// Anonymous event capture + pub fn anonymous(mut self, anonymous: bool) -> Self { + self.properties["$process_person_profile"] = (!anonymous).into(); + self + } + + /// Alias + pub fn alias(mut self, alias: String) -> Self { + self.properties["alias"] = alias.into(); + self + } + /// Group identify + pub fn group_identify( + mut self, + group_type: String, + group_key: String, + group_set: Value, + ) -> Self { + self.properties["$group_type"] = group_type.into(); + self.properties["$group_key"] = group_key.into(); + self.properties["$group_set"] = group_set; + + self + } + + /// Groups + pub fn groups(mut self, groups: Value) -> Self { + self.properties["$groups"] = groups; + self + } + + // ! Special Events + + /// Identify, Refer to https://posthog.com/docs/api/capture#identify + pub fn identify_event(distinct_id: String, values: Value) -> Value { + EventBuilder::new("$identify") + .properties(values) + .distinct_id(distinct_id) + .timestamp_now() + .build() + } + + /// Pageview, Refer to https://posthog.com/docs/api/capture#pageview + pub fn pageview_event( + distinct_id: String, + url: String, + values: impl Into>, + ) -> Value { + let mut values = match values.into() { + Some(values) => values, + None => json!({}), + }; + values["$current_url"] = url.into(); + + EventBuilder::new("$pageview") + .properties(values) + .distinct_id(distinct_id) + .timestamp_now() + .build() + } + + /// Screen view, Refer to https://posthog.com/docs/api/capture#screen + pub fn screen_view_event( + distinct_id: String, + name: String, + values: impl Into>, + ) -> Value { + let mut values = match values.into() { + Some(values) => values, + None => json!({}), + }; + values["$screen_name"] = name.into(); + + EventBuilder::new("$screen") + .properties(values) + .distinct_id(distinct_id) + .timestamp_now() + .build() + } + + /// Survey, Refer to https://posthog.com/docs/api/capture#survey + pub fn survey_event( + distinct_id: String, + survey_id: String, + survey_response: String, + values: impl Into>, + ) -> Value { + let mut values = match values.into() { + Some(values) => values, + None => json!({}), + }; + + values["$survey_id"] = survey_id.into(); + values["$survey_response"] = survey_response.into(); + + EventBuilder::new("$survey") + .distinct_id(distinct_id) + .properties(values) + .timestamp_now() + .build() + } + + /// Feature Flag Called + pub fn feature_flag_called_event( + distinct_id: String, + feature_flag: String, + feature_flag_response: String, + values: impl Into>, + ) -> Value { + let mut values = match values.into() { + Some(values) => values, + None => json!({}), + }; + values["$feature_flag"] = feature_flag.into(); + values["$feature_flag_response"] = feature_flag_response.into(); + + EventBuilder::new("$feature_flag_called") + .distinct_id(distinct_id) + .properties(values) + .timestamp_now() + .build() + } +} diff --git a/posthog-rs/src/sdk/models/event_test.rs b/posthog-rs/src/sdk/models/event_test.rs new file mode 100644 index 0000000..f635be5 --- /dev/null +++ b/posthog-rs/src/sdk/models/event_test.rs @@ -0,0 +1,178 @@ +use super::event::EventBuilder; + +use chrono::Utc; +use serde_json::json; + +#[test] +fn test_custom_event_builder() { + let event = EventBuilder::new("custom_event") + .distinct_id("user123".to_string()) + .timestamp_now() + .properties(json!({"custom_prop": "value"})) + .build(); + + let event_obj = event.as_object().unwrap(); + assert_eq!(event_obj["event"], "custom_event"); + assert_eq!(event_obj["distinct_id"], "user123"); + assert!(event_obj["timestamp"] + .as_str() + .unwrap() + .starts_with(&Utc::now().date_naive().to_string())); + assert_eq!(event_obj["properties"]["custom_prop"], "value"); +} + +#[test] +fn test_anonymous_event() { + let event = EventBuilder::new("anon_event").anonymous(true).build(); + + let event_obj = event.as_object().unwrap(); + assert_eq!(event_obj["properties"]["$process_person_profile"], false); +} + +#[test] +fn test_group_identify_event() { + let event = EventBuilder::new("group_event") + .group_identify( + "company".to_string(), + "company_123".to_string(), + json!({"name": "Acme Inc"}), + ) + .build(); + + let event_obj = event.as_object().unwrap(); + assert_eq!(event_obj["properties"]["$group_type"], "company"); + assert_eq!(event_obj["properties"]["$group_key"], "company_123"); + assert_eq!(event_obj["properties"]["$group_set"]["name"], "Acme Inc"); +} + +#[test] +fn test_identify_event() { + let values = json!({ + "email": "test@example.com", + "name": "Test User" + }); + let event = EventBuilder::identify_event("user123".to_string(), values); + + let event_obj = event.as_object().unwrap(); + assert_eq!(event_obj["event"], "$identify"); + assert_eq!(event_obj["distinct_id"], "user123"); + assert_eq!(event_obj["properties"]["email"], "test@example.com"); + assert_eq!(event_obj["properties"]["name"], "Test User"); +} + +#[test] +fn test_pageview_event() { + let values = json!({ + "referrer": "https://example.com" + }); + let event = EventBuilder::pageview_event( + "user123".to_string(), + "https://app.example.com/dashboard".to_string(), + Some(values), + ); + + let event_obj = event.as_object().unwrap(); + assert_eq!(event_obj["event"], "$pageview"); + assert_eq!(event_obj["distinct_id"], "user123"); + assert_eq!( + event_obj["properties"]["$current_url"], + "https://app.example.com/dashboard" + ); + assert_eq!(event_obj["properties"]["referrer"], "https://example.com"); +} + +#[test] +fn test_screen_view_event() { + let values = json!({ + "app_version": "1.0.0" + }); + let event = + EventBuilder::screen_view_event("user123".to_string(), "Dashboard".to_string(), Some(values)); + + let event_obj = event.as_object().unwrap(); + assert_eq!(event_obj["event"], "$screen"); + assert_eq!(event_obj["distinct_id"], "user123"); + assert_eq!(event_obj["properties"]["$screen_name"], "Dashboard"); + assert_eq!(event_obj["properties"]["app_version"], "1.0.0"); +} + +#[test] +fn test_survey_event() { + let values = json!({ + "user_type": "premium" + }); + let event = EventBuilder::survey_event( + "user123".to_string(), + "survey_456".to_string(), + "Great service!".to_string(), + Some(values), + ); + + let event_obj = event.as_object().unwrap(); + assert_eq!(event_obj["event"], "$survey"); + assert_eq!(event_obj["distinct_id"], "user123"); + assert_eq!(event_obj["properties"]["$survey_id"], "survey_456"); + assert_eq!( + event_obj["properties"]["$survey_response"], + "Great service!" + ); + assert_eq!(event_obj["properties"]["user_type"], "premium"); +} + +#[test] +fn test_event_builder_failure_cases() { + // Test missing required fields + let event = EventBuilder::new("").build(); + assert_eq!(event["event"], ""); + assert!(event["distinct_id"].is_null()); + + // Test invalid properties + let event = EventBuilder::new("test").properties(json!(null)).build(); + assert_eq!(event["properties"], json!(null)); + + // Test invalid timestamp format + let event = EventBuilder::new("test") + .timestamp("invalid-timestamp".to_string()) + .build(); + assert_eq!(event["timestamp"], "invalid-timestamp"); +} + +#[test] +fn test_standard_events_failure_cases() { + // Test identify with empty values + let event = EventBuilder::identify_event("user123".to_string(), json!({})); + assert!(event["properties"].as_object().unwrap().is_empty()); + + // Test pageview with empty URL + let event = EventBuilder::pageview_event("user123".to_string(), "".to_string(), None); + assert_eq!(event["properties"]["$current_url"], ""); + + // Test screen view with empty name + let event = EventBuilder::screen_view_event("user123".to_string(), "".to_string(), None); + assert_eq!(event["properties"]["$screen_name"], ""); + + // Test survey with empty response + let event = EventBuilder::survey_event( + "user123".to_string(), + "survey_123".to_string(), + "".to_string(), + None, + ); + assert_eq!(event["properties"]["$survey_response"], ""); +} + +#[test] +fn test_feature_flag_called_event() { + let event = EventBuilder::feature_flag_called_event( + "user123".to_string(), + "feature_flag_key".to_string(), + "variant_name".to_string(), + None, + ); + assert_eq!(event["event"], "$feature_flag_called"); + assert_eq!(event["distinct_id"], "user123"); + assert_eq!( + event["properties"], + json!({ "$feature_flag": "feature_flag_key", "$feature_flag_response": "variant_name" }) + ); +} diff --git a/posthog-rs/src/sdk/models/mod.rs b/posthog-rs/src/sdk/models/mod.rs new file mode 100644 index 0000000..7cb6be6 --- /dev/null +++ b/posthog-rs/src/sdk/models/mod.rs @@ -0,0 +1,4 @@ +pub mod event; + +#[cfg(test)] +mod event_test; \ No newline at end of file diff --git a/posthog-rs/src/sdk/service.rs b/posthog-rs/src/sdk/service.rs new file mode 100644 index 0000000..ac96c1f --- /dev/null +++ b/posthog-rs/src/sdk/service.rs @@ -0,0 +1,270 @@ +use crate::sdk::PostHogSDKClient; +use serde_json::Value; +use std::time::Duration; +use tokio::sync::mpsc::{self, Sender}; +use tracing::debug; + +pub type PostHogServiceSender = Sender; + +/// Messages that can be sent to the PostHog service actor. +/// +/// This enum represents the different types of messages that can be processed by the PostHog service: +/// - `Exit`: Signals the service to shut down gracefully +/// - `Capture`: Contains event data to be sent to PostHog +/// - `CaptureMultiple`: Contains a vector of events to be sent to PostHog +#[derive(Debug)] +pub enum PostHogServiceMessage { + Exit, + Capture(Value), + CaptureMultiple(Vec), +} + +/// An actor that manages batching and sending events to PostHog. +/// +/// The service actor maintains a queue of events and periodically sends them in batches to PostHog. +/// It can be configured with custom batch sizes and intervals, and supports historical data migration. +pub struct PostHogServiceActor { + receiver: Option>, + client: PostHogSDKClient, + captures: Vec, + batch_size: usize, + historical_migration: bool, + duration: Duration, + + #[cfg(test)] + pub error_count: usize, +} + +impl PostHogServiceActor { + /// Creates a new PostHog service actor with default configuration. + /// + /// # Arguments + /// * `client` - The PostHog SDK client used to send events + /// + /// # Default Configuration + /// * Batch size: 1,000 events + /// * Flush interval: 5 seconds + /// * Historical migration: disabled + pub fn new(client: PostHogSDKClient) -> Self { + Self { + client, + receiver: None, + captures: Vec::new(), + batch_size: 1_000, + duration: Duration::from_secs(5), + historical_migration: false, + #[cfg(test)] + error_count: 0, + } + } + + /// Sets whether the service is processing historical data. + /// + /// # Arguments + /// * `historical_migration` - If true, events will be marked as historical data + /// + /// # Returns + /// Returns self for method chaining + pub fn with_historical_migration(mut self, historical_migration: bool) -> Self { + self.historical_migration = historical_migration; + self + } + + /// Sets the interval duration between batch sends. + /// + /// # Arguments + /// * `duration` - The time interval between batch processing attempts + /// + /// # Returns + /// Returns self for method chaining + pub fn with_duration(mut self, duration: Duration) -> Self { + self.duration = duration; + self + } + + /// Sets the maximum number of events to include in each batch. + /// + /// # Arguments + /// * `batch_size` - Maximum number of events to send in a single batch + /// + /// # Returns + /// Returns self for method chaining + pub fn with_batch_size(mut self, batch_size: usize) -> Self { + self.batch_size = batch_size; + self + } + + /// Starts the PostHog service actor in a new tokio task. + /// + /// This method spawns a new task that processes incoming events and periodically + /// sends them to PostHog in batches. + /// + /// # Returns + /// Returns a channel sender that can be used to send messages to the service + pub async fn start(mut self) -> PostHogServiceSender { + let (sender, new_receiver) = mpsc::channel(1_000); + self.receiver = Some(new_receiver); + + tokio::spawn(async move { + self.run().await; + }); + + sender + } + + /// Sends a batch of events to PostHog. + /// + /// This method handles splitting large batches into smaller ones based on the configured + /// batch size and sends them to PostHog. If an error occurs, it will be logged and + /// propagated to the caller. + /// + /// # Arguments + /// * `batch` - Vector of events to send + /// + /// # Returns + /// Returns Ok(()) on success, or an error if the batch send fails + pub async fn send_batch(&mut self, mut batch: Vec) -> anyhow::Result<()> { + if batch.is_empty() { + return Ok(()); + } + + while !batch.is_empty() { + let batch_size = batch.len().min(self.batch_size); + debug!("Inner batch: ({} items)", batch_size); + + let current_batch = batch.drain(0..batch_size).collect::>(); + + self.client + .capture_batch(self.historical_migration, current_batch) + .await + .map_err(|e| { + eprintln!("Error sending batch capture: {}", e); + #[cfg(test)] + { + self.error_count += 1; + } + + e + })?; + } + + Ok(()) + } + + /// Main event loop for the service actor. + /// + /// This method runs continuously, processing incoming messages and periodically sending + /// batched events to PostHog. It handles: + /// - Regular batch sending on configured intervals + /// - Processing incoming capture events + /// - Graceful shutdown on Exit message or channel close + async fn run(mut self) { + let mut interval = tokio::time::interval(self.duration); + + let mut receiver = self.receiver.take().unwrap(); + + loop { + tokio::select! { + _ = interval.tick() => { + if !self.captures.is_empty() { + debug!("Sending Batch: {}", self.captures.len()); + // Clone the captures for sending and clear the vector + let batch = self.captures.drain(..).collect::>(); + + // Send batch to PostHog + if let Err(e) = self.send_batch(batch.clone()).await { + eprintln!("Error sending batch capture: {}", e); + // On error, add the events back to the queue + self.captures.extend(batch); + } + } + } + msg = receiver.recv() => { + match msg { + Some(PostHogServiceMessage::Exit) => { + // Handle any remaining captures before exiting + if !self.captures.is_empty() { + if let Err(e) = self.send_batch(self.captures.clone()).await { + eprintln!("Error sending final batch capture: {}", e); + } + } + break; + } + Some(PostHogServiceMessage::Capture(event)) => { + self.captures.push(event); + } + Some(PostHogServiceMessage::CaptureMultiple(events)) => { + self.captures.extend(events); + } + None => break, // Channel Closed + } + } + } + } + } + + pub async fn close(&mut self) -> anyhow::Result<()> { + let batch = self.captures.drain(..).collect::>(); + + self.send_batch(batch).await?; + + Ok(()) + } +} + +// impl Drop for PostHogServiceActor { +// fn drop(&mut self) { +// tracing::debug!("Stopping PostHog Service Actor"); +// // ensure the service has time to process any remaining events +// tokio::task::spawn_local(self.close()); +// thread::sleep(Duration::from_secs(8)); +// tracing::debug!("Stopped PostHog Service Actor"); +// } +// } + +#[cfg(test)] +mod tests { + use serde_json::json; + + use crate::sdk::models::event::EventBuilder; + + use super::*; + + fn service() -> PostHogServiceActor { + dotenvy::dotenv().ok(); + let public_key = std::env::var("POSTHOG_PUBLIC_KEY").unwrap(); + let base_url = std::env::var("POSTHOG_BASE_URL").unwrap(); + + let client = PostHogSDKClient::new(public_key, base_url).unwrap(); + + super::PostHogServiceActor::new(client) + } + + #[tokio::test] + async fn test_capture_batch() -> anyhow::Result<()> { + let items = (0..1000) + .into_iter() + .map(|i| { + EventBuilder::new("capture_multiple") + .distinct_id(format!("u_{}", i)) + .timestamp_now() + .properties(json!({ "key_idx": i })) + .build() + }) + .collect::>(); + + let mut instance = service() + .with_batch_size(500) + .with_duration(Duration::from_secs(1)); + + instance.send_batch(items).await.unwrap(); + + tokio::time::sleep(Duration::from_secs(3)).await; + assert_eq!(instance.error_count, 0); + + Ok(()) + } + + #[tokio::test] + async fn test_capture_batch_too_large() {} +} diff --git a/src/lib.rs b/src/lib.rs deleted file mode 100644 index 41bb4fd..0000000 --- a/src/lib.rs +++ /dev/null @@ -1,230 +0,0 @@ -use chrono::NaiveDateTime; -use reqwest::blocking::Client as HttpClient; -use reqwest::header::CONTENT_TYPE; -use semver::Version; -use serde::Serialize; -use std::collections::HashMap; -use std::fmt::{Display, Formatter}; -use std::time::Duration; - -extern crate serde_json; - -const API_ENDPOINT: &str = "https://us.i.posthog.com/capture/"; -const TIMEOUT: &Duration = &Duration::from_millis(800); // This should be specified by the user - -pub fn client>(options: C) -> Client { - let client = HttpClient::builder() - .timeout(Some(*TIMEOUT)) - .build() - .unwrap(); // Unwrap here is as safe as `HttpClient::new` - Client { - options: options.into(), - client, - } -} - -impl Display for Error { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - match self { - Error::Connection(msg) => write!(f, "Connection Error: {}", msg), - Error::Serialization(msg) => write!(f, "Serialization Error: {}", msg), - } - } -} - -impl std::error::Error for Error {} - -#[derive(Debug)] -pub enum Error { - Connection(String), - Serialization(String), -} - -pub struct ClientOptions { - api_endpoint: String, - api_key: String, -} - -impl From<&str> for ClientOptions { - fn from(api_key: &str) -> Self { - ClientOptions { - api_endpoint: API_ENDPOINT.to_string(), - api_key: api_key.to_string(), - } - } -} - -pub struct Client { - options: ClientOptions, - client: HttpClient, -} - -impl Client { - pub fn capture(&self, event: Event) -> Result<(), Error> { - let inner_event = InnerEvent::new(event, self.options.api_key.clone()); - let _res = self - .client - .post(self.options.api_endpoint.clone()) - .header(CONTENT_TYPE, "application/json") - .body(serde_json::to_string(&inner_event).expect("unwrap here is safe")) - .send() - .map_err(|e| Error::Connection(e.to_string()))?; - Ok(()) - } - - pub fn capture_batch(&self, events: Vec) -> Result<(), Error> { - for event in events { - self.capture(event)?; - } - Ok(()) - } -} - -// This exists so that the client doesn't have to specify the API key over and over -#[derive(Serialize)] -struct InnerEvent { - api_key: String, - event: String, - properties: Properties, - timestamp: Option, -} - -impl InnerEvent { - fn new(event: Event, api_key: String) -> Self { - let mut properties = event.properties; - - // Add $lib_name and $lib_version to the properties - properties.props.insert( - "$lib_name".into(), - serde_json::Value::String("posthog-rs".into()), - ); - - let version_str = env!("CARGO_PKG_VERSION"); - properties.props.insert( - "$lib_version".into(), - serde_json::Value::String(version_str.into()), - ); - - if let Ok(version) = version_str.parse::() { - properties.props.insert( - "$lib_version__major".into(), - serde_json::Value::Number(version.major.into()), - ); - properties.props.insert( - "$lib_version__minor".into(), - serde_json::Value::Number(version.minor.into()), - ); - properties.props.insert( - "$lib_version__patch".into(), - serde_json::Value::Number(version.patch.into()), - ); - } - - Self { - api_key, - event: event.event, - properties, - timestamp: event.timestamp, - } - } -} - -#[derive(Serialize, Debug, PartialEq, Eq)] -pub struct Event { - event: String, - properties: Properties, - timestamp: Option, -} - -#[derive(Serialize, Debug, PartialEq, Eq)] -pub struct Properties { - distinct_id: String, - props: HashMap, -} - -impl Properties { - fn new>(distinct_id: S) -> Self { - Self { - distinct_id: distinct_id.into(), - props: Default::default(), - } - } -} - -impl Event { - pub fn new>(event: S, distinct_id: S) -> Self { - Self { - event: event.into(), - properties: Properties::new(distinct_id), - timestamp: None, - } - } - - /// Errors if `prop` fails to serialize - pub fn insert_prop, P: Serialize>( - &mut self, - key: K, - prop: P, - ) -> Result<(), Error> { - let as_json = - serde_json::to_value(prop).map_err(|e| Error::Serialization(e.to_string()))?; - let _ = self.properties.props.insert(key.into(), as_json); - Ok(()) - } -} - -#[cfg(test)] -mod test_setup { - use ctor::ctor; - use dotenv::dotenv; - - #[ctor] - fn load_dotenv() { - dotenv().ok(); // Load the .env file - println!("Loaded .env for tests"); - } -} - -#[cfg(test)] -pub mod tests { - use super::*; - - // see https://us.posthog.com/project/115809/ for the e2e project - - #[test] - fn inner_event_adds_lib_properties_correctly() { - // Arrange - let mut event = Event::new("unit test event", "1234"); - event.insert_prop("key1", "value1").unwrap(); - let api_key = "test_api_key".to_string(); - - // Act - let inner_event = InnerEvent::new(event, api_key); - - // Assert - let props = &inner_event.properties.props; - assert_eq!( - props.get("$lib_name"), - Some(&serde_json::Value::String("posthog-rs".to_string())) - ); - } - - #[cfg(feature = "e2e-test")] - #[test] - fn get_client() { - use std::collections::HashMap; - - let api_key = std::env::var("POSTHOG_RS_E2E_TEST_API_KEY").unwrap(); - let client = crate::client(api_key.as_str()); - - let mut child_map = HashMap::new(); - child_map.insert("child_key1", "child_value1"); - - let mut event = Event::new("e2e test event", "1234"); - event.insert_prop("key1", "value1").unwrap(); - event.insert_prop("key2", vec!["a", "b"]).unwrap(); - event.insert_prop("key3", child_map).unwrap(); - - client.capture(event).unwrap(); - } -}