Using The jxAPI Through JSON-RPC
This page is about the legacy SOAP-based jxAPI that is no longer updated or recommended for use in new projects. The documentation in this section may be outdated or inaccurate, and is provided for reference purposes only.
Journyx recommends using the REST-based API for new projects in most cases. However, at the current time, there are certain object types that are not available through the REST API.
In addition to the XML-RPC endpoint, the jxAPI provides a JSON-RPC endpoint for applications where SOAP may not be appropriate. The JSON-RPC endpoint is appropriate for use where no SOAP library is available or resources are limited. JSON-RPC is especially well suited for use on platforms which provide a JavaScript engine, such as web browsers and mobile operating systems, and for applications which are themselves written in JavaScript.
The jxAPI implements JSON-RPC version 2.0, as described here, with deviations and clarifications as described below.
The JSON-RPC endpoint is located at
http://<host>:<port>/<docroot>/jtcgi/jxapi_json.pyc
(the <docroot>
is
usually omitted, except in some cases where multiple Journyx sites run on the
same server).
Types
String, Number, and Boolean JSON types map to the corresponding basic types in the jxAPI.
Lists in the jxAPI are represented by Arrays in JSON-RPC.
Records and other structures in the jxAPI are represented by Objects in JSON-RPC. Note that the jxAPI type of a record is not represented anywhere in its corresponding JSON object; the type is implied from the method it is passed to or returned from.
The jxAPI does not use Null values, and passing them to a jxAPI method is likely to cause an exception.
Parameters and Responses
The jxAPI does not support named parameters. The params
value of each request
must be an array.
Notifications
The client may use notification-style method calls, to which the server will not return a response (or more specifically, the HTTP response to the call will contain no content). The server will not and cannot send notifications to the client.
Batches
Batch calls are supported, including the expected omission of responses when notifications are part of the batch. While batch calls do not reduce network traffic volume or database processing time compared to individual calls, the reduction in HTTP request overhead can be significant especially when using SSL, so you are encouraged to use them whenever it is feasible.