Page 2 of 2

Incorrect Server Configuration

Posted: Mon Jun 22, 2015 6:35 am
by Daan

Glad to hear, Blair i fixed it by using the data service in the app builder, not in the API express module (i used a where just like normal rest service - Jquery app).

Evgene, best thing would be if we can import view's or query's straight from dataserver instead of re-writing it in API express (but maybe that's nice to have for the future ?), i now need my data back in a list so am back at the query problem..
but will wait for your reply in original topic.


Incorrect Server Configuration

Posted: Mon Jun 22, 2015 11:57 am
by Blair Cox

Daan, could you explain in detail how you accomplished this please?

Currently the API Express module is not working at all for any new connections I make. Tech folks are looking into the issue.


Incorrect Server Configuration

Posted: Mon Jun 22, 2015 12:48 pm
by Daan

Blair, it is explained in the multiple tutorials that Max Kats published, but here is what i did i plain text :

I created an API connection under "projects" (APIExpress).
(for "GET")

  • in there i created models of all the connections i needed (to individual tables)

  • made a copy of the url on the testpage in those models.

  • create new REST service in Jquery app, paste URL in URL but correct it ~
    ~ see example :

    https://appery.io/apiexpress-api/rest...

    Replace the "%7B%0A%7D" with "{}" (curly braces)

    Like so :

    https://appery.io/apiexpress-api/rest...

    than use the "test" tab to get response, "import as response" and map that to fields.

    I used almost the same method to use "where" except i added a parameter in the "request" part (exact field name out of database seemed to do the trick.
    and offcourse in beforeSend event map needed query parameter to you're "where" parameter and put this in JS of the mapping :

    console.log("value = " + value);
    var whereObject = {exactFieldNameParameter: value };
    console.log("whereObject = " + JSON.stringify(whereObject));
    return JSON.stringify(whereObject);

    hope that makes any sense to you and helps you along.


Incorrect Server Configuration

Posted: Mon Jun 29, 2015 2:35 pm
by Owen7613821

Hey Blair, just wondering if you were able to get around this issue you documented? Is it a bug with the API Express platform or something we are doing incorrectly?

I have tried running my custom services through both API Express test and also Chrome Extension Postman Rest Client, and i get the same error in both. Yet the standard model services for my tables work fine in both API Express test and Postman Rest Client.


Incorrect Server Configuration

Posted: Mon Jun 29, 2015 2:41 pm
by Blair Cox

Hi Owen,

Yup!! I'll save you a lot of grief - forget about API Express until it is out of Beta!!!

Use this -https://github.com/mevdschee/mysql-cr...

Or search for one that will work for your database and platform. I was up and running in less than an hour - after setting me back FIVE DAYS messing around with API Express. Forget about it. :)