REST GET,POST,PUT,DELETE?
Re: REST GET,POST,PUT,DELETE?
Hello, I am trying to send information through a REST using the POST method, the page that should receive the information, requests that the Authorization attribute be added with its respective key in the header of the html to send, how can I do that from Aware IM
Javier Cortes Ayus
Version 9.x (Testing)
OS: Ubuntu 20.04.6 LTS - DB: MySQL
Version 9.x (Testing)
OS: Ubuntu 20.04.6 LTS - DB: MySQL
Re: REST GET,POST,PUT,DELETE?
use your appropriate name/value pairs in the header.
should be straightforward
should be straightforward
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
Jaymer
Aware Programming & Consulting - Tampa FL
Re: REST GET,POST,PUT,DELETE?
Thank you Jaymer.
Indeed, once the corresponding values were placed, it was simple.
Indeed, once the corresponding values were placed, it was simple.
Javier Cortes Ayus
Version 9.x (Testing)
OS: Ubuntu 20.04.6 LTS - DB: MySQL
Version 9.x (Testing)
OS: Ubuntu 20.04.6 LTS - DB: MySQL
Re: REST GET,POST,PUT,DELETE?
This is fine for constructing a REST call and running test, but I want to see what the AwareIM server is constructing from the REST setup with all its features like name mapping and name replacement.BLOMASKY wrote: ↑Wed Mar 16, 2022 10:45 pm 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.
Bruce
How do I capture the POST url at the server level for debug purposes -- any ideas?
Seems like a good feature request to have in the configurator, once REST is setup, output to a log file the url content
Re: REST GET,POST,PUT,DELETE?
not sure what that means.
A REST call going TO Aware?
You have to make a Service, and thats tied to a Process with an Input table.
So all the submitted data gets stored in the Table.
Make the call and browse the table and you can see what came in?
True, the Server/Tomcat windows don't say squat.
Production log will show you the Process running... and you could use rules there with LOG2 statements if needed.
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
Jaymer
Aware Programming & Consulting - Tampa FL
Re: REST GET,POST,PUT,DELETE?
Webhook.site can expose a URL to post to and then view received post
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 am connecting to a remote API and posting an Invoice from my AwareIM APP
The ....POST url that AwareIM generates from the Aware configured REST Object contains a Request header and body.
I want to see something like this, to check if the layout and contents that AwareIM created is correct according to the configuration in the REST OBJECT and its related process. (i can see it in the table created by the process, but want to see what's going out on the wire)
{
"header": {
"Authorization": "Bearer api-key",
"x-apitest-app-id": "app-id",
"x-apitest-consumer-id": "consumer-id",
"x-apitest-service-id": "service-id"
},
"body": {
"number": "1234567",
"customer": "Citi Bank",
"invoice_date": "2023/04/10",
"due_date": "2023/04/10",
"terms": "Net",
"po_number": "4321",
"reference": "69000",
"status": "authorised",
"tax_inclusive": "2000",
"sub_total": "2500",
"total_tax": "500",
"tax_code": "td200",
"balance": "2500",
"billing_address": {
"id": "450009",
"string": "25 Sring St Blackburn",
"name": "HQ US",
"line1": ""
}
}
}
Re: REST GET,POST,PUT,DELETE?
@ACDC
what he said
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
Jaymer
Aware Programming & Consulting - Tampa FL
Re: REST GET,POST,PUT,DELETE?
Yes this does seem like a solution. Thank You
BTW, is there any constraints trying to get this working in TEST mode on a local pc with no ssl in place
Re: REST GET,POST,PUT,DELETE?
As I reecall, you can consume but not expose in test mode. Ssl not required for consuming
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?
Yes that's what I thought, thank you. I have had some strange issues with the configuration that don't make sense, was wondering if it's because i am in Test Mode, also getting java errors in the configurator. Anyway I will start again from scratch, maybe use a manual config as opposed to using the Discover Tool and auto setup of objects