From 1336ec8536d65f3ca0c3958d316be3852e2e1142 Mon Sep 17 00:00:00 2001 From: dylan Date: Fri, 20 Feb 2026 17:04:37 -0800 Subject: [PATCH] update tutorials to use latest flags stuff --- contents/docs/advanced/proxy/nginx.mdx | 6 +++--- contents/docs/advanced/proxy/node.mdx | 4 ++-- contents/docs/advanced/proxy/pomerium.mdx | 2 +- contents/docs/advanced/proxy/proxy-reference.mdx | 2 +- contents/docs/advanced/proxy/railway.mdx | 2 +- contents/tutorials/api-feature-flags.md | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/contents/docs/advanced/proxy/nginx.mdx b/contents/docs/advanced/proxy/nginx.mdx index 2496549f4cae..ecefcc2fce18 100644 --- a/contents/docs/advanced/proxy/nginx.mdx +++ b/contents/docs/advanced/proxy/nginx.mdx @@ -167,7 +167,7 @@ Confirm events are flowing through your proxy: 1. Test the proxy directly with curl: ```bash - curl -I https://e.yourdomain.com/decide?v=3 + curl -I https://e.yourdomain.com/flags?v=2 ``` You should see a `200 OK` response. @@ -299,7 +299,7 @@ Confirm events are flowing through your proxy: 1. Test the proxy directly: ```bash - curl -I http://localhost:8080/decide?v=3 + curl -I http://localhost:8080/flags?v=2 ``` 2. Open your browser's developer tools and go to the **Network** tab @@ -322,7 +322,7 @@ If nginx returns `502 Bad Gateway`, it can't reach PostHog's servers: 1. Verify your server can make HTTPS requests to PostHog domains: ```bash - curl -I https://us.i.posthog.com/decide?v=3 + curl -I https://us.i.posthog.com/flags?v=2 ``` 2. Check that `proxy_ssl_server_name on` is set in your config 3. For Docker, ensure the `resolver` directive is configured diff --git a/contents/docs/advanced/proxy/node.mdx b/contents/docs/advanced/proxy/node.mdx index 2181df8c1d4d..ede457e80be2 100644 --- a/contents/docs/advanced/proxy/node.mdx +++ b/contents/docs/advanced/proxy/node.mdx @@ -299,7 +299,7 @@ Confirm events are flowing through your proxy: 1. Test the proxy directly: ```bash - curl -I http://localhost:3000/ph/decide?v=3 + curl -I http://localhost:3000/ph/flags?v=2 ``` You should see a `200 OK` response. @@ -341,7 +341,7 @@ If the proxy returns 502 errors: 1. Verify your server can reach PostHog domains: ```bash - curl -I https://us.i.posthog.com/decide?v=3 + curl -I https://us.i.posthog.com/flags?v=2 ``` 2. Check that the `API_HOST` and `ASSET_HOST` values match your PostHog region 3. Ensure no firewall is blocking outbound HTTPS traffic diff --git a/contents/docs/advanced/proxy/pomerium.mdx b/contents/docs/advanced/proxy/pomerium.mdx index 1814554e3cf2..2737cb7bd122 100644 --- a/contents/docs/advanced/proxy/pomerium.mdx +++ b/contents/docs/advanced/proxy/pomerium.mdx @@ -223,7 +223,7 @@ Confirm events are flowing through your proxy: 1. Test the proxy directly: ```bash - curl -I https://e.yourdomain.com/decide?v=3 + curl -I https://e.yourdomain.com/flags?v=2 ``` You should see a `200 OK` response without authentication prompts. diff --git a/contents/docs/advanced/proxy/proxy-reference.mdx b/contents/docs/advanced/proxy/proxy-reference.mdx index 4ca850ab0e77..290bf85acda7 100644 --- a/contents/docs/advanced/proxy/proxy-reference.mdx +++ b/contents/docs/advanced/proxy/proxy-reference.mdx @@ -68,7 +68,7 @@ Your proxy is blocking the HTTP method. Ensure both `GET` and `POST` are allowed Your proxy can't reach PostHog. Test connectivity: ```bash -curl -I https://us.i.posthog.com/decide?v=3 +curl -I https://us.i.posthog.com/flags?v=2 ``` If this fails, check DNS, firewall rules (port 443), and internet access. For SSL errors, enable SNI in your proxy settings. diff --git a/contents/docs/advanced/proxy/railway.mdx b/contents/docs/advanced/proxy/railway.mdx index 7639a0da8042..9f908cf8be5e 100644 --- a/contents/docs/advanced/proxy/railway.mdx +++ b/contents/docs/advanced/proxy/railway.mdx @@ -130,7 +130,7 @@ Confirm events are flowing through your proxy: 1. Test the proxy directly: ```bash - curl -I https://your-project-name.up.railway.app/decide?v=3 + curl -I https://your-project-name.up.railway.app/flags?v=2 ``` You should see a `200 OK` response. diff --git a/contents/tutorials/api-feature-flags.md b/contents/tutorials/api-feature-flags.md index 1644a95535e4..342a3273c261 100644 --- a/contents/tutorials/api-feature-flags.md +++ b/contents/tutorials/api-feature-flags.md @@ -50,7 +50,7 @@ response = requests.post(url, headers=headers, json=body).json() -The only potentially tricky part of this is the version param. Use `v=3`, as it is the most recent. Unlike the other versions, it returns the feature flag values, any errors that occurred when computing, and any payloads for the flags. +The only potentially tricky part of this is the version param. Use `v=2`, as it is the most recent. Unlike the other versions, it returns the feature flag values, any errors that occurred when computing, and any payloads for the flags. Also, if doing a `curl` request, make sure to wrap your URL in quotes to ensure your terminal doesn’t think the `?` is a wildcard character. @@ -107,7 +107,7 @@ Our libraries abstract this functionality away and provides utilities such as ca ## Evaluating multi-variate flags -The `v=3` endpoint also supports multivariate flags. To test this, create a multi-variate feature flag in PostHog by selecting the "Multiple variants with rollout percentages (A/B test)" as the "Served value." +The `v=2` endpoint also supports multivariate flags. To test this, create a multi-variate feature flag in PostHog by selecting the "Multiple variants with rollout percentages (A/B test)" as the "Served value." Once you do this, make the same request as above and the response includes the variant data like this: @@ -358,4 +358,4 @@ Once confirmed, you're done. Congratulations, you’ve built a solid grasp of us - [Documentation on our `flags` endpoint](/docs/api/flags) - [Using the PostHog API to capture events](/tutorials/api-capture-events) - \ No newline at end of file +