Skip to content

Latest commit

 

History

History
644 lines (441 loc) · 19.8 KB

File metadata and controls

644 lines (441 loc) · 19.8 KB

hotdata.ConnectionsApi

All URIs are relative to https://app.hotdata.dev

Method HTTP request Description
check_connection_health GET /v1/connections/{connection_id}/health Check connection health
create_connection POST /v1/connections Create connection
delete_connection DELETE /v1/connections/{connection_id} Delete connection
get_connection GET /v1/connections/{connection_id} Get connection
get_table_profile GET /v1/connections/{connection_id}/tables/{schema}/{table}/profile Get table profile
list_connections GET /v1/connections List connections
purge_connection_cache DELETE /v1/connections/{connection_id}/cache Purge connection cache
purge_table_cache DELETE /v1/connections/{connection_id}/tables/{schema}/{table}/cache Purge table cache

check_connection_health

ConnectionHealthResponse check_connection_health(connection_id)

Check connection health

Test connectivity to the remote database. Returns health status and latency.

Example

  • Bearer Authentication (BearerAuth):
import hotdata
from hotdata.models.connection_health_response import ConnectionHealthResponse
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.ConnectionsApi(api_client)
    connection_id = 'connection_id_example' # str | Connection ID

    try:
        # Check connection health
        api_response = api_instance.check_connection_health(connection_id)
        print("The response of ConnectionsApi->check_connection_health:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConnectionsApi->check_connection_health: %s\n" % e)

Parameters

Name Type Description Notes
connection_id str Connection ID

Return type

ConnectionHealthResponse

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Connection health status -
404 Connection not found -

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

create_connection

CreateConnectionResponse create_connection(create_connection_request)

Create connection

Register a new database connection. Provide the source type and connection config (host, port, database, etc.). Credentials can be supplied inline (password/token fields are auto-converted to secrets) or by referencing an existing secret by name or ID. Schema discovery runs automatically after registration.

Example

  • Bearer Authentication (BearerAuth):
import hotdata
from hotdata.models.create_connection_request import CreateConnectionRequest
from hotdata.models.create_connection_response import CreateConnectionResponse
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.ConnectionsApi(api_client)
    create_connection_request = hotdata.CreateConnectionRequest() # CreateConnectionRequest | 

    try:
        # Create connection
        api_response = api_instance.create_connection(create_connection_request)
        print("The response of ConnectionsApi->create_connection:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConnectionsApi->create_connection: %s\n" % e)

Parameters

Name Type Description Notes
create_connection_request CreateConnectionRequest

Return type

CreateConnectionResponse

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Connection created -
400 Invalid request -
409 Connection already exists -

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

delete_connection

delete_connection(connection_id)

Delete connection

Delete a connection and its cached data.

Example

  • Bearer Authentication (BearerAuth):
import hotdata
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.ConnectionsApi(api_client)
    connection_id = 'connection_id_example' # str | Connection ID

    try:
        # Delete connection
        api_instance.delete_connection(connection_id)
    except Exception as e:
        print("Exception when calling ConnectionsApi->delete_connection: %s\n" % e)

Parameters

Name Type Description Notes
connection_id str Connection ID

Return type

void (empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Connection deleted -
404 Connection not found -

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

get_connection

GetConnectionResponse get_connection(connection_id)

Get connection

Get details for a specific connection, including table and sync counts.

Example

  • Bearer Authentication (BearerAuth):
import hotdata
from hotdata.models.get_connection_response import GetConnectionResponse
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.ConnectionsApi(api_client)
    connection_id = 'connection_id_example' # str | Connection ID

    try:
        # Get connection
        api_response = api_instance.get_connection(connection_id)
        print("The response of ConnectionsApi->get_connection:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConnectionsApi->get_connection: %s\n" % e)

Parameters

Name Type Description Notes
connection_id str Connection ID

Return type

GetConnectionResponse

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Connection details -
404 Connection not found -

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

get_table_profile

TableProfileResponse get_table_profile(connection_id, var_schema, table)

Get table profile

Get column-level statistics for a synced table. Returns per-column profiles including cardinality, null counts, and type-specific details (distinct values for categorical columns, min/max for temporal/numeric, length stats for text). Profiles are computed at sync time.

Example

  • Bearer Authentication (BearerAuth):
import hotdata
from hotdata.models.table_profile_response import TableProfileResponse
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.ConnectionsApi(api_client)
    connection_id = 'connection_id_example' # str | Connection ID
    var_schema = 'var_schema_example' # str | Schema name
    table = 'table_example' # str | Table name

    try:
        # Get table profile
        api_response = api_instance.get_table_profile(connection_id, var_schema, table)
        print("The response of ConnectionsApi->get_table_profile:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConnectionsApi->get_table_profile: %s\n" % e)

Parameters

Name Type Description Notes
connection_id str Connection ID
var_schema str Schema name
table str Table name

Return type

TableProfileResponse

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Column profile statistics -
404 Table or profile not found -

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

list_connections

ListConnectionsResponse list_connections()

List connections

List all registered database connections.

Example

  • Bearer Authentication (BearerAuth):
import hotdata
from hotdata.models.list_connections_response import ListConnectionsResponse
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.ConnectionsApi(api_client)

    try:
        # List connections
        api_response = api_instance.list_connections()
        print("The response of ConnectionsApi->list_connections:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConnectionsApi->list_connections: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ListConnectionsResponse

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 List of connections -

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

purge_connection_cache

purge_connection_cache(connection_id)

Purge connection cache

Purge all cached data for a connection. The next query against these tables will trigger a fresh sync from the remote source.

Example

  • Bearer Authentication (BearerAuth):
import hotdata
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.ConnectionsApi(api_client)
    connection_id = 'connection_id_example' # str | Connection ID

    try:
        # Purge connection cache
        api_instance.purge_connection_cache(connection_id)
    except Exception as e:
        print("Exception when calling ConnectionsApi->purge_connection_cache: %s\n" % e)

Parameters

Name Type Description Notes
connection_id str Connection ID

Return type

void (empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Cache purged -
404 Connection not found -

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

purge_table_cache

purge_table_cache(connection_id, var_schema, table)

Purge table cache

Purge the cached data for a single table. The next query will trigger a fresh sync.

Example

  • Bearer Authentication (BearerAuth):
import hotdata
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.ConnectionsApi(api_client)
    connection_id = 'connection_id_example' # str | Connection ID
    var_schema = 'var_schema_example' # str | Schema name
    table = 'table_example' # str | Table name

    try:
        # Purge table cache
        api_instance.purge_table_cache(connection_id, var_schema, table)
    except Exception as e:
        print("Exception when calling ConnectionsApi->purge_table_cache: %s\n" % e)

Parameters

Name Type Description Notes
connection_id str Connection ID
var_schema str Schema name
table str Table name

Return type

void (empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Table cache purged -
404 Not found -

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