bcdata Service Documentation
2021-10-27
Source:vignettes/service_documentation.Rmd
service_documentation.Rmd
DataBC Services used by bcdata
This document is an attempt at a comprehensive list of services and API endpoints accessed by the bcdata R package, as well which return values we rely on from those endpoints.
BC Data Catalogue
API version:
- PROD:
https://catalogue.data.gov.bc.ca/api/3
- BETA:
https://beta-catalogue.data.gov.bc.ca/api/3
Endpoints:
/action/package_show
-
/action/package_search
license_id
download_audience
res_format
sector
organization
/action/package_list
/action/group_show
Response values used:
- package:
title
name
id
license_title
type
notes
layer_name
-
resources
(see below)
- resource:
id
package_id
-
object_name
(This is not always the same as thetypeNames
parameter inresource.url
, as that is sometimes a simplified view - eg.,WHSE_ADMIN_BOUNDARIES.ADM_NR_DISTRICTS_SPG
vsWHSE_ADMIN_BOUNDARIES.ADM_NR_DISTRICTS_SP
) -
details
column_comments
column_name
-
bcdc_type
(not actually using yet but may be useful) format
resource_storage_location
name
url
- group:
description
packages
Web Services
API Version:
- TEST: https://test.openmaps.gov.bc.ca
- DELIVERY: https://delivery.openmaps.gov.bc.ca
- PROD: https://openmaps.gov.bc.ca
Endpoints:
- wfs:
geo/pub/wfs
- wms:
geo/pub/wms
Query Parameters for geo/pub/wfs
:
- query is sent in the body of a
POST
request (withencode = "form"
). If a dataset has > n records (default n = 1000), pagination is used to send sequential requests. Pagination is executed usingcount
,sortBY
, andstartIndex
.- SERVICE = “WFS”
- VERSION = “2.0.0”
- REQUEST = “GetCapabilities”
- REQUEST = “GetFeature”
- outputFormat = “application/json”
- typeNames (extracted from
resource.url
and compared againstresource.object_name
) - SRSNAME (default
EPSG:3005
) - CQL_FILTER
- count
- propertyName
- sortBy
- startIndex