With the 25.04 release, OIC events have been augmented to support File Server. The following file server events are supported -
- File created
- File deleted
- Folder created
- Folder deleted
Subscribing to the Folder Created Event
Create a new integration -
Subscribing to the File Created Event
Same as above, I just choose a different event -
{"action":"file_create","name":"700Orders.json","path":"/home/users/yourUser/NiallC/NewOrders","size":83791,"extension":"json","source":"urn://fs/sftp","type":"file","time":"2025-04-14T08:35:57.703Z","metadata":[{"key":"createdBy","value":"yourUser"}]}
All of the above fields are self-explanatory, at least I hope so.
Subscribing to the File Deleted Event
Subscribing to the Folder Deleted Event
Filtering Events
In this case, I am only interested in files with the format - ordersnnn.*.
The following filter should work -
{"type":"jq_filter","filter-def":".data.name | startswith(\"orders\")"}
Let's test this out -
{"type":"jq_filter","filter-def":".data.path==\"/home/users/yourUser/NiallC/NewOrders\" and (.data.name | startswith(\"orders\")) "}
Summa Summarum
Many customers have been asking for this feature, with 25.04 you have it!
No comments:
Post a Comment