The 4theFile API
- Perl Client Library reference implementation
The 4theFile API
This is an old revision of the document!
The 4theFile API provides RESTful web services for use in integrating 4theFile with other web-based applications. The API has the following features:
The Problem:
You've developed a project management database. It includes an interface for adding notes or uploading attachments for each project. But you've realized that often the content for these notes come in the form of email, and cutting and pasting those emails into your notes text area isn't very effective or satisfying. So you'd like a better way to associate these emails with a the right project records.
The Solution:
This simple example required one (count 'em, one!) API call, a simple HTTP GET to a url that looks something like this:
https://4thefile.com/api_v1/collections/XyzProjects/resources?tag=235
and a few more lines of code to parse out the relevant fields from the 4theFile resource objects in the response and display them with clickable links in your application.
https://4theFile.com/api_v1/collections/<collectionkey>/resources.xml
– use your 4theFile account username for the Basic auth username, and your 4theFile apiKey (NOT your 4theFile login password) for the Basic auth password. You should get back a status code of 200 and a mess of XML (if everything is good), or a non-200 status code and an explanation in the content if there's a problem.