Introduction
Last updated 24/04/2024
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 applications that have been built in Five.
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
Functions in Five take in three parameters.Parameter | Type | Description |
---|---|---|
five | Five | Instance of the Five object. |
context | any | Maybe used to provide additional information. |
result | FiveResult | Previous result. Optionally can be chained. |
By default, once you have named your function and opened one of Five's Code Editors, Five will automatically add a template for your function as shown below.
GetPrice()
function GetPrice(five, context, result) {
return five.success(result);
}
GetPrice()
function GetPrice(five: Five, context: any, result: FiveError) : FiveError {
return five.success(result);
}