Luccas Mateus 14974edcbf
[examples/openspending] - openspending v0.2 (#907)
* [examples/openspending] - openspending v0.2

* [examples/openspending][m] - fix build

* [examples/openspending][xs] - fix build

* [examples/openspending][xs] - add prebuild step

* [examples/openspending][m] - fix requested by demenech

* [examples/openspending][sm] - remove links + fix bug
2023-05-30 20:22:58 -03:00

1.1 KiB

section, lead, title, authors
section lead title authors
help true Dataset loading API
Neil Ashton

OpenSpending Loading API

Users can load datasets (or add sources to them) by making a POST request to https://openspending.org/api/2/new (notice https) with the following url parameters:

  • csv_file - A url to the csv file to me imported for the dataset
  • metadata - A url to the json file with dataset metadata (name, currency, etc.) and the model. Views can also be defined in this file. Take a look at a sample json file to see how it should be structured (the value for mapping is the model - how the csv file should be cast into dataset dimensions, and the value for dataset is the metadata itself). To gain a better understanding of how to do the mapping, take a look at the corresponding csv file.

Along with these two an api key must be provided in the header of the request. For more details see API Conventions.

Up: OpenSpending API