The API Developer Tool is the main application that has been created to help web developers understand the API documentation and to provide some examples on how to retrieve and parse information returned from an API call to the FirstClass server.
The API Developer tool provides the most visual information on how to use the API.
The API Developer tool uses the following Files
The current implementation of the API requires an authenticated login. The tool allows you to choose between a base64 sha 512 hash encrypted or a clear text password. After clicking the Login button, you will see the following:
The tool has a simple interface that allows you to expand and shrink the Data Received and Information / Sample Parsed Data sections so you can better view the content.
A number of different options are available once logged in. An effort has been made to provide developers with a range of examples that might prove useful if they are trying to incorporate FirstClass content within their own web applications.
Session Info provides the developer with a host of information that might be useful in crafting applications that will respond differently depending on the information retrieved from this option.
Selecting Desktop Containers will retrieve and display all containers on the user's desktop. This starts with the general call to open the user's desktop, fetching everything that is stored on the user's home screen This includes items that are invisible to the user. To display containers only, this section filters out and displays only visible containers to the viewer.
As mentioned above, retrieving the desktop retrieves everything that is stored on the user's home screen including items that are invisible to the user. To retrieve the People I follow, the desktop is retrieved and the developer must filter the results to display only people.
Similar to other desktop items, to retrieve My Watched Items, the desktop is retrieved and the developer must filter the results to display only the watched items.
Similar to other desktop items, to retrieve My Drafts, the desktop is retrieved and the developer must filter the results to display only the draft items.
The Pulse returns and displays the current pulse entries for the logged in user.
This Unread Mail Items option will list all of the unread mail items for the currently logged in user.
Today's Events returns a list of both events and tasks that are scheduled for the current day.
My Résumé returns the user's profile résumé and presents a sample of the retrieved information.
When you view the JSON data that is retuned you will notice a WebID for every object. You can open a container if you specify the full path to that container. For example, I notice that when I opened the Desktop container, it has a WebID of DeskTop000000000000000000000 and on that desktop is the Documents folder which has a WebID of 8000000100012250000000000220
With this option, you can specify the full path DeskTop000000000000000000000/8000000100012250000000000220 to open and retrieve the contents of that container
The Status Update is an example of a POST to FirstClass that will update the user's status and post to the Pulse. This requires the completion of a field first before submission. For all POST items, you must also submit a VKEY (one of 10 vkeys retrieved from the LOGINREPLY JSON data.) Returned with the data is also a replacement vkey that must replace the one used in this query.
A subsequent retrieval of the pulse will show that the entry has been submitted.
Change Password is another POST example that requires the old and new password to be submitted (POSTED) to the server. A password change requires both a vkey and that the clear text password be encrypted prior to submission. Once submitted, the vkey replacement must be made.
In addition, a password change is only allowed if you have an SSL certificate and the API Server Address reflects this. ie, an SSL connection is required and this example checks for 'https' in the server address.
If this criteria is met, you will be presented with a field to enter your old password and anther
The New Conference option is another example of a POST that requires a name and iconID. This creates the conference on the user's desktop and displays the resulting container and icon in the Information window. As with the PULSE entry, this too requires a vkey and vkey replacement upon completion.
Enter:
To delete an item, you need both the webID of the item and the webID of the parent container. This can be found during the opening of a container as per one of the previous examples. For example, when I opened the Documents folder (webID: 8000000100012250000000000220) I noticed a file called New Form 1 that has a webID: 011F7ADF0003BCE8000000001600 and these two values can be used to delete the file.
As this is a POST to the server, a vkey is required.