Dataset OpenAPI
This API allows you to search for data within a dataset or scan through the rows of the dataset in a paginated manner.
ℹ️
All the following APIs use the following domain: https://data.mef.gov.kh/api
Get rows in a dataset
GET
v1/public-datasets/{datasetId}/json
ℹ️
To find the datasetId
, refer to the URL of dataset.
In this dataset:
https://data.mef.gov.kh/datasets/pd_66a9f37836d76b00019fe84bThe datasetId is :
pd_66a9f37836d76b00019fe84b
Query parameters
page
(integer): Page number (optional, must be 1 or more)page_size
(integer): Page size (optional, must be 1 or more)
Request
javascript
const response = await fetch('{domain}/v1/public-datasets/{datasetId}/json');
const data = await response.json();
Response
{
"items": [],
"page": integer,
"page_size": integer,
"total_items": integer,
"total_pages": integer
}
Datasets Listing
This API returns a list of all the datasets available on Data.gov.kh
GET
v1/public-datasets
Query parameters
page
(integer): Page number (optional, must be 1 or more)page_size
(integer): Page size (optional, must be 1 or more)
Request
javascript
const response = await fetch('{domain}/v1/public-datasets');
const data = await response.json();
Response
{
"data":[
{
"format": string,
"dashboard_id": string,
"id": string,
"file_url": string,
"api_calls_count": 335,
"name": string,
"column_data_id": number,
"file_size": number,
"views_count": number,
"frequency": string,
"created_at": string,
"description": string,
"coverage_start":string,
"is_active": true,
"coverage_end":string,
"updated_at": string,
"source": string,
"deleted_at": string,
"organization_id": number,
"download_count": number,
"categories": object[],
"organization": object
}
],
"page": integer,
"page_size": integer,
"total_items": integer,
"total_pages": integer
}
Last updated on