Difference between revisions of "Reference Metadata API"

From Fusion Registry Wiki
Jump to navigation Jump to search
(Created page with "Category:WebService")
 
Line 1: Line 1:
 
[[Category:WebService]]
 
[[Category:WebService]]
 +
 +
 +
= Overview =
 +
This API supports GET, POST, and DELETE methods to maintain Reference Metadata Reports.  The GET methods conform to the [https://github.com/sdmx-twg/sdmx-rest/blob/master/doc/metadata.md SDMX REST Specification for reference metadata retrieval].
 +
 +
== GET ==
 +
{| class="wikitable"
 +
|-
 +
|style="background-color:#eaecf0"|<b>Entry Point</b>|| <b> /sdmx/v2/metadata</b>
 +
|-
 +
|style="background-color:#eaecf0"|<b>Access</b>|| <span style='color:green'><b>Public</b></span>
 +
|-
 +
|style="background-color:#eaecf0"|<b>Http Method</b>|| GET
 +
|-
 +
|style="background-color:#eaecf0"|<b>Response Format</b>|| JSON
 +
|-
 +
|style="background-color:#eaecf0"|<b>Response Statuses</b>|| <p><b>200</b> - Success</p>
 +
<p><b>401</b> - Unauthorized (if access has been restricted)</p>
 +
<p><b>500</b> - Server Error</p>
 +
|}
 +
 +
[https://github.com/sdmx-twg/sdmx-rest/blob/master/doc/metadata.md See Specification].
 +
 +
== GET ==
 +
{| class="wikitable"
 +
|-
 +
|style="background-color:#eaecf0"|<b>Entry Point</b>|| <b> /sdmx/v2/metadata</b>
 +
|-
 +
|style="background-color:#eaecf0"|<b>Access</b>|| <span style='color:green'><b>Public</b></span>
 +
|-
 +
|style="background-color:#eaecf0"|<b>Http Method</b>|| POST
 +
|-
 +
|style="background-color:#eaecf0"|<b>Accepts</b>|| [https://github.com/sdmx-twg/sdmx-json/tree/master/metadata-message SDMX-JSON]
 +
|-
 +
|style="background-color:#eaecf0"|<b>Content-Type</b>|| <p>1. multipart/form-data (if attaching file) – the attached file must be in field name of uploadFile</p>
 +
<p>2. application/text or application/json (if submitting data in the body of the POST)</p>
 +
|-
 +
|style="background-color:#eaecf0"|<b>Response Format</b>|| N/A
 +
|-
 +
|style="background-color:#eaecf0"|<b>Response Statuses</b>|| <p><b>200</b> - Success</p>
 +
<p><b>401</b> - Unauthorized (if access has been restricted)</p>
 +
<p><b>500</b> - Server Error</p>
 +
|}
 +
 +
Submit a Reference Metadata report, on success an HTTP 200 status is returned.  On failure an SDMX Error message is returned with the HTTP status code set to the appropriate code. 
 +
 +
Example Error:
 +
 +
<?xml version="1.0" ?>
 +
<message:Error xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:message="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message" xmlns:com="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common">
 +
  <message:ErrorMessage code="100">
 +
    <com:Text>Could not resolve reference from structure Metadata Set 'MT:EXAMPLE1.0.0)' to structure Metadata Provision Agreement 'MT:MUK1_EXAMPLE(1.0)'</com:Text>
 +
  </message:ErrorMessage>
 +
</message:Error>

Revision as of 04:29, 21 July 2022


Overview

This API supports GET, POST, and DELETE methods to maintain Reference Metadata Reports. The GET methods conform to the SDMX REST Specification for reference metadata retrieval.

GET

Entry Point /sdmx/v2/metadata
Access Public
Http Method GET
Response Format JSON
Response Statuses

200 - Success

401 - Unauthorized (if access has been restricted)

500 - Server Error

See Specification.

GET

Entry Point /sdmx/v2/metadata
Access Public
Http Method POST
Accepts SDMX-JSON
Content-Type

1. multipart/form-data (if attaching file) – the attached file must be in field name of uploadFile

2. application/text or application/json (if submitting data in the body of the POST)

Response Format N/A
Response Statuses

200 - Success

401 - Unauthorized (if access has been restricted)

500 - Server Error

Submit a Reference Metadata report, on success an HTTP 200 status is returned. On failure an SDMX Error message is returned with the HTTP status code set to the appropriate code.

Example Error:

<?xml version="1.0" ?>
<message:Error xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:message="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message" xmlns:com="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common">
 <message:ErrorMessage code="100">
   <com:Text>Could not resolve reference from structure Metadata Set 'MT:EXAMPLE1.0.0)' to structure Metadata Provision Agreement 'MT:MUK1_EXAMPLE(1.0)'</com:Text>
 </message:ErrorMessage>
</message:Error>