Data Management API
API reference for uploading, managing, and querying datasets on the Plexe Platform.
This document outlines the RESTful API endpoints for managing data uploads and querying datasets in the Plexe Platform.
Uploads
Get All Uploads
Retrieves a list of all data uploads associated with your account.
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
limit | integer | No | Maximum number of uploads to return (default: 20, max: 100) |
offset | integer | No | Number of uploads to skip for pagination (default: 0) |
status | string | No | Filter by status: pending , complete , failed , processing |
sort | string | No | Field to sort by: created_at , status (default: created_at ) |
order | string | No | Sort direction: asc or desc (default: desc ) |
Response
Get Upload Details
Retrieves detailed information about a specific upload.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
upload_id | string | Yes | ID of the upload to retrieve |
Response
Create Upload
Initiates a new upload by requesting a pre-signed S3 URL.
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
name | string | No | Display name for the upload |
description | string | No | Description of the upload |
files | array | Yes | List of files to upload |
files[].filename | string | Yes | Name of the file |
files[].content_type | string | Yes | MIME type of the file |
files[].size_bytes | integer | No | Expected size of the file in bytes |
Response
After receiving the pre-signed URLs, you must upload each file directly to the provided S3 URLs using HTTP PUT requests.
Update Upload Status
Confirms completion of file uploads to S3 and updates the upload status.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
upload_id | string | Yes | ID of the upload to update |
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
status | string | Yes | New status: complete to confirm all files are uploaded |
files | array | Yes | List of files that were uploaded |
files[].filename | string | Yes | Name of the file |
files[].s3_key | string | Yes | S3 key of the uploaded file |
Response
After confirming the uploads, the system will process the files (validating, parsing, etc.) and update the status to complete
when finished.
Delete Upload
Deletes an upload and its associated files.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
upload_id | string | Yes | ID of the upload to delete |
Response
You cannot delete an upload that is currently being used by a model. Unbind models from the dataset first.
Get File Preview
Retrieves a preview of a file’s contents.
Headers
Header | Value | Description |
---|---|---|
Authorization | Bearer TOKEN | Required. Your API access token |
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
upload_id | string | Yes | ID of the upload containing the file |
filename | string | Yes | Name of the file to preview |
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
limit | integer | No | Maximum number of rows to return (default: 10, max: 100) |
offset | integer | No | Number of rows to skip (default: 0) |
Response
For CSV files:
For JSON files:
Data Analysis
Analyze Dataset
Performs automated analysis on an uploaded dataset.
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
upload_id | string | Yes | ID of the upload to analyze |
files | array | No | Specific files to analyze (if omitted, analyzes all files) |
analysis_type | string | No | Type of analysis: basic or comprehensive (default: basic ) |
Response
This initiates an asynchronous job. You can check the job status using the Jobs API.
Get Analysis Results
Retrieves the results of a completed dataset analysis.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
job_id | string | Yes | ID of the analysis job |
Response
Data Querying
Create Data Session
Creates a session for querying a dataset.
Headers
Header | Value | Description |
---|---|---|
Authorization | Bearer TOKEN | Required. Your API access token |
Content-Type | application/json | Required |
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
upload_id | string | Yes | ID of the upload to query |
name | string | No | Session name for reference |
expiration_hours | integer | No | Hours until session expires (default: 24, max: 168) |
Response
Query Dataset
Queries a dataset using natural language or SQL.
Headers
Header | Value | Description |
---|---|---|
Authorization | Bearer TOKEN | Required. Your API access token |
Content-Type | application/json | Required |
Request Body
Natural language query:
SQL query:
Parameter | Type | Required | Description |
---|---|---|---|
query_type | string | Yes | Type of query: natural_language or sql |
query | string | Yes | The query to execute |
max_results | integer | No | Maximum number of results to return (default: 100, max: 10000) |
Response
For visualization results:
Get Query History
Retrieves the history of queries for a data session.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
session_id | string | Yes | ID of the data session |
Response
End Data Session
Ends a data session, releasing resources.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
session_id | string | Yes | ID of the data session to end |
Response
Data Export
Export Dataset
Initiates an export job for a dataset.
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
upload_id | string | Yes | ID of the upload to export |
files | array | No | Specific files to export (if omitted, exports all) |
format | string | No | Export format: csv , json , parquet (default: original format) |
include_headers | boolean | No | Whether to include headers (CSV only, default: true) |
email_notification | boolean | No | Whether to send email when export is ready (default: false) |
Response
Get Export Status
Checks the status of an export job.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
export_id | string | Yes | ID of the export job |
Response
Download Exported File
Downloads an exported file.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
export_id | string | Yes | ID of the export job |
filename | string | Yes | Name of the file to download |
Response
The file contents as a binary stream with appropriate content type header.
Error Codes
HTTP Status | Error Code | Description |
---|---|---|
400 | invalid_request | The request was invalid |
401 | unauthorized | Authentication failed |
403 | insufficient_permissions | Insufficient permissions for the operation |
404 | not_found | Resource not found |
409 | resource_conflict | Resource conflict (e.g., duplicate name) |
413 | payload_too_large | Upload size exceeds limits |
422 | validation_failed | Validation failed |
429 | rate_limited | Too many requests |
500 | server_error | Internal server error |
503 | service_unavailable | Service temporarily unavailable |
Limits
The Data Management API has the following limits:
Resource | Limit |
---|---|
Maximum file size | 5 GB per file |
Maximum upload size | 20 GB per upload |
Maximum files per upload | 50 files |
Active data sessions | 5 per user |
Queries per minute | 30 per session |
Maximum query result size | 100 MB |
Export retention period | 7 days |
These limits may vary based on your account tier.