Interface
Pacific Data Hub .Stat API. Access macrodata datasets about the Pacific region. Data is available in XML, JSON and CSV formats.
Data queries
Get data
GET https://stats-nsi-stable.pacificdata.org/rest/data/{flow}/{key}/{provider}[?startPeriod][&endPeriod][&dimensionAtObservation][&detail][&format]
This method retrieves the data observations for a dataflow, based on various filters.
Path Parameters
flow
string
The statistical domain (dataflow) of the data to be returned.
Examples:
DF_SDG: The ID for Sustainable Development Goals dataflow
DF_CPI: The ID for Consumer Price Index dataflow
DF_POCKET: The ID for Pocket Summary dataflow
DF_POP_SUM: The ID for Population dataflow
DF_IMTS: The ID for International Merchandise Trade Statistics dataflow
key
string
The (possibly partial) key identifying the data to be returned.
The keyword all can be used to indicate that all data belonging to the specified dataflow and provided by the specified provider must be returned. The allowable values for key will change depending on the selected dataflow. In general, it is a series of parameters separated by the . sign. Where there are 2 points in a row, it indicates a "wildcard" for that parameter. To select several values as a parameter, separate them with a + sign.
provider
string
The agency maintaining the artefact to be returned (i.e. SPC).
It is possible to set more than one agency, using + as separator (e.g. SPC+ECB).
The keyword all can be used to indicate that artefacts maintained by any maintenance agency should be returned.
startPeriod
string
The start of the period for which results should be supplied (inclusive). Can be expressed using 8601 dates or SDMX reporting periods.
Examples:
2000: Year (ISO 8601)
2000-01: Month (ISO 8601)
2000-01-01: Date (ISO 8601)
2000-Q1: Quarter (SDMX)
2000-W01: Week(SDMX)
endPeriod
string
The end of the period for which results should be supplied (inclusive). Can be expressed using 8601 dates or SDMX reporting periods.
Examples:
2000: Year (ISO 8601)
2000-01: Month (ISO 8601)
2000-01-01: Date (ISO 8601)
2000-Q1: Quarter (SDMX)
2000-W001: Week (SDMX)
dimensionAtObservation
string
Indicates how the data should be packaged.
The options are:
TIME_PERIOD: A timeseries view
The ID of any other dimension: A cross-sectional view of the data
AllDimensions: A flat view of the data
detail
string
The amount of information to be returned.
Possible options are:
full: All data and documentation
dataonly: Everything except attributes
serieskeysonly: The series keys. This is useful to return the series that match a certain query, without returning the actual data (e.g. overview page)
nodata: The series, including attributes and annotations, without observations
format
string
The data format to be returned.
Possible options are:
jsondata
csv
genericdata
structure
structurespecificdata
Headers
Accept-Language
string
Specifies the client's preferred language.
If-Modified-Since
string
Takes a date-time (RFC3339 format) as input and returns the content matching the query only if it has changed since the supplied timestamp.
Accept
string
Specifies the format of the API response.
Possible options are:
application/vnd.sdmx.genericdata+xml;version=2.1: returns SDMX-XML format
application/vnd.sdmx.data+json;version=2.1: returns SDMX-JSON format
application/vnd.sdmx.data+csv;version=2.1: returns SDMX-CSV format
Accept-Encoding
string
Specifies whether the response should be compressed and how.
identity (the default) indicates that no compression will be performed.
Code samples
Structure queries
Get dataflow
GET https://stats-nsi-stable.pacificdata.org/rest/dataflow/{agencyID}/{resourceID}/{version}[?references][&detail]
This method retrieves a dataflow (or many dataflows), and the associated metadata, including the name, description, and metadata dictionary.
Path Parameters
agencyID
string
The agency maintaining the artefact to be returned (i.e. SPC).
It is possible to set more than one agency, using + as separator (e.g. SPC+ECB).
The keyword all can be used to indicate that artefacts maintained by any maintenance agency should be returned.
resourceID
string
The ID of the artefact to be returned.
It is possible to set more than one ID, using + as separator (e.g. CL_FREQ+CL_CONF_STATUS).
The keyword all can be used to indicate that any artefact of the specified resource type should be returned.
version
string
The version of the artefact to be returned.
It is possible to set more than one version, using + as separator (e.g. 1.0+2.1).
The keyword all can be used to return all version of the matching resource.
The keyword latest can be used to return the latest production version of the matching resource.
references
string
Instructs the web service to return (or not return) the artefacts referenced by the artefact to be returned.
Possible values are:
none: No references will be returned
parents: Returns the artefacts that use the artefact matching the query
parentsandsiblings: Returns the artefacts that use the artefact matching the query, as well as the artefacts referenced by these artefacts
children: Returns the artefacts referenced by the artefact to be returned
descendants: References of references, up to any level, will be returned
all: The combination of parentsandsiblings and descendants
In addition, a concrete type of resource may also be used (e.g. codelist)
detail
string
The amount of information to be returned. referencepartial is a common value.
Possible values are:
allstubs: All artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencestubs: Referenced artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencepartial: Referenced item schemes should only include items used by the artefact to be returned. For example, a concept scheme would only contain the concepts used in a DSD, and its isPartial flag would be set to true
allcompletestubs: All artefacts should be returned as complete stubs, containing identification information, the artefacts' names, descriptions, annotations and isFinal information
referencecompletestubs: Referenced artefacts should be returned as complete stubs, containing identification information, the artefacts' name, description, annotations and isFinal information
full: All available information for all artefacts should be returned
Get agency schemes
GET https://stats-nsi-stable.pacificdata.org/rest/agencyscheme/{agencyID}/{resourceID}/{version}[?references][&detail]
This method retrieves information about agencies associated with the .Stat instance.
Path Parameters
agencyID
string
The agency maintaining the artefact to be returned (i.e. SPC).
It is possible to set more than one agency, using + as separator (e.g. SPC+ECB).
The keyword all can be used to indicate that artefacts maintained by any maintenance agency should be returned.
resourceID
string
The ID of the artefact to be returned.
It is possible to set more than one ID, using + as separator (e.g. CL_FREQ+CL_CONF_STATUS).
The keyword all can be used to indicate that any artefact of the specified resource type should be returned.
version
string
The version of the artefact to be returned.
It is possible to set more than one version, using + as separator (e.g. 1.0+2.1).
The keyword all can be used to return all version of the matching resource.
The keyword latest can be used to return the latest production version of the matching resource.
references
string
Instructs the web service to return (or not return) the artefacts referenced by the artefact to be returned. Possible values are:
none: No references will be returned
parents: Returns the artefacts that use the artefact matching the query
parentsandsiblings: Returns the artefacts that use the artefact matching the query, as well as the artefacts referenced by these artefacts
children: Returns the artefacts referenced by the artefact to be returned
descendants: References of references, up to any level, will be returned
all: The combination of parentsandsiblings and descendants In addition, a concrete type of resource may also be used (e.g. codelist)
detail
string
The amount of information to be returned. referencepartial is a common value.
Possible values are:
allstubs: All artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencestubs: Referenced artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencepartial: Referenced item schemes should only include items used by the artefact to be returned. For example, a concept scheme would only contain the concepts used in a DSD, and its isPartial flag would be set to true
allcompletestubs: All artefacts should be returned as complete stubs, containing identification information, the artefacts' names, descriptions, annotations and isFinal information
referencecompletestubs: Referenced artefacts should be returned as complete stubs, containing identification information, the artefacts' name, description, annotations and isFinal information
full: All available information for all artefacts should be returned
Get categorisations
GET https://stats-nsi-stable.pacificdata.org/rest/categorisation/{agencyID}/{resourceID}/{version}[?references][&detail]
This method retrieves information about categories used by dataflows.
Path Parameters
agencyID
string
The agency maintaining the artefact to be returned (i.e. SPC).
It is possible to set more than one agency, using + as separator (e.g. SPC+ECB).
The keyword all can be used to indicate that artefacts maintained by any maintenance agency should be returned.
resourceID
string
The ID of the artefact to be returned.
It is possible to set more than one ID, using + as separator (e.g. CL_FREQ+CL_CONF_STATUS).
The keyword all can be used to indicate that any artefact of the specified resource type should be returned.
version
string
The version of the artefact to be returned.
It is possible to set more than one version, using + as separator (e.g. 1.0+2.1).
The keyword all can be used to return all version of the matching resource.
The keyword latest can be used to return the latest production version of the matching resource.
references
string
Instructs the web service to return (or not return) the artefacts referenced by the artefact to be returned. Possible values are:
none: No references will be returned parents: Returns the artefacts that use the artefact matching the query
parentsandsiblings: Returns the artefacts that use the artefact matching the query, as well as the artefacts referenced by these artefacts
children: Returns the artefacts referenced by the artefact to be returned
descendants: References of references, up to any level, will be returned
all: The combination of parentsandsiblings and descendants In addition, a concrete type of resource may also be used (e.g. codelist)
detail
string
The amount of information to be returned. referencepartial is a common value.
Possible values are:
allstubs: All artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencestubs: Referenced artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencepartial: Referenced item schemes should only include items used by the artefact to be returned. For example, a concept scheme would only contain the concepts used in a DSD, and its isPartial flag would be set to true
allcompletestubs: All artefacts should be returned as complete stubs, containing identification information, the artefacts' names, descriptions, annotations and isFinal information
referencecompletestubs: Referenced artefacts should be returned as complete stubs, containing identification information, the artefacts' name, description, annotations and isFinal information
full: All available information for all artefacts should be returned
Get category schemes
GET https://stats-nsi-stable.pacificdata.org/rest/categoryscheme/{agencyID}/{resourceID}/{version}[?references][&detail]
This method retrieves information about category schemes used by dataflows.
Path Parameters
agencyID
string
The agency maintaining the artefact to be returned (i.e. SPC).
It is possible to set more than one agency, using + as separator (e.g. SPC+ECB).
The keyword all can be used to indicate that artefacts maintained by any maintenance agency should be returned.
resourceID
string
The ID of the artefact to be returned.
It is possible to set more than one ID, using + as separator (e.g. CL_FREQ+CL_CONF_STATUS).
The keyword all can be used to indicate that any artefact of the specified resource type should be returned.
version
string
The version of the artefact to be returned.
It is possible to set more than one version, using + as separator (e.g. 1.0+2.1).
The keyword all can be used to return all version of the matching resource.
The keyword latest can be used to return the latest production version of the matching resource.
references
string
Instructs the web service to return (or not return) the artefacts referenced by the artefact to be returned. Possible values are:
none: No references will be returned parents: Returns the artefacts that use the artefact matching the query
parentsandsiblings: Returns the artefacts that use the artefact matching the query, as well as the artefacts referenced by these artefacts
children: Returns the artefacts referenced by the artefact to be returned
descendants: References of references, up to any level, will be returned
all: The combination of parentsandsiblings and descendants In addition, a concrete type of resource may also be used (e.g. codelist)
detail
string
The amount of information to be returned. referencepartial is a common value.
Possible values are:
allstubs: All artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencestubs: Referenced artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencepartial: Referenced item schemes should only include items used by the artefact to be returned. For example, a concept scheme would only contain the concepts used in a DSD, and its isPartial flag would be set to true
allcompletestubs: All artefacts should be returned as complete stubs, containing identification information, the artefacts' names, descriptions, annotations and isFinal information
referencecompletestubs: Referenced artefacts should be returned as complete stubs, containing identification information, the artefacts' name, description, annotations and isFinal information
full: All available information for all artefacts should be returned
Get codelists
GET https://stats-nsi-stable.pacificdata.org/rest/codelist/{agencyID}/{resourceID}/{version}[?references][&detail]
This method retrieves the codelists associated with a dataflow.
Path Parameters
agencyID
string
The agency maintaining the artefact to be returned (i.e. SPC).
It is possible to set more than one agency, using + as separator (e.g. SPC+ECB).
The keyword all can be used to indicate that artefacts maintained by any maintenance agency should be returned.
resourceID
string
The ID of the artefact to be returned.
It is possible to set more than one ID, using + as separator (e.g. CL_FREQ+CL_CONF_STATUS).
The keyword all can be used to indicate that any artefact of the specified resource type should be returned.
version
string
The version of the artefact to be returned.
It is possible to set more than one version, using + as separator (e.g. 1.0+2.1).
The keyword all can be used to return all version of the matching resource.
The keyword latest can be used to return the latest production version of the matching resource.
references
string
Instructs the web service to return (or not return) the artefacts referenced by the artefact to be returned. Possible values are:
none: No references will be returned parents: Returns the artefacts that use the artefact matching the query
parentsandsiblings: Returns the artefacts that use the artefact matching the query, as well as the artefacts referenced by these artefacts
children: Returns the artefacts referenced by the artefact to be returned
descendants: References of references, up to any level, will be returned
all: The combination of parentsandsiblings and descendants In addition, a concrete type of resource may also be used (e.g. codelist)
detail
string
The amount of information to be returned. referencepartial is a common value.
Possible values are:
allstubs: All artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencestubs: Referenced artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencepartial: Referenced item schemes should only include items used by the artefact to be returned. For example, a concept scheme would only contain the concepts used in a DSD, and its isPartial flag would be set to true
allcompletestubs: All artefacts should be returned as complete stubs, containing identification information, the artefacts' names, descriptions, annotations and isFinal information
referencecompletestubs: Referenced artefacts should be returned as complete stubs, containing identification information, the artefacts' name, description, annotations and isFinal information
full: All available information for all artefacts should be returned
Get concept schemes
GET https://stats-nsi-stable.pacificdata.org/rest/conceptscheme/{agencyID}/{resourceID}/{version}[?references][&detail]
This method retrieves information about concept schemes used by dataflows.
Path Parameters
agencyID
string
The agency maintaining the artefact to be returned (i.e. SPC).
It is possible to set more than one agency, using + as separator (e.g. SPC+ECB).
The keyword all can be used to indicate that artefacts maintained by any maintenance agency should be returned.
resourceID
string
The ID of the artefact to be returned.
It is possible to set more than one ID, using + as separator (e.g. CL_FREQ+CL_CONF_STATUS).
The keyword all can be used to indicate that any artefact of the specified resource type should be returned.
version
string
The version of the artefact to be returned.
It is possible to set more than one version, using + as separator (e.g. 1.0+2.1).
The keyword all can be used to return all version of the matching resource.
The keyword latest can be used to return the latest production version of the matching resource.
references
string
Instructs the web service to return (or not return) the artefacts referenced by the artefact to be returned.
Possible values are:
none: No references will be returned
parents: Returns the artefacts that use the artefact matching the query
parentsandsiblings: Returns the artefacts that use the artefact matching the query, as well as the artefacts referenced by these artefacts
children: Returns the artefacts referenced by the artefact to be returned
descendants: References of references, up to any level, will be returned
all: The combination of parentsandsiblings and descendants In addition, a concrete type of resource may also be used (e.g. codelist)
detail
string
The amount of information to be returned. referencepartial is a common value.
Possible values are:
allstubs: All artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencestubs: Referenced artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencepartial: Referenced item schemes should only include items used by the artefact to be returned. For example, a concept scheme would only contain the concepts used in a DSD, and its isPartial flag would be set to true
allcompletestubs: All artefacts should be returned as complete stubs, containing identification information, the artefacts' names, descriptions, annotations and isFinal information
referencecompletestubs: Referenced artefacts should be returned as complete stubs, containing identification information, the artefacts' name, description, annotations and isFinal information
full: All available information for all artefacts should be returned
Get content constraints
GET https://stats-nsi-stable.pacificdata.org/rest/contentconstraint/{agencyID}/{resourceID}/{version}[?references][&detail]
This method retrieves content constraints for a dataflow.
Path Parameters
agencyID
string
The agency maintaining the artefact to be returned (i.e. SPC).
It is possible to set more than one agency, using + as separator (e.g. SPC+ECB).
The keyword all can be used to indicate that artefacts maintained by any maintenance agency should be returned.
resourceID
string
The ID of the artefact to be returned.
It is possible to set more than one ID, using + as separator (e.g. CL_FREQ+CL_CONF_STATUS).
The keyword all can be used to indicate that any artefact of the specified resource type should be returned.
version
string
The version of the artefact to be returned.
It is possible to set more than one version, using + as separator (e.g. 1.0+2.1).
The keyword all can be used to return all version of the matching resource.
The keyword latest can be used to return the latest production version of the matching resource.
references
string
Instructs the web service to return (or not return) the artefacts referenced by the artefact to be returned.
Possible values are:
none: No references will be returned parents: Returns the artefacts that use the artefact matching the query
parentsandsiblings: Returns the artefacts that use the artefact matching the query, as well as the artefacts referenced by these artefacts
children: Returns the artefacts referenced by the artefact to be returned
descendants: References of references, up to any level, will be returned
all: The combination of parentsandsiblings and descendants In addition, a concrete type of resource may also be used (e.g. codelist)
detail
string
The amount of information to be returned. referencepartial is a common value.
Possible values are:
allstubs: All artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencestubs: Referenced artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencepartial: Referenced item schemes should only include items used by the artefact to be returned. For example, a concept scheme would only contain the concepts used in a DSD, and its isPartial flag would be set to true
allcompletestubs: All artefacts should be returned as complete stubs, containing identification information, the artefacts' names, descriptions, annotations and isFinal information
referencecompletestubs: Referenced artefacts should be returned as complete stubs, containing identification information, the artefacts' name, description, annotations and isFinal information
full: All available information for all artefacts should be returned
Get data structures
GET https://stats-nsi-stable.pacificdata.org/rest/datastructure/{agencyID}/{resourceID}/{version}[?references][&detail]
This method retrieves a data structure definition.
Path Parameters
agencyID
string
The agency maintaining the artefact to be returned (i.e. SPC).
It is possible to set more than one agency, using + as separator (e.g. SPC+ECB).
The keyword all can be used to indicate that artefacts maintained by any maintenance agency should be returned.
resourceID
string
The ID of the artefact to be returned.
It is possible to set more than one ID, using + as separator (e.g. CL_FREQ+CL_CONF_STATUS).
The keyword all can be used to indicate that any artefact of the specified resource type should be returned.
version
string
The version of the artefact to be returned.
It is possible to set more than one version, using + as separator (e.g. 1.0+2.1).
The keyword all can be used to return all version of the matching resource.
The keyword latest can be used to return the latest production version of the matching resource.
references
string
Instructs the web service to return (or not return) the artefacts referenced by the artefact to be returned.
Possible values are:
none: No references will be returned
parents: Returns the artefacts that use the artefact matching the query
parentsandsiblings: Returns the artefacts that use the artefact matching the query, as well as the artefacts referenced by these artefacts
children: Returns the artefacts referenced by the artefact to be returned
descendants: References of references, up to any level, will be returned
all: The combination of parentsandsiblings and descendants In addition, a concrete type of resource may also be used (e.g. codelist)
detail
string
The amount of information to be returned. referencepartial is a common value.
Possible values are:
allstubs: All artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencestubs: Referenced artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name
referencepartial: Referenced item schemes should only include items used by the artefact to be returned. For example, a concept scheme would only contain the concepts used in a DSD, and its isPartial flag would be set to true
allcompletestubs: All artefacts should be returned as complete stubs, containing identification information, the artefacts' names, descriptions, annotations and isFinal information
referencecompletestubs: Referenced artefacts should be returned as complete stubs, containing identification information, the artefacts' name, description, annotations and isFinal information
full: All available information for all artefacts should be returned
Last updated
Was this helpful?
