Collection APIs
Collections listing
This API returns a list of all the collections on data.gov.sg
Query parameters
pageinteger · min: 1Optional
Page number (optional, must be 1 or more)
Responses
200
Successful response
application/json
get
GET /v2/public/api/collections HTTP/1.1
Host: api-production.data.gov.sg
Accept: */*
200
Successful response
{
"code": 1,
"data": {
"collections": [
{
"collectionId": "text",
"createdAt": "2016-06-01T19:09:53+08:00",
"name": "text",
"description": "text",
"lastUpdatedAt": "2016-06-01T19:09:53+08:00",
"coverageStart": "2016-06-01T19:09:53+08:00",
"coverageEnd": "2016-06-01T19:09:53+08:00",
"frequency": "text",
"sources": [
"text"
],
"managedByAgencyName": "text",
"childDatasets": [
"text"
]
}
],
"pages": 1
},
"errorMsg": "text"
}
Collection metadata
This API returns the metadata of a single collection and the datasets within it
Path parameters
collectionIdnumberRequired
The unique identifier of the collection (number)
Query parameters
withDatasetMetadatabooleanOptional
Include dataset metadata (true or false, default is false)
Responses
200
Successful response
application/json
get
GET /v2/public/api/collections/{collectionId}/metadata HTTP/1.1
Host: api-production.data.gov.sg
Accept: */*
200
Successful response
{
"code": 1,
"data": {
"collectionMetadata": {
"collectionId": "text",
"createdAt": "2015-05-20T10:11:24+08:00",
"name": "text",
"description": "text",
"lastUpdatedAt": "2020-06-26T12:19:29+08:00",
"coverageStart": "2015-05-20T10:11:24+08:00",
"coverageEnd": "2020-06-26T12:19:29+08:00",
"frequency": "text",
"sources": [
"text"
],
"managedBy": "text",
"childDatasets": [
"text"
]
},
"datasetMetadata": [
{
"datasetId": "text",
"createdAt": "2015-05-21T14:10:45+08:00",
"name": "text",
"format": "text",
"lastUpdatedAt": "2020-06-26T12:18:21+08:00",
"managedBy": "text",
"coverageStart": "2015-05-20T10:11:24+08:00",
"coverageEnd": "2020-06-26T12:19:29+08:00"
}
]
},
"errorMsg": "text"
}
Last updated
Was this helpful?