robosystems-client 0.2.3__py3-none-any.whl → 0.2.5__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/auth_response.py +40 -0
- 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.5.dist-info}/METADATA +2 -4
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.5.dist-info}/RECORD +104 -103
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.5.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -9,7 +9,7 @@ from ...models.error_response import ErrorResponse
|
|
|
9
9
|
from ...models.file_upload_request import FileUploadRequest
|
|
10
10
|
from ...models.file_upload_response import FileUploadResponse
|
|
11
11
|
from ...models.http_validation_error import HTTPValidationError
|
|
12
|
-
from ...types import
|
|
12
|
+
from ...types import Response
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def _get_kwargs(
|
|
@@ -17,28 +17,12 @@ def _get_kwargs(
|
|
|
17
17
|
table_name: str,
|
|
18
18
|
*,
|
|
19
19
|
body: FileUploadRequest,
|
|
20
|
-
token: Union[None, Unset, str] = UNSET,
|
|
21
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
22
20
|
) -> dict[str, Any]:
|
|
23
21
|
headers: dict[str, Any] = {}
|
|
24
|
-
if not isinstance(authorization, Unset):
|
|
25
|
-
headers["authorization"] = authorization
|
|
26
|
-
|
|
27
|
-
params: dict[str, Any] = {}
|
|
28
|
-
|
|
29
|
-
json_token: Union[None, Unset, str]
|
|
30
|
-
if isinstance(token, Unset):
|
|
31
|
-
json_token = UNSET
|
|
32
|
-
else:
|
|
33
|
-
json_token = token
|
|
34
|
-
params["token"] = json_token
|
|
35
|
-
|
|
36
|
-
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
37
22
|
|
|
38
23
|
_kwargs: dict[str, Any] = {
|
|
39
24
|
"method": "post",
|
|
40
25
|
"url": f"/v1/graphs/{graph_id}/tables/{table_name}/files",
|
|
41
|
-
"params": params,
|
|
42
26
|
}
|
|
43
27
|
|
|
44
28
|
_kwargs["json"] = body.to_dict()
|
|
@@ -108,105 +92,60 @@ def sync_detailed(
|
|
|
108
92
|
*,
|
|
109
93
|
client: AuthenticatedClient,
|
|
110
94
|
body: FileUploadRequest,
|
|
111
|
-
token: Union[None, Unset, str] = UNSET,
|
|
112
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
113
95
|
) -> Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
|
|
114
|
-
r"""
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
-H \"Content-Type: application/json\" \
|
|
163
|
-
-d '{
|
|
164
|
-
\"file_name\": \"entities.parquet\",
|
|
165
|
-
\"content_type\": \"application/x-parquet\"
|
|
166
|
-
}'
|
|
167
|
-
|
|
168
|
-
# Step 2: Upload file directly to S3
|
|
169
|
-
curl -X PUT \"$UPLOAD_URL\" \
|
|
170
|
-
-H \"Content-Type: application/x-parquet\" \
|
|
171
|
-
--data-binary \"@entities.parquet\"
|
|
172
|
-
|
|
173
|
-
# Step 3: Mark as uploaded
|
|
174
|
-
curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/$FILE_ID\" \
|
|
175
|
-
-H \"Authorization: Bearer YOUR_TOKEN\" \
|
|
176
|
-
-H \"Content-Type: application/json\" \
|
|
177
|
-
-d '{\"status\": \"uploaded\"}'
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
**Tips:**
|
|
181
|
-
- Presigned URLs expire (default: 1 hour)
|
|
182
|
-
- Use appropriate Content-Type header when uploading to S3
|
|
183
|
-
- File extension must match content type
|
|
184
|
-
- Large files benefit from direct S3 upload
|
|
185
|
-
|
|
186
|
-
**Note:**
|
|
187
|
-
Upload URL generation is included - no credit consumption.
|
|
188
|
-
|
|
189
|
-
Args:
|
|
190
|
-
graph_id (str): Graph database identifier
|
|
191
|
-
table_name (str): Table name
|
|
192
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
193
|
-
authorization (Union[None, Unset, str]):
|
|
194
|
-
body (FileUploadRequest):
|
|
195
|
-
|
|
196
|
-
Raises:
|
|
197
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
198
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
199
|
-
|
|
200
|
-
Returns:
|
|
201
|
-
Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]
|
|
202
|
-
"""
|
|
96
|
+
r"""Get File Upload URL
|
|
97
|
+
|
|
98
|
+
Generate a presigned S3 URL for secure file upload.
|
|
99
|
+
|
|
100
|
+
Initiates file upload to a staging table by generating a secure, time-limited
|
|
101
|
+
presigned S3 URL. Files are uploaded directly to S3, bypassing the API for
|
|
102
|
+
optimal performance.
|
|
103
|
+
|
|
104
|
+
**Upload Workflow:**
|
|
105
|
+
1. Call this endpoint to get presigned URL
|
|
106
|
+
2. PUT file directly to S3 URL
|
|
107
|
+
3. Call PATCH /tables/files/{file_id} with status='uploaded'
|
|
108
|
+
4. Backend validates file and calculates metrics
|
|
109
|
+
5. File ready for ingestion
|
|
110
|
+
|
|
111
|
+
**Supported Formats:**
|
|
112
|
+
- Parquet (`application/x-parquet` with `.parquet` extension)
|
|
113
|
+
- CSV (`text/csv` with `.csv` extension)
|
|
114
|
+
- JSON (`application/json` with `.json` extension)
|
|
115
|
+
|
|
116
|
+
**Validation:**
|
|
117
|
+
- File extension must match content type
|
|
118
|
+
- File name 1-255 characters
|
|
119
|
+
- No path traversal characters (.. / \)
|
|
120
|
+
- Auto-creates table if it doesn't exist
|
|
121
|
+
|
|
122
|
+
**Auto-Table Creation:**
|
|
123
|
+
Tables are automatically created on first file upload with type inferred from name
|
|
124
|
+
(e.g., \"Transaction\" → relationship) and empty schema populated during ingestion.
|
|
125
|
+
|
|
126
|
+
**Important Notes:**
|
|
127
|
+
- Presigned URLs expire (default: 1 hour)
|
|
128
|
+
- Use appropriate Content-Type header when uploading to S3
|
|
129
|
+
- File extension must match content type
|
|
130
|
+
- Upload URL generation is included - no credit consumption
|
|
131
|
+
|
|
132
|
+
Args:
|
|
133
|
+
graph_id (str):
|
|
134
|
+
table_name (str): Table name
|
|
135
|
+
body (FileUploadRequest):
|
|
136
|
+
|
|
137
|
+
Raises:
|
|
138
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
139
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]
|
|
143
|
+
"""
|
|
203
144
|
|
|
204
145
|
kwargs = _get_kwargs(
|
|
205
146
|
graph_id=graph_id,
|
|
206
147
|
table_name=table_name,
|
|
207
148
|
body=body,
|
|
208
|
-
token=token,
|
|
209
|
-
authorization=authorization,
|
|
210
149
|
)
|
|
211
150
|
|
|
212
151
|
response = client.get_httpx_client().request(
|
|
@@ -222,106 +161,61 @@ def sync(
|
|
|
222
161
|
*,
|
|
223
162
|
client: AuthenticatedClient,
|
|
224
163
|
body: FileUploadRequest,
|
|
225
|
-
token: Union[None, Unset, str] = UNSET,
|
|
226
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
227
164
|
) -> Optional[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
|
|
228
|
-
r"""
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
-H \"Content-Type: application/json\" \
|
|
277
|
-
-d '{
|
|
278
|
-
\"file_name\": \"entities.parquet\",
|
|
279
|
-
\"content_type\": \"application/x-parquet\"
|
|
280
|
-
}'
|
|
281
|
-
|
|
282
|
-
# Step 2: Upload file directly to S3
|
|
283
|
-
curl -X PUT \"$UPLOAD_URL\" \
|
|
284
|
-
-H \"Content-Type: application/x-parquet\" \
|
|
285
|
-
--data-binary \"@entities.parquet\"
|
|
286
|
-
|
|
287
|
-
# Step 3: Mark as uploaded
|
|
288
|
-
curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/$FILE_ID\" \
|
|
289
|
-
-H \"Authorization: Bearer YOUR_TOKEN\" \
|
|
290
|
-
-H \"Content-Type: application/json\" \
|
|
291
|
-
-d '{\"status\": \"uploaded\"}'
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
**Tips:**
|
|
295
|
-
- Presigned URLs expire (default: 1 hour)
|
|
296
|
-
- Use appropriate Content-Type header when uploading to S3
|
|
297
|
-
- File extension must match content type
|
|
298
|
-
- Large files benefit from direct S3 upload
|
|
299
|
-
|
|
300
|
-
**Note:**
|
|
301
|
-
Upload URL generation is included - no credit consumption.
|
|
302
|
-
|
|
303
|
-
Args:
|
|
304
|
-
graph_id (str): Graph database identifier
|
|
305
|
-
table_name (str): Table name
|
|
306
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
307
|
-
authorization (Union[None, Unset, str]):
|
|
308
|
-
body (FileUploadRequest):
|
|
309
|
-
|
|
310
|
-
Raises:
|
|
311
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
312
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
313
|
-
|
|
314
|
-
Returns:
|
|
315
|
-
Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]
|
|
316
|
-
"""
|
|
165
|
+
r"""Get File Upload URL
|
|
166
|
+
|
|
167
|
+
Generate a presigned S3 URL for secure file upload.
|
|
168
|
+
|
|
169
|
+
Initiates file upload to a staging table by generating a secure, time-limited
|
|
170
|
+
presigned S3 URL. Files are uploaded directly to S3, bypassing the API for
|
|
171
|
+
optimal performance.
|
|
172
|
+
|
|
173
|
+
**Upload Workflow:**
|
|
174
|
+
1. Call this endpoint to get presigned URL
|
|
175
|
+
2. PUT file directly to S3 URL
|
|
176
|
+
3. Call PATCH /tables/files/{file_id} with status='uploaded'
|
|
177
|
+
4. Backend validates file and calculates metrics
|
|
178
|
+
5. File ready for ingestion
|
|
179
|
+
|
|
180
|
+
**Supported Formats:**
|
|
181
|
+
- Parquet (`application/x-parquet` with `.parquet` extension)
|
|
182
|
+
- CSV (`text/csv` with `.csv` extension)
|
|
183
|
+
- JSON (`application/json` with `.json` extension)
|
|
184
|
+
|
|
185
|
+
**Validation:**
|
|
186
|
+
- File extension must match content type
|
|
187
|
+
- File name 1-255 characters
|
|
188
|
+
- No path traversal characters (.. / \)
|
|
189
|
+
- Auto-creates table if it doesn't exist
|
|
190
|
+
|
|
191
|
+
**Auto-Table Creation:**
|
|
192
|
+
Tables are automatically created on first file upload with type inferred from name
|
|
193
|
+
(e.g., \"Transaction\" → relationship) and empty schema populated during ingestion.
|
|
194
|
+
|
|
195
|
+
**Important Notes:**
|
|
196
|
+
- Presigned URLs expire (default: 1 hour)
|
|
197
|
+
- Use appropriate Content-Type header when uploading to S3
|
|
198
|
+
- File extension must match content type
|
|
199
|
+
- Upload URL generation is included - no credit consumption
|
|
200
|
+
|
|
201
|
+
Args:
|
|
202
|
+
graph_id (str):
|
|
203
|
+
table_name (str): Table name
|
|
204
|
+
body (FileUploadRequest):
|
|
205
|
+
|
|
206
|
+
Raises:
|
|
207
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
208
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
209
|
+
|
|
210
|
+
Returns:
|
|
211
|
+
Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]
|
|
212
|
+
"""
|
|
317
213
|
|
|
318
214
|
return sync_detailed(
|
|
319
215
|
graph_id=graph_id,
|
|
320
216
|
table_name=table_name,
|
|
321
217
|
client=client,
|
|
322
218
|
body=body,
|
|
323
|
-
token=token,
|
|
324
|
-
authorization=authorization,
|
|
325
219
|
).parsed
|
|
326
220
|
|
|
327
221
|
|
|
@@ -331,105 +225,60 @@ async def asyncio_detailed(
|
|
|
331
225
|
*,
|
|
332
226
|
client: AuthenticatedClient,
|
|
333
227
|
body: FileUploadRequest,
|
|
334
|
-
token: Union[None, Unset, str] = UNSET,
|
|
335
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
336
228
|
) -> Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
|
|
337
|
-
r"""
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
-H \"Content-Type: application/json\" \
|
|
386
|
-
-d '{
|
|
387
|
-
\"file_name\": \"entities.parquet\",
|
|
388
|
-
\"content_type\": \"application/x-parquet\"
|
|
389
|
-
}'
|
|
390
|
-
|
|
391
|
-
# Step 2: Upload file directly to S3
|
|
392
|
-
curl -X PUT \"$UPLOAD_URL\" \
|
|
393
|
-
-H \"Content-Type: application/x-parquet\" \
|
|
394
|
-
--data-binary \"@entities.parquet\"
|
|
395
|
-
|
|
396
|
-
# Step 3: Mark as uploaded
|
|
397
|
-
curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/$FILE_ID\" \
|
|
398
|
-
-H \"Authorization: Bearer YOUR_TOKEN\" \
|
|
399
|
-
-H \"Content-Type: application/json\" \
|
|
400
|
-
-d '{\"status\": \"uploaded\"}'
|
|
401
|
-
```
|
|
402
|
-
|
|
403
|
-
**Tips:**
|
|
404
|
-
- Presigned URLs expire (default: 1 hour)
|
|
405
|
-
- Use appropriate Content-Type header when uploading to S3
|
|
406
|
-
- File extension must match content type
|
|
407
|
-
- Large files benefit from direct S3 upload
|
|
408
|
-
|
|
409
|
-
**Note:**
|
|
410
|
-
Upload URL generation is included - no credit consumption.
|
|
411
|
-
|
|
412
|
-
Args:
|
|
413
|
-
graph_id (str): Graph database identifier
|
|
414
|
-
table_name (str): Table name
|
|
415
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
416
|
-
authorization (Union[None, Unset, str]):
|
|
417
|
-
body (FileUploadRequest):
|
|
418
|
-
|
|
419
|
-
Raises:
|
|
420
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
421
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
422
|
-
|
|
423
|
-
Returns:
|
|
424
|
-
Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]
|
|
425
|
-
"""
|
|
229
|
+
r"""Get File Upload URL
|
|
230
|
+
|
|
231
|
+
Generate a presigned S3 URL for secure file upload.
|
|
232
|
+
|
|
233
|
+
Initiates file upload to a staging table by generating a secure, time-limited
|
|
234
|
+
presigned S3 URL. Files are uploaded directly to S3, bypassing the API for
|
|
235
|
+
optimal performance.
|
|
236
|
+
|
|
237
|
+
**Upload Workflow:**
|
|
238
|
+
1. Call this endpoint to get presigned URL
|
|
239
|
+
2. PUT file directly to S3 URL
|
|
240
|
+
3. Call PATCH /tables/files/{file_id} with status='uploaded'
|
|
241
|
+
4. Backend validates file and calculates metrics
|
|
242
|
+
5. File ready for ingestion
|
|
243
|
+
|
|
244
|
+
**Supported Formats:**
|
|
245
|
+
- Parquet (`application/x-parquet` with `.parquet` extension)
|
|
246
|
+
- CSV (`text/csv` with `.csv` extension)
|
|
247
|
+
- JSON (`application/json` with `.json` extension)
|
|
248
|
+
|
|
249
|
+
**Validation:**
|
|
250
|
+
- File extension must match content type
|
|
251
|
+
- File name 1-255 characters
|
|
252
|
+
- No path traversal characters (.. / \)
|
|
253
|
+
- Auto-creates table if it doesn't exist
|
|
254
|
+
|
|
255
|
+
**Auto-Table Creation:**
|
|
256
|
+
Tables are automatically created on first file upload with type inferred from name
|
|
257
|
+
(e.g., \"Transaction\" → relationship) and empty schema populated during ingestion.
|
|
258
|
+
|
|
259
|
+
**Important Notes:**
|
|
260
|
+
- Presigned URLs expire (default: 1 hour)
|
|
261
|
+
- Use appropriate Content-Type header when uploading to S3
|
|
262
|
+
- File extension must match content type
|
|
263
|
+
- Upload URL generation is included - no credit consumption
|
|
264
|
+
|
|
265
|
+
Args:
|
|
266
|
+
graph_id (str):
|
|
267
|
+
table_name (str): Table name
|
|
268
|
+
body (FileUploadRequest):
|
|
269
|
+
|
|
270
|
+
Raises:
|
|
271
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
272
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
273
|
+
|
|
274
|
+
Returns:
|
|
275
|
+
Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]
|
|
276
|
+
"""
|
|
426
277
|
|
|
427
278
|
kwargs = _get_kwargs(
|
|
428
279
|
graph_id=graph_id,
|
|
429
280
|
table_name=table_name,
|
|
430
281
|
body=body,
|
|
431
|
-
token=token,
|
|
432
|
-
authorization=authorization,
|
|
433
282
|
)
|
|
434
283
|
|
|
435
284
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -443,98 +292,55 @@ async def asyncio(
|
|
|
443
292
|
*,
|
|
444
293
|
client: AuthenticatedClient,
|
|
445
294
|
body: FileUploadRequest,
|
|
446
|
-
token: Union[None, Unset, str] = UNSET,
|
|
447
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
448
295
|
) -> Optional[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
|
|
449
|
-
r"""
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
-H \"Content-Type: application/json\" \
|
|
498
|
-
-d '{
|
|
499
|
-
\"file_name\": \"entities.parquet\",
|
|
500
|
-
\"content_type\": \"application/x-parquet\"
|
|
501
|
-
}'
|
|
502
|
-
|
|
503
|
-
# Step 2: Upload file directly to S3
|
|
504
|
-
curl -X PUT \"$UPLOAD_URL\" \
|
|
505
|
-
-H \"Content-Type: application/x-parquet\" \
|
|
506
|
-
--data-binary \"@entities.parquet\"
|
|
507
|
-
|
|
508
|
-
# Step 3: Mark as uploaded
|
|
509
|
-
curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/$FILE_ID\" \
|
|
510
|
-
-H \"Authorization: Bearer YOUR_TOKEN\" \
|
|
511
|
-
-H \"Content-Type: application/json\" \
|
|
512
|
-
-d '{\"status\": \"uploaded\"}'
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
**Tips:**
|
|
516
|
-
- Presigned URLs expire (default: 1 hour)
|
|
517
|
-
- Use appropriate Content-Type header when uploading to S3
|
|
518
|
-
- File extension must match content type
|
|
519
|
-
- Large files benefit from direct S3 upload
|
|
520
|
-
|
|
521
|
-
**Note:**
|
|
522
|
-
Upload URL generation is included - no credit consumption.
|
|
523
|
-
|
|
524
|
-
Args:
|
|
525
|
-
graph_id (str): Graph database identifier
|
|
526
|
-
table_name (str): Table name
|
|
527
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
528
|
-
authorization (Union[None, Unset, str]):
|
|
529
|
-
body (FileUploadRequest):
|
|
530
|
-
|
|
531
|
-
Raises:
|
|
532
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
533
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
534
|
-
|
|
535
|
-
Returns:
|
|
536
|
-
Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]
|
|
537
|
-
"""
|
|
296
|
+
r"""Get File Upload URL
|
|
297
|
+
|
|
298
|
+
Generate a presigned S3 URL for secure file upload.
|
|
299
|
+
|
|
300
|
+
Initiates file upload to a staging table by generating a secure, time-limited
|
|
301
|
+
presigned S3 URL. Files are uploaded directly to S3, bypassing the API for
|
|
302
|
+
optimal performance.
|
|
303
|
+
|
|
304
|
+
**Upload Workflow:**
|
|
305
|
+
1. Call this endpoint to get presigned URL
|
|
306
|
+
2. PUT file directly to S3 URL
|
|
307
|
+
3. Call PATCH /tables/files/{file_id} with status='uploaded'
|
|
308
|
+
4. Backend validates file and calculates metrics
|
|
309
|
+
5. File ready for ingestion
|
|
310
|
+
|
|
311
|
+
**Supported Formats:**
|
|
312
|
+
- Parquet (`application/x-parquet` with `.parquet` extension)
|
|
313
|
+
- CSV (`text/csv` with `.csv` extension)
|
|
314
|
+
- JSON (`application/json` with `.json` extension)
|
|
315
|
+
|
|
316
|
+
**Validation:**
|
|
317
|
+
- File extension must match content type
|
|
318
|
+
- File name 1-255 characters
|
|
319
|
+
- No path traversal characters (.. / \)
|
|
320
|
+
- Auto-creates table if it doesn't exist
|
|
321
|
+
|
|
322
|
+
**Auto-Table Creation:**
|
|
323
|
+
Tables are automatically created on first file upload with type inferred from name
|
|
324
|
+
(e.g., \"Transaction\" → relationship) and empty schema populated during ingestion.
|
|
325
|
+
|
|
326
|
+
**Important Notes:**
|
|
327
|
+
- Presigned URLs expire (default: 1 hour)
|
|
328
|
+
- Use appropriate Content-Type header when uploading to S3
|
|
329
|
+
- File extension must match content type
|
|
330
|
+
- Upload URL generation is included - no credit consumption
|
|
331
|
+
|
|
332
|
+
Args:
|
|
333
|
+
graph_id (str):
|
|
334
|
+
table_name (str): Table name
|
|
335
|
+
body (FileUploadRequest):
|
|
336
|
+
|
|
337
|
+
Raises:
|
|
338
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
339
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
340
|
+
|
|
341
|
+
Returns:
|
|
342
|
+
Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]
|
|
343
|
+
"""
|
|
538
344
|
|
|
539
345
|
return (
|
|
540
346
|
await asyncio_detailed(
|
|
@@ -542,7 +348,5 @@ async def asyncio(
|
|
|
542
348
|
table_name=table_name,
|
|
543
349
|
client=client,
|
|
544
350
|
body=body,
|
|
545
|
-
token=token,
|
|
546
|
-
authorization=authorization,
|
|
547
351
|
)
|
|
548
352
|
).parsed
|