All URIs are relative to /
Method | HTTP request | Description |
---|---|---|
accept_workspace_member_invite | POST /workspaces/{workspace_id}/invites/{invite_key}/accept | Accept the invitation to join a workspace |
cancel_workspace_member_invite | DELETE /workspaces/{workspace_id}/invites/{invite_id} | Deletes an invite |
create_workspace | POST /workspaces | Create a new workspace |
delete_workspace | DELETE /workspaces/{workspace_id} | Delete an existing workspace |
get_workspace | GET /workspaces/{workspace_id} | Get an existing workspace |
get_workspace_members_list | GET /workspaces/{workspace_id}/members | Get the list members of a workspace |
get_workspaces_list | GET /workspaces | Get workspaces |
invite_workspace_member | POST /workspaces/{workspace_id}/invites | Invite a user to join the workspace |
remove_workspace_member | DELETE /workspaces/{workspace_id}/members/{user_id} | Remove a member from the workspace |
resend_workspace_member_invite | POST /workspaces/{workspace_id}/invites/{invite_id}/resend | Resend Invite notification |
update_workspace | PUT /workspaces/{workspace_id} | Update an existing workspace |
update_workspace_member_role | PUT /workspaces/{workspace_id}/members/{user_id} | Update workspace member role |
accept_workspace_member_invite(workspace_id, invite_key)
Accept the invitation to join a workspace
Accept the invitation to join a workspace. If the operation succeeds the user will be a member of the workspace
from __future__ import print_function
import time
import XataClient
from XataClient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = XataClient.WorkspacesApi()
workspace_id = XataClient.WorkspaceID() # WorkspaceID | Workspace name
invite_key = XataClient.InviteKey() # InviteKey | Invite Key (secret) for the invited user
try:
# Accept the invitation to join a workspace
api_instance.accept_workspace_member_invite(workspace_id, invite_key)
except ApiException as e:
print("Exception when calling WorkspacesApi->accept_workspace_member_invite: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | WorkspaceID | Workspace name | |
invite_key | InviteKey | Invite Key (secret) for the invited user |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cancel_workspace_member_invite(workspace_id, invite_id)
Deletes an invite
This operation provides a way to cancel invites by deleting them. Already accepted invites cannot be deleted.
from __future__ import print_function
import time
import XataClient
from XataClient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = XataClient.WorkspacesApi()
workspace_id = XataClient.WorkspaceID() # WorkspaceID | Workspace name
invite_id = XataClient.InviteID() # InviteID | Invite identifier
try:
# Deletes an invite
api_instance.cancel_workspace_member_invite(workspace_id, invite_id)
except ApiException as e:
print("Exception when calling WorkspacesApi->cancel_workspace_member_invite: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | WorkspaceID | Workspace name | |
invite_id | InviteID | Invite identifier |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Workspace create_workspace(body=body)
Create a new workspace
Creates a new workspace with the user requesting it as its single owner.
from __future__ import print_function
import time
import XataClient
from XataClient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = XataClient.WorkspacesApi()
body = XataClient.WorkspaceMeta() # WorkspaceMeta | (optional)
try:
# Create a new workspace
api_response = api_instance.create_workspace(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkspacesApi->create_workspace: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | WorkspaceMeta | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_workspace(workspace_id)
Delete an existing workspace
Delete the workspace with the provided ID
from __future__ import print_function
import time
import XataClient
from XataClient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = XataClient.WorkspacesApi()
workspace_id = XataClient.WorkspaceID() # WorkspaceID | Workspace name
try:
# Delete an existing workspace
api_instance.delete_workspace(workspace_id)
except ApiException as e:
print("Exception when calling WorkspacesApi->delete_workspace: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | WorkspaceID | Workspace name |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Workspace get_workspace(workspace_id)
Get an existing workspace
Retrieve workspace info from a workspace ID
from __future__ import print_function
import time
import XataClient
from XataClient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = XataClient.WorkspacesApi()
workspace_id = XataClient.WorkspaceID() # WorkspaceID | Workspace name
try:
# Get an existing workspace
api_response = api_instance.get_workspace(workspace_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkspacesApi->get_workspace: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | WorkspaceID | Workspace name |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspaceMembers get_workspace_members_list(workspace_id)
Get the list members of a workspace
Retrieve the list of members of the given workspace
from __future__ import print_function
import time
import XataClient
from XataClient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = XataClient.WorkspacesApi()
workspace_id = XataClient.WorkspaceID() # WorkspaceID | Workspace name
try:
# Get the list members of a workspace
api_response = api_instance.get_workspace_members_list(workspace_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkspacesApi->get_workspace_members_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | WorkspaceID | Workspace name |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2001 get_workspaces_list()
Get workspaces
Retrieve the list of workspaces the user belongs to
from __future__ import print_function
import time
import XataClient
from XataClient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = XataClient.WorkspacesApi()
try:
# Get workspaces
api_response = api_instance.get_workspaces_list()
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkspacesApi->get_workspaces_list: %s\n" % e)
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspaceInvite invite_workspace_member(workspace_id, body=body)
Invite a user to join the workspace
Invite some user to join the workspace with the given role
from __future__ import print_function
import time
import XataClient
from XataClient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = XataClient.WorkspacesApi()
workspace_id = XataClient.WorkspaceID() # WorkspaceID | Workspace name
body = XataClient.WorkspaceIdInvitesBody() # WorkspaceIdInvitesBody | (optional)
try:
# Invite a user to join the workspace
api_response = api_instance.invite_workspace_member(workspace_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkspacesApi->invite_workspace_member: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | WorkspaceID | Workspace name | |
body | WorkspaceIdInvitesBody | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remove_workspace_member(workspace_id, user_id)
Remove a member from the workspace
Remove the member from the workspace
from __future__ import print_function
import time
import XataClient
from XataClient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = XataClient.WorkspacesApi()
workspace_id = XataClient.WorkspaceID() # WorkspaceID | Workspace name
user_id = XataClient.UserID() # UserID | UserID
try:
# Remove a member from the workspace
api_instance.remove_workspace_member(workspace_id, user_id)
except ApiException as e:
print("Exception when calling WorkspacesApi->remove_workspace_member: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | WorkspaceID | Workspace name | |
user_id | UserID | UserID |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
resend_workspace_member_invite(workspace_id, invite_id)
Resend Invite notification
This operation provides a way to resend an Invite notification. Invite notifications can only be sent for Invites not yet accepted.
from __future__ import print_function
import time
import XataClient
from XataClient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = XataClient.WorkspacesApi()
workspace_id = XataClient.WorkspaceID() # WorkspaceID | Workspace name
invite_id = XataClient.InviteID() # InviteID | Invite identifier
try:
# Resend Invite notification
api_instance.resend_workspace_member_invite(workspace_id, invite_id)
except ApiException as e:
print("Exception when calling WorkspacesApi->resend_workspace_member_invite: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | WorkspaceID | Workspace name | |
invite_id | InviteID | Invite identifier |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Workspace update_workspace(workspace_id, body=body)
Update an existing workspace
Update workspace info
from __future__ import print_function
import time
import XataClient
from XataClient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = XataClient.WorkspacesApi()
workspace_id = XataClient.WorkspaceID() # WorkspaceID | Workspace name
body = XataClient.WorkspaceMeta() # WorkspaceMeta | (optional)
try:
# Update an existing workspace
api_response = api_instance.update_workspace(workspace_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkspacesApi->update_workspace: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | WorkspaceID | Workspace name | |
body | WorkspaceMeta | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_workspace_member_role(workspace_id, user_id, body=body)
Update workspace member role
Update a workspace member role. Workspaces must always have at least one owner, so this operation will fail if trying to remove owner role from the last owner in the workspace.
from __future__ import print_function
import time
import XataClient
from XataClient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = XataClient.WorkspacesApi()
workspace_id = XataClient.WorkspaceID() # WorkspaceID | Workspace name
user_id = XataClient.UserID() # UserID | UserID
body = XataClient.MembersUserIdBody() # MembersUserIdBody | (optional)
try:
# Update workspace member role
api_instance.update_workspace_member_role(workspace_id, user_id, body=body)
except ApiException as e:
print("Exception when calling WorkspacesApi->update_workspace_member_role: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | WorkspaceID | Workspace name | |
user_id | UserID | UserID | |
body | MembersUserIdBody | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]