All URIs are relative to https://api.segmentapis.com
Method | HTTP request | Description |
---|---|---|
get_workspace | GET / | Get Workspace |
GetWorkspace200Response get_workspace()
Get Workspace
Returns the Workspace associated with the token used to access this resource.
- Bearer Authentication (token):
import time
import os
import segment_public_api
from segment_public_api.models.get_workspace200_response import GetWorkspace200Response
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.WorkspacesApi(api_client)
try:
# Get Workspace
api_response = api_instance.get_workspace()
print("The response of WorkspacesApi->get_workspace:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspacesApi->get_workspace: %s\n" % e)
This endpoint does not need any parameter.
- 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]