-
Notifications
You must be signed in to change notification settings - Fork 393
Config API edits #7915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Config API edits #7915
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,72 +6,63 @@ redirect_from: | |
|
||
{% include content/papi-ga.html %} | ||
|
||
The Config API enables you to programmatically manage Segment workspaces, sources, destinations and more. With the API you can: | ||
The Config API lets you programmatically manage Segment workspaces, sources, destinations, and more. | ||
|
||
* List all your workspace Sources and Destinations to see how data flows through Segment | ||
* Create new Destinations - or delete them - with a few lines of code | ||
* Create new users and assign them to scoped roles | ||
* Configure, disable, or view Sources and manage connected Destinations | ||
* Get a complete view of all the Sources and Destinations available in Segment's catalog | ||
* Configure a Tracking Plan to see how data conforms to your expected schema | ||
* Query Event Delivery metrics to build custom dashboards and alerts to monitor delivery of your events to destinations | ||
* Filter entire events or individual fields from reaching specific destinations | ||
With the Config API, you can: | ||
|
||
- List all your workspace sources and destinations to see how data flows through Segment | ||
- Create new destinations - or delete them - with a few lines of code | ||
rchinn1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- Create new users and assign them to scoped roles | ||
rchinn1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- Configure, disable, or view sources and manage connected destinations | ||
rchinn1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- Get a complete view of all the sources and destinations available in Segment's catalog | ||
rchinn1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- Configure a Tracking Plan to see how data conforms to your expected schema | ||
rchinn1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- Query Event Delivery metrics to build custom dashboards and alerts to monitor delivery of your events to destinations | ||
rchinn1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- Filter entire events or individual fields from reaching specific destinations | ||
rchinn1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
The Config API is a set of REST services under segmentapis.com: | ||
|
||
| Service | Description | | ||
| --------------------------- | ------------------------------------------------------ | | ||
| [Access Tokens][1] | Manage access tokens | | ||
| [Source Catalog][2] | Get info about all event and cloud sources | | ||
| [Destination Catalog][3] | Get info about all destinations | | ||
| [Workspaces][4] | Get info about workspaces | | ||
| [Sources][5] | Manage workspace sources | | ||
| [Destinations][6] | Manage workspace destinations | | ||
| [Tracking Plans][7] | Manage workspace tracking plans | | ||
| [Event Delivery Metrics][8] | Get event delivery metrics for cloud-mode destinations | | ||
| [Destination Filters][9] | Manage destination filters | | ||
| [IAM][10] | Manage workspace users and roles | | ||
| [Functions][11] | Manage Functions | | ||
|
||
[1]: https://reference.segmentapis.com/#cd642f96-0fca-42a1-a727-e16fd33c7e8f | ||
[2]: https://reference.segmentapis.com/#7a63ac88-43af-43db-a987-7ed7d677a8c8 | ||
[3]: https://reference.segmentapis.com/#361ed478-5e53-4835-ab7e-7dbff736524f | ||
[4]: https://reference.segmentapis.com/#7ed2968b-c4a5-4cfb-b4bf-7d28c7b38bd2 | ||
[5]: https://reference.segmentapis.com/#5a852761-54d5-46da-8437-6e14e63449f3 | ||
[6]: https://reference.segmentapis.com/#39ce0439-0969-48c3-ba49-b22a46c41060 | ||
[7]: https://reference.segmentapis.com/#c4647e3c-fe1b-4e2f-88b9-6634841eb4e5 | ||
[8]: https://reference.segmentapis.com/#51d89077-efd7-429b-85d4-155ac2cd07aa | ||
[9]: https://reference.segmentapis.com/#6c12fbe8-9f84-4a6c-848e-76a2325cb3c5 | ||
[10]: https://reference.segmentapis.com/?version=latest#c4b14304-9112-4803-aa26-c08678cbe26a | ||
[11]: https://reference.segmentapis.com/?version=latest#c0866f35-2f39-4dfd-9fd3-26a0003ae74c | ||
|
||
To see all the API methods and models see the [Segment Config API Reference](https://reference.segmentapis.com/). | ||
|
||
At this time there are no language-specific clients. However the [API Reference](https://reference.segmentapis.com/) also contains example code snippets for cURL, Go, Node, Python and more. | ||
|
||
## Quick Start | ||
|
||
You can interact with the API from the command line. First install the `curl` tool. | ||
| [Access Tokens](https://reference.segmentapis.com/#cd642f96-0fca-42a1-a727-e16fd33c7e8f){:target="_blank"} | Manage access tokens | | ||
| [Source Catalog](https://reference.segmentapis.com/#7a63ac88-43af-43db-a987-7ed7d677a8c8){:target="_blank"} | Get info about all event and cloud sources | | ||
| [Destination Catalog](https://reference.segmentapis.com/#361ed478-5e53-4835-ab7e-7dbff736524f){:target="_blank"} | Get info about all destinations | | ||
| [Workspaces](https://reference.segmentapis.com/#7ed2968b-c4a5-4cfb-b4bf-7d28c7b38bd2){:target="_blank"} | Get info about workspaces | | ||
| [Sources](https://reference.segmentapis.com/#5a852761-54d5-46da-8437-6e14e63449f3){:target="_blank"} | Manage workspace sources | | ||
| [Destinations](https://reference.segmentapis.com/#39ce0439-0969-48c3-ba49-b22a46c41060){:target="_blank"} | Manage workspace destinations | | ||
| [Tracking Plans](https://reference.segmentapis.com/#c4647e3c-fe1b-4e2f-88b9-6634841eb4e5){:target="_blank"} | Manage workspace tracking plans | | ||
| [Event Delivery Metrics](https://reference.segmentapis.com/#51d89077-efd7-429b-85d4-155ac2cd07aa){:target="_blank"} | Get event delivery metrics for cloud-mode destinations | | ||
| [Destination Filters](https://reference.segmentapis.com/#6c12fbe8-9f84-4a6c-848e-76a2325cb3c5){:target="_blank"} | Manage destination filters | | ||
| [IAM](https://reference.segmentapis.com/?version=latest#c4b14304-9112-4803-aa26-c08678cbe26a){:target="_blank"} | Manage workspace users and roles | | ||
| [Functions](https://reference.segmentapis.com/?version=latest#c0866f35-2f39-4dfd-9fd3-26a0003ae74c){:target="_blank"} | Manage Functions | | ||
|
||
|
||
To see all the API methods and models see the [Segment Config API Reference](https://reference.segmentapis.com/){:target="_blank"}. | ||
|
||
At this time there are no language-specific clients. However the [API Reference](https://reference.segmentapis.com/){:target="_blank"} also contains example code snippets for cURL, Go, Node, Python, and more. | ||
|
||
## Quick start | ||
|
||
You can call the API from the command line. First, install `curl`: | ||
|
||
```shell | ||
$ brew install curl | ||
``` | ||
|
||
### Access Tokens | ||
### Access tokens | ||
|
||
You can use the Config API with an access token to programmatically access Segment resources that the token can access. Access tokens are created by workspace owners using the Access Management page, and can only access resources that the token has permission to. | ||
You can use the Config API with an access token to programmatically access Segment resources that the token can access. Access tokens are created by workspace owners using the **Access Management** page, and can only access resources that the token has permission to. | ||
|
||
These are currently only suitable for first party, trusted applications, such as your personal local scripts and server side programs. Partners should not prompt Segment users for their username and password and save an access token as a way to delegate access. See the [Authentication](/docs/api/config-api/authentication/) doc for more information. | ||
|
||
When you create an access token, you'll give it a description, a workspace, and determine whether it has workspace owner or member access. | ||
|
||
> warning "Secret Token" | ||
> warning "Secret token" | ||
> You can not retrieve the plain-text `token` later, so you should save it in a secret manager. If you lose the `token` you can generate a new one. | ||
|
||
> info | ||
> As of February 1, 2024, new Config API tokens cannot be created in the app as Segment moves toward exclusive support for the [Public API](/docs/api/public-api/). [Migrate your implementation to the Public API](https://docs.segmentapis.com/tag/Migration){:target="_blank”} to access the latest features and available endpoints. To create a new Config API token, reach out to [email protected] for support. | ||
> info "" | ||
> As of February 1, 2024, new Config API tokens cannot be created in the app as Segment moves toward exclusive support for the [Public API](/docs/api/public-api/). [Migrate your implementation to the Public API](https://docs.segmentapis.com/tag/Migration){:target="_blank”} to access the latest features and available endpoints. To create a new Config API token, [contact Segment](mailto:[email protected]) for support. | ||
|
||
### API Requests | ||
### API requests | ||
|
||
Now that you have an access token, you can use this token to access the rest of the Config API by setting it in the `Authorization` header of your requests, for example: | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.