0

I have been save and retrieve data from Firebase now I want to Get data from firebase database through API and I want to post data in firebase database by using HTTP post request. Which API do I use for getting firebase database data through API in form of JSON?

Installation & Setup for REST API I read this link but still confused, please help me. I save this data in firebase database now I should use this data through API in my App. Thanks in Advance

James Westgate
  • 11,306
  • 8
  • 61
  • 68
  • There are number of ways to do this but the best approach would be as stated within [this answer](https://stackoverflow.com/questions/5870611/curl-in-android). You can replicate the CURL method within your Android code and make the relevant HTTP call. In this examples it's using Httpget. – Nero Nov 30 '18 at 08:20

1 Answers1

1

You are linking to the old Firebase docs you might find these docs a little easier to read and understand. An example

curl -X PUT -d '{
  "alanisawesome": {
    "name": "Alan Turing",
    "birthday": "June 23, 1912"
  }
}' 'https://docs-examples.firebaseio.com/rest/saving-data/fireblog/users.json'

Result in the Database

{
  "users": {
    "alanisawesome": {
      "date_of_birth": "June 23, 1912",
      "full_name": "Alan Turing"
    }
  }
}
Jack Woodward
  • 991
  • 5
  • 9
  • The docs clearly explain how to get data. - https://firebase.google.com/docs/database/rest/retrieve-data and save data - https://firebase.google.com/docs/database/rest/save-data . I would recommend just trying out the rest apis in rest client like postman to get your head around it and then put into your app. – Jack Woodward Nov 30 '18 at 10:18
  • Thanks for spending time for me..thanks for the example Jack Woodward – Luqman Hussain Nov 30 '18 at 10:21