SFX APIs

Overview

This section contains documentation for the SFX APIs:

Requests and Responses

To send an API request to SFX and receive a response:

  1. Obtain an authentication token, which can be generated in SFS.
  2. Send an HTTP request to the API using the appropriate method or endpoint.
  3. Receive an HTTP code describing the result type. Sometimes, a description providing more detail is contained in the message property.
  4. Receive a JSON body, which always contains a results object along with execTime, and count properties.

Token

To access an API, you need an authentication token. This token can be generated by a publisher or a manager (SUPER, CONFIG & ALPHA rights). The form is accessible in

  • Configuration > API (SFP)
  • Settings > API (SFS)

A token is a sha1 hash generated from the user's ID and uniqid(). Only one token can be active for each user/APIType. (If you generate a new token, the old one becomes invalid.)

ID Property

Responses to POST or PUT requests contain an id property identifying the entity targeted by the operation. For POST requests this is the newly created ID. For GET requests, the publisher, site or zone objects always has an id property.