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 a package
Description
Recommend K datasets based on a given set of dataset IDs.
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"
]
}
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 recommendations to return",
"default": 5
}
},
"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"
]
}
}
Response 200 OK
{
"recommendations": [
"10009060-1",
"10000971-1",
"10007969-1",
"10003856-1",
"10006688-1"
]
}
Schema of the response body
{
"properties": {
"recommendations": {
"items": {
"type": "string"
},
"type": "array",
"title": "Recommendations",
"description": "List of recommended dataset IDs"
}
},
"type": "object",
"required": [
"recommendations"
],
"title": "RecommendationsResponse",
"example": {
"recommendations": [
"10009060-1",
"10000971-1",
"10007969-1",
"10003856-1",
"10006688-1"
]
}
}
Response 422 Unprocessable Content
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /dataset-packaging/add-dataset/¶
Add Dataset
Description
Add the dataset with the specified ID to the internal database.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
id |
query | string | No |
Response 200 OK
Schema of the response body
Response 422 Unprocessable Content
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /dataset-packaging/check-datasets/¶
Check Datasets
Description
Check for missing datasets in the database.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
insert |
query | boolean | False | No |
Response 200 OK
Schema of the response body
Response 422 Unprocessable Content
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /dataset-packaging/health/¶
Health Check
Description
Check the health of the Dataset Packaging API.
Response 200 OK
Schema of the response body
GET /dataset-packaging/¶
Root Endpoint
Description
Root endpoint to verify that the Dataset Packaging API is running.
Response 200 OK
Schema of the response body
Schemas¶
HTTPValidationError¶
| Name | Type |
|---|---|
detail |
Array<ValidationError> |
RecommendationsResponse¶
| Name | Type |
|---|---|
recommendations |
Array<string> |
RecommendRequest¶
| Name | Type |
|---|---|
ids |
Array<string> |
k |
integer |
ValidationError¶
| Name | Type |
|---|---|
loc |
Array<> |
msg |
string |
type |
string |