API Documentation

Introduction

At its core, the Freestone™ API allows registered users to access and modify their Freestone™ data. Using basic HTTP requests, you can make calls to our RESTful API and retrieve, update, add, or delete items in your Freestone™ dataset. This allows you to integrate the best features of Freestone™ into your own applications!

Note: While our API aims to be intuitive to use, developers should still have a good understanding of HTTP request methods and REST services before making requests that update or delete data.

API Overview

The Freestone™ API supports four request methods that follow the basic CRUD model:

  • POST – Creates data
  • GET – Retrieves data
  • PUT – Updates data
  • DELETE – Deletes data

With this in mind, it’s simply a matter of sending your request data using the chosen request method to the appropriate API URL endpoint. The reference list on the left contains our current API calls along with their respective URLs, parameters, and examples.

Basic Tutorial

The following are brief examples of how each HTTP request method works with our API. Although we accept JSON or XML requests, for the sake of brevity our examples will demonstrate access using the command-line tool cURL and JSON parameters.

Note: We have also written several libraries for accessing our API using common programming languages; these can be found on our GitHub page.

GET Request

# Retrieve item 123 from the sample endpoint

curl -u USERNAME:KEY -X GET https://freestoneapi.com/sample/123

POST Request

# Create a new item at the sample endpoint with the supplied parameters

curl -u USERNAME:KEY -X POST -d '{"field":"value"}' https://freestoneapi.com/sample

PUT Request

# Update item 123 at the sample endpoint with the supplied parameters 

curl -u USERNAME:KEY -X PUT -d '{"field":"new value"}' https://freestoneapi.com/sample/123

DELETE Request

# Delete item 123 from the sample endpoint 

curl -u USERNAME:KEY -X DELETE https://freestoneapi.com/sample/123