To facilitate polling both the Table API and Attachment API, we will need to edit the Endpoint URLs configured in earlier Guides in the following places:
Outbound Message Path
Previously Configured Poll Processors
First, edit the Endpoint URL in the Connection.
In Unifi Integration Designer, navigate to the 'Connections' icon. Click to open & edit < Your Connection > (configured following the Outbound Incident Guide).
/table/incident from the Endpoint URL and Save. (This will be prepended to the Outbound Message Path & previously configured Poll Processors.)
Edit each of the previously configured Outbound Messages:
To edit the CreateIncident Message, navigate to the 'Messages' icon & click to open the CreateIncident Message.
Navigate to Outbound > Settings. Add the previously cut
/table/incident to the Path & Save.
Edit the Endpoint URL in the Setup script for each of the previously configured Poll Processors:*
Unifi - SN REST Poll Processor (as configured in the 'Poll Processor' page of the Incident Update Poller Guide
Unifi - SN REST Poller with Incident DataStore (as configured in the 'Poll Processor' page of the Incident Multiple Message Poller Guide)
Unifi - SN REST Create Poll processor (as configured in the 'Poll Processor' page of the Incident Create Poller Guide)
Unifi - SN REST Poller Single incident (as configured in the 'Child Poll Processor' page of the Incident Parent and Child Poller Guide)
Unifi - SN REST Poller Incident List (as configured in the 'Parent Poll Processor' page of the Incident Parent and Child Poller Guide)
To edit the Unifi - SN REST Poll Processor, navigate to the 'Poll Processors' icon & click to open the Unifi - SN REST Poll Processor.
Navigate to Scripts > Setup Script.
Edit the code by prepending the existing Endpoint URL with
/table/incident i.e. insert it immediately after the
poll_request.endpoint_url += ' value & click Save. That line of code should now read as follows:
poll_request.endpoint_url += '/table/incident?sysparm_query=' + uri_query +'&sysparm_fields=' + encodeURIComponent(fields) + '&sysparm_limit=10';
Your Unifi - SN REST Poll Processor Setup Script should now look like this:
Once complete we can configure the first of our Child Poll Processors, the Get Attachment Poll Processor.