Skip to content

Latest commit

 

History

History
78 lines (51 loc) · 2.12 KB

WorkspacesApi.md

File metadata and controls

78 lines (51 loc) · 2.12 KB

segment_public_api.WorkspacesApi

All URIs are relative to https://api.segmentapis.com

Method HTTP request Description
get_workspace GET / Get Workspace

Operation: get_workspace

GetWorkspace200Response get_workspace()

Get Workspace

Returns the Workspace associated with the token used to access this resource.

Example

  • 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)

Parameters

This endpoint does not need any parameter.

Return type

GetWorkspace200Response

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json

HTTP response details

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]