Hi all,
If I have an external system i.e not Aware and I want to use REST GET, POST, PUT and DELETE verbs to talk to an Aware app (i.e the Aware app is the "backend" for another customer facing solution), is this possible in Aware today? Do all the verbs mentioned work per REST standards?
Thanks
REST GET,POST,PUT,DELETE?
REST GET,POST,PUT,DELETE?
Henrik (V8 Developer Ed. - Windows)
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: REST GET,POST,PUT,DELETE?
Can you keep us in the loop about what you learn, Henrik?
Tom - V8.8 build 3137 - MySql / PostGres
-
- Posts: 58
- Joined: Thu Sep 13, 2012 7:06 pm
Re: REST GET,POST,PUT,DELETE?
Any updates? Thanks
Re: REST GET,POST,PUT,DELETE?
Just following up on this. Is there anywhere to learn more about this?
Pete Bradstreet
Contract developer of commercialized applications
AwareIM Ver. 8.2
Contract developer of commercialized applications
AwareIM Ver. 8.2
Re: REST GET,POST,PUT,DELETE?
I tried to use/understand this but was over my head and also the documentation is not the best. You have to understand REST in detail I think to understand how it works in Aware. I have managed to get some simple POST from an external source into Aware so does work but I haven't done more than that (would like to though).
Take a look at the sample BSVs shared by Jaymer, it's a good starting point.
Ideally I would want a sample BSV and/or guide for how to set up an entire REST infrastructure using all verbs so if support or anyone who knows this part of Aware can do that, would be awesome.
Take a look at the sample BSVs shared by Jaymer, it's a good starting point.
Ideally I would want a sample BSV and/or guide for how to set up an entire REST infrastructure using all verbs so if support or anyone who knows this part of Aware can do that, would be awesome.
Henrik (V8 Developer Ed. - Windows)
Re: REST GET,POST,PUT,DELETE?
Thanks Henrik, any idea where I can grab Jaymers bsv?
Cheers,
Pete
Cheers,
Pete
Pete Bradstreet
Contract developer of commercialized applications
AwareIM Ver. 8.2
Contract developer of commercialized applications
AwareIM Ver. 8.2
Re: REST GET,POST,PUT,DELETE?
I would be interested in seeing Jaymer's BSV too.
I may be missing something, but in my experience Aware handles all of the verbs in the same way. No matter what verb is used, the process listed in the Service Implementation is executed and I do not know of any way to determine which verb was used.
I may be missing something, but in my experience Aware handles all of the verbs in the same way. No matter what verb is used, the process listed in the Service Implementation is executed and I do not know of any way to determine which verb was used.
Bob
Re: REST GET,POST,PUT,DELETE?
Here is the sample bsv:
viewtopic.php?f=1&t=10849&p=55252&hilit ... mer#p55252
I also wonder about the verb used thing i.e how can we determine which verb is used in a call to the Aware REST.
viewtopic.php?f=1&t=10849&p=55252&hilit ... mer#p55252
I also wonder about the verb used thing i.e how can we determine which verb is used in a call to the Aware REST.
Henrik (V8 Developer Ed. - Windows)
Re: REST GET,POST,PUT,DELETE?
Thanks Henrik, I have actually seen this before and have a number of rest services that take a similar approach although I found the process of hiding attributes from being returned too tedious so I created an alias object that I keep in sync that has far fewer attributes.
What I am a little confused about is the whole Verb thing (REST,GET,POST,PUT,DELETE). I have processes that do these things already but I don't get the verbs. I am thinking that perhaps it is just a case of populating the URL must contain string field to have those verbs so that the service URLs look more like traditional crud endpoints, I suspect that is the case but I will have another dive.
Cheers,
Pete
What I am a little confused about is the whole Verb thing (REST,GET,POST,PUT,DELETE). I have processes that do these things already but I don't get the verbs. I am thinking that perhaps it is just a case of populating the URL must contain string field to have those verbs so that the service URLs look more like traditional crud endpoints, I suspect that is the case but I will have another dive.
Cheers,
Pete
Pete Bradstreet
Contract developer of commercialized applications
AwareIM Ver. 8.2
Contract developer of commercialized applications
AwareIM Ver. 8.2
Re: REST GET,POST,PUT,DELETE?
I have limited knowledge about REST but think the verbs are part of the body of the request being made to the Aware REST service endpoint and depending on which verb is used, the Aware REST should 1) pick up which verb and do operations based on that and 2) send a reply to the calling entity in the form of a success reply or some data being returned and I think the replies can look different depending on which verb is used (not sure about that though).
The thing is, if we want to setup a REST api for our apps and use the REST format, we have to more or less work after the current REST standards i.e a REST DELETE does just that deletes some resource and sends an appropriate DELETE call reply. IMO we can´t ask our customers to do a POST with a DELETE keyword as part of the parameters, sure it would work technically but most likely not work like "normal" REST apis work and the way most companies expect REST apis to work. There are multiple verbs for a reason, otherwise all calls would be made with POST and keywords.
This then takes us back to the verbs used question, how can we know which verb is used and also regarding the potential reply, is there some standard for type of reply or how does it work?
The thing is, if we want to setup a REST api for our apps and use the REST format, we have to more or less work after the current REST standards i.e a REST DELETE does just that deletes some resource and sends an appropriate DELETE call reply. IMO we can´t ask our customers to do a POST with a DELETE keyword as part of the parameters, sure it would work technically but most likely not work like "normal" REST apis work and the way most companies expect REST apis to work. There are multiple verbs for a reason, otherwise all calls would be made with POST and keywords.
This then takes us back to the verbs used question, how can we know which verb is used and also regarding the potential reply, is there some standard for type of reply or how does it work?
Henrik (V8 Developer Ed. - Windows)
Re: REST GET,POST,PUT,DELETE?
I have used REST a lot with NODE. Calling Node FROM Aware not in reverse.
A few suggestions:
1) GET POSTMAN! This lets you very easily with a GUI create REST calls and see the return. Use it, Love it. This way you are only debugging the Aware part of this.
2). While there are 4 main verbs, they mostly have to do with how and what is being sent to the REST client. There is NOTHING wrong with using a POST to delete. Since you will have a named rest process. It can do whatever you want. Since, unless you are issuing a GET, your only response is usally a msg stating Success of Failure.
3). Use the best tool for the job. While there are a lot of plus in many cases having Aware hosting your rest backend. It is pretty simple to set up a node server (Express, Restify, etc.) and use that if you are just manipulating SQL.)
Bruce
A few suggestions:
1) GET POSTMAN! This lets you very easily with a GUI create REST calls and see the return. Use it, Love it. This way you are only debugging the Aware part of this.
2). While there are 4 main verbs, they mostly have to do with how and what is being sent to the REST client. There is NOTHING wrong with using a POST to delete. Since you will have a named rest process. It can do whatever you want. Since, unless you are issuing a GET, your only response is usally a msg stating Success of Failure.
3). Use the best tool for the job. While there are a lot of plus in many cases having Aware hosting your rest backend. It is pretty simple to set up a node server (Express, Restify, etc.) and use that if you are just manipulating SQL.)
Bruce