You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/api/public-api/index.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Public API
3
3
plan: papi
4
4
---
5
-
The Segment Public API helps you manage your Segment workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. The Public API is available to Team and Business Tier customers.
5
+
The Segment Public API helps you manage your Segment workspaces and its resources. You can use the API to perform CRUD (create, read, update, and delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. The Public API is available to Team and Business Tier customers.
6
6
7
7
All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a workspace.
8
8
@@ -14,7 +14,7 @@ All CRUD endpoints in the API follow REST conventions and use standard HTTP meth
14
14
%}
15
15
16
16
> success "Getting started with the Public API"
17
-
> If your application is built in Javascript / Typescript, Go, Java, or Swift, check out [Segment's Public API SDKs](https://docs.segmentapis.com/tag/Getting-Started#section/Install-and-use-an-SDK){:target="_blank"}.
17
+
> If your application is built in JavaScript, Typescript, Go, Java, Swift, or C#, check out [Segment's Public API SDKs](https://docs.segmentapis.com/tag/Getting-Started#section/Install-and-use-an-SDK){:target="_blank"}.
18
18
19
19
## Config API vs Public API
20
20
The Public API includes the following benefits over the Config API:
@@ -28,24 +28,24 @@ The Public API includes the following benefits over the Config API:
28
28
| Improved architecture | The Public API is built with improved security, checks for authentication, authorization, input validation, HTTPS exposed services, auto-scaling, and more in mind. |
29
29
| Cleaner mapping | The Public API uses unique IDs for reference, in place of slugs in the Config API. Unique IDs are, by design, unique. |
30
30
| Available in Europe | The Public API is accessible to both US and EU-based workspaces. ||
31
-
| Increased reliability | The Public API features more stable endpoints, and a 99.8% success rate |
31
+
| Increased reliability | The Public API features more stable endpoints, and a 99.8% success rate.|
32
32
33
33
## Create a Public API token
34
34
35
35
> info "Only Workspace Owners can create a Public API token"
36
-
> Only users with the Workspace Owner role can create a Public API token. For more information about roles, see Segment's [Roles](/docs/segment-app/iam/roles/) documentation.
36
+
> Only users with the **Workspace Owner** role can create a Public API token. For more information about roles, see Segment's [Roles](/docs/segment-app/iam/roles/) documentation.
37
37
38
38
To create a Public API token in your Segment workspace:
3. Create a description for the token and assign it either **Workspace Owner** or **Workspace Member** access.
42
42
4. Click **Create**.
43
43
5. Copy your workspace token somewhere secure and click **Done**.
44
44
45
-
To begin sending requests to the Public API, make sure to include the Public API Token into your HTTP requests with the `Authorization` Header and configured with `Bearer Token`and the value of the newly generated Public API token.
45
+
To begin sending requests to the Public API, include the Public API Token in your HTTP requests. Configure the `Authorization` Header as a `Bearer Token`with the value of the newly generated Public API token.
46
46
47
47
48
-
## API Token Security
48
+
## API token security
49
49
50
50
To enhance API token security, Segment partners with GitHub to prevent fraudulent use of exposed API tokens found in public git repositories. This helps to prevent malicious actors from using exposed tokens to perform unauthorized actions in your Segment workspace.
51
51
@@ -55,7 +55,7 @@ Learn more about [GitHub's secret scanning program](https://docs.github.com/en/d
55
55
56
56
## FAQs
57
57
#### What should I do if I see a notification that my token was exposed?
58
-
In most cases, identifying and revoking an exposed token takes seconds. Segment recommends you check the [audit trail](/docs/segment-app/iam/audit-trail/) to ensure no unauthorized actions were taken with the token.
58
+
In most cases, identifying and revoking an exposed token takes seconds. We recommend that you check the [audit trail](/docs/segment-app/iam/audit-trail/) to ensure no unauthorized actions were taken with the token.
59
59
60
60
#### How did my token get exposed?
61
61
Developers can accidentally commit tokens to public repositories, exposing them to the public. This can happen when developers use a token in a local development environment and forget to remove it before committing their code.
@@ -70,10 +70,10 @@ This feature is automatically enabled for all workspaces on Team or Business tie
70
70
If you see a CORS error, this means you're attempting to make a request to the Public API on the front-end. The Public API is used for server-side only. To get rid of the error, move all Public API requests to a server.
71
71
72
72
#### What User Role / Workspace permissions are required to generate Public API tokens?
73
-
Only [users that have a `Workspace Owner` role](https://segment.com/docs/segment-app/iam/roles/#global-roles) can create Public API Tokens.
73
+
Only [users that have a **Workspace Owner** role](/docs/segment-app/iam/roles/#global-roles) can create Public API Tokens.
74
74
75
75
## Troubleshooting
76
-
#### The `Update Schema Settings in Source` endpoint returns error for field`forwardingViolationsTo` and `forwardingBlockedEventsTo`
76
+
#### The `Update Schema Settings in Source` endpoint returns an error for fields`forwardingViolationsTo` and `forwardingBlockedEventsTo`
77
77
When you don't have a source to forward violations or blocked events to, then exclude the fields `forwardingViolationsTo` or `forwardingBlockedEventsTo` entirely from the request and the setting will be disabled.
0 commit comments