Using data from an external json url

Using data from an external json url

samjcosamjco Posts: 6Questions: 2Answers: 0
edited June 2019 in Free community support

Let's say that I have JSON data located at the URL: https://editor.datatables.net/examples/php/rest/get.php

I have look at the examples here (https://editor.datatables.net/examples/advanced/REST.html) and am having a bit of trouble understanding to server scripting.

What I am trying to accomplish is use the sample here: https://editor.datatables.net/examples/advanced/multiItem.html
but use it with an external REST/JSON URL with all of the edit scriptings and not with a SQL data which is what is used in the above example.

So I want to show data using REST, but edit data back using SQL or REST whichever easiest.

Answers

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    Whatever is easiest will be to use the server-side libraries we provide for PHP, .NET and NodeJS. If you don't want to use them, then the client / server protocol that Editor uses is fully documented and I'm happy to answer any questions you have about it.

    Allan

  • samjcosamjco Posts: 6Questions: 2Answers: 0

    Thank @allan

    So the issue is, when looking at the examples, it doesn't say the name of the PHP file that holds the scripting... so the tutorials seem incomplete.
    It would be nice to a breakdown of the page names and functions to be more clear and precise.

    Another thing was, that, even after downloading the files, I was looking for matching file names from the examples to try and replicate the examples and reverse engineer it from there... but the files didn't match, nor did I see any of the example data.

    It would be nice to see a folder for each tutorial in the downloaded files. for example:

    Editor (dir)
    - examples (dir)
    - - REST-html (dir)
    - - multiItem-html(dir)

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    it doesn't say the name of the PHP file that holds the scripting

    The ajax property defines that. E.g. in this example the ajax option points to php/staff.php in the examples directory. It will even show you the PHP script if you click the "Server script" tab below the table.

    Allan

This discussion has been closed.