Skip to content

Latest commit

 

History

History
429 lines (312 loc) · 13.3 KB

TenancyApi.md

File metadata and controls

429 lines (312 loc) · 13.3 KB

canopy.openapi.TenancyApi

All URIs are relative to http://localhost

Method HTTP request Description
tenancy_delete_tenant DELETE /tenants/{tenantId}
tenancy_get_tenant GET /tenants/{tenantId}
tenancy_get_tenant_users GET /tenants/{tenantId}/users
tenancy_get_tenants GET /tenants
tenancy_post_tenant POST /tenants
tenancy_put_tenant PUT /tenants/{tenantId}

tenancy_delete_tenant

tenancy_delete_tenant(tenant_id)

Example

  • OAuth Authentication (Bearer):
from __future__ import print_function
import time
import canopy.openapi
from canopy.openapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = canopy.openapi.Configuration(
    host = "http://localhost"
)

# 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 OAuth2 access token for authorization: Bearer
configuration = canopy.openapi.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with canopy.openapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = canopy.openapi.TenancyApi(api_client)
    tenant_id = 'tenant_id_example' # str | 

    try:
        api_instance.tenancy_delete_tenant(tenant_id)
    except ApiException as e:
        print("Exception when calling TenancyApi->tenancy_delete_tenant: %s\n" % e)

Parameters

Name Type Description Notes
tenant_id str

Return type

void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Success -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tenancy_get_tenant

GetTenantQueryResult tenancy_get_tenant(tenant_id)

Example

  • OAuth Authentication (Bearer):
from __future__ import print_function
import time
import canopy.openapi
from canopy.openapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = canopy.openapi.Configuration(
    host = "http://localhost"
)

# 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 OAuth2 access token for authorization: Bearer
configuration = canopy.openapi.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with canopy.openapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = canopy.openapi.TenancyApi(api_client)
    tenant_id = 'tenant_id_example' # str | 

    try:
        api_response = api_instance.tenancy_get_tenant(tenant_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling TenancyApi->tenancy_get_tenant: %s\n" % e)

Parameters

Name Type Description Notes
tenant_id str

Return type

GetTenantQueryResult

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

HTTP response details

Status code Description Response headers
200 Success -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tenancy_get_tenant_users

GetTenantUsersQueryResult tenancy_get_tenant_users(tenant_id)

Example

  • OAuth Authentication (Bearer):
from __future__ import print_function
import time
import canopy.openapi
from canopy.openapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = canopy.openapi.Configuration(
    host = "http://localhost"
)

# 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 OAuth2 access token for authorization: Bearer
configuration = canopy.openapi.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with canopy.openapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = canopy.openapi.TenancyApi(api_client)
    tenant_id = 'tenant_id_example' # str | 

    try:
        api_response = api_instance.tenancy_get_tenant_users(tenant_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling TenancyApi->tenancy_get_tenant_users: %s\n" % e)

Parameters

Name Type Description Notes
tenant_id str

Return type

GetTenantUsersQueryResult

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

HTTP response details

Status code Description Response headers
200 Success -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tenancy_get_tenants

GetTenantsQueryResult tenancy_get_tenants()

Example

  • OAuth Authentication (Bearer):
from __future__ import print_function
import time
import canopy.openapi
from canopy.openapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = canopy.openapi.Configuration(
    host = "http://localhost"
)

# 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 OAuth2 access token for authorization: Bearer
configuration = canopy.openapi.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with canopy.openapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = canopy.openapi.TenancyApi(api_client)
    
    try:
        api_response = api_instance.tenancy_get_tenants()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling TenancyApi->tenancy_get_tenants: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

GetTenantsQueryResult

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

HTTP response details

Status code Description Response headers
200 Success -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tenancy_post_tenant

tenancy_post_tenant(tenancy_post_tenant_request=tenancy_post_tenant_request)

Example

  • OAuth Authentication (Bearer):
from __future__ import print_function
import time
import canopy.openapi
from canopy.openapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = canopy.openapi.Configuration(
    host = "http://localhost"
)

# 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 OAuth2 access token for authorization: Bearer
configuration = canopy.openapi.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with canopy.openapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = canopy.openapi.TenancyApi(api_client)
    tenancy_post_tenant_request = canopy.openapi.TenancyPostTenantRequest() # TenancyPostTenantRequest |  (optional)

    try:
        api_instance.tenancy_post_tenant(tenancy_post_tenant_request=tenancy_post_tenant_request)
    except ApiException as e:
        print("Exception when calling TenancyApi->tenancy_post_tenant: %s\n" % e)

Parameters

Name Type Description Notes
tenancy_post_tenant_request TenancyPostTenantRequest [optional]

Return type

void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json-patch+json, application/json, text/json, application/*+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Success -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tenancy_put_tenant

tenancy_put_tenant(tenant_id, tenancy_put_tenant_request)

Example

  • OAuth Authentication (Bearer):
from __future__ import print_function
import time
import canopy.openapi
from canopy.openapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = canopy.openapi.Configuration(
    host = "http://localhost"
)

# 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 OAuth2 access token for authorization: Bearer
configuration = canopy.openapi.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with canopy.openapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = canopy.openapi.TenancyApi(api_client)
    tenant_id = 'tenant_id_example' # str | 
tenancy_put_tenant_request = canopy.openapi.TenancyPutTenantRequest() # TenancyPutTenantRequest | 

    try:
        api_instance.tenancy_put_tenant(tenant_id, tenancy_put_tenant_request)
    except ApiException as e:
        print("Exception when calling TenancyApi->tenancy_put_tenant: %s\n" % e)

Parameters

Name Type Description Notes
tenant_id str
tenancy_put_tenant_request TenancyPutTenantRequest

Return type

void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json-patch+json, application/json, text/json, application/*+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Success -

[Back to top] [Back to API list] [Back to Model list] [Back to README]