Edit Endpoint URLs
We have previously been polling the Table API of our PDI. We now want to poll the Attachment API. To facilitate this, we will need to make changes to the Endpoint URLs in multiple places.
The instructions on this page only apply if you have configured the Connection with the full endpoint url (including the
If you have used the truncated url in the Connection (moving the
/table/incidentelement to the outbound Message path & Poll Processors), this page may be skipped.
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/incidentfrom 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/incidentto the Path & Save.
Repeat for each of the other Outbound Messages.
DO NOT delete the existing path, rather prepend it with
/table/incident(as cut from the Connection). For example, the Path for the UpdateIncident Message should now read as follows:
Edit the Endpoint URL in the Setup script for each of the previously configured Poll Processors:*
*(The names of your Poll Processors may differ.)
Note: Although it is necessary to edit the Endpoint URL for all of the previously configured Poll Processors for each of them to work, it is only essential (for the purposes of this Guide) that this is done for the Parent and Child Poll Processors and the Create Poll Processor as these will be used when testing our Integration (& the Messages).
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/incidenti.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:
Repeat for each of the other previously configured Poll Processors.
Once complete we can configure the first of our Child Poll Processors, the Get Attachment Poll Processor.