4

How to API / REST service calls. What are your suggestions/experiences/best practices?

Comments
  • 1
  • 0
    @sharktits thx for that. but that's exactly the point. which langauge do you recommend? are there best practices? and i know btw how to call the api with 1 simple parameter. but how to call it with e.g. id = 1, id = 2, id=3 etc.?
  • 0
    Language depends entirely on what you want to do. There is okhttp for java if you wanna do desktop stuff, fetch api for js, and thats about what i use. You gotta look up http protocols too.
  • 0
    I never did it but i think it might apply for this case as well.

    1.Find good documentation
    2.Find working example
    3.Change example to your needs
  • 0
    @sharktits ok, let's say there is an API which needs oauth implementation. then every service call will get you a XML file which you need to process. since you have a number of files you need a number of calls, because input parameters are limited to a 1:1 relation. Then, all you need is to save your xml data in a database and display them in a front-end application. how would you approach your back-end application?
  • 0
    @Gregozor2121 yes, that's what i did. a have a working authentification and service call with soap ui. but now i want to go e step further and that's exactlay where I fail at #1 now ^^
  • 0
    Well i personally would make a java spark backend, parse the xml with javacsv, save it into mysql/sqlite (depends on the xml size), then throw back a json and display it with vuejs. But thats just my preferred stack.
  • 0
    @sharktits i guess you already have a stable dev environment. would you still use a java based stack if you could start from scratch? i'm good with java, but a think it's kind of "overkill" for my small "hobby" web app.
  • 0
    @sharktits at the moment i'm thinking about a cronjob to gather the xml files and pentaho DI to process those files into a DB. then to build a simple frontend app in js/php/html5/css3 accessing the database. i just don't have a clue if oauth and rest calls are possible e.g. in a powershell script.
  • 0
    Well, id use java if i had to stab myself for every written line, but thats just me.

    But yeah, exactly, i have no idea if you can oauth in a shell script, but im sure you can in java, so...
Add Comment