- Introduction to WorkXpress
- Building Your Application
- Examples and Best Practices
- Technical Manual
This shows you the differences between two versions of the page.
api [2012/08/01 18:14] lisa |
api [2016/09/14 18:19] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Description of use for the WorkXpress API ====== | ||
- | |||
- | The WorkXpress API exposes the complete WorkXpress Engine using only four | ||
- | simple functions. These functions include: | ||
- | |||
- | * LookupData | ||
- | * AddItem | ||
- | * UpdateItem | ||
- | * ExecuteAction | ||
- | |||
- | Each exposed function has the same three simple parameters and returns response | ||
- | XML containing the data requested. These parameters include: | ||
- | |||
- | * API version | ||
- | * Authentication Code | ||
- | * Request XML | ||
- | |||
- | Before each call is made, the client program must assemble an appropriate Request | ||
- | XML string. Then, a connection to the WorkXpress API must be made through the | ||
- | SOAP WSDL. A SOAP connection object must be instantiated, and finally, the call is | ||
- | made. | ||
- | |||
- | This call returns a Response XML document, which needs to be parsed by the client | ||
- | program, to extract its requested data. | ||
- | |||
- | A complete specification of the request and response XML documents for each | ||
- | exposed API function follows. All code examples are in PHP and will need to be | ||
- | modified for the appropriate language. | ||
- | |||
- | For PHP developers there is a PEAR package that makes communicating with | ||
- | WorkXpress easier. For more information, please see | ||
- | http://www.workxpress.com//sites/default/files/Services%20WorkXpress.pdf. | ||
- | |||
- | ===== Exposed API Functions ===== | ||
- | |||
- | |||
- | In most programming languages making an API call requires the client application to | ||
- | first instantiate a connection to the server, to a specific WSDL file. The WSDL file | ||
- | defines what functions and data structures are available for consumption through the | ||
- | API. | ||
- | |||
- | The URL for the WorkXpress WSDL is: | ||
- | http://example.workxpress.com/api/api.php?wsdl | ||
- | |||
- | Once the object is instantiated against the WorkXpress WSDL, all of the functions | ||
- | detailed below are available on the connection object, and can be called like any | ||
- | other function in the client language. | ||
- | |||
- | Example: | ||
- | |||
- | <WRAP center round box 60%> | ||
- | $soap = new | ||
- | |||
- | SoapClient('http://example.workxpress.com/api/api.php?wsdl'); | ||
- | |||
- | $response = $soap->UpdateItem(1, $auth_code, $xml); | ||
- | </WRAP> | ||
- | |||
- | |||
- | ===== Compatibility Level ===== | ||
- | |||
- | |||
- | This document is written for compatibility level 1. | ||
- | |||
- | ===== Authentication ===== | ||
- | |||
- | Before you can use the WorkXpress API, an authentication key must be generated for | ||
- | the Application. To generate an auth key on any project, click the “Crete API Auth Key” | ||
- | from the Tools tab in the Block Creator: | ||
- | |||
- | {{ :create_blocks.gif?nolink&200 |}} | ||
- | |||
- | The build tools are not available on testing and production applications. However, this | ||
- | page can be accessed via | ||
- | http://example.workxpress.com/im_tools/create_auth_key.php. | ||
- | |||
- | {{ :auth_key.gif?nolink |}} | ||
- | |||
- | Once the page loads, three Fields will be rendered. A user to associate the key with | ||
- | must be provided as well as that user's password. Once the Layout has been saved with | ||
- | the appropriate data, the Layout will reload and the Auth Key Field will be an editable | ||
- | Text Area with the authentication key. Auth keys cannot be retrieved. If an auth key is | ||
- | lost it must be regenerated from within WorkXpress. |