Secure API & DB Code from Web..

Secure API & DB Code from Web..

samsamtestsamsamtest Posts: 52Questions: 15Answers: 1

Hi,
I wonder if this possible with Datatables Editor
I need to secure the address and key of the API and DB.
**Example: **
When creating a company, I will need to add Name, address etc., ** their API Address, Key and Database credentials. **
Is it possible with Data-tables Editor to get the address from the database and secure it so no one can read code in a web browser?

Below you can see example:

     var table = $('#example').DataTable( {
                "dom": "Bfrtip",
               ajax: {
            **>    "url": “http://( ADRESS )/GetCustomerList",**
               "dataSrc" : "",
               "Content-Length" : “9119989 },

  ajax: {create: {
                type: 'POST',
            **  >   url:  "http://( IP ADRESS" }/AddCustomer**  //**
            edit: { type: 'POST',
             **  >  url:  "http://( IP ADRESS )/UpdateCustomer"},**

I wonder: Do you have examples if I want to sum fileds and get the sum data out only.
Example, I want to Sum two fields from the API and get out the total amount ore count etc.
Or maybe calculating from two different DB ore API calls.
This will work when using DataTables Editor ?

Thanks.
Kind Regards
Sam

This question has an accepted answers - jump to answer

Answers

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

    Is it possible with Data-tables Editor to get the address from the database and secure it so no one can read code in a web browser?

    This is something that is for a lower level than Editor - although Editor does provide the ability to submit the information needed. For a web interface, typically you'd have a session on the server-side which ties the login for a user with a browser session. If however you are using a pure API (no web-interface - I'm not clear if this is the case, for if it were, you wouldn't be using Editor!) what you would typically do is have a public key that can be used by the end user as part of the HTTP request and perform some kind of authentication - e.g. login or ssh credentials.

    Do you have examples if I want to sum fileds and get the sum data out only.

    Do display a sum of two fields in a DataTable use columns.render.

    Allan

This discussion has been closed.