WebHook API header.  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

WebHook API header.

Postby Ernst » Mon Jul 01, 2024 3:42 pm

The web company have added a Web Hook Header, which I can see in the sy_webhooksubscriptionHeader table, But he says he is not getting them. Ive switch logging on. Is there a way I can check if this was passed, Is there a log file I can see?

RecID SY_WebhookSubscription_RecID Name Value
6ECBC3F1-7F1A-4A11-A7D2-19DA3FF95CFB 5B02FD6C-1C2E-4255-ACF0-27740559AA55 koda-jiwa-webhook-auth TEMPORARY AUTH VALUE
3CA4CADF-5579-4907-A027-8D78809BF44F 5B02FD6C-1C2E-4255-ACF0-27740559AA55 content-type application/json


Above is the header, table .
User avatar
Ernst
Kohai
Kohai
 
Posts: 233
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: WebHook API header.

Postby Ernst » Mon Jul 01, 2024 3:43 pm

PS On JIWA721 Service Pack 20, with API plugin 7.2.1.66
User avatar
Ernst
Kohai
Kohai
 
Posts: 233
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: WebHook API header.  Topic is solved

Postby SBarnes » Mon Jul 01, 2024 5:27 pm

The simplest way would be to temporarly repoint the hooks to some where like https://webhook.site/ and see what you get, or run a tool like fiddler (https://www.telerik.com/fiddler) and intercept the traffic although that is problematic if you are using ssl.

Option 1 is the simplest.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1646
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 182

Re: WebHook API header.

Postby Mike.Sheen » Mon Jul 01, 2024 6:15 pm

If you turn on DebugMode, the request logs folder is created and contains a CSV log for every day of the requests, which includes the request headers.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2486
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 770

Re: WebHook API header.

Postby Ernst » Mon Jul 01, 2024 6:18 pm

Hi Mike, Yip I was hoping I could pick it up in the log, but where will the log be written to?
User avatar
Ernst
Kohai
Kohai
 
Posts: 233
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: WebHook API header.

Postby Mike.Sheen » Mon Jul 01, 2024 6:21 pm

Ernst wrote:Hi Mike, Yip I was hoping I could pick it up in the log, but where will the log be written to?


I did say it was in the requestlogs folder - it creates a CSV file for each day in there.

Where is the requestlogs folder? In the same folder the service executable is in - your %Program Files (x86)%\Jiwa Financials\Jiwa 7 folder.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2486
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 770

Re: WebHook API header.

Postby Mike.Sheen » Mon Jul 01, 2024 6:25 pm

Sorry Ernst - brain fart on my part - webhooks don't log their requests to CSV, only normal requests of the Jiwa API.

Follow Stuarts suggestion and use something like webhook.site, or Fiddler.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2486
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 770

Re: WebHook API header.

Postby Ernst » Mon Jul 01, 2024 6:30 pm

OK I found it, I guess its the headers column, and Yip those extra headers added, have not been sent. Can you see them.
Attachments
2024-07-01.csv
(26.16 KiB) Downloaded 88 times
User avatar
Ernst
Kohai
Kohai
 
Posts: 233
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: WebHook API header.

Postby Ernst » Mon Jul 01, 2024 6:31 pm

The webhook is there..
User avatar
Ernst
Kohai
Kohai
 
Posts: 233
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: WebHook API header.

Postby Mike.Sheen » Mon Jul 01, 2024 6:31 pm

Ernst wrote:OK I found it, I guess its the headers column, and Yip those extra headers added, have not been sent. Can you see them.


See my previous. This log is not a log of webhook events, unless you stood up a second Jiwa API to receive the webhooks, and this is the log from that second API.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2486
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 770

Next

Return to Technical and or Programming

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron