All URIs are relative to https://staging.dev.clevermaps.io/rest
| Method | HTTP request | Description |
|---|---|---|
| create_organization | POST /organizations | Creates a new organization. |
| delete_organization | DELETE /organizations/{organizationId} | Delete an organization. |
| get_organization_by_id | GET /organizations/{organizationId} | Get organization detail. |
| get_organizations | GET /organizations | Get all organizations available for authenticated user. |
| update_organization | PUT /organizations/{organizationId} | Update organization. |
OrganizationResponseDTO create_organization(create_organization_dto)
Creates a new organization.
Security: Creating of organization is restricted to CleverMaps platform administrators.
- Bearer Authentication (bearerAuth):
import cm_python_openapi_sdk
from cm_python_openapi_sdk.models.create_organization_dto import CreateOrganizationDTO
from cm_python_openapi_sdk.models.organization_response_dto import OrganizationResponseDTO
from cm_python_openapi_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = cm_python_openapi_sdk.Configuration(
host = "https://staging.dev.clevermaps.io/rest"
)
# 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 = cm_python_openapi_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cm_python_openapi_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cm_python_openapi_sdk.OrganizationsApi(api_client)
create_organization_dto = {"title":"New Organization","dwhClusterId":"cmstd1"} # CreateOrganizationDTO |
try:
# Creates a new organization.
api_response = api_instance.create_organization(create_organization_dto)
print("The response of OrganizationsApi->create_organization:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->create_organization: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| create_organization_dto | CreateOrganizationDTO |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Organization was successfully created | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_organization(organization_id)
Delete an organization.
Security: Deleting of organization is restricted to CleverMaps platform administrators.
- Bearer Authentication (bearerAuth):
import cm_python_openapi_sdk
from cm_python_openapi_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = cm_python_openapi_sdk.Configuration(
host = "https://staging.dev.clevermaps.io/rest"
)
# 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 = cm_python_openapi_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cm_python_openapi_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cm_python_openapi_sdk.OrganizationsApi(api_client)
organization_id = 'bvc4hb9kufgaehed' # str | Id of the organization
try:
# Delete an organization.
api_instance.delete_organization(organization_id)
except Exception as e:
print("Exception when calling OrganizationsApi->delete_organization: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | Id of the organization |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | Organization was successfully deleted | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrganizationResponseDTO get_organization_by_id(organization_id)
Get organization detail.
- Bearer Authentication (bearerAuth):
import cm_python_openapi_sdk
from cm_python_openapi_sdk.models.organization_response_dto import OrganizationResponseDTO
from cm_python_openapi_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = cm_python_openapi_sdk.Configuration(
host = "https://staging.dev.clevermaps.io/rest"
)
# 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 = cm_python_openapi_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cm_python_openapi_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cm_python_openapi_sdk.OrganizationsApi(api_client)
organization_id = 'bvc4hb9kufgaehed' # str | Id of the organization
try:
# Get organization detail.
api_response = api_instance.get_organization_by_id(organization_id)
print("The response of OrganizationsApi->get_organization_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->get_organization_by_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | Id of the organization |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetOrganizations200Response get_organizations(page=page, size=size, project_id=project_id)
Get all organizations available for authenticated user.
- Bearer Authentication (bearerAuth):
import cm_python_openapi_sdk
from cm_python_openapi_sdk.models.get_organizations200_response import GetOrganizations200Response
from cm_python_openapi_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = cm_python_openapi_sdk.Configuration(
host = "https://staging.dev.clevermaps.io/rest"
)
# 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 = cm_python_openapi_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cm_python_openapi_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cm_python_openapi_sdk.OrganizationsApi(api_client)
page = 0 # int | Number of the page (optional) (default to 0)
size = 100 # int | The count of records to return for one page (optional) (default to 100)
project_id = 'srb6iq85a8h0ors3' # str | Id of the project, used in query parameters (optional)
try:
# Get all organizations available for authenticated user.
api_response = api_instance.get_organizations(page=page, size=size, project_id=project_id)
print("The response of OrganizationsApi->get_organizations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->get_organizations: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| page | int | Number of the page | [optional] [default to 0] |
| size | int | The count of records to return for one page | [optional] [default to 100] |
| project_id | str | Id of the project, used in query parameters | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrganizationResponseDTO update_organization(organization_id, update_organization_dto)
Update organization.
Security: Updating of organization is restricted to CleverMaps platform administrators.
- Bearer Authentication (bearerAuth):
import cm_python_openapi_sdk
from cm_python_openapi_sdk.models.organization_response_dto import OrganizationResponseDTO
from cm_python_openapi_sdk.models.update_organization_dto import UpdateOrganizationDTO
from cm_python_openapi_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = cm_python_openapi_sdk.Configuration(
host = "https://staging.dev.clevermaps.io/rest"
)
# 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 = cm_python_openapi_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cm_python_openapi_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cm_python_openapi_sdk.OrganizationsApi(api_client)
organization_id = 'bvc4hb9kufgaehed' # str | Id of the organization
update_organization_dto = {"title":"New Organization Name","invitationEmail":"invivations@organization.com","dwhClusterId":"cmstd1"} # UpdateOrganizationDTO |
try:
# Update organization.
api_response = api_instance.update_organization(organization_id, update_organization_dto)
print("The response of OrganizationsApi->update_organization:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->update_organization: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| organization_id | str | Id of the organization | |
| update_organization_dto | UpdateOrganizationDTO |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Organization was successfully updated | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]