Dataset API 1.0.0¶
API for data and model management
Servers¶
| Description | URL |
|---|---|
| /dmm | /dmm |
Endpoints¶
GET /api/v1¶
Api Home
Description
API root endpoint showing available endpoints
Response 200 OK
Schema of the response body
POST /api/v1/data-workflow¶
Data Workflow
Description
Handle data workflow by uploading files and assigning metadata.
Request body
{
"dataset_id": "string",
"file": "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ=",
"file_name": "string"
}
Schema of the request body
{
"properties": {
"dataset_id": {
"title": "Dataset Id",
"type": "string"
},
"file": {
"format": "binary",
"title": "File",
"type": "string"
},
"file_name": {
"title": "File Name",
"type": "string"
}
},
"required": [
"file",
"file_name",
"dataset_id"
],
"title": "Body_data_workflow_api_v1_data_workflow_post",
"type": "object"
}
Response 200 OK
{
"code": 0,
"dataset": {},
"message": "string"
}
Schema of the response body
{
"properties": {
"code": {
"title": "Code",
"type": "integer"
},
"dataset": {
"additionalProperties": true,
"title": "Dataset",
"type": "object"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"code",
"message",
"dataset"
],
"title": "DatasetSuccessEnvelope",
"type": "object"
}
Response 422 Unprocessable Content
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
}
GET /api/v1/dataset¶
Get Datasets
Description
Return all datasets, with optional filtering
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
state |
query | None | Ready | No | Optional dataset state to filter on. |
type |
query | None | No | Optional dataset type to filter on. If omitted, only datasets in Ready state are returned. |
Response 200 OK
{
"code": 0,
"datasets": [
{}
],
"message": "string"
}
Schema of the response body
{
"properties": {
"code": {
"title": "Code",
"type": "integer"
},
"datasets": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Datasets",
"type": "array"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"code",
"message",
"datasets"
],
"title": "DatasetsSuccessEnvelope",
"type": "object"
}
Response 422 Unprocessable Content
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
}
PUT /api/v1/dataset/load¶
Load Dataset
Description
Move dataset files from scratchpad to permanent storage
Request body
{
"directed": true,
"edges": [
{
"from": null,
"labels": [
"string"
],
"to": null
}
],
"multigraph": true,
"nodes": [
{
"@id": null,
"labels": [
"string"
],
"properties": {}
}
]
}
Schema of the request body
{
"properties": {
"directed": {
"default": true,
"title": "Directed",
"type": "boolean"
},
"edges": {
"items": {
"$ref": "#/components/schemas/Edge"
},
"title": "Edges",
"type": "array"
},
"multigraph": {
"default": true,
"title": "Multigraph",
"type": "boolean"
},
"nodes": {
"items": {
"$ref": "#/components/schemas/Node"
},
"title": "Nodes",
"type": "array"
}
},
"required": [
"nodes",
"edges"
],
"title": "APRequest",
"type": "object"
}
Response 200 OK
{
"ap": {},
"code": 0,
"message": "string"
}
Schema of the response body
{
"properties": {
"ap": {
"additionalProperties": true,
"title": "Ap",
"type": "object"
},
"code": {
"title": "Code",
"type": "integer"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"code",
"message",
"ap"
],
"title": "APSuccessEnvelope",
"type": "object"
}
Response 422 Unprocessable Content
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
}
POST /api/v1/dataset/register¶
Register Dataset
Description
Register a new dataset in Neo4j
Request body
{
"directed": true,
"edges": [
{
"from": null,
"labels": [
"string"
],
"to": null
}
],
"multigraph": true,
"nodes": [
{
"@id": null,
"labels": [
"string"
],
"properties": {}
}
]
}
Schema of the request body
{
"properties": {
"directed": {
"default": true,
"title": "Directed",
"type": "boolean"
},
"edges": {
"items": {
"$ref": "#/components/schemas/Edge"
},
"title": "Edges",
"type": "array"
},
"multigraph": {
"default": true,
"title": "Multigraph",
"type": "boolean"
},
"nodes": {
"items": {
"$ref": "#/components/schemas/Node"
},
"title": "Nodes",
"type": "array"
}
},
"required": [
"nodes",
"edges"
],
"title": "APRequest",
"type": "object"
}
Response 200 OK
{
"ap": {},
"code": 0,
"message": "string"
}
Schema of the response body
{
"properties": {
"ap": {
"additionalProperties": true,
"title": "Ap",
"type": "object"
},
"code": {
"title": "Code",
"type": "integer"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"code",
"message",
"ap"
],
"title": "APSuccessEnvelope",
"type": "object"
}
Response 422 Unprocessable Content
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
}
PUT /api/v1/dataset/update¶
Update Dataset
Description
Update a dataset in Neo4j
Request body
{
"directed": true,
"edges": [
{
"from": null,
"labels": [
"string"
],
"to": null
}
],
"multigraph": true,
"nodes": [
{
"@id": null,
"labels": [
"string"
],
"properties": {}
}
]
}
Schema of the request body
{
"properties": {
"directed": {
"default": true,
"title": "Directed",
"type": "boolean"
},
"edges": {
"items": {
"$ref": "#/components/schemas/Edge"
},
"title": "Edges",
"type": "array"
},
"multigraph": {
"default": true,
"title": "Multigraph",
"type": "boolean"
},
"nodes": {
"items": {
"$ref": "#/components/schemas/Node"
},
"title": "Nodes",
"type": "array"
}
},
"required": [
"nodes",
"edges"
],
"title": "APRequest",
"type": "object"
}
Response 200 OK
{
"ap": {},
"code": 0,
"message": "string"
}
Schema of the response body
{
"properties": {
"ap": {
"additionalProperties": true,
"title": "Ap",
"type": "object"
},
"code": {
"title": "Code",
"type": "integer"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"code",
"message",
"ap"
],
"title": "APSuccessEnvelope",
"type": "object"
}
Response 422 Unprocessable Content
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
}
GET /api/v1/dataset/{dataset_id}¶
Get Dataset
Description
Return dataset with a specific ID from Neo4j via MoMa API
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
dataset_id |
path | string | No |
Response 200 OK
{
"code": 0,
"dataset": {},
"message": "string"
}
Schema of the response body
{
"properties": {
"code": {
"title": "Code",
"type": "integer"
},
"dataset": {
"additionalProperties": true,
"title": "Dataset",
"type": "object"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"code",
"message",
"dataset"
],
"title": "DatasetSuccessEnvelope",
"type": "object"
}
Response 422 Unprocessable Content
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
}
POST /api/v1/polyglot/query¶
Execute Query
Description
Execute a SQL query on a dataset based on an Analytical Pattern
Request body
{
"directed": true,
"edges": [
{
"from": null,
"labels": [
"string"
],
"to": null
}
],
"multigraph": true,
"nodes": [
{
"@id": null,
"labels": [
"string"
],
"properties": {}
}
]
}
Schema of the request body
{
"properties": {
"directed": {
"default": true,
"title": "Directed",
"type": "boolean"
},
"edges": {
"items": {
"$ref": "#/components/schemas/Edge"
},
"title": "Edges",
"type": "array"
},
"multigraph": {
"default": true,
"title": "Multigraph",
"type": "boolean"
},
"nodes": {
"items": {
"$ref": "#/components/schemas/Node"
},
"title": "Nodes",
"type": "array"
}
},
"required": [
"nodes",
"edges"
],
"title": "APRequest",
"type": "object"
}
Response 200 OK
{
"ap": {},
"code": 0,
"message": "string"
}
Schema of the response body
{
"properties": {
"ap": {
"additionalProperties": true,
"title": "Ap",
"type": "object"
},
"code": {
"title": "Code",
"type": "integer"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"code",
"message",
"ap"
],
"title": "APSuccessEnvelope",
"type": "object"
}
Response 422 Unprocessable Content
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
}
GET /api/v1/test-postgres-duckdb¶
Test Postgres Connection
Response 200 OK
Schema of the response body
Schemas¶
APRequest¶
| Name | Type |
|---|---|
directed |
boolean |
edges |
Array<Edge> |
multigraph |
boolean |
nodes |
Array<Node> |
APSuccessEnvelope¶
| Name | Type |
|---|---|
ap |
|
code |
integer |
message |
string |
Body_data_workflow_api_v1_data_workflow_post¶
| Name | Type |
|---|---|
dataset_id |
string |
file |
string(binary) |
file_name |
string |
DatasetsSuccessEnvelope¶
| Name | Type |
|---|---|
code |
integer |
datasets |
Array<> |
message |
string |
DatasetState¶
Type: string
DatasetSuccessEnvelope¶
| Name | Type |
|---|---|
code |
integer |
dataset |
|
message |
string |
DatasetType¶
Type: string
Edge¶
| Name | Type |
|---|---|
from |
|
labels |
Array<string> |
to |
HTTPValidationError¶
| Name | Type |
|---|---|
detail |
Array<ValidationError> |
Node¶
| Name | Type |
|---|---|
@id |
|
labels |
Array<string> |
properties |
ValidationError¶
| Name | Type |
|---|---|
loc |
Array<> |
msg |
string |
type |
string |