Skip to content

Analytical Pattern Management API 0.1.0

API to manage AP


Endpoints


GET /

Index

Response 200 OK

Schema of the response body

v1


POST /api/v1/aps/

Create Ap

Description

Registers a new Analytical Pattern

Request body

{
    "nodes": [
        {
            "id": "string",
            "labels": [
                "string"
            ],
            "properties": null
        }
    ],
    "edges": [
        {
            "from": "string",
            "labels": [
                "string"
            ],
            "to": "string",
            "properties": null
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "nodes": {
            "items": {
                "$ref": "#/components/schemas/PgJsonNode"
            },
            "type": "array",
            "title": "Nodes"
        },
        "edges": {
            "items": {
                "$ref": "#/components/schemas/PgJsonEdge"
            },
            "type": "array",
            "title": "Edges"
        }
    },
    "type": "object",
    "required": [
        "nodes",
        "edges"
    ],
    "title": "AnalyticalPattern"
}

Response 201 Created

{
    "id": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "title": "Id"
        }
    },
    "type": "object",
    "required": [
        "id"
    ],
    "title": "CreatePayload"
}

Response 500 Internal Server Error

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/aps/{id}

Retrieve Ap

Description

Retrieves an Analytical Pattern whole graph by the UUID of the Analytical Pattern Node.

Input parameters

Parameter In Type Default Nullable Description
id path string No The Analytical Pattern Node UUID to look for

Response 200 OK

{
    "nodes": [
        {
            "id": "string",
            "labels": [
                "string"
            ],
            "properties": null
        }
    ],
    "edges": [
        {
            "from": "string",
            "labels": [
                "string"
            ],
            "to": "string",
            "properties": null
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "nodes": {
            "items": {
                "$ref": "#/components/schemas/PgJsonNode"
            },
            "type": "array",
            "title": "Nodes"
        },
        "edges": {
            "items": {
                "$ref": "#/components/schemas/PgJsonEdge"
            },
            "type": "array",
            "title": "Edges"
        }
    },
    "type": "object",
    "required": [
        "nodes",
        "edges"
    ],
    "title": "AnalyticalPattern"
}

Response 404 Not Found

Response 500 Internal Server Error

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/aps/display

Display Ap

Description

Returns an SVG representation of the Analytical Pattern.

Request body

{
    "nodes": [
        {
            "id": "string",
            "labels": [
                "string"
            ],
            "properties": null
        }
    ],
    "edges": [
        {
            "from": "string",
            "labels": [
                "string"
            ],
            "to": "string",
            "properties": null
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "nodes": {
            "items": {
                "$ref": "#/components/schemas/PgJsonNode"
            },
            "type": "array",
            "title": "Nodes"
        },
        "edges": {
            "items": {
                "$ref": "#/components/schemas/PgJsonEdge"
            },
            "type": "array",
            "title": "Edges"
        }
    },
    "type": "object",
    "required": [
        "nodes",
        "edges"
    ],
    "title": "AnalyticalPattern"
}

Response 200 OK

Schema of the response body

Schema of the response body

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/aps/validate

Validate Ap

Description

Ensure the provided PG-JSON is a valid Analytical Pattern. Return the list of errors if validation fails. The input must first be a valid PG-JSON. If the payload is not a valid PG-JSON, a 422 error will be returned, and no Analytical Pattern validation will be performed.

Request body

{
    "nodes": [
        {
            "id": "string",
            "labels": [
                "string"
            ],
            "properties": null
        }
    ],
    "edges": [
        {
            "from": "string",
            "labels": [
                "string"
            ],
            "to": "string",
            "properties": null
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "nodes": {
            "items": {
                "$ref": "#/components/schemas/PgJsonNode"
            },
            "type": "array",
            "title": "Nodes"
        },
        "edges": {
            "items": {
                "$ref": "#/components/schemas/PgJsonEdge"
            },
            "type": "array",
            "title": "Edges"
        }
    },
    "type": "object",
    "required": [
        "nodes",
        "edges"
    ],
    "title": "PgJson"
}

Response 200 OK

{
    "valid": true,
    "errors": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "valid": {
            "type": "boolean",
            "title": "Valid"
        },
        "errors": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Errors"
        }
    },
    "type": "object",
    "required": [
        "valid",
        "errors"
    ],
    "title": "ValidationPayload"
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/tasks/

Create Task

Description

Registers a new Task

Request body

{
    "name": "string",
    "request": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "name": {
            "type": "string",
            "title": "Name"
        },
        "request": {
            "type": "string",
            "title": "Request"
        }
    },
    "type": "object",
    "required": [
        "name",
        "request"
    ],
    "title": "CreateTaskInput"
}

Response 201 Created

{
    "id": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "title": "Id"
        }
    },
    "type": "object",
    "required": [
        "id"
    ],
    "title": "CreatePayload"
}

Response 500 Internal Server Error

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/tasks/{id}/aps

Retrieve Aps

Description

Returns all Analytical Pattern associated to the given Task ID.

Input parameters

Parameter In Type Default Nullable Description
id path string No The Task UUID to look for

Response 200 OK

[
    "string"
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "array",
    "items": {
        "type": "string"
    },
    "title": "Response Retrieve Aps Api V1 Tasks  Id  Aps Get"
}

Response 404 Not Found

Response 500 Internal Server Error

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/health

Health Check

Response 200 OK

Schema of the response body


Schemas

AnalyticalPattern

Name Type
edges Array<PgJsonEdge>
nodes Array<PgJsonNode>

CreatePayload

Name Type
id string

CreateTaskInput

Name Type
name string
request string

HTTPValidationError

Name Type
detail Array<ValidationError>

PgJson

Name Type
edges Array<PgJsonEdge>
nodes Array<PgJsonNode>

PgJsonEdge

Name Type
from string
labels Array<string>
properties
to string

PgJsonNode

Name Type
id string
labels Array<string>
properties

ValidationError

Name Type
loc Array<>
msg string
type string

ValidationPayload

Name Type
errors Array<string>
valid boolean