From 38c272725afe30a556913c3889b50224c48dfc72 Mon Sep 17 00:00:00 2001 From: Joey French Date: Sun, 18 Jan 2026 13:31:38 -0600 Subject: [PATCH 1/2] refactor: update URL formatting in API calls to use `quote` for safer parameter handling ## Summary This commit refactors multiple API endpoint definitions across various modules to utilize the `quote` function from `urllib.parse`. This change ensures that URL parameters are properly encoded, enhancing the safety and reliability of API calls. ## Key Changes - Updated URL formatting in API calls to replace f-strings with `.format()` method using `quote` for `graph_id`, `agent_type`, `backup_id`, `org_id`, `subscription_id`, `user_id`, and other parameters. - Ensured consistent handling of special characters in URLs to prevent potential issues with API requests. ## Files Affected - Multiple files across the `agent`, `backup`, `billing`, `connections`, `credits`, `files`, `graph_health`, `graph_info`, `graph_limits`, `org`, `org_members`, `org_usage`, `query`, `schema`, `subgraphs`, `subscriptions`, `tables`, `usage`, and `user` modules. ## Testing Notes - Verify that all API calls function correctly with the updated URL formatting. - Ensure that any existing tests cover the modified endpoints to validate the changes. ## Infrastructure Considerations This change improves the robustness of API interactions by ensuring that all parameters are safely encoded, reducing the risk of errors during API requests. --- robosystems_client/api/agent/auto_select_agent.py | 5 ++++- robosystems_client/api/agent/batch_process_queries.py | 5 ++++- robosystems_client/api/agent/execute_specific_agent.py | 6 +++++- robosystems_client/api/agent/get_agent_metadata.py | 6 +++++- robosystems_client/api/agent/list_agents.py | 5 ++++- robosystems_client/api/agent/recommend_agent.py | 5 ++++- robosystems_client/api/backup/create_backup.py | 5 ++++- robosystems_client/api/backup/get_backup_download_url.py | 6 +++++- robosystems_client/api/backup/get_backup_stats.py | 5 ++++- robosystems_client/api/backup/list_backups.py | 5 ++++- robosystems_client/api/backup/restore_backup.py | 6 +++++- robosystems_client/api/billing/cancel_org_subscription.py | 6 +++++- robosystems_client/api/billing/create_portal_session.py | 5 ++++- robosystems_client/api/billing/get_checkout_status.py | 5 ++++- robosystems_client/api/billing/get_org_billing_customer.py | 5 ++++- robosystems_client/api/billing/get_org_subscription.py | 6 +++++- robosystems_client/api/billing/get_org_upcoming_invoice.py | 5 ++++- robosystems_client/api/billing/list_org_invoices.py | 5 ++++- robosystems_client/api/billing/list_org_subscriptions.py | 5 ++++- robosystems_client/api/connections/create_connection.py | 5 ++++- robosystems_client/api/connections/create_link_token.py | 5 ++++- robosystems_client/api/connections/delete_connection.py | 6 +++++- robosystems_client/api/connections/exchange_link_token.py | 5 ++++- robosystems_client/api/connections/get_connection.py | 6 +++++- .../api/connections/get_connection_options.py | 5 ++++- robosystems_client/api/connections/init_o_auth.py | 5 ++++- robosystems_client/api/connections/list_connections.py | 5 ++++- robosystems_client/api/connections/oauth_callback.py | 6 +++++- robosystems_client/api/connections/sync_connection.py | 6 +++++- robosystems_client/api/credits_/check_credit_balance.py | 5 ++++- robosystems_client/api/credits_/check_storage_limits.py | 5 ++++- robosystems_client/api/credits_/get_credit_summary.py | 5 ++++- robosystems_client/api/credits_/get_storage_usage.py | 5 ++++- robosystems_client/api/credits_/list_credit_transactions.py | 5 ++++- robosystems_client/api/files/create_file_upload.py | 5 ++++- robosystems_client/api/files/delete_file.py | 6 +++++- robosystems_client/api/files/get_file.py | 6 +++++- robosystems_client/api/files/list_files.py | 5 ++++- robosystems_client/api/files/update_file.py | 6 +++++- robosystems_client/api/graph_health/get_database_health.py | 5 ++++- robosystems_client/api/graph_info/get_database_info.py | 5 ++++- robosystems_client/api/graph_limits/get_graph_limits.py | 5 ++++- robosystems_client/api/graphs/select_graph.py | 5 ++++- .../api/materialize/get_materialization_status.py | 5 ++++- robosystems_client/api/materialize/materialize_graph.py | 5 ++++- robosystems_client/api/mcp/call_mcp_tool.py | 5 ++++- robosystems_client/api/mcp/list_mcp_tools.py | 5 ++++- robosystems_client/api/operations/cancel_operation.py | 5 ++++- robosystems_client/api/operations/get_operation_status.py | 5 ++++- .../api/operations/stream_operation_events.py | 5 ++++- robosystems_client/api/org/get_org.py | 5 ++++- robosystems_client/api/org/list_org_graphs.py | 5 ++++- robosystems_client/api/org/update_org.py | 5 ++++- robosystems_client/api/org_members/invite_org_member.py | 5 ++++- robosystems_client/api/org_members/list_org_members.py | 5 ++++- robosystems_client/api/org_members/remove_org_member.py | 6 +++++- .../api/org_members/update_org_member_role.py | 6 +++++- robosystems_client/api/org_usage/get_org_limits.py | 5 ++++- robosystems_client/api/org_usage/get_org_usage.py | 5 ++++- robosystems_client/api/query/execute_cypher_query.py | 5 ++++- robosystems_client/api/schema/export_graph_schema.py | 5 ++++- robosystems_client/api/schema/get_graph_schema.py | 5 ++++- robosystems_client/api/schema/validate_schema.py | 5 ++++- robosystems_client/api/subgraphs/create_subgraph.py | 5 ++++- robosystems_client/api/subgraphs/delete_subgraph.py | 6 +++++- robosystems_client/api/subgraphs/get_subgraph_info.py | 6 +++++- robosystems_client/api/subgraphs/get_subgraph_quota.py | 5 ++++- robosystems_client/api/subgraphs/list_subgraphs.py | 5 ++++- .../api/subscriptions/create_repository_subscription.py | 5 ++++- .../api/subscriptions/get_graph_subscription.py | 5 ++++- .../api/subscriptions/upgrade_subscription.py | 5 ++++- robosystems_client/api/tables/list_tables.py | 5 ++++- robosystems_client/api/tables/query_tables.py | 5 ++++- robosystems_client/api/usage/get_graph_metrics.py | 5 ++++- robosystems_client/api/usage/get_graph_usage_analytics.py | 5 ++++- robosystems_client/api/user/revoke_user_api_key.py | 5 ++++- robosystems_client/api/user/update_user_api_key.py | 5 ++++- robosystems_client/api/views/create_view.py | 5 ++++- robosystems_client/api/views/save_view.py | 5 ++++- 79 files changed, 333 insertions(+), 79 deletions(-) diff --git a/robosystems_client/api/agent/auto_select_agent.py b/robosystems_client/api/agent/auto_select_agent.py index e54ee3c..75ff31b 100644 --- a/robosystems_client/api/agent/auto_select_agent.py +++ b/robosystems_client/api/agent/auto_select_agent.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -36,7 +37,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/agent", + "url": "/v1/graphs/{graph_id}/agent".format( + graph_id=quote(str(graph_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/agent/batch_process_queries.py b/robosystems_client/api/agent/batch_process_queries.py index 7b632e8..35a842c 100644 --- a/robosystems_client/api/agent/batch_process_queries.py +++ b/robosystems_client/api/agent/batch_process_queries.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/agent/batch", + "url": "/v1/graphs/{graph_id}/agent/batch".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/agent/execute_specific_agent.py b/robosystems_client/api/agent/execute_specific_agent.py index eb3374f..05ae9b6 100644 --- a/robosystems_client/api/agent/execute_specific_agent.py +++ b/robosystems_client/api/agent/execute_specific_agent.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -37,7 +38,10 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/agent/{agent_type}", + "url": "/v1/graphs/{graph_id}/agent/{agent_type}".format( + graph_id=quote(str(graph_id), safe=""), + agent_type=quote(str(agent_type), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/agent/get_agent_metadata.py b/robosystems_client/api/agent/get_agent_metadata.py index c6fa81a..cdb9f18 100644 --- a/robosystems_client/api/agent/get_agent_metadata.py +++ b/robosystems_client/api/agent/get_agent_metadata.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -16,7 +17,10 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/agent/{agent_type}", + "url": "/v1/graphs/{graph_id}/agent/{agent_type}".format( + graph_id=quote(str(graph_id), safe=""), + agent_type=quote(str(agent_type), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/agent/list_agents.py b/robosystems_client/api/agent/list_agents.py index 592eda0..fcd90e8 100644 --- a/robosystems_client/api/agent/list_agents.py +++ b/robosystems_client/api/agent/list_agents.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -28,7 +29,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/agent", + "url": "/v1/graphs/{graph_id}/agent".format( + graph_id=quote(str(graph_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/agent/recommend_agent.py b/robosystems_client/api/agent/recommend_agent.py index 07f42c2..b71962e 100644 --- a/robosystems_client/api/agent/recommend_agent.py +++ b/robosystems_client/api/agent/recommend_agent.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/agent/recommend", + "url": "/v1/graphs/{graph_id}/agent/recommend".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/backup/create_backup.py b/robosystems_client/api/backup/create_backup.py index 929b70c..ca57030 100644 --- a/robosystems_client/api/backup/create_backup.py +++ b/robosystems_client/api/backup/create_backup.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/backups", + "url": "/v1/graphs/{graph_id}/backups".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/backup/get_backup_download_url.py b/robosystems_client/api/backup/get_backup_download_url.py index 99053f4..bba3a4a 100644 --- a/robosystems_client/api/backup/get_backup_download_url.py +++ b/robosystems_client/api/backup/get_backup_download_url.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -24,7 +25,10 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/backups/{backup_id}/download", + "url": "/v1/graphs/{graph_id}/backups/{backup_id}/download".format( + graph_id=quote(str(graph_id), safe=""), + backup_id=quote(str(backup_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/backup/get_backup_stats.py b/robosystems_client/api/backup/get_backup_stats.py index 6ac3af5..1b91c90 100644 --- a/robosystems_client/api/backup/get_backup_stats.py +++ b/robosystems_client/api/backup/get_backup_stats.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/backups/stats", + "url": "/v1/graphs/{graph_id}/backups/stats".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/backup/list_backups.py b/robosystems_client/api/backup/list_backups.py index da9ef64..39ba240 100644 --- a/robosystems_client/api/backup/list_backups.py +++ b/robosystems_client/api/backup/list_backups.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -26,7 +27,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/backups", + "url": "/v1/graphs/{graph_id}/backups".format( + graph_id=quote(str(graph_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/backup/restore_backup.py b/robosystems_client/api/backup/restore_backup.py index deee42c..4a05625 100644 --- a/robosystems_client/api/backup/restore_backup.py +++ b/robosystems_client/api/backup/restore_backup.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -21,7 +22,10 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/backups/{backup_id}/restore", + "url": "/v1/graphs/{graph_id}/backups/{backup_id}/restore".format( + graph_id=quote(str(graph_id), safe=""), + backup_id=quote(str(backup_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/billing/cancel_org_subscription.py b/robosystems_client/api/billing/cancel_org_subscription.py index 0fe000b..b024066 100644 --- a/robosystems_client/api/billing/cancel_org_subscription.py +++ b/robosystems_client/api/billing/cancel_org_subscription.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,7 +17,10 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}/cancel", + "url": "/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}/cancel".format( + org_id=quote(str(org_id), safe=""), + subscription_id=quote(str(subscription_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/billing/create_portal_session.py b/robosystems_client/api/billing/create_portal_session.py index df6da84..4b971ea 100644 --- a/robosystems_client/api/billing/create_portal_session.py +++ b/robosystems_client/api/billing/create_portal_session.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/billing/customer/{org_id}/portal", + "url": "/v1/billing/customer/{org_id}/portal".format( + org_id=quote(str(org_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/billing/get_checkout_status.py b/robosystems_client/api/billing/get_checkout_status.py index bed3859..37f85cc 100644 --- a/robosystems_client/api/billing/get_checkout_status.py +++ b/robosystems_client/api/billing/get_checkout_status.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/billing/checkout/{session_id}/status", + "url": "/v1/billing/checkout/{session_id}/status".format( + session_id=quote(str(session_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/billing/get_org_billing_customer.py b/robosystems_client/api/billing/get_org_billing_customer.py index 7b80001..be461b5 100644 --- a/robosystems_client/api/billing/get_org_billing_customer.py +++ b/robosystems_client/api/billing/get_org_billing_customer.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/billing/customer/{org_id}", + "url": "/v1/billing/customer/{org_id}".format( + org_id=quote(str(org_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/billing/get_org_subscription.py b/robosystems_client/api/billing/get_org_subscription.py index b6e7d72..057be8a 100644 --- a/robosystems_client/api/billing/get_org_subscription.py +++ b/robosystems_client/api/billing/get_org_subscription.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,7 +17,10 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}", + "url": "/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}".format( + org_id=quote(str(org_id), safe=""), + subscription_id=quote(str(subscription_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/billing/get_org_upcoming_invoice.py b/robosystems_client/api/billing/get_org_upcoming_invoice.py index 8717d41..ebef0f8 100644 --- a/robosystems_client/api/billing/get_org_upcoming_invoice.py +++ b/robosystems_client/api/billing/get_org_upcoming_invoice.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/billing/invoices/{org_id}/upcoming", + "url": "/v1/billing/invoices/{org_id}/upcoming".format( + org_id=quote(str(org_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/billing/list_org_invoices.py b/robosystems_client/api/billing/list_org_invoices.py index ab58615..e4d7cd8 100644 --- a/robosystems_client/api/billing/list_org_invoices.py +++ b/robosystems_client/api/billing/list_org_invoices.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -23,7 +24,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/billing/invoices/{org_id}", + "url": "/v1/billing/invoices/{org_id}".format( + org_id=quote(str(org_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/billing/list_org_subscriptions.py b/robosystems_client/api/billing/list_org_subscriptions.py index 42beec3..02090cb 100644 --- a/robosystems_client/api/billing/list_org_subscriptions.py +++ b/robosystems_client/api/billing/list_org_subscriptions.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/billing/subscriptions/{org_id}", + "url": "/v1/billing/subscriptions/{org_id}".format( + org_id=quote(str(org_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/connections/create_connection.py b/robosystems_client/api/connections/create_connection.py index 5582a31..ba6094d 100644 --- a/robosystems_client/api/connections/create_connection.py +++ b/robosystems_client/api/connections/create_connection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/connections", + "url": "/v1/graphs/{graph_id}/connections".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/connections/create_link_token.py b/robosystems_client/api/connections/create_link_token.py index 4ac5319..8d9bc9c 100644 --- a/robosystems_client/api/connections/create_link_token.py +++ b/robosystems_client/api/connections/create_link_token.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/connections/link/token", + "url": "/v1/graphs/{graph_id}/connections/link/token".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/connections/delete_connection.py b/robosystems_client/api/connections/delete_connection.py index 9aba508..dadb979 100644 --- a/robosystems_client/api/connections/delete_connection.py +++ b/robosystems_client/api/connections/delete_connection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -17,7 +18,10 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/graphs/{graph_id}/connections/{connection_id}", + "url": "/v1/graphs/{graph_id}/connections/{connection_id}".format( + graph_id=quote(str(graph_id), safe=""), + connection_id=quote(str(connection_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/connections/exchange_link_token.py b/robosystems_client/api/connections/exchange_link_token.py index 8a7b5ac..75eb4a6 100644 --- a/robosystems_client/api/connections/exchange_link_token.py +++ b/robosystems_client/api/connections/exchange_link_token.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/connections/link/exchange", + "url": "/v1/graphs/{graph_id}/connections/link/exchange".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/connections/get_connection.py b/robosystems_client/api/connections/get_connection.py index 388d96f..433f981 100644 --- a/robosystems_client/api/connections/get_connection.py +++ b/robosystems_client/api/connections/get_connection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -17,7 +18,10 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/connections/{connection_id}", + "url": "/v1/graphs/{graph_id}/connections/{connection_id}".format( + graph_id=quote(str(graph_id), safe=""), + connection_id=quote(str(connection_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/connections/get_connection_options.py b/robosystems_client/api/connections/get_connection_options.py index a065b4f..718225b 100644 --- a/robosystems_client/api/connections/get_connection_options.py +++ b/robosystems_client/api/connections/get_connection_options.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,7 +17,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/connections/options", + "url": "/v1/graphs/{graph_id}/connections/options".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/connections/init_o_auth.py b/robosystems_client/api/connections/init_o_auth.py index 879da23..d72a88e 100644 --- a/robosystems_client/api/connections/init_o_auth.py +++ b/robosystems_client/api/connections/init_o_auth.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/connections/oauth/init", + "url": "/v1/graphs/{graph_id}/connections/oauth/init".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/connections/list_connections.py b/robosystems_client/api/connections/list_connections.py index b1fabe7..8f2e8ae 100644 --- a/robosystems_client/api/connections/list_connections.py +++ b/robosystems_client/api/connections/list_connections.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -40,7 +41,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/connections", + "url": "/v1/graphs/{graph_id}/connections".format( + graph_id=quote(str(graph_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/connections/oauth_callback.py b/robosystems_client/api/connections/oauth_callback.py index 949de14..a091731 100644 --- a/robosystems_client/api/connections/oauth_callback.py +++ b/robosystems_client/api/connections/oauth_callback.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -21,7 +22,10 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/connections/oauth/callback/{provider}", + "url": "/v1/graphs/{graph_id}/connections/oauth/callback/{provider}".format( + graph_id=quote(str(graph_id), safe=""), + provider=quote(str(provider), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/connections/sync_connection.py b/robosystems_client/api/connections/sync_connection.py index 26e53d7..cb73e07 100644 --- a/robosystems_client/api/connections/sync_connection.py +++ b/robosystems_client/api/connections/sync_connection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -24,7 +25,10 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/connections/{connection_id}/sync", + "url": "/v1/graphs/{graph_id}/connections/{connection_id}/sync".format( + graph_id=quote(str(graph_id), safe=""), + connection_id=quote(str(connection_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/credits_/check_credit_balance.py b/robosystems_client/api/credits_/check_credit_balance.py index d4eb4fa..8412dce 100644 --- a/robosystems_client/api/credits_/check_credit_balance.py +++ b/robosystems_client/api/credits_/check_credit_balance.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -34,7 +35,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/credits/balance/check", + "url": "/v1/graphs/{graph_id}/credits/balance/check".format( + graph_id=quote(str(graph_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/credits_/check_storage_limits.py b/robosystems_client/api/credits_/check_storage_limits.py index 087d32c..f869c72 100644 --- a/robosystems_client/api/credits_/check_storage_limits.py +++ b/robosystems_client/api/credits_/check_storage_limits.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,7 +17,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/credits/storage/limits", + "url": "/v1/graphs/{graph_id}/credits/storage/limits".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/credits_/get_credit_summary.py b/robosystems_client/api/credits_/get_credit_summary.py index 24b5c7d..a17f059 100644 --- a/robosystems_client/api/credits_/get_credit_summary.py +++ b/robosystems_client/api/credits_/get_credit_summary.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,7 +17,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/credits/summary", + "url": "/v1/graphs/{graph_id}/credits/summary".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/credits_/get_storage_usage.py b/robosystems_client/api/credits_/get_storage_usage.py index 26ec3ae..1387f23 100644 --- a/robosystems_client/api/credits_/get_storage_usage.py +++ b/robosystems_client/api/credits_/get_storage_usage.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -26,7 +27,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/credits/storage/usage", + "url": "/v1/graphs/{graph_id}/credits/storage/usage".format( + graph_id=quote(str(graph_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/credits_/list_credit_transactions.py b/robosystems_client/api/credits_/list_credit_transactions.py index ede9588..aa375d8 100644 --- a/robosystems_client/api/credits_/list_credit_transactions.py +++ b/robosystems_client/api/credits_/list_credit_transactions.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -59,7 +60,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/credits/transactions", + "url": "/v1/graphs/{graph_id}/credits/transactions".format( + graph_id=quote(str(graph_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/files/create_file_upload.py b/robosystems_client/api/files/create_file_upload.py index 503531e..97b9119 100644 --- a/robosystems_client/api/files/create_file_upload.py +++ b/robosystems_client/api/files/create_file_upload.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/files", + "url": "/v1/graphs/{graph_id}/files".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/files/delete_file.py b/robosystems_client/api/files/delete_file.py index 4d6a4d1..7d282cd 100644 --- a/robosystems_client/api/files/delete_file.py +++ b/robosystems_client/api/files/delete_file.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -25,7 +26,10 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/graphs/{graph_id}/files/{file_id}", + "url": "/v1/graphs/{graph_id}/files/{file_id}".format( + graph_id=quote(str(graph_id), safe=""), + file_id=quote(str(file_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/files/get_file.py b/robosystems_client/api/files/get_file.py index 64691f9..ee390e4 100644 --- a/robosystems_client/api/files/get_file.py +++ b/robosystems_client/api/files/get_file.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -17,7 +18,10 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/files/{file_id}", + "url": "/v1/graphs/{graph_id}/files/{file_id}".format( + graph_id=quote(str(graph_id), safe=""), + file_id=quote(str(file_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/files/list_files.py b/robosystems_client/api/files/list_files.py index 88734dd..5ad1db7 100644 --- a/robosystems_client/api/files/list_files.py +++ b/robosystems_client/api/files/list_files.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -37,7 +38,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/files", + "url": "/v1/graphs/{graph_id}/files".format( + graph_id=quote(str(graph_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/files/update_file.py b/robosystems_client/api/files/update_file.py index 0dfcc7c..36b2826 100644 --- a/robosystems_client/api/files/update_file.py +++ b/robosystems_client/api/files/update_file.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -22,7 +23,10 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "patch", - "url": f"/v1/graphs/{graph_id}/files/{file_id}", + "url": "/v1/graphs/{graph_id}/files/{file_id}".format( + graph_id=quote(str(graph_id), safe=""), + file_id=quote(str(file_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/graph_health/get_database_health.py b/robosystems_client/api/graph_health/get_database_health.py index f3f960e..9f6240d 100644 --- a/robosystems_client/api/graph_health/get_database_health.py +++ b/robosystems_client/api/graph_health/get_database_health.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/health", + "url": "/v1/graphs/{graph_id}/health".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/graph_info/get_database_info.py b/robosystems_client/api/graph_info/get_database_info.py index e1052b7..80d1022 100644 --- a/robosystems_client/api/graph_info/get_database_info.py +++ b/robosystems_client/api/graph_info/get_database_info.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/info", + "url": "/v1/graphs/{graph_id}/info".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/graph_limits/get_graph_limits.py b/robosystems_client/api/graph_limits/get_graph_limits.py index 832bb94..a64b8b1 100644 --- a/robosystems_client/api/graph_limits/get_graph_limits.py +++ b/robosystems_client/api/graph_limits/get_graph_limits.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/limits", + "url": "/v1/graphs/{graph_id}/limits".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/graphs/select_graph.py b/robosystems_client/api/graphs/select_graph.py index 6c8daac..9f648f5 100644 --- a/robosystems_client/api/graphs/select_graph.py +++ b/robosystems_client/api/graphs/select_graph.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,7 +17,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/select", + "url": "/v1/graphs/{graph_id}/select".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/materialize/get_materialization_status.py b/robosystems_client/api/materialize/get_materialization_status.py index 949e7ba..c822352 100644 --- a/robosystems_client/api/materialize/get_materialization_status.py +++ b/robosystems_client/api/materialize/get_materialization_status.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -16,7 +17,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/materialize/status", + "url": "/v1/graphs/{graph_id}/materialize/status".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/materialize/materialize_graph.py b/robosystems_client/api/materialize/materialize_graph.py index 767636f..fbca753 100644 --- a/robosystems_client/api/materialize/materialize_graph.py +++ b/robosystems_client/api/materialize/materialize_graph.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/materialize", + "url": "/v1/graphs/{graph_id}/materialize".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/mcp/call_mcp_tool.py b/robosystems_client/api/mcp/call_mcp_tool.py index 621308e..bf11317 100644 --- a/robosystems_client/api/mcp/call_mcp_tool.py +++ b/robosystems_client/api/mcp/call_mcp_tool.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -35,7 +36,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/mcp/call-tool", + "url": "/v1/graphs/{graph_id}/mcp/call-tool".format( + graph_id=quote(str(graph_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/mcp/list_mcp_tools.py b/robosystems_client/api/mcp/list_mcp_tools.py index 76f8337..6ce7af2 100644 --- a/robosystems_client/api/mcp/list_mcp_tools.py +++ b/robosystems_client/api/mcp/list_mcp_tools.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,7 +17,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/mcp/tools", + "url": "/v1/graphs/{graph_id}/mcp/tools".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/operations/cancel_operation.py b/robosystems_client/api/operations/cancel_operation.py index 7a6aa96..6fab01a 100644 --- a/robosystems_client/api/operations/cancel_operation.py +++ b/robosystems_client/api/operations/cancel_operation.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -17,7 +18,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/operations/{operation_id}", + "url": "/v1/operations/{operation_id}".format( + operation_id=quote(str(operation_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/operations/get_operation_status.py b/robosystems_client/api/operations/get_operation_status.py index 552a3fc..3d189a3 100644 --- a/robosystems_client/api/operations/get_operation_status.py +++ b/robosystems_client/api/operations/get_operation_status.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -17,7 +18,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/operations/{operation_id}/status", + "url": "/v1/operations/{operation_id}/status".format( + operation_id=quote(str(operation_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/operations/stream_operation_events.py b/robosystems_client/api/operations/stream_operation_events.py index 204719e..ed4b925 100644 --- a/robosystems_client/api/operations/stream_operation_events.py +++ b/robosystems_client/api/operations/stream_operation_events.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -35,7 +36,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/operations/{operation_id}/stream", + "url": "/v1/operations/{operation_id}/stream".format( + operation_id=quote(str(operation_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/org/get_org.py b/robosystems_client/api/org/get_org.py index 8120817..8f80db1 100644 --- a/robosystems_client/api/org/get_org.py +++ b/robosystems_client/api/org/get_org.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/orgs/{org_id}", + "url": "/v1/orgs/{org_id}".format( + org_id=quote(str(org_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/org/list_org_graphs.py b/robosystems_client/api/org/list_org_graphs.py index 23a2de4..9d05c56 100644 --- a/robosystems_client/api/org/list_org_graphs.py +++ b/robosystems_client/api/org/list_org_graphs.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/orgs/{org_id}/graphs", + "url": "/v1/orgs/{org_id}/graphs".format( + org_id=quote(str(org_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/org/update_org.py b/robosystems_client/api/org/update_org.py index 636f62f..27ff6f4 100644 --- a/robosystems_client/api/org/update_org.py +++ b/robosystems_client/api/org/update_org.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/orgs/{org_id}", + "url": "/v1/orgs/{org_id}".format( + org_id=quote(str(org_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/org_members/invite_org_member.py b/robosystems_client/api/org_members/invite_org_member.py index b4e457a..52ac594 100644 --- a/robosystems_client/api/org_members/invite_org_member.py +++ b/robosystems_client/api/org_members/invite_org_member.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/orgs/{org_id}/members", + "url": "/v1/orgs/{org_id}/members".format( + org_id=quote(str(org_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/org_members/list_org_members.py b/robosystems_client/api/org_members/list_org_members.py index 35bb4af..b216ad1 100644 --- a/robosystems_client/api/org_members/list_org_members.py +++ b/robosystems_client/api/org_members/list_org_members.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/orgs/{org_id}/members", + "url": "/v1/orgs/{org_id}/members".format( + org_id=quote(str(org_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/org_members/remove_org_member.py b/robosystems_client/api/org_members/remove_org_member.py index 54b5e03..fa8b848 100644 --- a/robosystems_client/api/org_members/remove_org_member.py +++ b/robosystems_client/api/org_members/remove_org_member.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -15,7 +16,10 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/orgs/{org_id}/members/{user_id}", + "url": "/v1/orgs/{org_id}/members/{user_id}".format( + org_id=quote(str(org_id), safe=""), + user_id=quote(str(user_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/org_members/update_org_member_role.py b/robosystems_client/api/org_members/update_org_member_role.py index 65bb2bb..00513f2 100644 --- a/robosystems_client/api/org_members/update_org_member_role.py +++ b/robosystems_client/api/org_members/update_org_member_role.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -21,7 +22,10 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/orgs/{org_id}/members/{user_id}", + "url": "/v1/orgs/{org_id}/members/{user_id}".format( + org_id=quote(str(org_id), safe=""), + user_id=quote(str(user_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/org_usage/get_org_limits.py b/robosystems_client/api/org_usage/get_org_limits.py index cbb0e2c..12250d6 100644 --- a/robosystems_client/api/org_usage/get_org_limits.py +++ b/robosystems_client/api/org_usage/get_org_limits.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/orgs/{org_id}/limits", + "url": "/v1/orgs/{org_id}/limits".format( + org_id=quote(str(org_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/org_usage/get_org_usage.py b/robosystems_client/api/org_usage/get_org_usage.py index c9d0956..ae513ad 100644 --- a/robosystems_client/api/org_usage/get_org_usage.py +++ b/robosystems_client/api/org_usage/get_org_usage.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -23,7 +24,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/orgs/{org_id}/usage", + "url": "/v1/orgs/{org_id}/usage".format( + org_id=quote(str(org_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/query/execute_cypher_query.py b/robosystems_client/api/query/execute_cypher_query.py index f727af0..96fd3b3 100644 --- a/robosystems_client/api/query/execute_cypher_query.py +++ b/robosystems_client/api/query/execute_cypher_query.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -46,7 +47,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/query", + "url": "/v1/graphs/{graph_id}/query".format( + graph_id=quote(str(graph_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/schema/export_graph_schema.py b/robosystems_client/api/schema/export_graph_schema.py index 5a2a0de..0c507c7 100644 --- a/robosystems_client/api/schema/export_graph_schema.py +++ b/robosystems_client/api/schema/export_graph_schema.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -26,7 +27,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/schema/export", + "url": "/v1/graphs/{graph_id}/schema/export".format( + graph_id=quote(str(graph_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/schema/get_graph_schema.py b/robosystems_client/api/schema/get_graph_schema.py index cc07b5b..fdeb7cf 100644 --- a/robosystems_client/api/schema/get_graph_schema.py +++ b/robosystems_client/api/schema/get_graph_schema.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/schema", + "url": "/v1/graphs/{graph_id}/schema".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/schema/validate_schema.py b/robosystems_client/api/schema/validate_schema.py index 287570c..8ce0ab8 100644 --- a/robosystems_client/api/schema/validate_schema.py +++ b/robosystems_client/api/schema/validate_schema.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/schema/validate", + "url": "/v1/graphs/{graph_id}/schema/validate".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/subgraphs/create_subgraph.py b/robosystems_client/api/subgraphs/create_subgraph.py index 76a26f2..0c2b1d0 100644 --- a/robosystems_client/api/subgraphs/create_subgraph.py +++ b/robosystems_client/api/subgraphs/create_subgraph.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/subgraphs", + "url": "/v1/graphs/{graph_id}/subgraphs".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/subgraphs/delete_subgraph.py b/robosystems_client/api/subgraphs/delete_subgraph.py index 12f1188..16c6bd9 100644 --- a/robosystems_client/api/subgraphs/delete_subgraph.py +++ b/robosystems_client/api/subgraphs/delete_subgraph.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -21,7 +22,10 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/graphs/{graph_id}/subgraphs/{subgraph_name}", + "url": "/v1/graphs/{graph_id}/subgraphs/{subgraph_name}".format( + graph_id=quote(str(graph_id), safe=""), + subgraph_name=quote(str(subgraph_name), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/subgraphs/get_subgraph_info.py b/robosystems_client/api/subgraphs/get_subgraph_info.py index 3ec3350..a40a6da 100644 --- a/robosystems_client/api/subgraphs/get_subgraph_info.py +++ b/robosystems_client/api/subgraphs/get_subgraph_info.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -16,7 +17,10 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/subgraphs/{subgraph_name}/info", + "url": "/v1/graphs/{graph_id}/subgraphs/{subgraph_name}/info".format( + graph_id=quote(str(graph_id), safe=""), + subgraph_name=quote(str(subgraph_name), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/subgraphs/get_subgraph_quota.py b/robosystems_client/api/subgraphs/get_subgraph_quota.py index 10ec833..0ff82b4 100644 --- a/robosystems_client/api/subgraphs/get_subgraph_quota.py +++ b/robosystems_client/api/subgraphs/get_subgraph_quota.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/subgraphs/quota", + "url": "/v1/graphs/{graph_id}/subgraphs/quota".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/subgraphs/list_subgraphs.py b/robosystems_client/api/subgraphs/list_subgraphs.py index 3a1192b..3946dd8 100644 --- a/robosystems_client/api/subgraphs/list_subgraphs.py +++ b/robosystems_client/api/subgraphs/list_subgraphs.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/subgraphs", + "url": "/v1/graphs/{graph_id}/subgraphs".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/subscriptions/create_repository_subscription.py b/robosystems_client/api/subscriptions/create_repository_subscription.py index 5745431..658528c 100644 --- a/robosystems_client/api/subscriptions/create_repository_subscription.py +++ b/robosystems_client/api/subscriptions/create_repository_subscription.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -22,7 +23,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/subscriptions", + "url": "/v1/graphs/{graph_id}/subscriptions".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/subscriptions/get_graph_subscription.py b/robosystems_client/api/subscriptions/get_graph_subscription.py index e14e28f..f25ea6d 100644 --- a/robosystems_client/api/subscriptions/get_graph_subscription.py +++ b/robosystems_client/api/subscriptions/get_graph_subscription.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -15,7 +16,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/subscriptions", + "url": "/v1/graphs/{graph_id}/subscriptions".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/subscriptions/upgrade_subscription.py b/robosystems_client/api/subscriptions/upgrade_subscription.py index a491282..fe0995d 100644 --- a/robosystems_client/api/subscriptions/upgrade_subscription.py +++ b/robosystems_client/api/subscriptions/upgrade_subscription.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/graphs/{graph_id}/subscriptions/upgrade", + "url": "/v1/graphs/{graph_id}/subscriptions/upgrade".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/tables/list_tables.py b/robosystems_client/api/tables/list_tables.py index 18990bd..e7a523b 100644 --- a/robosystems_client/api/tables/list_tables.py +++ b/robosystems_client/api/tables/list_tables.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -16,7 +17,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/tables", + "url": "/v1/graphs/{graph_id}/tables".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/tables/query_tables.py b/robosystems_client/api/tables/query_tables.py index 23044d3..71698d7 100644 --- a/robosystems_client/api/tables/query_tables.py +++ b/robosystems_client/api/tables/query_tables.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/tables/query", + "url": "/v1/graphs/{graph_id}/tables/query".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/usage/get_graph_metrics.py b/robosystems_client/api/usage/get_graph_metrics.py index b6264dd..c21cc8f 100644 --- a/robosystems_client/api/usage/get_graph_metrics.py +++ b/robosystems_client/api/usage/get_graph_metrics.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,7 +17,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/analytics", + "url": "/v1/graphs/{graph_id}/analytics".format( + graph_id=quote(str(graph_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/usage/get_graph_usage_analytics.py b/robosystems_client/api/usage/get_graph_usage_analytics.py index 89e50cb..c59c187 100644 --- a/robosystems_client/api/usage/get_graph_usage_analytics.py +++ b/robosystems_client/api/usage/get_graph_usage_analytics.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -36,7 +37,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/graphs/{graph_id}/analytics/usage", + "url": "/v1/graphs/{graph_id}/analytics/usage".format( + graph_id=quote(str(graph_id), safe=""), + ), "params": params, } diff --git a/robosystems_client/api/user/revoke_user_api_key.py b/robosystems_client/api/user/revoke_user_api_key.py index ebdf30d..3106046 100644 --- a/robosystems_client/api/user/revoke_user_api_key.py +++ b/robosystems_client/api/user/revoke_user_api_key.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,7 +17,9 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/user/api-keys/{api_key_id}", + "url": "/v1/user/api-keys/{api_key_id}".format( + api_key_id=quote(str(api_key_id), safe=""), + ), } return _kwargs diff --git a/robosystems_client/api/user/update_user_api_key.py b/robosystems_client/api/user/update_user_api_key.py index 17b9e52..20a87c3 100644 --- a/robosystems_client/api/user/update_user_api_key.py +++ b/robosystems_client/api/user/update_user_api_key.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/user/api-keys/{api_key_id}", + "url": "/v1/user/api-keys/{api_key_id}".format( + api_key_id=quote(str(api_key_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/views/create_view.py b/robosystems_client/api/views/create_view.py index 7f13fdb..df4a91c 100644 --- a/robosystems_client/api/views/create_view.py +++ b/robosystems_client/api/views/create_view.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -19,7 +20,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/views", + "url": "/v1/graphs/{graph_id}/views".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/robosystems_client/api/views/save_view.py b/robosystems_client/api/views/save_view.py index 6a626d4..93f311b 100644 --- a/robosystems_client/api/views/save_view.py +++ b/robosystems_client/api/views/save_view.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/graphs/{graph_id}/views/save", + "url": "/v1/graphs/{graph_id}/views/save".format( + graph_id=quote(str(graph_id), safe=""), + ), } _kwargs["json"] = body.to_dict() From 723fe6a3ad6eefe3671a28383a85dbe926efc7ec Mon Sep 17 00:00:00 2001 From: Joey French Date: Wed, 28 Jan 2026 18:37:22 -0600 Subject: [PATCH 2/2] fix: improve error handling for HTTP responses in QueryClient ## Summary This commit enhances the error handling mechanism in the `QueryClient` class to better manage HTTP error responses (4xx/5xx). It provides clearer error messages by parsing the response content and extracting relevant details. ## Key Changes - Added logic to handle error responses where the parsed response is `None`. - Improved exception messages to include HTTP status codes and detailed error information from the response body. ## Testing Notes - Verify that the error handling works correctly for various HTTP error scenarios. - Ensure that the exceptions raised provide meaningful information for debugging. ## Infrastructure Considerations This change improves the robustness of the `QueryClient` by ensuring that errors are reported with more context, aiding in troubleshooting and enhancing overall reliability. --- robosystems_client/extensions/query_client.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/robosystems_client/extensions/query_client.py b/robosystems_client/extensions/query_client.py index efab299..83e46e3 100644 --- a/robosystems_client/extensions/query_client.py +++ b/robosystems_client/extensions/query_client.py @@ -266,6 +266,23 @@ def execute_query( else: raise Exception(f"Query execution failed: {error_msg}") + # Handle error responses (4xx/5xx) where parsed is None + if hasattr(response, "status_code") and response.status_code >= 400: + import json as _json + + detail = f"HTTP {response.status_code}" + try: + body = ( + response.content.decode("utf-8") + if isinstance(response.content, bytes) + else str(response.content) + ) + error_data = _json.loads(body) + detail = error_data.get("detail", error_data.get("message", body)) + except Exception: + pass + raise Exception(f"Query failed ({response.status_code}): {detail}") + # Unexpected response format raise Exception("Unexpected response format from query endpoint")