Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Create New Topic in Foswiki server based on input from external system

by programmingzeal (Sexton)
on Feb 20, 2022 at 12:28 UTC ( #11141504=perlquestion: print w/replies, xml ) Need Help??

programmingzeal has asked for the wisdom of the Perl Monks concerning the following question:

I am new to foswiki. I want to create a topic on foswiki instance running on web server on local machine with data coming from external system. The new topic data will be sent via POST request from external system to this local machine's (server URL) port XXXX. When the data arrives at the port XXXX some how a new topic or update topic (if exist) event should be triggered on foswiki local instance. How can I achieve this?

I understand that I have to use Perl/CGI Sockets for communication between the two machines but when the payload arrives from client to server, how to trigger an event that will cause updation in foswiki local instance?

Are there any tutorials and CPAN APIs available?

The client and server machines are on LAN

I found a post on foswiki forum similar to my task but the code link there is not working https://foswiki.org/Support/Question1221

  • Comment on Create New Topic in Foswiki server based on input from external system

Replies are listed 'Best First'.
Re: Create New Topic in Foswiki server based on input from external system
by marto (Cardinal) on Feb 20, 2022 at 12:47 UTC

      I have read the two pages. Also, I did some search and arrived at the conclusion that I have to write a new plugin which acts as a REST CGI script.

      https://foswiki.org/System/DevelopingPlugins#Creating_New_Plugins

      What I understand is that I have to write a script as a Plugin which listens on port XXXX or maybe a cronjob on local web server or maybe when client sends a POST query to the foswiki REST script URL with payload it executes function to create new topic.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11141504]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2022-07-06 17:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?