Skip to main content

Introduction

Last updated 2/03/2023

Five Interface

The Five API operates on REST and GraphQL principles. Our API employs resource-oriented URLs, which follow a predictable pattern, and utilizes HTTP response codes to indicate any API errors. We leverage standard HTTP features, such as HTTP authentication and HTTP verbs, which are widely understood by existing HTTP clients.

Our API adheres to most of the conventions of REST and GraphQL architecture. Requests that require authentication must always be authenticated, as our servers do not store data from previous requests.

Our routing is consistently straightforward, with minimal levels of nesting. All data transmitted to and from our API must be in JSON format. Many programming languages offer built-in tools to convert data structures to and from JSON strings.

Throughout the documentation, we provide sample API requests. These examples are derived from the Restaurant Ordering System, the Book Club, and the Portfolio applications.

Using Five's API

The Five API facilitates the creation, retrieval, updating, and deletion of records stored within your Five applications.

Requests can be made for records from either a particular object in your application or a specific view on one of your pages.

View-based requests adhere to the rights and fields specified in the view. For example, if you request records from a table view, only the fields corresponding to the columns present on that table will be returned.

All requests are authenticated using HTTP headers that must be included with each request.

Furthermore, we offer comprehensive support for integrating with GraphQL APIs to create more dynamic and robust applications.

Five's Parameters

By default, functions inside of Five have three parameters supplied:

  • five, which is an object of type Five,
  • context, which can be any type of data, and
  • result, which is an object of type FiveError