Last updated 9 months ago
Was this helpful?
This API returns a list of all the collections on data.gov.sg
This API returns the metadata of a single collection and the datasets within it
To find the collectionId, refer to the URL of collection. For this collection: The collectionId is: 522
522
Page number (optional, must be 1 or more)
GET /v2/public/api/collections HTTP/1.1 Host: api-production.data.gov.sg Accept: */*
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" }
The unique identifier of the collection (number)
Include dataset metadata (true or false, default is false)
GET /v2/public/api/collections/{collectionId}/metadata HTTP/1.1 Host: api-production.data.gov.sg Accept: */*
{ "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" }