I'm trying to GET data from firebase by REST. My firebase database looks like this
So I want to fetch it with curl:
curl 'https://smwtest-15295.firebaseio.com/WHAT_HERE?'
but I don't know what to put as request url params.
I'm trying to GET data from firebase by REST. My firebase database looks like this
So I want to fetch it with curl:
curl 'https://smwtest-15295.firebaseio.com/WHAT_HERE?'
but I don't know what to put as request url params.
Your URIs have to end with .json, as shown in the documentation you refer to.
For example:
curl 'https://smwtest-15295.firebaseio.com/9099.json'
or
curl 'https://smwtest-15295.firebaseio.com/9099/address.json'
Then you can filter or order your data by adding query string parameters.
If you want to query the entire JSON tree, use:
curl 'https://smwtest-15295.firebaseio.com/.json'
More details in the REST API Reference.
.json suffix is used by Firebase to recognize REST requests. Without .json at the end of the URL, it would be interpreted as a request to the Firebase console. Give it a try by entering https://smwtest-15295.firebaseio.com/ into your browser, and you'll see the difference.