Skip to content

Commit 4161172

Browse files
dmarticusjina-yoon
authored andcommitted
update tutorials to use latest flags stuff (#15191)
1 parent 59860b1 commit 4161172

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

contents/docs/advanced/proxy/nginx.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Confirm events are flowing through your proxy:
167167
1. Test the proxy directly with curl:
168168

169169
```bash
170-
curl -I https://e.yourdomain.com/decide?v=3
170+
curl -I https://e.yourdomain.com/flags?v=2
171171
```
172172

173173
You should see a `200 OK` response.
@@ -299,7 +299,7 @@ Confirm events are flowing through your proxy:
299299
1. Test the proxy directly:
300300

301301
```bash
302-
curl -I http://localhost:8080/decide?v=3
302+
curl -I http://localhost:8080/flags?v=2
303303
```
304304

305305
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:
322322

323323
1. Verify your server can make HTTPS requests to PostHog domains:
324324
```bash
325-
curl -I https://us.i.posthog.com/decide?v=3
325+
curl -I https://us.i.posthog.com/flags?v=2
326326
```
327327
2. Check that `proxy_ssl_server_name on` is set in your config
328328
3. For Docker, ensure the `resolver` directive is configured

contents/docs/advanced/proxy/node.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ Confirm events are flowing through your proxy:
299299
300300
1. Test the proxy directly:
301301
```bash
302-
curl -I http://localhost:3000/ph/decide?v=3
302+
curl -I http://localhost:3000/ph/flags?v=2
303303
```
304304
You should see a `200 OK` response.
305305
@@ -341,7 +341,7 @@ If the proxy returns 502 errors:
341341
342342
1. Verify your server can reach PostHog domains:
343343
```bash
344-
curl -I https://us.i.posthog.com/decide?v=3
344+
curl -I https://us.i.posthog.com/flags?v=2
345345
```
346346
2. Check that the `API_HOST` and `ASSET_HOST` values match your PostHog region
347347
3. Ensure no firewall is blocking outbound HTTPS traffic

contents/docs/advanced/proxy/pomerium.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Confirm events are flowing through your proxy:
223223
1. Test the proxy directly:
224224

225225
```bash
226-
curl -I https://e.yourdomain.com/decide?v=3
226+
curl -I https://e.yourdomain.com/flags?v=2
227227
```
228228

229229
You should see a `200 OK` response without authentication prompts.

contents/docs/advanced/proxy/proxy-reference.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Your proxy is blocking the HTTP method. Ensure both `GET` and `POST` are allowed
6868
Your proxy can't reach PostHog. Test connectivity:
6969

7070
```bash
71-
curl -I https://us.i.posthog.com/decide?v=3
71+
curl -I https://us.i.posthog.com/flags?v=2
7272
```
7373

7474
If this fails, check DNS, firewall rules (port 443), and internet access. For SSL errors, enable SNI in your proxy settings.

contents/docs/advanced/proxy/railway.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Confirm events are flowing through your proxy:
130130
1. Test the proxy directly:
131131

132132
```bash
133-
curl -I https://your-project-name.up.railway.app/decide?v=3
133+
curl -I https://your-project-name.up.railway.app/flags?v=2
134134
```
135135
You should see a `200 OK` response.
136136

contents/tutorials/api-feature-flags.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ response = requests.post(url, headers=headers, json=body).json()
5050

5151
</MultiLanguage>
5252

53-
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.
53+
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.
5454

5555
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.
5656

@@ -107,7 +107,7 @@ Our libraries abstract this functionality away and provides utilities such as ca
107107

108108
## Evaluating multi-variate flags
109109

110-
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."
110+
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."
111111

112112
Once you do this, make the same request as above and the response includes the variant data like this:
113113

@@ -358,4 +358,4 @@ Once confirmed, you're done. Congratulations, you’ve built a solid grasp of us
358358
- [Documentation on our `flags` endpoint](/docs/api/flags)
359359
- [Using the PostHog API to capture events](/tutorials/api-capture-events)
360360

361-
<NewsletterForm />
361+
<NewsletterForm />

0 commit comments

Comments
 (0)