All URIs are relative to https://api.segmentapis.com
Method | HTTP request | Description |
---|---|---|
add_source_to_tracking_plan | POST /tracking-plans/{trackingPlanId}/sources | Add Source to Tracking Plan |
create_tracking_plan | POST /tracking-plans | Create Tracking Plan |
delete_tracking_plan | DELETE /tracking-plans/{trackingPlanId} | Delete Tracking Plan |
get_tracking_plan | GET /tracking-plans/{trackingPlanId} | Get Tracking Plan |
list_rules_from_tracking_plan | GET /tracking-plans/{trackingPlanId}/rules | List Rules from Tracking Plan |
list_sources_from_tracking_plan | GET /tracking-plans/{trackingPlanId}/sources | List Sources from Tracking Plan |
list_tracking_plans | GET /tracking-plans | List Tracking Plans |
remove_rules_from_tracking_plan | DELETE /tracking-plans/{trackingPlanId}/rules | Remove Rules from Tracking Plan |
remove_source_from_tracking_plan | DELETE /tracking-plans/{trackingPlanId}/sources | Remove Source from Tracking Plan |
replace_rules_in_tracking_plan | PUT /tracking-plans/{trackingPlanId}/rules | Replace Rules in Tracking Plan |
update_rules_in_tracking_plan | PATCH /tracking-plans/{trackingPlanId}/rules | Update Rules in Tracking Plan |
update_tracking_plan | PATCH /tracking-plans/{trackingPlanId} | Update Tracking Plan |
AddSourceToTrackingPlan200Response add_source_to_tracking_plan(tracking_plan_id, add_source_to_tracking_plan_v1_input)
Add Source to Tracking Plan
Connects a Source to a Tracking Plan. • When called, this endpoint may generate the Source Modified
event in the audit trail. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information.
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.add_source_to_tracking_plan200_response import AddSourceToTrackingPlan200Response
from segment_public_api.models.add_source_to_tracking_plan_v1_input import AddSourceToTrackingPlanV1Input
from segment_public_api.rest import ApiException
from pprint import pprint
# Configure Bearer authorization: token
configuration = segment_public_api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with segment_public_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = segment_public_api.TrackingPlansApi(api_client)
tracking_plan_id = 'tp_sprout_rVGCC6WdrNxjCf6JpCHP' # str |
add_source_to_tracking_plan_v1_input = {"sourceId":"qQEHquLrjRDN9j1ByrChyn"} # AddSourceToTrackingPlanV1Input |
try:
# Add Source to Tracking Plan
api_response = api_instance.add_source_to_tracking_plan(tracking_plan_id, add_source_to_tracking_plan_v1_input)
print("The response of TrackingPlansApi->add_source_to_tracking_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TrackingPlansApi->add_source_to_tracking_plan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tracking_plan_id | str | ||
add_source_to_tracking_plan_v1_input | AddSourceToTrackingPlanV1Input |
AddSourceToTrackingPlan200Response
- Content-Type: application/json, application/vnd.segment.v1+json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Resource not found | - |
422 | Validation failure | - |
429 | Too many requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateTrackingPlan200Response create_tracking_plan(create_tracking_plan_v1_input)
Create Tracking Plan
Creates a Tracking Plan. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information.
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.create_tracking_plan200_response import CreateTrackingPlan200Response
from segment_public_api.models.create_tracking_plan_v1_input import CreateTrackingPlanV1Input
from segment_public_api.rest import ApiException
from pprint import pprint
# Configure Bearer authorization: token
configuration = segment_public_api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with segment_public_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = segment_public_api.TrackingPlansApi(api_client)
create_tracking_plan_v1_input = {"name":"New TP","type":"LIVE"} # CreateTrackingPlanV1Input |
try:
# Create Tracking Plan
api_response = api_instance.create_tracking_plan(create_tracking_plan_v1_input)
print("The response of TrackingPlansApi->create_tracking_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TrackingPlansApi->create_tracking_plan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
create_tracking_plan_v1_input | CreateTrackingPlanV1Input |
- Content-Type: application/json, application/vnd.segment.v1+json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Resource not found | - |
422 | Validation failure | - |
429 | Too many requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteTrackingPlan200Response delete_tracking_plan(tracking_plan_id)
Delete Tracking Plan
Deletes a Tracking Plan. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information.
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.delete_tracking_plan200_response import DeleteTrackingPlan200Response
from segment_public_api.rest import ApiException
from pprint import pprint
# Configure Bearer authorization: token
configuration = segment_public_api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with segment_public_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = segment_public_api.TrackingPlansApi(api_client)
tracking_plan_id = 'tp_sprout_rVGCC6WdrNxjCf6JpCHP' # str |
try:
# Delete Tracking Plan
api_response = api_instance.delete_tracking_plan(tracking_plan_id)
print("The response of TrackingPlansApi->delete_tracking_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TrackingPlansApi->delete_tracking_plan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tracking_plan_id | str |
- Content-Type: Not defined
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Resource not found | - |
422 | Validation failure | - |
429 | Too many requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetTrackingPlan200Response get_tracking_plan(tracking_plan_id)
Get Tracking Plan
Returns a Tracking Plan. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information.
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.get_tracking_plan200_response import GetTrackingPlan200Response
from segment_public_api.rest import ApiException
from pprint import pprint
# Configure Bearer authorization: token
configuration = segment_public_api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with segment_public_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = segment_public_api.TrackingPlansApi(api_client)
tracking_plan_id = 'tp_sprout_rVGCC6WdrNxjCf6JpCHP' # str |
try:
# Get Tracking Plan
api_response = api_instance.get_tracking_plan(tracking_plan_id)
print("The response of TrackingPlansApi->get_tracking_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TrackingPlansApi->get_tracking_plan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tracking_plan_id | str |
- Content-Type: Not defined
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Resource not found | - |
422 | Validation failure | - |
429 | Too many requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListRulesFromTrackingPlan200Response list_rules_from_tracking_plan(tracking_plan_id, pagination=pagination)
List Rules from Tracking Plan
Lists Tracking Plan rules. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 200 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.list_rules_from_tracking_plan200_response import ListRulesFromTrackingPlan200Response
from segment_public_api.models.pagination_input import PaginationInput
from segment_public_api.rest import ApiException
from pprint import pprint
# Configure Bearer authorization: token
configuration = segment_public_api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with segment_public_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = segment_public_api.TrackingPlansApi(api_client)
tracking_plan_id = 'tp_sprout_rVGCC6WdrNxjCf6JpCHP' # str |
pagination = segment_public_api.PaginationInput(count=10) # PaginationInput | Pagination options. This parameter exists in v1. (optional)
try:
# List Rules from Tracking Plan
api_response = api_instance.list_rules_from_tracking_plan(tracking_plan_id, pagination=pagination)
print("The response of TrackingPlansApi->list_rules_from_tracking_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TrackingPlansApi->list_rules_from_tracking_plan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tracking_plan_id | str | ||
pagination | PaginationInput | Pagination options. This parameter exists in v1. | [optional] |
ListRulesFromTrackingPlan200Response
- Content-Type: Not defined
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Resource not found | - |
422 | Validation failure | - |
429 | Too many requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListSourcesFromTrackingPlan200Response list_sources_from_tracking_plan(tracking_plan_id, pagination=pagination)
List Sources from Tracking Plan
Lists Sources connected to a Tracking Plan. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. This endpoint requires the user to have at least the following permission(s): * Source Read-only * Tracking Plan Read-only
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.list_sources_from_tracking_plan200_response import ListSourcesFromTrackingPlan200Response
from segment_public_api.models.pagination_input import PaginationInput
from segment_public_api.rest import ApiException
from pprint import pprint
# Configure Bearer authorization: token
configuration = segment_public_api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with segment_public_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = segment_public_api.TrackingPlansApi(api_client)
tracking_plan_id = 'tp_sprout_rVGCC6WdrNxjCf6JpCHP' # str |
pagination = segment_public_api.PaginationInput(count=10) # PaginationInput | Pagination options. This parameter exists in v1. (optional)
try:
# List Sources from Tracking Plan
api_response = api_instance.list_sources_from_tracking_plan(tracking_plan_id, pagination=pagination)
print("The response of TrackingPlansApi->list_sources_from_tracking_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TrackingPlansApi->list_sources_from_tracking_plan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tracking_plan_id | str | ||
pagination | PaginationInput | Pagination options. This parameter exists in v1. | [optional] |
ListSourcesFromTrackingPlan200Response
- Content-Type: Not defined
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Resource not found | - |
422 | Validation failure | - |
429 | Too many requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListTrackingPlans200Response list_tracking_plans(type=type, pagination=pagination)
List Tracking Plans
Returns a list of Tracking Plans. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information.
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.list_tracking_plans200_response import ListTrackingPlans200Response
from segment_public_api.models.pagination_input import PaginationInput
from segment_public_api.rest import ApiException
from pprint import pprint
# Configure Bearer authorization: token
configuration = segment_public_api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with segment_public_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = segment_public_api.TrackingPlansApi(api_client)
type = 'LIVE' # str | Requests Tracking Plans of a certain type. If omitted, lists all types. This parameter exists in v1. (optional)
pagination = segment_public_api.PaginationInput(count=10) # PaginationInput | Pagination options. This parameter exists in v1. (optional)
try:
# List Tracking Plans
api_response = api_instance.list_tracking_plans(type=type, pagination=pagination)
print("The response of TrackingPlansApi->list_tracking_plans:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TrackingPlansApi->list_tracking_plans: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
type | str | Requests Tracking Plans of a certain type. If omitted, lists all types. This parameter exists in v1. | [optional] |
pagination | PaginationInput | Pagination options. This parameter exists in v1. | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Resource not found | - |
422 | Validation failure | - |
429 | Too many requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RemoveRulesFromTrackingPlan200Response remove_rules_from_tracking_plan(tracking_plan_id, rules)
Remove Rules from Tracking Plan
Deletes Tracking Plan rules. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information.
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.remove_rule_v1 import RemoveRuleV1
from segment_public_api.models.remove_rules_from_tracking_plan200_response import RemoveRulesFromTrackingPlan200Response
from segment_public_api.rest import ApiException
from pprint import pprint
# Configure Bearer authorization: token
configuration = segment_public_api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with segment_public_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = segment_public_api.TrackingPlansApi(api_client)
tracking_plan_id = 'tp_sprout_rVGCC6WdrNxjCf6JpCHP' # str |
rules = [segment_public_api.RemoveRuleV1()] # List[RemoveRuleV1] | Rules to delete. This parameter exists in v1.
try:
# Remove Rules from Tracking Plan
api_response = api_instance.remove_rules_from_tracking_plan(tracking_plan_id, rules)
print("The response of TrackingPlansApi->remove_rules_from_tracking_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TrackingPlansApi->remove_rules_from_tracking_plan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tracking_plan_id | str | ||
rules | List[RemoveRuleV1] | Rules to delete. This parameter exists in v1. |
RemoveRulesFromTrackingPlan200Response
- Content-Type: Not defined
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Resource not found | - |
422 | Validation failure | - |
429 | Too many requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RemoveSourceFromTrackingPlan200Response remove_source_from_tracking_plan(tracking_plan_id, source_id)
Remove Source from Tracking Plan
Disconnects a Source from a Tracking Plan. • When called, this endpoint may generate the Source Modified
event in the audit trail. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information.
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.remove_source_from_tracking_plan200_response import RemoveSourceFromTrackingPlan200Response
from segment_public_api.rest import ApiException
from pprint import pprint
# Configure Bearer authorization: token
configuration = segment_public_api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with segment_public_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = segment_public_api.TrackingPlansApi(api_client)
tracking_plan_id = 'tp_sprout_rVGCC6WdrNxjCf6JpCHP' # str |
source_id = 'qQEHquLrjRDN9j1ByrChyn' # str | The id of the Source associated with the Tracking Plan. Config API note: analogous to `sourceName`. This parameter exists in v1.
try:
# Remove Source from Tracking Plan
api_response = api_instance.remove_source_from_tracking_plan(tracking_plan_id, source_id)
print("The response of TrackingPlansApi->remove_source_from_tracking_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TrackingPlansApi->remove_source_from_tracking_plan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tracking_plan_id | str | ||
source_id | str | The id of the Source associated with the Tracking Plan. Config API note: analogous to `sourceName`. This parameter exists in v1. |
RemoveSourceFromTrackingPlan200Response
- Content-Type: Not defined
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Resource not found | - |
422 | Validation failure | - |
429 | Too many requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReplaceRulesInTrackingPlan200Response replace_rules_in_tracking_plan(tracking_plan_id, replace_rules_in_tracking_plan_v1_input)
Replace Rules in Tracking Plan
Replaces Tracking Plan rules. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information.
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.replace_rules_in_tracking_plan200_response import ReplaceRulesInTrackingPlan200Response
from segment_public_api.models.replace_rules_in_tracking_plan_v1_input import ReplaceRulesInTrackingPlanV1Input
from segment_public_api.rest import ApiException
from pprint import pprint
# Configure Bearer authorization: token
configuration = segment_public_api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with segment_public_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = segment_public_api.TrackingPlansApi(api_client)
tracking_plan_id = 'tp_sprout_rVGCC6WdrNxjCf6JpCHP' # str |
replace_rules_in_tracking_plan_v1_input = {"rules":[{"key":"New Replaced Rule","type":"TRACK","version":1,"jsonSchema":{}}]} # ReplaceRulesInTrackingPlanV1Input |
try:
# Replace Rules in Tracking Plan
api_response = api_instance.replace_rules_in_tracking_plan(tracking_plan_id, replace_rules_in_tracking_plan_v1_input)
print("The response of TrackingPlansApi->replace_rules_in_tracking_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TrackingPlansApi->replace_rules_in_tracking_plan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tracking_plan_id | str | ||
replace_rules_in_tracking_plan_v1_input | ReplaceRulesInTrackingPlanV1Input |
ReplaceRulesInTrackingPlan200Response
- Content-Type: application/json, application/vnd.segment.v1+json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Resource not found | - |
422 | Validation failure | - |
429 | Too many requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateRulesInTrackingPlan200Response update_rules_in_tracking_plan(tracking_plan_id, update_rules_in_tracking_plan_v1_input)
Update Rules in Tracking Plan
Updates Tracking Plan rules. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information.
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.update_rules_in_tracking_plan200_response import UpdateRulesInTrackingPlan200Response
from segment_public_api.models.update_rules_in_tracking_plan_v1_input import UpdateRulesInTrackingPlanV1Input
from segment_public_api.rest import ApiException
from pprint import pprint
# Configure Bearer authorization: token
configuration = segment_public_api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with segment_public_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = segment_public_api.TrackingPlansApi(api_client)
tracking_plan_id = 'tp_sprout_rVGCC6WdrNxjCf6JpCHP' # str |
update_rules_in_tracking_plan_v1_input = {"rules":[{"key":"New Rule","type":"TRACK","version":1,"jsonSchema":{}}]} # UpdateRulesInTrackingPlanV1Input |
try:
# Update Rules in Tracking Plan
api_response = api_instance.update_rules_in_tracking_plan(tracking_plan_id, update_rules_in_tracking_plan_v1_input)
print("The response of TrackingPlansApi->update_rules_in_tracking_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TrackingPlansApi->update_rules_in_tracking_plan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tracking_plan_id | str | ||
update_rules_in_tracking_plan_v1_input | UpdateRulesInTrackingPlanV1Input |
UpdateRulesInTrackingPlan200Response
- Content-Type: application/json, application/vnd.segment.v1+json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Resource not found | - |
422 | Validation failure | - |
429 | Too many requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateTrackingPlan200Response update_tracking_plan(tracking_plan_id, update_tracking_plan_v1_input)
Update Tracking Plan
Updates a Tracking Plan. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. Config API omitted fields: - updateMask
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.update_tracking_plan200_response import UpdateTrackingPlan200Response
from segment_public_api.models.update_tracking_plan_v1_input import UpdateTrackingPlanV1Input
from segment_public_api.rest import ApiException
from pprint import pprint
# Configure Bearer authorization: token
configuration = segment_public_api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with segment_public_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = segment_public_api.TrackingPlansApi(api_client)
tracking_plan_id = 'tp_sprout_rVGCC6WdrNxjCf6JpCHP' # str |
update_tracking_plan_v1_input = {"name":"Updated TP"} # UpdateTrackingPlanV1Input |
try:
# Update Tracking Plan
api_response = api_instance.update_tracking_plan(tracking_plan_id, update_tracking_plan_v1_input)
print("The response of TrackingPlansApi->update_tracking_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TrackingPlansApi->update_tracking_plan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tracking_plan_id | str | ||
update_tracking_plan_v1_input | UpdateTrackingPlanV1Input |
- Content-Type: application/json, application/vnd.segment.v1+json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Resource not found | - |
422 | Validation failure | - |
429 | Too many requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]