API Return Format: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[ | [[I4A API Guide]] | ||
== Description == | == Description == |
Revision as of 20:18, 21 September 2022
Description
The API uses the REST methodology and can return data back to the sender in a number of formats. They are:
Usage
Simply put the return format in the url string right after the /i4a/api/ part of the url. By default each format will set the content-type in the HTML header. This is known to cause problems with some browsers and frameworks. If you are experiencing issues you can append _noheader to the format name and the data will be returned to you "RAW" with no headers being set. For instance you can could pass:
/i4a/api/json_noheader/membership.contact/24228 and it would return the same json data, but would not populate the HEADER that is returned to the calling page.
json
Json is a compact text based format, that at first glance looks somewhat like a traditional CSV file. It is becoming very popular with Web 2.0 and is used most often with AJAX.
xml
wddx
Wddx is nothing more than a specialized XML packet. It has a defined stucture in how the XML is organized, but otherwise it is identical to an XML document.
Links
- https://www.json.org/ - The source for information on json format
- https://en.wikipedia.org/wiki/JSON - Wikipedia article on json format
- https://en.wikipedia.org/wiki/XML - Wikipedia article on xml format
- https://en.wikipedia.org/wiki/Wddx - Wikipedia article on wddx format