Websydian v6.1 online documentationOnline documentation - WebsydianExpress v3.0

API Functions

Overview

The WebsydianExpress API functions are the developers interface to WebsydianExpress. That is, when the developer at runtime needs to retrieve information about WebsydianExpress this is typically done by calling an API function.

The API functions are defined in the WSYAPI library model and are scoped under one of two functions:

APIWebServer, which are for API functions deployed in the web server tier.
Please be aware that web server API's may NOT be called from server functions
APIServer, which are API functions that are deployed on the back-end (database) server.

Events

Apart from the "normal" values for *Returned Status, these API functions can also return the unique identification of a WebsydianExpress Event - this will always be a numeric value corresponding to an entry in the message log table.

If the function is successful it will always return *Returned Status = *Successful. As this is the case, it should in almost all instances be sufficient to just check whether the *Returned Status is successful or not after calling an API.

If you during your test need information about the error that has happened - use the message log in the administration interface to obtain the reason for the error.

Should you want to use the information in the messages you can use the supplied Message API's

Universal events

There are a number of events that can be thrown by any API function. All of these are to some extent a symptom of some kind of system error - and should be reported as such.

WSE0001 - Call to GetEventType failed

An attempt to call a basic runtime function has ended in error. This should only happen if the runtime object has been removed.

WSE0002 - Error in function

This is an event that is thrown if a call to a function returns a call status. As used in the API's it will usually happen if the API function calls a service function - and this call results in a call status error.

WSE0008 - Uncatched event

This event is thrown when a call from one runtime function to another has resulted in an unexpected return status. This is a system error.

WSE0057 - Unknown Error type

This event is thrown if a call to a function has resulted in a returned status that can not be identified as a valid event or one of the Plex standard return codes.

Web Server API's

Server API's