Skip to content

Welcome to the documentation for the Dataset Packaging Service.

This service provides an API for grouping a larger set of datasets into a smaller, useful combination of datasets.

FastAPI 0.1.0

Endpoints


POST /dataset-packaging/recommend/

Recommend packages

Description

Recommend N packages with K datasets based on a given set of dataset IDs.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token

Request body

{
    "ids": [
        "10009060-1",
        "10003341-1",
        "10007969-1",
        "10006688-1",
        "1000136-2",
        "10000971-1",
        "10003856-1",
        "10003732-2",
        "10009168-1",
        "100074-1",
        "10002240-5"
    ],
    "k": 5,
    "n": 3
}
⚠️ 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": {
        "ids": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "Ids",
            "description": "Set of dataset IDs to base recommendations on"
        },
        "k": {
            "type": "integer",
            "exclusiveMinimum": 1.0,
            "title": "K",
            "description": "Number of datasets per package",
            "default": 3
        },
        "n": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "N",
            "description": "Number of packages to return",
            "default": 2
        }
    },
    "type": "object",
    "required": [
        "ids"
    ],
    "title": "RecommendRequest",
    "example": {
        "ids": [
            "10009060-1",
            "10003341-1",
            "10007969-1",
            "10006688-1",
            "1000136-2",
            "10000971-1",
            "10003856-1",
            "10003732-2",
            "10009168-1",
            "100074-1",
            "10002240-5"
        ],
        "k": 5,
        "n": 3
    }
}

Responses

{
    "packages": [
        {
            "datasets": [
                "10009060-1",
                "10000971-1",
                "10007969-1",
                "10003856-1",
                "10006688-1"
            ],
            "name": "Package 1"
        },
        {
            "datasets": [
                "10003341-1",
                "10003732-2",
                "10009168-1",
                "100074-1",
                "10002240-5"
            ],
            "name": "Package 2"
        }
    ]
}
⚠️ 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": {
        "packages": {
            "items": {
                "$ref": "#/components/schemas/Package"
            },
            "type": "array",
            "title": "Packages",
            "description": "List of N recommended packages, each containing K dataset IDs"
        }
    },
    "type": "object",
    "required": [
        "packages"
    ],
    "title": "RecommendationsResponse",
    "example": {
        "packages": [
            {
                "datasets": [
                    "10009060-1",
                    "10000971-1",
                    "10007969-1",
                    "10003856-1",
                    "10006688-1"
                ],
                "name": "Package 1"
            },
            {
                "datasets": [
                    "10003341-1",
                    "10003732-2",
                    "10009168-1",
                    "100074-1",
                    "10002240-5"
                ],
                "name": "Package 2"
            }
        ]
    }
}

{
    "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 /dataset-packaging/recommend/graph/

Recommend packages in AP format

Description

Recommend N packages with K datasets based on a given set of dataset IDs.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token

Request body

{
    "nodes": [
        {
            "id": "string",
            "labels": [
                "string"
            ],
            "properties": null
        }
    ],
    "edges": [
        {
            "from": "string",
            "to": "string",
            "labels": [
                "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": {
        "nodes": {
            "items": {
                "$ref": "#/components/schemas/Node"
            },
            "type": "array",
            "title": "Nodes"
        },
        "edges": {
            "items": {
                "$ref": "#/components/schemas/Edge"
            },
            "type": "array",
            "title": "Edges"
        }
    },
    "type": "object",
    "required": [
        "nodes",
        "edges"
    ],
    "title": "GraphPayload"
}

Responses

{
    "nodes": [
        {
            "id": "string",
            "labels": [
                "string"
            ],
            "properties": null
        }
    ],
    "edges": [
        {
            "from": "string",
            "to": "string",
            "labels": [
                "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": {
        "nodes": {
            "items": {
                "$ref": "#/components/schemas/Node"
            },
            "type": "array",
            "title": "Nodes"
        },
        "edges": {
            "items": {
                "$ref": "#/components/schemas/Edge"
            },
            "type": "array",
            "title": "Edges"
        }
    },
    "type": "object",
    "required": [
        "nodes",
        "edges"
    ],
    "title": "GraphPayload"
}

{
    "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 /dataset-packaging/datasets/import/{dataset_id}

Import Dataset

Description

Import the dataset with the specified ID to the internal database.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token
dataset_id path string No

Responses

Schema of the response body

{
    "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"
}

DELETE /dataset-packaging/datasets/{dataset_id}

Delete Dataset

Description

Delete the dataset with the specified ID from the internal database.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token
dataset_id path string No

Responses

Schema of the response body

{
    "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 /dataset-packaging/datasets/missing/

Check Datasets

Description

Check for missing datasets in the database.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token

Request body

{
    "ids": 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": {
        "ids": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Ids",
            "description": "Dataset IDs to check; omit to check all external IDs"
        }
    },
    "type": "object",
    "title": "CheckDatasetsRequest"
}

Responses

Schema of the response body

{
    "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 /dataset-packaging/datasets/sync/

Sync Datasets

Description

Sync (add missing & delete stale) datasets in the internal database with the external source.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token

Responses

Schema of the response body


GET /dataset-packaging/health/

Health Check

Description

Check the health of the Dataset Packaging API.

Responses

Schema of the response body


GET /dataset-packaging/

Root Endpoint

Description

Root endpoint to verify that the Dataset Packaging API is running.

Responses

Schema of the response body


Schemas

CheckDatasetsRequest

Name Type Description
ids Dataset IDs to check; omit to check all external IDs

Edge

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

GraphPayload

Name Type Description
edges Array<Edge>
nodes Array<Node>

HTTPValidationError

Name Type Description
detail Array<ValidationError>

Node

Name Type Description
id string
labels Array<string>
properties

Package

Name Type Description
datasets Array<string> Dataset IDs in this package
name string Package name

RecommendationsResponse

Name Type Description
packages Array<Package> List of N recommended packages, each containing K dataset IDs

RecommendRequest

Name Type Description
ids Array<string> Set of dataset IDs to base recommendations on
k integer Number of datasets per package
n integer Number of packages to return

ValidationError

Name Type Description
loc Array<>
msg string
type string

Security schemes

Name Type Scheme Description
HTTPBearer http bearer