All URIs are relative to http://localhost:8080
| Method | HTTP request | Description |
|---|---|---|
| create_workspace | POST /organizations/{organization_id}/workspaces | Create a new workspace |
| create_workspace_access_control | POST /organizations/{organization_id}/workspaces/{workspace_id}/security/access | Add a control access to the Workspace |
| create_workspace_file | POST /organizations/{organization_id}/workspaces/{workspace_id}/files | Upload a file for the Workspace |
| delete_workspace | DELETE /organizations/{organization_id}/workspaces/{workspace_id} | Delete a workspace |
| delete_workspace_access_control | DELETE /organizations/{organization_id}/workspaces/{workspace_id}/security/access/{identity_id} | Remove the specified access from the given Workspace |
| delete_workspace_file | DELETE /organizations/{organization_id}/workspaces/{workspace_id}/files/delete | Delete a workspace file |
| delete_workspace_files | DELETE /organizations/{organization_id}/workspaces/{workspace_id}/files | Delete all Workspace files |
| get_workspace | GET /organizations/{organization_id}/workspaces/{workspace_id} | Get the details of a workspace |
| get_workspace_access_control | GET /organizations/{organization_id}/workspaces/{workspace_id}/security/access/{identity_id} | Get a control access for the Workspace |
| get_workspace_file | GET /organizations/{organization_id}/workspaces/{workspace_id}/files/download | Download the Workspace File specified |
| get_workspace_security | GET /organizations/{organization_id}/workspaces/{workspace_id}/security | Get the Workspace security information |
| list_workspace_files | GET /organizations/{organization_id}/workspaces/{workspace_id}/files | List all Workspace files |
| list_workspace_role_permissions | GET /organizations/{organization_id}/workspaces/{workspace_id}/permissions/{role} | Get the Workspace permission by given role |
| list_workspace_security_users | GET /organizations/{organization_id}/workspaces/{workspace_id}/security/users | Get the Workspace security users list |
| list_workspaces | GET /organizations/{organization_id}/workspaces | List all Workspaces |
| update_workspace | PATCH /organizations/{organization_id}/workspaces/{workspace_id} | Update a workspace |
| update_workspace_access_control | PATCH /organizations/{organization_id}/workspaces/{workspace_id}/security/access/{identity_id} | Update the specified access to User for a Workspace |
| update_workspace_default_security | PATCH /organizations/{organization_id}/workspaces/{workspace_id}/security/default | Update the Workspace default security |
Workspace create_workspace(organization_id, workspace_create_request)
Create a new workspace
Create a new workspace.
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.models.workspace import Workspace
from cosmotech_api.models.workspace_create_request import WorkspaceCreateRequest
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_create_request = cosmotech_api.WorkspaceCreateRequest() # WorkspaceCreateRequest | The Workspace to create
try:
# Create a new workspace
api_response = api_instance.create_workspace(organization_id, workspace_create_request)
print("The response of WorkspaceApi->create_workspace:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->create_workspace: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_create_request | WorkspaceCreateRequest | The Workspace to create |
- Content-Type: application/json, application/yaml
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 201 | The workspace details | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspaceAccessControl create_workspace_access_control(organization_id, workspace_id, workspace_access_control)
Add a control access to the Workspace
Grant access to a workspace for a user or group.
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.models.workspace_access_control import WorkspaceAccessControl
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
workspace_access_control = cosmotech_api.WorkspaceAccessControl() # WorkspaceAccessControl | The new Workspace security access to add.
try:
# Add a control access to the Workspace
api_response = api_instance.create_workspace_access_control(organization_id, workspace_id, workspace_access_control)
print("The response of WorkspaceApi->create_workspace_access_control:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->create_workspace_access_control: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier | |
| workspace_access_control | WorkspaceAccessControl | The new Workspace security access to add. |
- Content-Type: application/json, application/yaml
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 201 | The Workspace access | - |
| 404 | The Workspace specified is unknown or you don't have access to it | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspaceFile create_workspace_file(organization_id, workspace_id, file, overwrite=overwrite, destination=destination)
Upload a file for the Workspace
Upload a file to workspace storage. Use 'destination' to specify path, 'overwrite' to replace existing files.
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.models.workspace_file import WorkspaceFile
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
file = None # bytearray | The file to upload
overwrite = False # bool | Whether to overwrite an existing file (optional) (default to False)
destination = 'destination_example' # str | Destination path. Must end with a '/' if specifying a folder. Note that paths may or may not start with a '/', but they are always treated as relative to the Workspace root location. (optional)
try:
# Upload a file for the Workspace
api_response = api_instance.create_workspace_file(organization_id, workspace_id, file, overwrite=overwrite, destination=destination)
print("The response of WorkspaceApi->create_workspace_file:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->create_workspace_file: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier | |
| file | bytearray | The file to upload | |
| overwrite | bool | Whether to overwrite an existing file | [optional] [default to False] |
| destination | str | Destination path. Must end with a '/' if specifying a folder. Note that paths may or may not start with a '/', but they are always treated as relative to the Workspace root location. | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 201 | The file resource details | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_workspace(organization_id, workspace_id)
Delete a workspace
Permanently delete a workspace.
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
try:
# Delete a workspace
api_instance.delete_workspace(organization_id, workspace_id)
except Exception as e:
print("Exception when calling WorkspaceApi->delete_workspace: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | The workspace details | - |
| 400 | Bad request | - |
| 404 | The Workspace specified is unknown or you don't have access to it | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_workspace_access_control(organization_id, workspace_id, identity_id)
Remove the specified access from the given Workspace
Remove a user's access to a workspace. Cannot remove the last administrator.
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
identity_id = 'identity_id_example' # str | The User identifier
try:
# Remove the specified access from the given Workspace
api_instance.delete_workspace_access_control(organization_id, workspace_id, identity_id)
except Exception as e:
print("Exception when calling WorkspaceApi->delete_workspace_access_control: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier | |
| identity_id | str | The User identifier |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | Request succeeded | - |
| 404 | The Workspace or the user specified is unknown or you don't have access to them | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_workspace_file(organization_id, workspace_id, file_name)
Delete a workspace file
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
file_name = 'file_name_example' # str | The file name
try:
# Delete a workspace file
api_instance.delete_workspace_file(organization_id, workspace_id, file_name)
except Exception as e:
print("Exception when calling WorkspaceApi->delete_workspace_file: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier | |
| file_name | str | The file name |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | Request succeeded | - |
| 404 | The Workspace or the file specified is unknown or you don't have access to them | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_workspace_files(organization_id, workspace_id)
Delete all Workspace files
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
try:
# Delete all Workspace files
api_instance.delete_workspace_files(organization_id, workspace_id)
except Exception as e:
print("Exception when calling WorkspaceApi->delete_workspace_files: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | Request succeeded | - |
| 404 | The Workspace specified is unknown or you don't have access to them | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Workspace get_workspace(organization_id, workspace_id)
Get the details of a workspace
Retrieve detailed information about a workspace.
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.models.workspace import Workspace
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
try:
# Get the details of a workspace
api_response = api_instance.get_workspace(organization_id, workspace_id)
print("The response of WorkspaceApi->get_workspace:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->get_workspace: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier |
- Content-Type: Not defined
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 200 | The Workspace details | - |
| 404 | The Workspace specified is unknown or you don't have access to it | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspaceAccessControl get_workspace_access_control(organization_id, workspace_id, identity_id)
Get a control access for the Workspace
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.models.workspace_access_control import WorkspaceAccessControl
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
identity_id = 'identity_id_example' # str | The User identifier
try:
# Get a control access for the Workspace
api_response = api_instance.get_workspace_access_control(organization_id, workspace_id, identity_id)
print("The response of WorkspaceApi->get_workspace_access_control:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->get_workspace_access_control: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier | |
| identity_id | str | The User identifier |
- Content-Type: Not defined
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 200 | The Workspace access | - |
| 404 | The Workspace or user specified is unknown or you don't have access to it | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray get_workspace_file(organization_id, workspace_id, file_name)
Download the Workspace File specified
Download a specific file from workspace storage. Returns file as binary stream.
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
file_name = 'file_name_example' # str | The file name
try:
# Download the Workspace File specified
api_response = api_instance.get_workspace_file(organization_id, workspace_id, file_name)
print("The response of WorkspaceApi->get_workspace_file:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->get_workspace_file: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier | |
| file_name | str | The file name |
bytearray
- Content-Type: Not defined
- Accept: application/octet-stream
| Status code | Description | Response headers |
|---|---|---|
| 200 | The workspace file as a resource | - |
| 404 | The Workspace file specified is unknown or you don't have access to it | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspaceSecurity get_workspace_security(organization_id, workspace_id)
Get the Workspace security information
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.models.workspace_security import WorkspaceSecurity
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
try:
# Get the Workspace security information
api_response = api_instance.get_workspace_security(organization_id, workspace_id)
print("The response of WorkspaceApi->get_workspace_security:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->get_workspace_security: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier |
- Content-Type: Not defined
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 200 | The Workspace security | - |
| 404 | The Workspace specified is unknown or you don't have access to it | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[WorkspaceFile] list_workspace_files(organization_id, workspace_id)
List all Workspace files
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.models.workspace_file import WorkspaceFile
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
try:
# List all Workspace files
api_response = api_instance.list_workspace_files(organization_id, workspace_id)
print("The response of WorkspaceApi->list_workspace_files:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->list_workspace_files: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier |
- Content-Type: Not defined
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 200 | The workspace files | - |
| 404 | The Workspace specified is unknown or you don't have access to it | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[str] list_workspace_role_permissions(organization_id, workspace_id, role)
Get the Workspace permission by given role
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
role = 'role_example' # str | The Role
try:
# Get the Workspace permission by given role
api_response = api_instance.list_workspace_role_permissions(organization_id, workspace_id, role)
print("The response of WorkspaceApi->list_workspace_role_permissions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->list_workspace_role_permissions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier | |
| role | str | The Role |
List[str]
- Content-Type: Not defined
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 200 | The Workspace security permission list | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[str] list_workspace_security_users(organization_id, workspace_id)
Get the Workspace security users list
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
try:
# Get the Workspace security users list
api_response = api_instance.list_workspace_security_users(organization_id, workspace_id)
print("The response of WorkspaceApi->list_workspace_security_users:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->list_workspace_security_users: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier |
List[str]
- Content-Type: Not defined
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 200 | The Workspace security users list | - |
| 404 | The Workspace or the User specified is unknown or you don't have access to them | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[Workspace] list_workspaces(organization_id, page=page, size=size)
List all Workspaces
Retrieve a paginated list of all workspaces in an organization that the user has permission to view.
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.models.workspace import Workspace
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
page = 56 # int | Page number to query (first page is at index 0) (optional)
size = 56 # int | Amount of result by page (optional)
try:
# List all Workspaces
api_response = api_instance.list_workspaces(organization_id, page=page, size=size)
print("The response of WorkspaceApi->list_workspaces:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->list_workspaces: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| page | int | Page number to query (first page is at index 0) | [optional] |
| size | int | Amount of result by page | [optional] |
- Content-Type: Not defined
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 200 | The workspace details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Workspace update_workspace(organization_id, workspace_id, workspace_update_request)
Update a workspace
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.models.workspace import Workspace
from cosmotech_api.models.workspace_update_request import WorkspaceUpdateRequest
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
workspace_update_request = cosmotech_api.WorkspaceUpdateRequest() # WorkspaceUpdateRequest | The new Workspace details. This endpoint can't be used to update security
try:
# Update a workspace
api_response = api_instance.update_workspace(organization_id, workspace_id, workspace_update_request)
print("The response of WorkspaceApi->update_workspace:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->update_workspace: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier | |
| workspace_update_request | WorkspaceUpdateRequest | The new Workspace details. This endpoint can't be used to update security |
- Content-Type: application/json, application/yaml
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 200 | The workspace details | - |
| 400 | Bad request | - |
| 404 | The Workspace specified is unknown or you don't have access to it | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspaceAccessControl update_workspace_access_control(organization_id, workspace_id, identity_id, workspace_role)
Update the specified access to User for a Workspace
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.models.workspace_access_control import WorkspaceAccessControl
from cosmotech_api.models.workspace_role import WorkspaceRole
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
identity_id = 'identity_id_example' # str | The User identifier
workspace_role = cosmotech_api.WorkspaceRole() # WorkspaceRole | The new Workspace Access Control
try:
# Update the specified access to User for a Workspace
api_response = api_instance.update_workspace_access_control(organization_id, workspace_id, identity_id, workspace_role)
print("The response of WorkspaceApi->update_workspace_access_control:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->update_workspace_access_control: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier | |
| identity_id | str | The User identifier | |
| workspace_role | WorkspaceRole | The new Workspace Access Control |
- Content-Type: application/json, application/yaml
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 200 | The Workspace access | - |
| 404 | The Workspace specified is unknown or you don't have access to it | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspaceSecurity update_workspace_default_security(organization_id, workspace_id, workspace_role)
Update the Workspace default security
- OAuth Authentication (oAuth2AuthCode):
import cosmotech_api
from cosmotech_api.models.workspace_role import WorkspaceRole
from cosmotech_api.models.workspace_security import WorkspaceSecurity
from cosmotech_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = cosmotech_api.Configuration(
host = "http://localhost:8080"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with cosmotech_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cosmotech_api.WorkspaceApi(api_client)
organization_id = 'organization_id_example' # str | The Organization identifier
workspace_id = 'workspace_id_example' # str | The Workspace identifier
workspace_role = cosmotech_api.WorkspaceRole() # WorkspaceRole | This change the workspace default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the workspace.
try:
# Update the Workspace default security
api_response = api_instance.update_workspace_default_security(organization_id, workspace_id, workspace_role)
print("The response of WorkspaceApi->update_workspace_default_security:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WorkspaceApi->update_workspace_default_security: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | The Organization identifier | |
| workspace_id | str | The Workspace identifier | |
| workspace_role | WorkspaceRole | This change the workspace default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the workspace. |
- Content-Type: application/json, application/yaml
- Accept: application/json, application/yaml
| Status code | Description | Response headers |
|---|---|---|
| 201 | The Workspace default visibility | - |
| 404 | The Workspace specified is unknown or you don't have access to it | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]