diff --git a/CHANGELOG.md b/CHANGELOG.md index 15e7c1f..264f4a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- chore(query-runs): clarify user_public_id documentation - feat(databases): add search parameter to list endpoint - chore(databases): make pagination fields nullable diff --git a/docs/QueryApi.md b/docs/QueryApi.md index 2a1607b..f769189 100644 --- a/docs/QueryApi.md +++ b/docs/QueryApi.md @@ -19,7 +19,6 @@ Set `async: true` to execute asynchronously — returns a query run ID for polli ### Example * Api Key Authentication (WorkspaceId): -* Api Key Authentication (SessionId): * Bearer Authentication (BearerAuth): ```python @@ -46,12 +45,6 @@ configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['WorkspaceId'] = 'Bearer' -# Configure API key authorization: SessionId -configuration.api_key['SessionId'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['SessionId'] = 'Bearer' - # Configure Bearer authorization: BearerAuth configuration = hotdata.Configuration( access_token = os.environ["BEARER_TOKEN"] @@ -89,7 +82,7 @@ Name | Type | Description | Notes ### Authorization -[WorkspaceId](../README.md#WorkspaceId), [SessionId](../README.md#SessionId), [BearerAuth](../README.md#BearerAuth) +[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) ### HTTP request headers diff --git a/docs/QueryRunInfo.md b/docs/QueryRunInfo.md index e2b1cf2..b66c521 100644 --- a/docs/QueryRunInfo.md +++ b/docs/QueryRunInfo.md @@ -23,7 +23,7 @@ Name | Type | Description | Notes **sql_text** | **str** | | **status** | **str** | | **trace_id** | **str** | | [optional] -**user_public_id** | **str** | Caller identity derived from the Authorization Bearer token (SHA-256 hash). Format: `user_{first_10_hex_chars}`. | [optional] +**user_public_id** | **str** | Who ran this query: the account id from the access token the request was made with. Use it to group a caller's query history. Requests made with a credential that identifies no account instead record an opaque `user_`-prefixed identifier, which is stable for that credential but cannot be resolved to an account. | [optional] **warning_message** | **str** | | [optional] ## Example diff --git a/docs/ResultsApi.md b/docs/ResultsApi.md index b4c933d..bcc28b1 100644 --- a/docs/ResultsApi.md +++ b/docs/ResultsApi.md @@ -35,7 +35,6 @@ IEEE special floats (`±Inf`, `NaN`) have no canonical JSON representation. For ### Example * Api Key Authentication (WorkspaceId): -* Api Key Authentication (SessionId): * Bearer Authentication (BearerAuth): ```python @@ -62,12 +61,6 @@ configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['WorkspaceId'] = 'Bearer' -# Configure API key authorization: SessionId -configuration.api_key['SessionId'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['SessionId'] = 'Bearer' - # Configure Bearer authorization: BearerAuth configuration = hotdata.Configuration( access_token = os.environ["BEARER_TOKEN"] @@ -111,7 +104,7 @@ Name | Type | Description | Notes ### Authorization -[WorkspaceId](../README.md#WorkspaceId), [SessionId](../README.md#SessionId), [BearerAuth](../README.md#BearerAuth) +[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) ### HTTP request headers @@ -140,7 +133,6 @@ List stored results for the database named by the required X-Database-Id header. ### Example * Api Key Authentication (WorkspaceId): -* Api Key Authentication (SessionId): * Bearer Authentication (BearerAuth): ```python @@ -166,12 +158,6 @@ configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['WorkspaceId'] = 'Bearer' -# Configure API key authorization: SessionId -configuration.api_key['SessionId'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['SessionId'] = 'Bearer' - # Configure Bearer authorization: BearerAuth configuration = hotdata.Configuration( access_token = os.environ["BEARER_TOKEN"] @@ -211,7 +197,7 @@ Name | Type | Description | Notes ### Authorization -[WorkspaceId](../README.md#WorkspaceId), [SessionId](../README.md#SessionId), [BearerAuth](../README.md#BearerAuth) +[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) ### HTTP request headers diff --git a/hotdata/api/query_api.py b/hotdata/api/query_api.py index f23589c..0719e0e 100644 --- a/hotdata/api/query_api.py +++ b/hotdata/api/query_api.py @@ -327,7 +327,6 @@ def _query_serialize( # authentication setting _auth_settings: List[str] = [ 'WorkspaceId', - 'SessionId', 'BearerAuth' ] diff --git a/hotdata/api/results_api.py b/hotdata/api/results_api.py index da1a78e..18e873d 100644 --- a/hotdata/api/results_api.py +++ b/hotdata/api/results_api.py @@ -364,7 +364,6 @@ def _get_result_serialize( # authentication setting _auth_settings: List[str] = [ 'WorkspaceId', - 'SessionId', 'BearerAuth' ] @@ -667,7 +666,6 @@ def _list_results_serialize( # authentication setting _auth_settings: List[str] = [ 'WorkspaceId', - 'SessionId', 'BearerAuth' ] diff --git a/hotdata/configuration.py b/hotdata/configuration.py index eb36bd8..af2f6fb 100644 --- a/hotdata/configuration.py +++ b/hotdata/configuration.py @@ -115,7 +115,6 @@ { "BearerAuth": BearerAuthSetting, "WorkspaceId": APIKeyAuthSetting, - "SessionId": APIKeyAuthSetting, }, total=False, ) @@ -599,15 +598,6 @@ def auth_settings(self)-> AuthSettings: 'WorkspaceId', ), } - if 'SessionId' in self.api_keys: - auth['SessionId'] = { - 'type': 'api_key', - 'in': 'header', - 'key': 'X-Session-Id', - 'value': self.get_api_key_with_prefix( - 'SessionId', - ), - } return auth def to_debug_report(self) -> str: diff --git a/hotdata/models/query_run_info.py b/hotdata/models/query_run_info.py index 070a9d5..b47edab 100644 --- a/hotdata/models/query_run_info.py +++ b/hotdata/models/query_run_info.py @@ -45,7 +45,7 @@ class QueryRunInfo(BaseModel): sql_text: StrictStr status: StrictStr trace_id: Optional[StrictStr] = None - user_public_id: Optional[StrictStr] = Field(default=None, description="Caller identity derived from the Authorization Bearer token (SHA-256 hash). Format: `user_{first_10_hex_chars}`.") + user_public_id: Optional[StrictStr] = Field(default=None, description="Who ran this query: the account id from the access token the request was made with. Use it to group a caller's query history. Requests made with a credential that identifies no account instead record an opaque `user_`-prefixed identifier, which is stable for that credential but cannot be resolved to an account.") warning_message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["bytes_scanned", "completed_at", "created_at", "error_message", "execution_time_ms", "id", "result_id", "row_count", "rows_scanned", "saved_query_id", "saved_query_version", "server_processing_ms", "snapshot_id", "sql_hash", "sql_text", "status", "trace_id", "user_public_id", "warning_message"]