All URIs are relative to https://app.hotdata.dev
| Method | HTTP request | Description |
|---|---|---|
| create_workspace | POST /v1/workspaces | Create a workspace |
| list_workspaces | GET /v1/workspaces | List workspaces |
CreateWorkspace201Response create_workspace(create_workspace_request)
Create a workspace
Creates a new workspace in the specified organization.
- Bearer Authentication (BearerAuth):
import hotdata
from hotdata.models.create_workspace201_response import CreateWorkspace201Response
from hotdata.models.create_workspace_request import CreateWorkspaceRequest
from hotdata.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.hotdata.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = hotdata.Configuration(
host = "https://app.hotdata.dev"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = hotdata.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with hotdata.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hotdata.WorkspacesApi(api_client)
create_workspace_request = hotdata.CreateWorkspaceRequest() # CreateWorkspaceRequest |
try:
# Create a workspace
api_response = api_instance.create_workspace(create_workspace_request)
print("The response of WorkspacesApi->create_workspace:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspacesApi->create_workspace: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| create_workspace_request | CreateWorkspaceRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Workspace created | - |
| 400 | Invalid JSON body | - |
| 401 | Missing or invalid authorization | - |
| 403 | Forbidden | - |
| 404 | Organization not found | - |
| 422 | Validation error (e.g. name required) | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListWorkspaces200Response list_workspaces(organization_public_id=organization_public_id)
List workspaces
Lists all workspaces in the user's organization.
- Bearer Authentication (BearerAuth):
import hotdata
from hotdata.models.list_workspaces200_response import ListWorkspaces200Response
from hotdata.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.hotdata.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = hotdata.Configuration(
host = "https://app.hotdata.dev"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = hotdata.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with hotdata.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hotdata.WorkspacesApi(api_client)
organization_public_id = 'organization_public_id_example' # str | Filter by organization. Defaults to the user's current organization. (optional)
try:
# List workspaces
api_response = api_instance.list_workspaces(organization_public_id=organization_public_id)
print("The response of WorkspacesApi->list_workspaces:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspacesApi->list_workspaces: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_public_id | str | Filter by organization. Defaults to the user's current organization. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response | - |
| 401 | Missing or invalid authorization | - |
| 403 | Forbidden — not a member of the organization or workspace token used | - |
| 404 | Organization not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]