Introducion | Flextype

Introducion

Rest API

Rest API's

Flextype provides APIs organized around Representational State Transfer (REST) for working with your content.

Entries

The Flextype Entries API organized around Representational State Transfer (REST) for delivering entries from Flextype to apps, websites and other. Entries is delivered as JSON data.

For more details read the reference guide for the Entries API.

Registry

The Flextype Registry API organized around Representational State Transfer (REST) for delivering registry from Flextype to apps, websites and other. Entries is delivered as JSON data.

For more details read the reference guide for the Registry API.

Files

The Flextype Files API organized around Representational State Transfer (REST) for delivering Files from Flextype to apps, websites and other. Files is delivered as JSON data.

For more details read the reference guide for the Files API.

Folders

The Flextype Folders API organized around Representational State Transfer (REST) for delivering Folders from Flextype to apps, websites and other. Folders is delivered as JSON data.

For more details read the reference guide for the Folders API.

Images

The Flextype Images allows the retrieval and manipulation of image files referenced from Flextype site uploads directory to apps, websites and other media. Images are delivered as files.

For more details read the reference guide for the Images.

Authentication

To retrieve or store content with Flextype, you first need to authenticate your app with an token. Flextype offers three APIs, and each requires separate authentication.

We recommend using different access tokens for different environments in your development process. For example, use one for your production environment and another for staging or continuous integration. This allows you to revoke them individually in the future and manage your delivery channels independently.

You should send the authentication token token to an API as a query parameter for GET requests and for all POST, PUT, PATCH, DELETE requests you should send the access authentication token access_token to an API inside request body.

HTTP details

Cross-origin resource sharing

CORS (Cross-origin resource sharing) allows JavaScript web apps to make HTTP requests to other domains. This is important for third party web apps using Flextype, as without CORS, a JavaScript app hosted on example.com couldn't access our APIs because they're hosted on another.com which is a different domain.

CORS is supported by all modern browsers. Read more about using CORS in this tutorial.

JSON format details

Flextype represents resources as JSON, encoded in UTF-8. Flextype represents dates and times as Unix Timestamp.

Errors

When something goes wrong with an API request, our server generates an error. The error message contains an appropriate HTTP status code in the header and a JSON response in the body.

Error types

HTTP status code Error code Description
401 Unauthorized AccessTokenInvalid Incorrect authentication credentials.
404 Not Found NotFound The requested resource or endpoint could not be found.
Language: en, ru