API Notes
NicToolServer provides a rich set of function calls which may be called with the SOAP or XML-RPC protocols, using HTTP (or preferably, HTTPS) as a transport layer. First a session must be created with the login function. When you are done with your session, it may be terminated with the logout function. Your session will timeout after a certain amount of time has passed with no activity, and you will be required to login again.
Data types. The data types used by NicToolServer are fairly simple:
-
struct. A hash table of name/value pairs.
-
string. A string of characters
-
int. A number
-
array. A list of other values
-
flag. This is a boolean value represented by a string. It should be either '1' meaning TRUE or '0' meaning FALSE.
Function calling.
Note: Function names are case insensitive.
Note: Named parameters inside structs are case sensitive.
Special parameters. There is one named parameter that is required by all function calls. It should be included along with the other named hash entries in all function calls, unless noted:
- nt_user_session
-
The session ID string. This string is required for all functions other than login
Note: The only protocol version supported by NicTool Server 2.00b is "1.0"
- nt_protocol_version
-
a string naming the protocol version in use by the client agent
Errors. If a function call encounters an error, three entries in the returned hash will contain the error code, a short description of the error, and the specific error message. If no error occurs, these three entries may still be present. The returned named entry error_code will have a value other than "200" if the result is an error.
- error_code
-
string. Code number of the error. "200" indicates that no error has occurred.
- error_desc
-
string. Short description of the error. "OK" is the normal response if there is no error.
- error_msg
-
string. The full error message. "OK" is the normal response if there is no error.