Skip to content

Commit cdcc3b2

Browse files
jfrench9claude
andauthored
Refactor API endpoints to include 'graphs' scope in URL paths (#18)
## Summary This PR implements a significant API restructuring to improve endpoint organization by introducing 'graphs' as a URL path scope. The changes standardize how graph-related operations are accessed and provide better API consistency across the robosystems client. ## Key Accomplishments - **API Path Standardization**: Updated all API endpoints to include 'graphs' in their URL paths, creating a more intuitive and hierarchical API structure - **Module Reorganization**: Consolidated graph-related functionality by: - Moving `create` module contents into a new unified `graphs` module - Migrating user graph operations (`get_user_graphs`, `select_user_graph`) to the `graphs` module with cleaner naming - Renaming functions for better clarity (`get_user_graphs` → `get_graphs`, `select_user_graph` → `select_graph`) - **Code Cleanup**: Removed unused SSO authentication components (`sso_login.py` and related models) - **Comprehensive Coverage**: Updated 59 files across all major API categories including agents, backups, connections, analytics, billing, credits, health monitoring, and more ## Breaking Changes ⚠️ - **URL Structure**: All API endpoints now require 'graphs' in their URL paths - **Import Paths**: - `robosystems_client.api.create.*` → `robosystems_client.api.graphs.*` - `robosystems_client.api.user.get_user_graphs` → `robosystems_client.api.graphs.get_graphs` - `robosystems_client.api.user.select_user_graph` → `robosystems_client.api.graphs.select_graph` - **Model Changes**: Removed `SsoLoginRequest` model - **Function Signatures**: Graph selection and retrieval functions have updated names and potentially modified parameters ## Testing Notes - Verify all API endpoints respond correctly with the new URL structure - Test graph creation, selection, and management workflows end-to-end - Confirm that existing client integrations are updated to use new import paths - Validate that authentication flows work correctly after SSO login removal - Test all graph-scoped operations (analytics, billing, credits, backups, etc.) function properly ## Infrastructure Considerations - Client applications will need to update their API endpoint configurations - Any hardcoded URL paths in external systems must be updated to include the 'graphs' scope - Monitor for increased error rates during the transition period as clients update - Consider implementing URL redirects or backwards compatibility if needed for gradual migration - Update API documentation and client SDK examples to reflect the new structure --- 🤖 Generated with [Claude Code](https://claude.ai/code) **Branch Info:** - Source: `refactor/graph-scope-change` - Target: `main` - Type: feature Co-Authored-By: Claude <noreply@anthropic.com>
2 parents 8d0b366 + d8c75ae commit cdcc3b2

59 files changed

Lines changed: 97 additions & 296 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎robosystems_client/api/agent/auto_select_agent.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _get_kwargs(
3636

3737
_kwargs: dict[str, Any] = {
3838
"method": "post",
39-
"url": f"/v1/{graph_id}/agent",
39+
"url": f"/v1/graphs/{graph_id}/agent",
4040
"params": params,
4141
}
4242

‎robosystems_client/api/agent/batch_process_queries.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _get_kwargs(
3535

3636
_kwargs: dict[str, Any] = {
3737
"method": "post",
38-
"url": f"/v1/{graph_id}/agent/batch",
38+
"url": f"/v1/graphs/{graph_id}/agent/batch",
3939
"params": params,
4040
}
4141

‎robosystems_client/api/agent/execute_specific_agent.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def _get_kwargs(
3737

3838
_kwargs: dict[str, Any] = {
3939
"method": "post",
40-
"url": f"/v1/{graph_id}/agent/{agent_type}",
40+
"url": f"/v1/graphs/{graph_id}/agent/{agent_type}",
4141
"params": params,
4242
}
4343

‎robosystems_client/api/agent/get_agent_metadata.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _get_kwargs(
3434

3535
_kwargs: dict[str, Any] = {
3636
"method": "get",
37-
"url": f"/v1/{graph_id}/agent/{agent_type}/metadata",
37+
"url": f"/v1/graphs/{graph_id}/agent/{agent_type}/metadata",
3838
"params": params,
3939
}
4040

‎robosystems_client/api/agent/list_agents.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def _get_kwargs(
4141

4242
_kwargs: dict[str, Any] = {
4343
"method": "get",
44-
"url": f"/v1/{graph_id}/agent/list",
44+
"url": f"/v1/graphs/{graph_id}/agent/list",
4545
"params": params,
4646
}
4747

‎robosystems_client/api/agent/recommend_agent.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _get_kwargs(
3535

3636
_kwargs: dict[str, Any] = {
3737
"method": "post",
38-
"url": f"/v1/{graph_id}/agent/recommend",
38+
"url": f"/v1/graphs/{graph_id}/agent/recommend",
3939
"params": params,
4040
}
4141

‎robosystems_client/api/auth/sso_login.py‎

Lines changed: 0 additions & 177 deletions
This file was deleted.

‎robosystems_client/api/backup/create_backup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _get_kwargs(
3535

3636
_kwargs: dict[str, Any] = {
3737
"method": "post",
38-
"url": f"/v1/{graph_id}/backups",
38+
"url": f"/v1/graphs/{graph_id}/backups",
3939
"params": params,
4040
}
4141

‎robosystems_client/api/backup/export_backup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def _get_kwargs(
3333

3434
_kwargs: dict[str, Any] = {
3535
"method": "post",
36-
"url": f"/v1/{graph_id}/backups/{backup_id}/export",
36+
"url": f"/v1/graphs/{graph_id}/backups/{backup_id}/export",
3737
"params": params,
3838
}
3939

‎robosystems_client/api/backup/get_backup_download_url.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def _get_kwargs(
3939

4040
_kwargs: dict[str, Any] = {
4141
"method": "get",
42-
"url": f"/v1/{graph_id}/backups/{backup_id}/download",
42+
"url": f"/v1/graphs/{graph_id}/backups/{backup_id}/download",
4343
"params": params,
4444
}
4545

0 commit comments

Comments
 (0)