Adobe Connect Support Blog

September 25, 2013 /XML API /

Adobe Connect Web Services Best Practices with URL Encoding

It is always good to review the best practices for URL encoding strings (http://www.w3schools.com/tags/ref_urlencode.asp) before writing your code for any sort of XML API integration with Adobe Connect.  This especially comes in handy when you need to pass in passwords for either a principal or telephony profile, or if you use something as common as the time zone value in a date filter.

One example of a common problem  is the ‘+’ in the service call URL if your time zone for instance, includes a ‘+’ sign (so GMT+01:00 for Paris as an example).  This is a conflicting standards issue with the  URL spec and the ISO8601 time spec.  All customers should make a practice of URL encoding all query strings in their application or if they are just using a web browser to make API calls to Adobe Connect.

The workaround in the case of a time zone on the plus side of GMT would be to URL encode the ‘+’ with ‘%2b’.

So an example would be:

https://{serverURL}/api/xml?action=report-meeting-attendance-details&sco-id=XXXXXXXX&filter-gte-date-end=2013-09-11T15%3A31%3A21.057%2b01%3A00&filter-lte-date-end=2013-09-11T16%3A06%3A10.650%2b01%3A00

Where I substituted the correct ‘%2b’ in the URL string instead of ‘+’ and also %3A instead of ‘:’ .

This Will return the desired:

<results>
<status code=”ok”/>
<report-meeting-attendance-details>
<row transcript-id=”XXXXXXXX” sco-id=”XXXXXXX” principal-id=”XXXXXXX” answered-survey=”0″>
<attendee-login>user@email.com</attendee-login>
<attendee-name>User Name</attendee-name>
<attendee-ip-address>XXX.XXX.XXX.XXX</attendee-ip-address>
<sco-name>Sco Name</sco-name>
<meeting-url>http://{serverURL}/meetingurl</meeting-url>
<unique-meeting-id>XXXXXXXXX-XXXXXXXXX-XXXXXXXXX</unique-meeting-id>
<customer-id>XXXXXX</customer-id>
<date-created>2013-09-11T15:31:21.057+01:00</date-created>
<date-end>2013-09-11T16:06:10.650+01:00</date-end>
</row>
<row>
….
</row>
<row>
….
</row>
</report-meeting-attendance-details>
</results>

 

Note: The error you would get if you did not encode the “+” in the above example would look like this:

<results>
<status code=”invalid”>
<invalid field=”date-end” type=”date” subcode=”format“/>
</status>
</results>
XML API

Join the discussion