1407.0.55.002 - ABS.Stat - Beta: Web Services User Guide , 2013  
Latest ISSUE Released at 11:30 AM (CANBERRA TIME) 01/03/2013  First Issue
   Page tools: Print Print Page Print all pages in this productPrint All RSS Feed RSS Bookmark and Share Search this Product

SDMX Web Service Methods:

There are 9 SDMX WS methods that will be made available, these are:

  • GetGenericData
  • GetCompactData
  • GetDataStructureDefinition
  • GetDatasetMetadata
  • GetDimensionMemberMetadata
  • GetDimensionMetadata
  • GetMetadata
  • GetMetadataStructure
  • GetReferenceMetadata

1. GetGenericData
This method retrieves data in a generic format from a specified ABS.Stat dataset. It requires an input parameter (ie the query) as an XML document in SDMX-ML format. An example of the GetGenericData SDMX query message is copied on the following page. The Web Service will return the query results in SDMX-ML format (see SDMX query result example below).

SDMX query message example

<message:QueryMessage xmlns="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/query" xmlns:message="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message" xsi:schemaLocation="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/query http://www.sdmx.org/docs/2_0/SDMXQuery.xsd http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message http://www.sdmx.org/docs/2_0/SDMXMessage.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header xmlns="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message">
<ID>none</ID>
<Test>false</Test>
<Truncated>false</Truncated>
<Prepared>2012-06-01T09:41:13</Prepared>
<Sender id="YourID">
<Name xml:lang="en">Your English Name</Name>
</Sender>
<Receiver id="ABS">
<Name xml:lang="en">Australian Bureau of Statistics</Name>
<Name xml:lang="fr">Australian Bureau of Statistics</Name>
</Receiver>
</Header>
<Query xmlns="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message">
<DataWhere xmlns="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/query">
<And>
<DataSet>CPI</DataSet>
<Dimension id="REGION">50</Dimension>
<Dimension id="FREQUENCY">Q</Dimension>
<Attribute id="TIME_FORMAT">P3M</Attribute>
<Time>
<StartTime>2011-Q4</StartTime>
<EndTime>2011-Q4</EndTime>
</Time>
<Or>
<Dimension id="MEASURE">1</Dimension>
<Dimension id="MEASURE">2</Dimension>
<Dimension id="MEASURE">3</Dimension>
</Or>
<Or>
<Dimension id="INDEX">10001</Dimension>
<Dimension id="INDEX">20001</Dimension>
<Dimension id="INDEX">20006</Dimension>
<Dimension id="INDEX">20002</Dimension>
<Dimension id="INDEX">20003</Dimension>
<Dimension id="INDEX">20004</Dimension>
<Dimension id="INDEX">115486</Dimension>
<Dimension id="INDEX">20005</Dimension>
<Dimension id="INDEX">115488</Dimension>
<Dimension id="INDEX">115489</Dimension>
<Dimension id="INDEX">115493</Dimension>
<Dimension id="INDEX">126670</Dimension>
<Dimension id="INDEX">999901</Dimension>
<Dimension id="INDEX">999902</Dimension>
<Dimension id="INDEX">999903</Dimension>
</Or>
<Or>
<Dimension id="TSEST">10</Dimension>
<Dimension id="TSEST">20</Dimension>
</Or>
</And>
</DataWhere>
</Query>
</message:QueryMessage>
2. GetCompactData
This method retrieves data in a compact format from a specified ABS.Stat dataset. Similarly to GetGenericData method, it requires an input parameter (ie the query) as an XML document in SDMX-ML format and will return the query results in SDMX-ML format.

3. GetDataStructureDefinition

This method retrieves data structure definitions as well as codelists and concepts associated with a dataset. The input parameter is an XML document in SDMX-ML format and the output is an SDMX structure message (see Data Structure Definition Output example below).

SDMX query message example


<message:QueryMessage xmlns="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/query" xmlns:message="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message" xsi:schemaLocation="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/query http://www.sdmx.org/docs/2_0/SDMXQuery.xsd
http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message http://www.sdmx.org/docs/2_0/SDMXMessage.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header xmlns="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message">
<ID>none</ID>
<Test>false</Test>
<Prepared>2012-06-01T09:33:53</Prepared>
<Sender id="YourID">
<Name xml:lang="en">Your English Name</Name>
</Sender>
<Receiver id="ABS">
<Name xml:lang="en">Australian Bureau of Statistics</Name>
<Name xml:lang="fr">Australian Bureau of Statistics</Name>
</Receiver>
</Header>
<message:Query>
<KeyFamilyWhere>
<Or>
<KeyFamily>CPI</KeyFamily>
</Or>
</KeyFamilyWhere>
</message:Query>
</message:QueryMessage>


SDMX Data Structure Definition result example

4. GetDatasetMetadata

This method retrieves the metadata for a dataset for a specified dataset. It requires an input parameter (ie the query) as an XML document in SDMX-ML format. An example of the GetDatasetMetadata SDMX query message is copied below. The Web Service will return the query results in SDMX-ML format (see SDMX query result example below)

SDMX query message example:


<message:GenericMetadataQuery
xmlns:message="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message"
xmlns:structure="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/structure"
xmlns:query="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/query"
xmlns:common="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.sdmx.org/resources/sdmxml/schemas/v2_1/query SDMXQueryMetadata.xsd
http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message SDMXMessage.xsd">
<message:Header>
<message:ID>REG_REQ007</message:ID>
<message:Test>true</message:Test>
<message:Prepared>2012-06-01T09:48:05</message:Prepared>
<message:Sender id="YourID">
<common:Name xml:lang="en">Your English Name</common:Name>
</message:Sender>
<message:Receiver id="ABS">
<common:Name xml:lang="en">Australian Bureau of Statistics</common:Name>
<common:Name xml:lang="fr">Australian Bureau of Statistics</common:Name>
</message:Receiver>
</message:Header>
<message:Query>
<query:ReturnDetails/>
<query:MetadataParameters>
<query:AttachedDataSet>
<common:DataProvider>
<Ref id="ABS" maintainableParentID="" agencyID="ABS"/>
</common:DataProvider>
<common:ID>CPI</common:ID>
</query:AttachedDataSet>
</query:MetadataParameters>
</message:Query>
</message:GenericMetadataQuery>

5. GetDimensionMemberMetadata

This method retrieves the metadata for a particular dimension member for a specified dataset. It requires an input parameter (ie the query) as an XML document in SDMX-ML format. An example of the GetDimensionMemberMetadata SDMX query message is copied below. The Web Service will return the query results in SDMX-ML format (see SDMX query result example below)

SDMX query message example:


<message:GenericMetadataQuery
xmlns:message="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message"
xmlns:structure="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/structure"
xmlns:query="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/query"
xmlns:common="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.sdmx.org/resources/sdmxml/schemas/v2_1/query SDMXQueryMetadata.xsd
http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message SDMXMessage.xsd">
<message:Header>
<message:ID>REG_REQ007</message:ID>
<message:Test>true</message:Test>
<message:Prepared>2012-06-01T09:50:30</message:Prepared>
<message:Sender id="YourID">
<common:Name xml:lang="en">Your English Name</common:Name>
</message:Sender>
<message:Receiver id="ABS">
<common:Name xml:lang="en">Australian Bureau of Statistics</common:Name>
<common:Name xml:lang="fr">Australian Bureau of Statistics</common:Name>
</message:Receiver>
</message:Header>
<message:Query>
<query:ReturnDetails/>
<query:MetadataParameters>
<query:AttachedDataKey>
<common:KeyValue id="MEASURE">
<common:Value>1</common:Value>
</common:KeyValue>
</query:AttachedDataKey>
<query:AttachedDataSet>
<common:DataProvider>
<Ref id="ABS" maintainableParentID="" agencyID="ABS"/>
</common:DataProvider>
<common:ID>CPI</common:ID>
</query:AttachedDataSet>
</query:MetadataParameters>
</message:Query>
</message:GenericMetadataQuery>


SDMX Query result example:

6. GetDimensionMetadata

This method retrieves the metadata for a particular dimension for a specified dataset. It requires an input parameter (ie the query) as an XML document in SDMX-ML format. An example of the GetDimensionMetadata SDMX query message is copied below. The Web Service will return the query results in SDMX-ML format (see SDMX query result example below)

SDMX query message example:

<message:GenericMetadataQuery
xmlns:message="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message"
xmlns:structure="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/structure"
xmlns:query="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/query"
xmlns:common="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.sdmx.org/resources/sdmxml/schemas/v2_1/query SDMXQueryMetadata.xsd
http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message SDMXMessage.xsd">
<message:Header>
<message:ID>REG_REQ007</message:ID>
<message:Test>true</message:Test>
<message:Prepared>2012-06-01T09:53:17</message:Prepared>
<message:Sender id="YourID">
<common:Name xml:lang="en">Your English Name</common:Name>
</message:Sender>
<message:Receiver id="ABS">
<common:Name xml:lang="en">Australian Bureau of Statistics</common:Name>
<common:Name xml:lang="fr">Australian Bureau of Statistics</common:Name>
</message:Receiver>
</message:Header>
<message:Query>
<query:ReturnDetails/>
<query:MetadataParameters>
<query:AttachedObject>
<Ref package="datastructure" class="Dimension" id="MEASURE" agencyID="ABS"/>
</query:AttachedObject>
<query:AttachedDataSet>
<common:DataProvider>
<Ref id="ABS" maintainableParentID="" agencyID="ABS"/>
</common:DataProvider>
<common:ID>CPI</common:ID>
</query:AttachedDataSet>
</query:MetadataParameters>
</message:Query>
</message:GenericMetadataQuery>

7. GetMetadata

This method is the generic method which can retrieve the metadata for a particular dimension member, datatset, dimension and reference metadata for a specified dataset depending on the input parameter. It requires an input parameter (ie the query) as an XML document in SDMX-ML format.

See 5. GetDimensionMemberMetadata for an example of the GetMetadata SDMX query message and method results in SDMX-ML format.

8. GetMetadataStructure

This method retrieves the metadata structure definitions (code lists and concepts) for a particular for a specified dataset. It requires an input parameter (ie the query) as an XML document in SDMX-ML format. An example of the GetMetadataStructure SDMX query message is copied below. The Web Service will return the query results in SDMX-ML format (see SDMX query result example below).

SDMX query message example:

<message:MetadataStructureQuery
xmlns:message="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message"
xmlns:structure="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/structure"
xmlns:query="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/query"
xmlns:common="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.sdmx.org/resources/sdmxml/schemas/v2_1/query SDMXQueryMetadata.xsd
http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message SDMXMessage.xsd">
<message:Header>
<message:ID>REG_REQ007</message:ID>
<message:Test>true</message:Test>
<message:Prepared>2012-06-01T10:01:26</message:Prepared>
<message:Sender id="YourID">
<common:Name xml:lang="en">Your English Name</common:Name>
</message:Sender>
<message:Receiver id="ABS">
<common:Name xml:lang="en">Australian Bureau of Statistics</common:Name>
<common:Name xml:lang="fr">Australian Bureau of Statistics</common:Name>
</message:Receiver>
</message:Header>
<message:Query>
<query:ReturnDetails>
<query:References>
<query:None/>
</query:References>
</query:ReturnDetails>
<query:MetadataStructureWhere>
<query:ID>LABOUR_PRICE_INDEX</query:ID>
<query:AgencyID>ABS</query:AgencyID>
</query:MetadataStructureWhere>
</message:Query>
</message:MetadataStructureQuery>

9. GetReferenceMetadata

This method retrieves the reference metadata for a particular dimension member for a specified dataset. It requires an input parameter (ie the query) as an XML document in SDMX-ML format. An example of the GetDimensionMemberMetadata SDMX query message is copied below. The Web Service will return the query results in SDMX-ML format (see SDMX query result example below).

SDMX query message example:

<message:GenericMetadataQuery
xmlns:message="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message"
xmlns:structure="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/structure"
xmlns:query="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/query"
xmlns:common="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.sdmx.org/resources/sdmxml/schemas/v2_1/query SDMXQueryMetadata.xsd
http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message SDMXMessage.xsd">
<message:Header>
<message:ID>REG_REQ007</message:ID>
<message:Test>true</message:Test>
<message:Prepared>2012-06-01T10:03:45</message:Prepared>
<message:Sender id="YourID">
<common:Name xml:lang="en">Your English Name</common:Name>
</message:Sender>
<message:Receiver id="ABS">
<common:Name xml:lang="en">Australian Bureau of Statistics</common:Name>
<common:Name xml:lang="fr">Australian Bureau of Statistics</common:Name>
</message:Receiver>
</message:Header>
<message:Query>
<query:ReturnDetails/>
<query:MetadataParameters>
<query:AttachedDataKey>
<common:KeyValue id="INDEX">
<common:Value>THRPEB</common:Value>
</common:KeyValue>
<common:KeyValue id="INDUSTRY">
<common:Value>-</common:Value>
</common:KeyValue>
<common:KeyValue id="REGION">
<common:Value>0</common:Value>
</common:KeyValue>
<common:KeyValue id="FREQUENCY">
<common:Value>Q</common:Value>
</common:KeyValue>
<common:KeyValue id="TIME">
<common:Value>2011Q4</common:Value>
</common:KeyValue>
<common:KeyValue id="MEASURE">
<common:Value>2</common:Value>
</common:KeyValue>
<common:KeyValue id="TSEST">
<common:Value>30</common:Value>
</common:KeyValue>
<common:KeyValue id="SECTOR">
<common:Value>7</common:Value>
</common:KeyValue>
</query:AttachedDataKey>
<query:AttachedDataSet>
<common:DataProvider>
<Ref id="ABS" maintainableParentID="" agencyID="ABS"/>
</common:DataProvider>
<common:ID>CPI</common:ID>
</query:AttachedDataSet>
</query:MetadataParameters>
</message:Query>
</message:GenericMetadataQuery>