HTTP Interface of the production server


Application API requests

You can use the http interface of the production server to make application API requests or web application resource requests. Use the following request structures, headers, and elements. Use the following request structure to perform an application API request:

Application API request headers

Header Name Data Type Description Valid values
x-wl-app-version String Version of the application
WL-Instance-ID String Protection mechanism for XSS attacks.

Application API request elements...

Header Name Data type Description Valid values
Protocol String
HTTP
WorklightServer String Host name or IP address (and possibly port) identifying the IBM Worklight Server
Application ID String Unique Identifier of the application within the IBM Worklight Server. Every application deployed on the IBM Worklight Server must have a unique identifier Up to 256 alphanumeric and underscore characters
ApplicationEnvironment String Name of the environment the applicationis running on air, android, Androidnative, blackberry, dashboard, desktopbrowser, facebook, igoogle,iOSnative, ipad, iphone, JavaMEnative, mobilewebapp, vista, windows8, windowsphone
Action String Requested action Details in following table

Actions...

Action HTTP Request Parameters
init POST x, isAjaxRequest . see the following table showing common parameters.
heartbeat POST x, isAjaxRequest . see the following table showing common parameters.
logactivity POST x, isAjaxRequest . see the following table showing common parameters.

activity . string .

query POST x, isAjaxRequest . see the following table showing common parameters.filterList . JSON block

parameterList . JSON block

sorterList . JSON block

Note: When the action is query, the request URL has the following structure: ./query/{Adapter Name}/{Procedure Name} where Adapter Name and Procedure Name are strings.

logout POST x, isAjaxRequest - see the following table showing common parameters.
login POST x, isAjaxRequest . see the following table showing common parameters.

realm . string .

updates POST x, isAjaxRequest . see the following table showing common parameters.

skin . current skin name (string)

checksum . the checksum of the current skin (string)

skinLoaderChecksum . the checksum of the skin selection code (string)

getup POST x, isAjaxRequest - see the following table showing common parameters.
deleteup POST x, isAjaxRequest . see the following table showing common parameters.

userprefkey . the user preference to delete .

getuserinfo POST x, isAjaxRequest . see the following table showing common parameters.
getgadgetprefs POST x, isAjaxRequest - see the following table showing common parameters.
notifications POST x, isAjaxRequest . see the following table showing common parameters.

subscribe . JSON string containing subscribe options

unsubscribe . when specified, designates an unsubscribe action

updateToken . the update notification token (string)

adapter . the name of the notification adapter (string)

eventSource . the name of the notification event source (string)

alias . notification subscription alias (string)

fbcallback GET or POST x, isAjaxRequest . see the following table showing common parameters.

popup . string

composite POST x, isAjaxRequest - see the following table showing common parameters.

requests . a JSON string containing information about other actions to invoke.

This action is used to combine several actions in a single HTTP request.

appversionaccess GET x, isAjaxRequest . see the following table showing common parameters.
setup POST x, isAjaxRequest - see the following table showing common parameters.

userprefs contains JSON pairs of preference key and value

authentication POST x, isAjaxRequest - see the following table showing common parameters.

action values are popup, test, or test_img

authenticate POST x, isAjaxRequest - see the following table showing common parameters.

This is an empty handler used to allow the client to respond to authentication challenges with a challengeResponse that cannot fit in a single header or when all headers combined are bigger than the limit for header size.

Common parameters

Parameter Values Comments
x A random decimal number Included with all GET and POST requests to prevent caching by the Vista Sidebar HTTP engine.
isAjaxRequest true Included with every GET and POST request only from Adobe. AIR application.
_ None Included with every POST request only from Webkit-based browsers and application frameworks: Safari, Chrome, and Adobe AIR.

Web application resource requests

Use the following request structure to perform a web application resource request:


Request elements

See Application API Request Elements for details about the following request elements: Protocol, Worklight Server, Application ID, and Application Environment.

Element Data Type Description Valid Values
Application Resource Path String HTML, image, JavaScript, CSS, and any other application resource Example values: img/bg.png, myWidget.html, js/myWidget.js


Preview application resource requests

Use the following request structure to preview application resource requests:


Request elements

See Application API Request Elements for details about the following request elements: Protocol, Worklight Server, ApplicationID, and Application Environment.

Element Data Type Description Valid Values
Application Resource Path String HTML, image, JavaScript, CSS, and any other application resource Example values: img/bg.png, myWidget.html, js/myWidget.js

Console API requests

Use the following request structure to perform a console API request:

Actions...

Action HTTP Request Parameters
getAdapters GET None
getAdapter GET adapterName
deleteAdapter POST adapterName
exportAdapter GET adapterName, response
uploadAdapter POST input, adapterFolderPath
getApplications GET None
getApplication GET applicationName
deleteApplication POST applicationName
getApplicationThumbnail GET applicationName
uploadApplication POST input
setApplicationVersionAccessRule POST gadgetAppId, action, message, downloadLink
setApplicationAuthenticityCheckRule POST gadgetAppId, action
setApplicationVersionLock POST gadgetAppId, lock
deleteGadgetApplication POST gadgetAppId
getPublishUrl GET gadgetAppId
getPublicResource GET gadgetAppId
getBinaryApp GET gadgetAppId
getMediators GET None
getEventSources GET None
getEventSource GET adapterName, sourceName
getAllApplications GET None
setEnabled POST applicationUniqueName, enabled
unsubscribeSMS POST phoneNumbers
getUserName GET None
logout POST None
getServerVersion GET None
getServerLog GET numLastLines


Parent topic IBM Worklight Server administration