robosystems-client 0.2.3__py3-none-any.whl → 0.2.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of robosystems-client might be problematic. Click here for more details.
- robosystems_client/api/agent/auto_select_agent.py +1 -41
- robosystems_client/api/agent/batch_process_queries.py +1 -41
- robosystems_client/api/agent/execute_specific_agent.py +1 -41
- robosystems_client/api/agent/get_agent_metadata.py +5 -49
- robosystems_client/api/agent/list_agents.py +4 -42
- robosystems_client/api/agent/recommend_agent.py +5 -45
- robosystems_client/api/auth/generate_sso_token.py +0 -18
- robosystems_client/api/auth/get_current_auth_user.py +14 -74
- robosystems_client/api/auth/logout_user.py +14 -50
- robosystems_client/api/auth/refresh_auth_session.py +14 -50
- robosystems_client/api/auth/resend_verification_email.py +14 -74
- robosystems_client/api/backup/create_backup.py +5 -45
- robosystems_client/api/backup/get_backup_download_url.py +4 -42
- robosystems_client/api/backup/get_backup_stats.py +5 -49
- robosystems_client/api/backup/list_backups.py +4 -42
- robosystems_client/api/backup/restore_backup.py +5 -45
- robosystems_client/api/connections/create_connection.py +5 -45
- robosystems_client/api/connections/create_link_token.py +5 -45
- robosystems_client/api/connections/delete_connection.py +5 -49
- robosystems_client/api/connections/exchange_link_token.py +5 -45
- robosystems_client/api/connections/get_connection.py +5 -49
- robosystems_client/api/connections/get_connection_options.py +5 -49
- robosystems_client/api/connections/init_o_auth.py +5 -45
- robosystems_client/api/connections/list_connections.py +4 -42
- robosystems_client/api/connections/oauth_callback.py +5 -45
- robosystems_client/api/connections/sync_connection.py +5 -45
- robosystems_client/api/graph_analytics/get_graph_metrics.py +5 -49
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +4 -42
- robosystems_client/api/graph_billing/get_current_graph_bill.py +5 -49
- robosystems_client/api/graph_billing/get_graph_billing_history.py +4 -42
- robosystems_client/api/graph_billing/get_graph_monthly_bill.py +5 -49
- robosystems_client/api/graph_billing/get_graph_usage_details.py +4 -42
- robosystems_client/api/graph_credits/check_credit_balance.py +0 -38
- robosystems_client/api/graph_credits/check_storage_limits.py +1 -45
- robosystems_client/api/graph_credits/get_credit_summary.py +1 -45
- robosystems_client/api/graph_credits/get_storage_usage.py +0 -38
- robosystems_client/api/graph_credits/list_credit_transactions.py +4 -42
- robosystems_client/api/graph_health/get_database_health.py +5 -49
- robosystems_client/api/graph_info/get_database_info.py +5 -49
- robosystems_client/api/graph_limits/get_graph_limits.py +5 -49
- robosystems_client/api/graphs/create_graph.py +21 -57
- robosystems_client/api/graphs/get_available_extensions.py +131 -15
- robosystems_client/api/graphs/get_graphs.py +154 -79
- robosystems_client/api/graphs/select_graph.py +117 -49
- robosystems_client/api/mcp/call_mcp_tool.py +24 -47
- robosystems_client/api/mcp/list_mcp_tools.py +13 -61
- robosystems_client/api/operations/cancel_operation.py +1 -45
- robosystems_client/api/operations/get_operation_status.py +1 -45
- robosystems_client/api/query/execute_cypher_query.py +69 -53
- robosystems_client/api/schema/export_graph_schema.py +223 -65
- robosystems_client/api/schema/get_graph_schema.py +137 -79
- robosystems_client/api/schema/validate_schema.py +5 -45
- robosystems_client/api/subgraphs/create_subgraph.py +5 -45
- robosystems_client/api/subgraphs/delete_subgraph.py +5 -45
- robosystems_client/api/subgraphs/get_subgraph_info.py +5 -49
- robosystems_client/api/subgraphs/get_subgraph_quota.py +5 -49
- robosystems_client/api/subgraphs/list_subgraphs.py +5 -49
- robosystems_client/api/tables/delete_file.py +181 -301
- robosystems_client/api/tables/get_file_info.py +117 -265
- robosystems_client/api/tables/get_upload_url.py +193 -389
- robosystems_client/api/tables/ingest_tables.py +277 -465
- robosystems_client/api/tables/list_table_files.py +193 -373
- robosystems_client/api/tables/list_tables.py +189 -361
- robosystems_client/api/tables/query_tables.py +85 -141
- robosystems_client/api/tables/update_file_status.py +205 -349
- robosystems_client/api/user/create_user_api_key.py +1 -41
- robosystems_client/api/user/get_all_credit_summaries.py +14 -111
- robosystems_client/api/user/get_current_user.py +14 -75
- robosystems_client/api/user/list_user_api_keys.py +14 -75
- robosystems_client/api/user/revoke_user_api_key.py +1 -45
- robosystems_client/api/user/update_user.py +1 -41
- robosystems_client/api/user/update_user_api_key.py +1 -41
- robosystems_client/api/user/update_user_password.py +1 -41
- robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -38
- robosystems_client/api/user_analytics/get_user_usage_overview.py +14 -75
- robosystems_client/api/user_limits/get_all_shared_repository_limits.py +14 -105
- robosystems_client/api/user_limits/get_shared_repository_limits.py +1 -45
- robosystems_client/api/user_limits/get_user_limits.py +14 -75
- robosystems_client/api/user_limits/get_user_usage.py +14 -75
- robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +1 -45
- robosystems_client/api/user_subscriptions/get_repository_credits.py +1 -45
- robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +14 -75
- robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +0 -38
- robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +1 -41
- robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +1 -41
- robosystems_client/extensions/__init__.py +8 -1
- robosystems_client/extensions/auth_integration.py +1 -2
- robosystems_client/extensions/query_client.py +3 -2
- robosystems_client/extensions/sse_client.py +1 -1
- robosystems_client/extensions/table_ingest_client.py +5 -0
- robosystems_client/extensions/utils.py +2 -2
- robosystems_client/models/__init__.py +4 -4
- robosystems_client/models/create_graph_request.py +4 -3
- robosystems_client/models/cypher_query_request.py +5 -22
- robosystems_client/models/schema_export_response.py +4 -2
- robosystems_client/models/schema_info_response.py +77 -0
- robosystems_client/models/{get_graph_schema_response_getgraphschema.py → schema_info_response_schema.py} +6 -6
- robosystems_client/models/schema_validation_response.py +7 -6
- robosystems_client/models/table_query_request.py +37 -2
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/METADATA +2 -4
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/RECORD +103 -102
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Optional, Union
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
@@ -15,26 +15,13 @@ def _get_kwargs(
|
|
|
15
15
|
*,
|
|
16
16
|
format_: Union[Unset, str] = "json",
|
|
17
17
|
include_data_stats: Union[Unset, bool] = False,
|
|
18
|
-
token: Union[None, Unset, str] = UNSET,
|
|
19
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
20
18
|
) -> dict[str, Any]:
|
|
21
|
-
headers: dict[str, Any] = {}
|
|
22
|
-
if not isinstance(authorization, Unset):
|
|
23
|
-
headers["authorization"] = authorization
|
|
24
|
-
|
|
25
19
|
params: dict[str, Any] = {}
|
|
26
20
|
|
|
27
21
|
params["format"] = format_
|
|
28
22
|
|
|
29
23
|
params["include_data_stats"] = include_data_stats
|
|
30
24
|
|
|
31
|
-
json_token: Union[None, Unset, str]
|
|
32
|
-
if isinstance(token, Unset):
|
|
33
|
-
json_token = UNSET
|
|
34
|
-
else:
|
|
35
|
-
json_token = token
|
|
36
|
-
params["token"] = json_token
|
|
37
|
-
|
|
38
25
|
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
39
26
|
|
|
40
27
|
_kwargs: dict[str, Any] = {
|
|
@@ -43,23 +30,34 @@ def _get_kwargs(
|
|
|
43
30
|
"params": params,
|
|
44
31
|
}
|
|
45
32
|
|
|
46
|
-
_kwargs["headers"] = headers
|
|
47
33
|
return _kwargs
|
|
48
34
|
|
|
49
35
|
|
|
50
36
|
def _parse_response(
|
|
51
37
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
52
|
-
) -> Optional[Union[HTTPValidationError, SchemaExportResponse]]:
|
|
38
|
+
) -> Optional[Union[Any, HTTPValidationError, SchemaExportResponse]]:
|
|
53
39
|
if response.status_code == 200:
|
|
54
40
|
response_200 = SchemaExportResponse.from_dict(response.json())
|
|
55
41
|
|
|
56
42
|
return response_200
|
|
57
43
|
|
|
44
|
+
if response.status_code == 403:
|
|
45
|
+
response_403 = cast(Any, None)
|
|
46
|
+
return response_403
|
|
47
|
+
|
|
48
|
+
if response.status_code == 404:
|
|
49
|
+
response_404 = cast(Any, None)
|
|
50
|
+
return response_404
|
|
51
|
+
|
|
58
52
|
if response.status_code == 422:
|
|
59
53
|
response_422 = HTTPValidationError.from_dict(response.json())
|
|
60
54
|
|
|
61
55
|
return response_422
|
|
62
56
|
|
|
57
|
+
if response.status_code == 500:
|
|
58
|
+
response_500 = cast(Any, None)
|
|
59
|
+
return response_500
|
|
60
|
+
|
|
63
61
|
if client.raise_on_unexpected_status:
|
|
64
62
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
65
63
|
else:
|
|
@@ -68,7 +66,7 @@ def _parse_response(
|
|
|
68
66
|
|
|
69
67
|
def _build_response(
|
|
70
68
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
71
|
-
) -> Response[Union[HTTPValidationError, SchemaExportResponse]]:
|
|
69
|
+
) -> Response[Union[Any, HTTPValidationError, SchemaExportResponse]]:
|
|
72
70
|
return Response(
|
|
73
71
|
status_code=HTTPStatus(response.status_code),
|
|
74
72
|
content=response.content,
|
|
@@ -83,35 +81,75 @@ def sync_detailed(
|
|
|
83
81
|
client: AuthenticatedClient,
|
|
84
82
|
format_: Union[Unset, str] = "json",
|
|
85
83
|
include_data_stats: Union[Unset, bool] = False,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
) -> Response[Union[Any, HTTPValidationError, SchemaExportResponse]]:
|
|
85
|
+
"""Export Declared Graph Schema
|
|
86
|
+
|
|
87
|
+
Export the declared schema definition of an existing graph.
|
|
88
|
+
|
|
89
|
+
## What This Returns
|
|
90
|
+
|
|
91
|
+
This endpoint returns the **original schema definition** that was used to create the graph:
|
|
92
|
+
- The schema as it was **declared** during graph creation
|
|
93
|
+
- Complete node and relationship definitions
|
|
94
|
+
- Property types and constraints
|
|
95
|
+
- Schema metadata (name, version, type)
|
|
96
|
+
|
|
97
|
+
## Runtime vs Declared Schema
|
|
98
|
+
|
|
99
|
+
**Use this endpoint** (`/schema/export`) when you need:
|
|
100
|
+
- The original schema definition used to create the graph
|
|
101
|
+
- Schema in a specific format (JSON, YAML, Cypher DDL)
|
|
102
|
+
- Schema for documentation or version control
|
|
103
|
+
- Schema to replicate in another graph
|
|
104
|
+
|
|
105
|
+
**Use `/schema` instead** when you need:
|
|
106
|
+
- What data is ACTUALLY in the database right now
|
|
107
|
+
- What properties exist on real nodes (discovered from data)
|
|
108
|
+
- Current runtime database structure for querying
|
|
109
|
+
|
|
110
|
+
## Export Formats
|
|
111
|
+
|
|
112
|
+
### JSON Format (`format=json`)
|
|
113
|
+
Returns structured JSON with nodes, relationships, and properties.
|
|
114
|
+
Best for programmatic access and API integration.
|
|
115
|
+
|
|
116
|
+
### YAML Format (`format=yaml`)
|
|
117
|
+
Returns human-readable YAML with comments.
|
|
118
|
+
Best for documentation and configuration management.
|
|
90
119
|
|
|
91
|
-
|
|
120
|
+
### Cypher DDL Format (`format=cypher`)
|
|
121
|
+
Returns Cypher CREATE statements for recreating the schema.
|
|
122
|
+
Best for database migration and replication.
|
|
123
|
+
|
|
124
|
+
## Data Statistics
|
|
125
|
+
|
|
126
|
+
Set `include_data_stats=true` to include:
|
|
127
|
+
- Node counts by label
|
|
128
|
+
- Relationship counts by type
|
|
129
|
+
- Total nodes and relationships
|
|
130
|
+
|
|
131
|
+
This combines declared schema with runtime statistics.
|
|
132
|
+
|
|
133
|
+
This operation is included - no credit consumption required.
|
|
92
134
|
|
|
93
135
|
Args:
|
|
94
|
-
graph_id (str):
|
|
136
|
+
graph_id (str):
|
|
95
137
|
format_ (Union[Unset, str]): Export format: json, yaml, or cypher Default: 'json'.
|
|
96
138
|
include_data_stats (Union[Unset, bool]): Include statistics about actual data in the graph
|
|
97
|
-
Default: False.
|
|
98
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
99
|
-
authorization (Union[None, Unset, str]):
|
|
139
|
+
(node counts, relationship counts) Default: False.
|
|
100
140
|
|
|
101
141
|
Raises:
|
|
102
142
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
103
143
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
104
144
|
|
|
105
145
|
Returns:
|
|
106
|
-
Response[Union[HTTPValidationError, SchemaExportResponse]]
|
|
146
|
+
Response[Union[Any, HTTPValidationError, SchemaExportResponse]]
|
|
107
147
|
"""
|
|
108
148
|
|
|
109
149
|
kwargs = _get_kwargs(
|
|
110
150
|
graph_id=graph_id,
|
|
111
151
|
format_=format_,
|
|
112
152
|
include_data_stats=include_data_stats,
|
|
113
|
-
token=token,
|
|
114
|
-
authorization=authorization,
|
|
115
153
|
)
|
|
116
154
|
|
|
117
155
|
response = client.get_httpx_client().request(
|
|
@@ -127,27 +165,69 @@ def sync(
|
|
|
127
165
|
client: AuthenticatedClient,
|
|
128
166
|
format_: Union[Unset, str] = "json",
|
|
129
167
|
include_data_stats: Union[Unset, bool] = False,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
168
|
+
) -> Optional[Union[Any, HTTPValidationError, SchemaExportResponse]]:
|
|
169
|
+
"""Export Declared Graph Schema
|
|
170
|
+
|
|
171
|
+
Export the declared schema definition of an existing graph.
|
|
172
|
+
|
|
173
|
+
## What This Returns
|
|
174
|
+
|
|
175
|
+
This endpoint returns the **original schema definition** that was used to create the graph:
|
|
176
|
+
- The schema as it was **declared** during graph creation
|
|
177
|
+
- Complete node and relationship definitions
|
|
178
|
+
- Property types and constraints
|
|
179
|
+
- Schema metadata (name, version, type)
|
|
180
|
+
|
|
181
|
+
## Runtime vs Declared Schema
|
|
182
|
+
|
|
183
|
+
**Use this endpoint** (`/schema/export`) when you need:
|
|
184
|
+
- The original schema definition used to create the graph
|
|
185
|
+
- Schema in a specific format (JSON, YAML, Cypher DDL)
|
|
186
|
+
- Schema for documentation or version control
|
|
187
|
+
- Schema to replicate in another graph
|
|
188
|
+
|
|
189
|
+
**Use `/schema` instead** when you need:
|
|
190
|
+
- What data is ACTUALLY in the database right now
|
|
191
|
+
- What properties exist on real nodes (discovered from data)
|
|
192
|
+
- Current runtime database structure for querying
|
|
193
|
+
|
|
194
|
+
## Export Formats
|
|
195
|
+
|
|
196
|
+
### JSON Format (`format=json`)
|
|
197
|
+
Returns structured JSON with nodes, relationships, and properties.
|
|
198
|
+
Best for programmatic access and API integration.
|
|
199
|
+
|
|
200
|
+
### YAML Format (`format=yaml`)
|
|
201
|
+
Returns human-readable YAML with comments.
|
|
202
|
+
Best for documentation and configuration management.
|
|
203
|
+
|
|
204
|
+
### Cypher DDL Format (`format=cypher`)
|
|
205
|
+
Returns Cypher CREATE statements for recreating the schema.
|
|
206
|
+
Best for database migration and replication.
|
|
134
207
|
|
|
135
|
-
|
|
208
|
+
## Data Statistics
|
|
209
|
+
|
|
210
|
+
Set `include_data_stats=true` to include:
|
|
211
|
+
- Node counts by label
|
|
212
|
+
- Relationship counts by type
|
|
213
|
+
- Total nodes and relationships
|
|
214
|
+
|
|
215
|
+
This combines declared schema with runtime statistics.
|
|
216
|
+
|
|
217
|
+
This operation is included - no credit consumption required.
|
|
136
218
|
|
|
137
219
|
Args:
|
|
138
|
-
graph_id (str):
|
|
220
|
+
graph_id (str):
|
|
139
221
|
format_ (Union[Unset, str]): Export format: json, yaml, or cypher Default: 'json'.
|
|
140
222
|
include_data_stats (Union[Unset, bool]): Include statistics about actual data in the graph
|
|
141
|
-
Default: False.
|
|
142
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
143
|
-
authorization (Union[None, Unset, str]):
|
|
223
|
+
(node counts, relationship counts) Default: False.
|
|
144
224
|
|
|
145
225
|
Raises:
|
|
146
226
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
147
227
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
148
228
|
|
|
149
229
|
Returns:
|
|
150
|
-
Union[HTTPValidationError, SchemaExportResponse]
|
|
230
|
+
Union[Any, HTTPValidationError, SchemaExportResponse]
|
|
151
231
|
"""
|
|
152
232
|
|
|
153
233
|
return sync_detailed(
|
|
@@ -155,8 +235,6 @@ def sync(
|
|
|
155
235
|
client=client,
|
|
156
236
|
format_=format_,
|
|
157
237
|
include_data_stats=include_data_stats,
|
|
158
|
-
token=token,
|
|
159
|
-
authorization=authorization,
|
|
160
238
|
).parsed
|
|
161
239
|
|
|
162
240
|
|
|
@@ -166,35 +244,75 @@ async def asyncio_detailed(
|
|
|
166
244
|
client: AuthenticatedClient,
|
|
167
245
|
format_: Union[Unset, str] = "json",
|
|
168
246
|
include_data_stats: Union[Unset, bool] = False,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
247
|
+
) -> Response[Union[Any, HTTPValidationError, SchemaExportResponse]]:
|
|
248
|
+
"""Export Declared Graph Schema
|
|
249
|
+
|
|
250
|
+
Export the declared schema definition of an existing graph.
|
|
251
|
+
|
|
252
|
+
## What This Returns
|
|
253
|
+
|
|
254
|
+
This endpoint returns the **original schema definition** that was used to create the graph:
|
|
255
|
+
- The schema as it was **declared** during graph creation
|
|
256
|
+
- Complete node and relationship definitions
|
|
257
|
+
- Property types and constraints
|
|
258
|
+
- Schema metadata (name, version, type)
|
|
259
|
+
|
|
260
|
+
## Runtime vs Declared Schema
|
|
261
|
+
|
|
262
|
+
**Use this endpoint** (`/schema/export`) when you need:
|
|
263
|
+
- The original schema definition used to create the graph
|
|
264
|
+
- Schema in a specific format (JSON, YAML, Cypher DDL)
|
|
265
|
+
- Schema for documentation or version control
|
|
266
|
+
- Schema to replicate in another graph
|
|
267
|
+
|
|
268
|
+
**Use `/schema` instead** when you need:
|
|
269
|
+
- What data is ACTUALLY in the database right now
|
|
270
|
+
- What properties exist on real nodes (discovered from data)
|
|
271
|
+
- Current runtime database structure for querying
|
|
272
|
+
|
|
273
|
+
## Export Formats
|
|
274
|
+
|
|
275
|
+
### JSON Format (`format=json`)
|
|
276
|
+
Returns structured JSON with nodes, relationships, and properties.
|
|
277
|
+
Best for programmatic access and API integration.
|
|
278
|
+
|
|
279
|
+
### YAML Format (`format=yaml`)
|
|
280
|
+
Returns human-readable YAML with comments.
|
|
281
|
+
Best for documentation and configuration management.
|
|
282
|
+
|
|
283
|
+
### Cypher DDL Format (`format=cypher`)
|
|
284
|
+
Returns Cypher CREATE statements for recreating the schema.
|
|
285
|
+
Best for database migration and replication.
|
|
286
|
+
|
|
287
|
+
## Data Statistics
|
|
288
|
+
|
|
289
|
+
Set `include_data_stats=true` to include:
|
|
290
|
+
- Node counts by label
|
|
291
|
+
- Relationship counts by type
|
|
292
|
+
- Total nodes and relationships
|
|
173
293
|
|
|
174
|
-
|
|
294
|
+
This combines declared schema with runtime statistics.
|
|
295
|
+
|
|
296
|
+
This operation is included - no credit consumption required.
|
|
175
297
|
|
|
176
298
|
Args:
|
|
177
|
-
graph_id (str):
|
|
299
|
+
graph_id (str):
|
|
178
300
|
format_ (Union[Unset, str]): Export format: json, yaml, or cypher Default: 'json'.
|
|
179
301
|
include_data_stats (Union[Unset, bool]): Include statistics about actual data in the graph
|
|
180
|
-
Default: False.
|
|
181
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
182
|
-
authorization (Union[None, Unset, str]):
|
|
302
|
+
(node counts, relationship counts) Default: False.
|
|
183
303
|
|
|
184
304
|
Raises:
|
|
185
305
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
186
306
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
187
307
|
|
|
188
308
|
Returns:
|
|
189
|
-
Response[Union[HTTPValidationError, SchemaExportResponse]]
|
|
309
|
+
Response[Union[Any, HTTPValidationError, SchemaExportResponse]]
|
|
190
310
|
"""
|
|
191
311
|
|
|
192
312
|
kwargs = _get_kwargs(
|
|
193
313
|
graph_id=graph_id,
|
|
194
314
|
format_=format_,
|
|
195
315
|
include_data_stats=include_data_stats,
|
|
196
|
-
token=token,
|
|
197
|
-
authorization=authorization,
|
|
198
316
|
)
|
|
199
317
|
|
|
200
318
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -208,27 +326,69 @@ async def asyncio(
|
|
|
208
326
|
client: AuthenticatedClient,
|
|
209
327
|
format_: Union[Unset, str] = "json",
|
|
210
328
|
include_data_stats: Union[Unset, bool] = False,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
329
|
+
) -> Optional[Union[Any, HTTPValidationError, SchemaExportResponse]]:
|
|
330
|
+
"""Export Declared Graph Schema
|
|
331
|
+
|
|
332
|
+
Export the declared schema definition of an existing graph.
|
|
333
|
+
|
|
334
|
+
## What This Returns
|
|
335
|
+
|
|
336
|
+
This endpoint returns the **original schema definition** that was used to create the graph:
|
|
337
|
+
- The schema as it was **declared** during graph creation
|
|
338
|
+
- Complete node and relationship definitions
|
|
339
|
+
- Property types and constraints
|
|
340
|
+
- Schema metadata (name, version, type)
|
|
341
|
+
|
|
342
|
+
## Runtime vs Declared Schema
|
|
343
|
+
|
|
344
|
+
**Use this endpoint** (`/schema/export`) when you need:
|
|
345
|
+
- The original schema definition used to create the graph
|
|
346
|
+
- Schema in a specific format (JSON, YAML, Cypher DDL)
|
|
347
|
+
- Schema for documentation or version control
|
|
348
|
+
- Schema to replicate in another graph
|
|
349
|
+
|
|
350
|
+
**Use `/schema` instead** when you need:
|
|
351
|
+
- What data is ACTUALLY in the database right now
|
|
352
|
+
- What properties exist on real nodes (discovered from data)
|
|
353
|
+
- Current runtime database structure for querying
|
|
354
|
+
|
|
355
|
+
## Export Formats
|
|
356
|
+
|
|
357
|
+
### JSON Format (`format=json`)
|
|
358
|
+
Returns structured JSON with nodes, relationships, and properties.
|
|
359
|
+
Best for programmatic access and API integration.
|
|
360
|
+
|
|
361
|
+
### YAML Format (`format=yaml`)
|
|
362
|
+
Returns human-readable YAML with comments.
|
|
363
|
+
Best for documentation and configuration management.
|
|
364
|
+
|
|
365
|
+
### Cypher DDL Format (`format=cypher`)
|
|
366
|
+
Returns Cypher CREATE statements for recreating the schema.
|
|
367
|
+
Best for database migration and replication.
|
|
368
|
+
|
|
369
|
+
## Data Statistics
|
|
370
|
+
|
|
371
|
+
Set `include_data_stats=true` to include:
|
|
372
|
+
- Node counts by label
|
|
373
|
+
- Relationship counts by type
|
|
374
|
+
- Total nodes and relationships
|
|
375
|
+
|
|
376
|
+
This combines declared schema with runtime statistics.
|
|
215
377
|
|
|
216
|
-
|
|
378
|
+
This operation is included - no credit consumption required.
|
|
217
379
|
|
|
218
380
|
Args:
|
|
219
|
-
graph_id (str):
|
|
381
|
+
graph_id (str):
|
|
220
382
|
format_ (Union[Unset, str]): Export format: json, yaml, or cypher Default: 'json'.
|
|
221
383
|
include_data_stats (Union[Unset, bool]): Include statistics about actual data in the graph
|
|
222
|
-
Default: False.
|
|
223
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
224
|
-
authorization (Union[None, Unset, str]):
|
|
384
|
+
(node counts, relationship counts) Default: False.
|
|
225
385
|
|
|
226
386
|
Raises:
|
|
227
387
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
228
388
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
229
389
|
|
|
230
390
|
Returns:
|
|
231
|
-
Union[HTTPValidationError, SchemaExportResponse]
|
|
391
|
+
Union[Any, HTTPValidationError, SchemaExportResponse]
|
|
232
392
|
"""
|
|
233
393
|
|
|
234
394
|
return (
|
|
@@ -237,7 +397,5 @@ async def asyncio(
|
|
|
237
397
|
client=client,
|
|
238
398
|
format_=format_,
|
|
239
399
|
include_data_stats=include_data_stats,
|
|
240
|
-
token=token,
|
|
241
|
-
authorization=authorization,
|
|
242
400
|
)
|
|
243
401
|
).parsed
|