https://github.com/sosna/sdmx-rest4js
JavaScript client for SDMX services
https://github.com/sosna/sdmx-rest4js
rest-client sdmx
Last synced: 5 months ago
JSON representation
JavaScript client for SDMX services
- Host: GitHub
- URL: https://github.com/sosna/sdmx-rest4js
- Owner: sosna
- License: isc
- Created: 2016-02-26T10:17:14.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T02:23:35.000Z (over 3 years ago)
- Last Synced: 2025-09-26T23:13:49.813Z (9 months ago)
- Topics: rest-client, sdmx
- Language: CoffeeScript
- Homepage: https://sosna.github.io/sdmx-rest4js
- Size: 668 KB
- Stars: 16
- Watchers: 7
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# sdmx-rest4js
[](https://github.com/sosna/sdmx-rest4js/actions)
[](https://codecov.io/github/sosna/sdmx-rest4js?branch=master)
[](https://www.codefactor.io/repository/github/sosna/sdmx-rest4js)
[](https://snyk.io/test/github/sosna/sdmx-rest4js?targetFile=package.json)
[](https://github.com/semantic-release/semantic-release)
[](https://www.npmjs.com/package/sdmx-rest)
[](http://www.awesomeofficialstatistics.org)
This library allows to create and execute [SDMX REST queries](https://github.com/sdmx-twg/sdmx-rest) using JavaScript.
In a nutshell, you can:
- Create [data](https://github.com/sosna/sdmx-rest4js/wiki/Data-queries), [metadata](https://github.com/sosna/sdmx-rest4js/wiki/Metadata-queries), [availability](https://github.com/sosna/sdmx-rest4js/wiki/Other-queries) and [schema](https://github.com/sosna/sdmx-rest4js.wiki.git) queries;
- Access various [SDMX web services](https://github.com/sosna/sdmx-rest4js/wiki/Services), with the `getService` function;
- [Execute a query](https://github.com/sosna/sdmx-rest4js/wiki/Running-queries) against a web service, with the `request` function;
- Translate queries into [URLs](https://github.com/sosna/sdmx-rest4js/wiki/URLs), with the `getUrl` function. This is handy, in case you want to execute the query using, say, jQuery;
The example below shows how to execute a query against the ECB service, with the `request` function.
```JavaScript
var sdmxrest = require('sdmx-rest');
var query = {flow: 'EXR', key: 'A.CHF.EUR.SP00.A'};
sdmxrest.request(query, 'ECB') // ECB is one of the predefined services
.then(function(data) {console.log(data)})
.catch(function(error){console.log("something went wrong: " + error)});
```
This library is compliant with both SDMX 2.1 and SDMX 3.0.
For more information and examples, check the [Wiki](https://github.com/sosna/sdmx-rest4js/wiki).