Page tree
Skip to end of metadata
Go to start of metadata

 

Apperian API Transactions

The Apperian API provides methods that support the following transactions. Click on each transaction for a description of its purpose, a list of all the methods it calls, and a diagram that steps through the request/response workflow.

 

On This Page

Exchanging JSON-RPC Messages

To communicate with the Apperian publishing web service, your client application needs to POST a request message with a JSON object to the web services URL. There is a different URL for each production environment. If you are not sure which production environment to use, check with Customer Support.

All messages must be sent using the HTTPS protocol. The Apperian web service responds with a JSON object in a response message.

Anatomy of a Request Message

The request message invokes the API method you wish to use. The JSON object in the request message always includes these five members:

MemberDescription
jsonrpcA string that specifies the version of the JSON-RPC protocol.
apiVersionA string that specifies the version of the Apperian API. This should always be set to 1.0.
id

A value of any type, which is used to match the response with the request that it is replying to.

To ensure that a response is matched with the correct request, this should be a unique value. A common practice is to use an integer value and increment it with every request.

methodA string containing the name of the Apperian API method to be invoked. For more information on the methods provided with the Apperian API, see Methods.
params

A structured value that holds the parameter values to be used during the invocation of the method.

Example Request Message

This example shows a request that calls the update method. This request specifies the unique ID for the app; it must then be followed by a request that calls the publish method to update the file and/or metadata for the specified app.

Anatomy of a Response Message

The Apperian web service returns a response message with a JSON object that includes a result member in the success case or an error member in the failure case.

MemberDescription
jsonrpcA string that specifies the version of the JSON-RPC protocol.
idThe ID sent by the Client in the request message. The Server must reply with the same value in the response.
result

This member is returned when the method is invoked successfully. Its value depends on the method that was called by the request message.

This object must be null when there was an error invoking the method.

error

This member is returned when there is an error invoking the method on the server. The value includes two required members: code and message, and may also include the optional data member.

  • code is an integer that indicates the error type.
  • message is a string that describes the type of error.
  • data contains additional information about the error, if necessary.

This object must be null when the method is invoked successfully.

For more information on errors see Error Codes.

Example Response Message

This example shows a response to a call to the update method. It provides a URL to which the updated app file can be uploaded before calling the publish method. It also lists the metadata currently stored in the database about the app.

For details on the JSON-RPC protocol, see the JSON-RPC 2.0 Specification.

  • No labels