Difference between revisions of "Search Data API"

From Fusion Registry Wiki
Jump to navigation Jump to search
(Auto Complete Response)
(Search Response)
Line 52: Line 52:
 
The search response is a list a list of results, each result is a match on a Dataflow and a list of Components that matched with the match text, and the number of series that exist for the matched term
 
The search response is a list a list of results, each result is a match on a Dataflow and a list of Components that matched with the match text, and the number of series that exist for the matched term
  
<b><u>Example: <b>[https://demo.metadatatechnology.com/FusionRegistry/ws/public/datasearch?query=money /ws/public/datasearch?query=population]</b></u>
+
<b><u>Example: </u></b>[https://demo.metadatatechnology.com/FusionRegistry/ws/public/datasearch?query=money /ws/public/datasearch?query=population]
 
   
 
   
 
  {
 
  {
Line 76: Line 76:
 
     }
 
     }
 
   ]
 
   ]
 
 
 
  }
 
  }

Revision as of 01:49, 2 March 2021


Overview

API

Path

Entry Point /ws/public/datasearch
Access Public
Http Method GET
Response Format JSON
Response Statuses

200 - Success

401 - Unauthorized (if access has been restricted)

500 - Server Error


Query Parameters

Request Parameter Purpose Allowed Values
query The search text Any values allowed
auto If true the response are valid autocomplete options, if false the response is the search results true/false

Auto Complete Response

The response is a JSON array of search options based on the query term

Example: /ws/public/datasearch?query=money&auto=true

[
  "Claims on central government (annual growth as % of broad money)",
  "Claims on private sector (annual growth as % of broad money)",
  "Broad money (current LCU)","Money (current LCU)",
  "Claims on other sectors of the domestic economy (annual growth as % of broad money)"
]

Search Response

The search response is a list a list of results, each result is a match on a Dataflow and a list of Components that matched with the match text, and the number of series that exist for the matched term

Example: /ws/public/datasearch?query=population

{
  "time" : 28,
  "results" : [
    {
      "Dataflow": "urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow=WB:WDI_HEALTH(1.0)",
      "SeriesCount": 17836,
      "Components": {
            "SERIES": {
               "SH_DYN_AIDS_FE_ZS": {
                   "Name": "Women's share of population ages 15+ living with HIV (%)",
                   "SeriesCount": 112,
                   "Match": "Women's share of population ages 15+ living with HIV (%)"
               },
               "SH_H2O_SAFE_RU_ZS": {
                   "Name": "Improved water source, rural (% of rural population with access)",
                   "SeriesCount": 190,
                   "Match": "Improved water source, rural (% of rural population with access)"
               },
        .....
          }
    }
  ]
}