RATS API Table of Contents:

RATS' API was originally intended to be strictly numeric, but as development moved on, it grew an descriptive element to make maintenance easier. The code on both sides uses the descriptive element internally, and the numeric element as part of the data transfer. The numeric element is what is used to organise the API, and thus has a few rules that might help you find what you need to know faster.

The API starts with a command code. The command code is always 5 digits. The first digit indicates the command range. 1 is a client ->server command that is open to anyone who can connect to the rats_server. 2 is a response message to a client->server query.  3 is a unrestricted client->client command. 4 is a response to an unrestricted client->client command. 5 is a restricted client->server command. 6 is the response to a restricted client->server command. 7 is reserver for restricted client->client calls. 8 is reserver for responses to restricted client->client calls. 9 is used for coded error messages. 1,3,5, and 7 are command codes. 2,4,6, and 8 are response codes.

The second digit denotes weather the call simply looks at data, or alters it. If the second digit is 0-4, it simply looks at data. If the call is 5-9, the call alters data. (ok, small problem here, for 3xxxx/4xxxx calls the convention is reversed. We screwed up. We may fix it, or leave it as an artifact in version 2 depending on 3rd party use. THIS MEANS LET US KNOW IF YOU ARE USING IT!!!!!!)

The last number is always 0 or 1. if the last number is 0, there will be no further data coming from the transmitter. If the call ends in 1, you should expect to see more replies before you can continue sending commands.

The two numbers in the middle just help to distinguish the command.

In any given range the numbers x0000 is a placeholder for the start of range, and x9999 is for the end of the range. they are reserved.

Then there are the formatting rules. The format of an API call is a command code followed by a colon followed by a number of arguments specified in the API call's specific definition. Each argument is followed by a colon. An example would be 10020:<first name>:<last name>:<ssn>:<birth date>:. Because we use a text character as a delimiter, passwords need to follow a special rule since they can contain pretty much any delimiter we might choose. Passwords are always passed at the end of an API call. Another formatting rule is that dates must always be passed as  astring of the format MMDDYYYY.

All 9xxxx errors should be treated as a failure algorithmicly, and not as simply informative.

Jump to the full API descriptions

Data definition for back end variables

(eventually a table of the api calls will be here as a TOC and a quick reference)