Rest api

nettemor

Member
Hi,
I am not sure how to approach this issue so i want to ask you for a way to solve this.

I have created an app in Fabric for sale and installation of airconditioners. Some of the data from this app are to be transferred to an economy system for invoicing and further handeling.
When handeled in the economy system, some status data should be transferred back to the fabric app.

I have been told that Rest was a way to go to do this.I am not familiar with Rest.

My question to you is:
How do and where do i start? If someone please can tell me like 1. do this - 2. do - 3. do this ... i really need help how to get started:p

And also i need to clearify:
Is the List plugin - webservices (http://fabrikar.com/help/tutorials/details/3/29-webservices) the plugin to use if i am to use Rest with fabrik? Getting a bit confused cause i find a download for the List plugin, but also find a reference/talk about a Rest form plugin (but cant find any Form plugin in the download section)
 
The form 'rest' plugin isn't what you need, as that only sends data to a generic REST service when you submit a form. Examples of "REStful" services which you post data to would be things like Twitter, Flickr, Google Translate, Dropbox.

So the only generic solution we have which might work would indeed be the webservice plugin. So the main question is whether the "economy system" you are using has a web service you can connect to. Do they have any docs we can look at about how to get data form their service?

-- hugh
 
Hi Hugh,
and thanks for getting back to me.

Ok, i see i cannot use the Rest form plugin or the Webservice. I tried the Webservice plugin last night but after many hours:( i figured that it requires that the client has a webservice running:). So i misunderstood how this pluging was working.

And this client does not have a webservice, but they have a program doing scheduled tasks..... Just spoken to the client about this and they suggest that the following solution would be the best:

They want to send an sql string from the economy system to fabric system, and where fabric returns all the new orders (status=20 is new orders). String should be something like http://mysite.com/interface.php?SQL=select * from xx_sales where status=20'. This can f.ex be sent each hour to get new orders.

Also they want to send sql string directly for update of the fabric data like this http://mysite.com/interface.php?SQL=update xx_sales set invoicenr=3333 where id=248000. Fabric should then update the database with the string.

Is this possible within fabric? I think it does not matter how we do it or what we use to make this work, as long as it is a automatic routine.

I have a hard time figuring this out. Do you have any suggestions how i can do this the best way ?
 
No way can you do that through Fabrik, and I would never implement anything that did something that way, it would be a security nightmare. That's what web services are for!

If they want to do it by executing SQL commands, then my best suggestion is you look at doing this entirely outside of Fabrik, giving them restricted remote access to your MySQL, with a user that is restricted to just that specific table, and just SELECT and UPDATE commands. Then they can fire off the commands themselves, through any standard MySQL client layer.

-- hugh
 
Yes that so true. Sounds like the way you describe using standard client layer will be fine. I'll try to do this. Thank you very much for your thoughts and input, i appreciate it very much. :)
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top