Receiving a HTTP POST payload in Aware

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
customaware
Posts: 2409
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Receiving a HTTP POST payload in Aware

Post by customaware »

Excuse my ignorance about this as I am a completely vacant space when it comes to this stuff. Hope someone can point me in the right direction.

Imagine some external site needs to send me a HTTP POST with a whole pile of parameters in it....

How do I receive that in Aware?

Am I right to assume that I can create a REST service that is exposed to receive it and this will write all the parameters to a matching BO that I create?

The service say I need to provide and endpoint which I am assuming is the URL to a REST service?

See... I have no idea. I am just guessing.

Here is the part of the documentation about the POST payload.
HTTP POST Parameters.png
HTTP POST Parameters.png (95.97 KiB) Viewed 11348 times
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
himanshu
Posts: 723
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: Receiving a HTTP POST payload in Aware

Post by himanshu »

Hi Mark,

1. Create a Non Persistence Business Object with all those fields.
2. Create a Process which take this Non Business Object as input parameter. Write rules to create the actual BO instance with Non Persistence BO.
3. Create a REST service with last process created.

Your new URL or endpoint for above service will look like below
http://yourdomain:port/AwareIM/REST/[BusinessSpace]/[ServiceName]?
I hope this will help. Let me know your outcome.
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
customaware
Posts: 2409
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Receiving a HTTP POST payload in Aware

Post by customaware »

Ooohhh....

So my thinking was on the right path. Awesome. Thanx Himanshu.

Will let you know how I go.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
customaware
Posts: 2409
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Receiving a HTTP POST payload in Aware

Post by customaware »

Bingo!

Thanx Himanshu..... Works like a charm.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Jaymer
Posts: 2459
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Receiving a HTTP POST payload in Aware

Post by Jaymer »

guys, I'm not sure about unipaas, but in magic v8/v9, we could use HotFudge to do a POST.
Mark, whats your feeling about posting data into aware from a Magic app using this method... instead of nightly runs to export, transfer the file, import, etc?
What if I needed to create 100 records in a file once a week from Magic?
How would Aware react getting/queueing 100 POST requests?
Does magic need to wait for a reply?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
customaware
Posts: 2409
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Receiving a HTTP POST payload in Aware

Post by customaware »

It would work easily Jaymer.

The only limit at the moment is 1,000 records.

If you want say 100 per night it is a snap.

I have done that before. The only reason I asked the original question was that it looked like it might be a bit different to what I had seen before.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
customaware
Posts: 2409
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Receiving a HTTP POST payload in Aware

Post by customaware »

Well, have had my first go at the new V8.1 REST consumption.

Had a few issues that Support was able to help out with (Awesome support as always) and one small issue that has now been fixed in the lastest Beta update..

All working perfectly. I am deliriously happy to be able to do this stuff without having to resort to a plugin.

Top Stuff Awaresoft!!
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Post Reply