NAV
HTTP

Authentication

The Flix Server REST API uses signed headers for its authentication. You must provide a signed Authentication header with your requests to authorize your access to the endpoint. We employ a signing algorithm which is explained below to generate the signature for your requests.

The API expects the signature to be created and hashed using an Access Key. In order to obtain a key, see Obtaining an Access Key.

Authorization: FNAUTH <secret_access_key_id>:<signature>

Signing HTTP Requests

Please see our Python implementation for examples of signing HTTP requests.

Obtaining an Access Key

POST /authenticate HTTP/1.1
Authorization: Basic <signature>


HTTP/1.1 201 CREATED
Content-Type: application/json

{
  "id": "fgSukEr0TgDSXrWhXbx9",
  "secret_access_key": "O9OAYEGKEDW37ZE0OEQYZEY4H2KYDX5BGTTKXZ6D",
  "expiry_date": "Fri, 23 Jun 2017 10:31:52 GMT"
}

The Authenticate endpoint is for creating a time limited Access Key which you can use to sign future requests. The Access Key will last for 24 hours.

The method for authentication is basic-authentication. You must provide the base64 encoded authorization header using your username and password to authenticate.

Authorization: Basic <username>:<password>

The signature is a a base64 encoded colon separated string formed of your username and password. <username>:<password>.

Extending an Access Key

If your Access Key is nearing it’s expiry time, you may wish to extend it to continue its use without requiring the users credentials. This is allowed in order to prevent you having to store user credentials.

PUT /access_key/{access_key_id} HTTP/1.1
Authorization: FNAUTH <signature>

{
  "secret_access_key": "O9OAYEGKEDW37ZE0OEQYZEY4H2KYDX5BGTTKXZ6D",
}

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "fgSukEr0TgDSXrWhXbx9",
  "secret_access_key": "O9OAYEGKEDW37ZE0OEQYZEY4H2KYDX5BGTTKXZ6D",
  "expiry_date": "Fri, 23 Jun 2017 10:31:52 GMT"
}

Media Objects

Media Objects in Flix are files (image, quicktime, audio, etc.), it could be any type of files. A Media Object is not link to a sequence / episode / show, you can link a media object to an asset and reuse the same one if needed.

Status

Status Description
0 File info created
1 File uploaded
2 Processing
3 Error occured
4 Completed

Create File info

Create a file info containing the content length and all informations that will ensure the upload was succesfull.

POST /file HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 200 OK
Content-Type: application/json

{
    "name": "file.jpeg",
    "content_type": "image/jpeg",
    "content_length": 80123987,
}

HTTP/1.1 201 CREATED
Content-Type: application/json

{
    "id": 1,
    "name": "file.jpeg",
    "content_type": "image/jpeg",
    "content_length": 80123987,
    "token": "4d1048d3-5763-4481-ba1c-6ea84209f273",
    "status": 0,
}

Get File info

Retrieve the file info to be able to retrieve the file itself.

Parameter Type Description
ID integer The ID of the media object
GET /file/{ID} HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 200 OK
Content-Type: application/json

{
    "id": 1,
    "name": "file.jpeg",
    "content_type": "image/jpeg",
    "content_length": 80123987,
    "token": "4d1048d3-5763-4481-ba1c-6ea84209f273",
    "status": 0,
}

Download File

Retrieve the file info to be able to retrieve the file itself.

Parameter Type Description
ID integer The ID of the media object
GET /file/{ID}/data HTTP/1.1
Authorization: FNAUTH <signature>

Shows

Shows in Flix are the main container entity for each project. Sequences and Panels all reside within a Show and are only accessible within it. A Show contains various configuration options and is intended to be immutable. For example, once a Show is created, its framerate or aspect ratio cannot be changed.

List of Frame Rates:

List of Aspect Ratios:

List Shows

GET /shows HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 200 OK
Content-Type: application/json

{
    "shows": [
      {
          "id": 1,
          "title": "A show title",
          "description": "A short description.",
          "frame_rate": 24,
          "aspect_ratio": 2.35,
          "episodic": false,
          "metadata": {
              "thumbnail_asset_id": 1,
              "tracking_code": "s1",
          },
          "groups": [
              { "id": 1, "title": "default" },
          ],
          "owner": { ... },
      },
      {
          "id": 2,
          "title": "Another Show",
          "description": "This is a different show.",
          "frame_rate": 24,
          "aspect_ratio": 1.77,
          "episodic": true,
          "metadata": {
              "thumbnail_asset_id": 1,
              "tracking_code": "s1",
          },
          "groups": [
              { "id": 1, "title": "default" },
          ],
          "owner": { ... },
      },
    ]
}

This endpoint will return you the list of currently available shows.

Query Parameters

Parameter Default Description Required
page 0 The returns the page of results. no

Get a Specific Show

GET /show/{ID} HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 200 OK
Content-Type: application/json

{
    "id": 1,
    "title": "A show title",
    "description": "A short description",
    "frame_rate": 24,
    "aspect_ratio": 1.77,
    "episodic": false,
    "metadata": {
        "thumbnail_asset_id": 1,
        "tracking_code": "s1",
    },
    "groups": [
        { "id": 1, "title": "default" },
    ],
    "owner": { ... },
}

This endpoint will return a specific Show object.

URL Parameters

Parameter Description
ID The id of the Show to retrieve

Create a Show

POST /show HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: application/json

{
    "title": "A show title",
    "description": "A short description",
    "episodic": true,
    "frame_rate": 24,
    "aspect_ratio": 1.77,
    "groups": [
        { "id": 1, "title": "default" },
    ],
    "metadata": {
        "season": "1",
        "thumbnail_asset_id": 1,
        "tracking_code": "trackingcode",
    },
}

HTTP/1.1 201 CREATED
Content-Type: application/json

{
    "id": 10,
    "title": "A show title",
    "description": "A short description",
    "episodic": true,
    "frame_rate": 24,
    "aspect_ratio": 1.77,
    "created_date": "Mon, 19 Nov 2018 12:00:26 GMT"
    "owner": { ... },
    "metadata": {
        "season": "1",
        "thumbnail_asset_id": 1,
        "tracking_code": "trackingcode",
    },
}

Creating a Show is as simple as posting the a Show object to the endpoint. When you a create a show, you will have owner permissions for that show.

Show Properties

Property Type Description Required
title String The ID of the Show to retrieve. yes
description String A short description of the Show no
episodic Bool Is the Show Episodic? no
frame_rate FrameRate The frame rate yes
aspect_ratio AspectRatio The aspect ratio of the show yes
groups []Group An array of groups which permits access to this show yes
metadata Object Object for storing arbitary data against the show.
{
“season”: string (set the season if it’s an episodic show),
“thumbnail_asset_id”: number,
“tracking_code”: string
}
no
created_date DateTime Date the show was created no

Modify a Show

PATCH /show/{ID} HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: application/json

{
    "title": "My new title",
}

HTTP/1.1 200 OK
Content-Type: application/json

{
    "id": 101,
    "title": "My new title",
    "description": "A short description",
    "episodic": false,
    "frame_rate": 24,
    "aspect_ratio": 1.77,
    "created_date": "Mon, 19 Nov 2018 12:00:26 GMT"
    "owner": { ... },
    "metadata": {
        "thumbnail_asset_id": 1,
        "tracking_code": "trackingcode",
    },
}

You can modify a shows values by requesting a PATCH request to the shows endpoint with the values you wish to change.

URL Parameters

Parameter Description
ID The id of the Show to delete

Transcoding

Our transcode system offers some limited options for transcoding or transforming media objects stored in Flix into new media objects. For example, generating publish images, or thumbnails for panels. A transcode is asynchronous, to retrieve the end of the transcode you can listent to the server websocket and filter by job ID.

Status Description
-1 Error
0 Finished
1 Running
2 Pending
3 Created

Transcode Types

Types Description Required params
‘thumbs’ Generate thumbnails, scaled, fullres images from any document
You can specify scaled / fullres to generate them at the same time
asset_id
‘publish’ Generate new files with burnin from a sequence show_id, sequence_id, revision_id, framerate
‘quicktime’ Generate a quicktime for a sequence
Adding create_new_asset on the metadata will duplicate the asset and link it
show_id, sequence_id, revision_id, panels (optional)
‘audioExtract’ Extract and generate a audio from a quicktime asset_id
‘masterThumbs’ Generate a thumbnail for a master image master_media_object_id, master_id, show_id, revision

Transcode Metadata

Property Type Description
asset_id number Asset id to apply the transcode
show_id number Show id to apply the transcode
revision_id number Revision id to apply the transcode
sequence_id number Sequence id to apply the transcode
episode_id number Episode id to apply the transcode
aspect_ratio number Aspect Ratio of the show to apply the transcode
panels []Panels List of panels to apply the transcode
range { Start: number, Frames: number } Range of frames to retrieve from a quicktime
framerate number Framerate of the show to apply the transcode
create_new_asset bool Will duplicate the asset to keep it untouched
scaled bool Will generate the scale images from the asset
fullres bool Will generate the fullres image from the asset
master_id number Master image ID to apply yhe transcode
master_media_object_id number Master Media Object ID to apply the transcode
revision number Revision to apply the transcode (from master)
owner_name string Owner name to send mail after publish
owner_email string Owner email to send mail after the publish
comment string Comment to set on the publish

Create Transcode job

POST /transcode/job HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: application/json

{
    "type": "thumbs",
    "metadata": { "asset_id": 100 },
}

HTTP/1.1 201 CREATED
Content-Type: application/json

{
    "create_new_asset": "false",
    "created_date": "2017-12-04T16:18:10Z",
    "id": "f8b70fcf-2bd2-46a2-8b4a-dcb4ef6caefc",
    "metadata": { "asset_id": 100 },
    "status": 3,
    "type": "thumbs",
}

Creating a Transcode is as simple as posting the Transcode Job object to the endpoint.

Show Properties

Property Type Description
type JobType Type of the transcode job.
metadata TranscodeMetadata Metadata of the transcode job

List Transcode jobs

GET /transcode/jobs HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 200 OK
Content-Type: application/json

{
    "jobs": [
        {
            "create_new_asset": "false",
            "created_date": "2017-12-04T16:18:10Z",
            "id": "f8b70fcf-2bd2-46a2-8b4a-dcb4ef6caefc",
            "metadata": { "asset_id": 100 },
            "status": 3,
            "type": "thumbs",
        },
        {
            "create_new_asset": "false",
            "created_date": "2017-12-04T16:18:10Z",
            "id": "f8b70fcf-2bd2-46a2-8b4a-dcb4ef6daefc",
            "metadata": { "asset_id": 110 },
            "status": 3,
            "type": "audioExtract",
        },
    ]
}

This endpoint will return you the list of Transcode jobs.

Get Transcode job

GET /transcode/job/{ID} HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 200 OK
Content-Type: application/json

{
    {
        "create_new_asset": "false",
        "created_date": "2017-12-04T16:18:10Z",
        "id": "f8b70fcf-2bd2-46a2-8b4a-dcb4ef6caefc",
        "metadata": {
            "show_id": 1,
            "sequence_id": 2,
            "revision_id": 3,
            "framerate": 24,
        },
        "status": 3,
        "type": "publish",
    },
}

This endpoint will return a specific Transcode Job object.

URL Parameters

Parameter Description
ID The id of the Transcode Job to retrieve

Sequences

Sequences are a revisable collection of panels. The panels in a sequences are ordered. A sequence revision is immutable and therefore modifying a sequence will result in the creation of a new revision. If a Sequence is created in a episode, it is not accessible through show only route, and vice versa.

List Sequences

GET /show/{showId}/sequences HTTP/1.1
or
GET /show/{showId}/episode/{episodeId}/sequences HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 200 OK
Content-Type: application/json

{
    "sequences": [
        {
            "id": 1,
            "description": "my first sequence",
            "created_date": "2017-06-23T14:57:52Z",
            "owner": {
                "id": 1,
                "created_date": "0001-01-01T00:00:00Z"
            },
            "revisions_count": 0
        },
        {
            "id": 2,
            "description": "my second sequence",
            "created_date": "2017-06-23T14:57:52Z",
            "owner": {
                "id": 1,
                "created_date": "0001-01-01T00:00:00Z"
            },
            "revisions_count": 0
        }
    ]
}

List all the sequences in the show.

URL Parameters

Parameter Description
showId The ID of the parent Show.
episodeId The ID of the Episode

Query Parameters

Parameter Default Description
page 0 The page number of the results to display.
display_hidden false Display hidden sequences.

Get a Sequence

GET /shows/{showId}/sequence/{sequenceId} HTTP/1.1
or
GET /shows/{showId}/episode/{episodeId}/sequence/{sequenceId} HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 200 OK
Content-Type: application/json

{
    "id": 1,
    "description": "my first sequence",
    "created_date": "2017-06-23T14:57:52Z",
    "owner": {
        "id": 1,
        "created_date": "0001-01-01T00:00:00Z"
    },
    "revisions_count": 0
}

This endpoint allows to retrieve a specific sequence

URL Parameters

Parameter Description
showId The ID of the parent Show.
sequenceId The ID of the Sequence
episodeId The ID of the Episode

Create a Sequence

POST /show/{showId}/sequence HTTP/1.1
or
POST /show/{showId}/episode/{episodeId}/sequence HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: application/json

{
  "description": "Another sequence",
  "meta_data": {
    "act": "01",
    "tracking": "seq10",
    "comment": "Comments"
  }
}

HTTP/1.1 201 CREATED
Content-Type: application/json

{
  "id": 20,
  "description": "Another sequence",
  "created_date": "2018-12-03T15:31:55Z",
  "owner": {
    "id": 1,
    "username": "admin",
    "email": "flix-admin@foundry.com",
    "created_date": "2018-11-30T10:28:00Z",
    "is_admin": true,
    "is_system": false,
    "owner_id": 0,
    "groups": [
      {
        "id": 1,
        "title": "default"
      }
    ],
    "type": "flix",
    "is_third_party": false
  },
  "revisions_count": 0,
  "deleted": false,
  "hidden": false,
  "meta_data": {
    "act": "01",
    "comment": "Comments",
    "hidden": false,
    "tracking": "seq10"
  }
}

This endpoint allows to create a new Sequence.

URL Parameters

Parameter Description
showId The ID of the parent Show.
episodeId The ID of the Episode

Sequence Properties

Property Type Description
Description string Description of the sequence
MetaData.Act string Act of the sequence
MetaData.Tracking string Tracking code of the sequence
MetaData.Comment string A comment attached to the sequence

Modify a Sequence

PATCH /show/{showId}/sequence/{sequenceId} HTTP/1.1
or
PATCH /show/{showId}/episode/{episodeId}/sequence/{sequenceId} HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: application/json

{
  "description": "Another sequence",
  "meta_data": {
    "act": "01",
    "tracking": "seq10",
    "comment": "Comments"
  }
}

HTTP/1.1 201 CREATED
Content-Type: application/json

{
  "id": 20,
  "description": "Another sequence",
  "created_date": "2018-12-03T15:31:55Z",
  "owner": {
    "id": 1,
    "username": "admin",
    "email": "flix-admin@foundry.com",
    "created_date": "2018-11-30T10:28:00Z",
    "is_admin": true,
    "is_system": false,
    "owner_id": 0,
    "groups": [
      {
        "id": 1,
        "title": "default"
      }
    ],
    "type": "flix",
    "is_third_party": false
  },
  "revisions_count": 0,
  "deleted": false,
  "hidden": false,
  "meta_data": {
    "act": "01",
    "comment": "Comments",
    "hidden": false,
    "tracking": "seq10"
  }
}

This endpoint allows to modify an existing Sequence.

URL Parameters

Parameter Description
showId The ID of the parent Show.
episodeId The ID of the Episode
sequenceId The ID of the Sequence

Sequence Properties

Property Type Description
Description string Description of the sequence
MetaData.Act string Act of the sequence
MetaData.Tracking string Tracking code of the sequence
MetaData.Comment string A comment attached to the sequence

Delete a Sequence

DELETE /show/{showId}/sequence/{sequenceId} HTTP/1.1
or
DELETE /show/{showId}/episode/{episodeId}/sequence/{sequenceId} HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 204 NO CONTENT
Content-Type: application/json

This endpoint allows to delete an existing Sequence.

Sequence Revisions

Sequences are a revisable collection of panels. The panels in a sequences are ordered. A sequence revision is immutable and therefore modifying a sequence will result in the creation of a new revision.

Sequence Revision IDs are integers which automatically increment with each addition of a new revision. The Sequence entity contains a property ‘revisions_count’ which tell you how many revisions of that Sequence exist.

If a Sequence Revision is created in a episode, it is not accessible through show only route, and vice versa.

Get a list of Sequence Revisions

GET /show/{showId}/sequence/{sequenceId}/revisions HTTP/1.1
or
GET /show/{showId}/episode/{episodeId}/sequence/{sequenceId}/revisions HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 200 OK
Content-Type: application/json

{
  "sequence_revisions": [
    {
        "revision": 1,
        "owner": {
          "id": 2,
          "created_date": "0001-01-01T00:00:00Z"
        },
        "created_date": "0001-01-01T00:00:00Z",
        "meta_data": {
          "note": "<revision specific comment>",
          "<any json object - no database restrictions>"
        },
        "revisioned_panels": [
            {
                "id": 1,
                "revision_number": 1
            },
            {
                "id": 2,
                "revision_number": 1
            }
        ],
        "revisioned_shots": [
            {
                "id": 3,
                "revision_number": 1
            },
            {
                "id": 6,
                "revision_number": 1
            }
        ]
    },
    {
        "revision": 2,
        "owner": {
            "id": 1,
            "created_date": "0001-01-01T00:00:00Z"
        },
        "created_date": "0001-01-01T00:00:00Z",
        "meta_data": {
          "note": "<revision specific comment>",
          "<any json object - no database restrictions>"
        },
        "revisioned_panels": [
            {
                "id": 1,
                "revision_number": 1
            },
            {
                "id": 3,
                "revision_number": 1
            }
        ],
        "revisioned_shots": []
    }
  ]
}

URL Parameters

Parameter Type Description
showId integer The ID of the parent Show
sequenceId integer The ID of the sequence
episodeId integer The ID of the episode

Get a Sequence Revision

Getting a Sequence Revision will return all of the data for that specific revision.

GET /show/{showId}/sequence/{sequenceId}/revision/{revisionId} HTTP/1.1
or
GET /show/{showId}/episode/{episodeId}/sequence/{sequenceId}/revision/{revisionId} HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 200 OK
Content-Type: application/json

{
  "revision": 1,
  "owner": {
    "id": 0,
    "created_date": "0001-01-01T00:00:00Z"
  },
  "created_date": "0001-01-01T00:00:00Z",
  "meta_data": {
    "note": "<revision specific comment>",
    "<any json object - no database restrictions>"
  },
  "revisioned_panels": [
      {
          "id": 1,
          "revision_number": 1
      },
      {
          "id": 2,
          "revision_number": 1
      }
  ],
  "revisioned_shots": [
      {
          "id": 1,
          "revision_number": 1
      }
  ]
}


URL Parameters

Parameter Type Description
showId integer The ID of the parent Show
sequenceId integer The ID of the sequence
revisionId integer The Sequence Revision number
episodeId integer The ID of the episode

Create a Sequence Revision

POST /show/{showId}/sequence/{sequenceId}/revision HTTP/1.1
or
POST /show/{showId}/episode/{episodeId}/sequence/{sequenceId}/revision HTTP/1.1
Content-Type: application/json
Authorization: FNAUTH <signature>

{
  "comment": "Revision number x",
  "meta_data": {
    "<any json object - no database restrictions>"
  },
  "revisioned_panels": [
    {
        "id": 1,
        "revision_number": 1
    },
    {
        "id": 2,
        "revision_number": 1
    }
  ]
}


HTTP/1.1 201 CREATED
Content-Type: application/json

{
  "revision": 1,
  "published": false,
  "imported": false,
  "comment": "Revision number x",
  "owner": {
    "id": 0,
    "created_date": "0001-01-01T00:00:00Z"
  },
  "revisioned_panels": [
      {
          "id": 1,
          "revision_number": 1,
          "dialogue": { 
              "id": 1
            } 
      },
      {
          "id": 2,
          "revision_number": 1,
          "dialogue": { 
              "id": 2
            } 
      }
  ]
}

Creating a Sequence Revision requires you to post the Sequence Revision object populated with the panels you require for that Sequence.

URL Parameters

Parameter Type Description
showId integer The ID of the parent Show
sequenceId integer The ID of the sequence
episodeId integer The ID of the episode

Sequence Revision Properties

Property Type Description
Comment string A revision specific comment
MetaData string Additional data attached to the revision
RevisionedPanels []RevisionedPanel Panels that belong to this particular revision

Modify a Sequence Revision

PATCH /show/{showId}/sequence/{sequenceId}/revision/{revisionId} HTTP/1.1
or
POST /show/{showId}/episode/{episodeId}/sequence/{sequenceId}/revision/{revisionId} HTTP/1.1
Content-Type: application/json
Authorization: FNAUTH <signature>

{
  "comment": "Revision number x",
  "meta_data": {
    "<any json object - no database restrictions>"
  },
  "revisioned_panels": [
    {
        "id": 1,
        "revision_number": 1
    },
    {
        "id": 2,
        "revision_number": 1
    }
  ]
}


HTTP/1.1 200 OK
Content-Type: application/json

{
  "revision": 1,
  "published": false,
  "imported": false,
  "comment": "Revision number x",
  "owner": {
    "id": 0,
    "created_date": "0001-01-01T00:00:00Z"
  },
  "revisioned_panels": [
      {
          "id": 1,
          "revision_number": 1,
          "dialogue": { 
              "id": 1
            } 
      },
      {
          "id": 2,
          "revision_number": 1,
          "dialogue": { 
              "id": 2
            } 
      }
  ]
}

This endpoint allows to update an existing sequence revision.

URL Parameters

Parameter Type Description
showId integer The ID of the parent Show
sequenceId integer The ID of the sequence
episodeId integer The ID of the episode
revisionId integer The ID of the sequence revision to update

Sequence Revision Modification Properties

Property Type Description
Comment string A revision specific comment

Publish a Sequence Revision

PATCH /show/{showId}/sequence/{sequenceId}/revision/{revisionId}/publish HTTP/1.1
or
POST /show/{showId}/episode/{episodeId}/sequence/{sequenceId}/revision/{revisionId}/publish HTTP/1.1
Content-Type: application/json
Authorization: FNAUTH <signature>

{
  "comment": "Here is the newly published revision",
}


HTTP/1.1 200 OK
Content-Type: application/json

{
  "revision": 6,
  "owner": {
    "id": 1,
    "username": "admin",
    "is_admin": false,
    "is_system": false,
    "owner_id": 0,
    "type": "flix",
    "is_third_party": false
  },
  "created_date": "2018-12-04T11:01:39Z",
  "meta_data": {
    "annotations": [],
    "audio_asset_id": null,
    "audio_timings": [],
    "highlights": [],
    "markers": [],
    "movie_asset_id": null
  },
  "published": false,
  "imported": false
}

This endpoint allows to publish a sequence revision. It generates project files ready to be used by editorial application.

When the revision is successfully published, all users from user groups assigned to the sequence’s show will receive an email containing the difference between the currently and previously published revisions.

URL Parameters

Parameter Type Description
showId integer The ID of the parent Show
sequenceId integer The ID of the sequence
episodeId integer The ID of the episode
revisionId integer The ID of the sequence revision to update

Request Properties

Property Type Description
Comment string A comment specific to the published revision

Episodes

Episodes are a second level of organising Sequences within a show. It is possible that a show is epidosic and therefore requires multiple sequences to be grouped by episode. To facilitate this, you can create episodes within a Show, and then sequences can be created at a lower level in the hierachy.

List Episodes

GET /show/{showId}/episodes HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 200 OK
Content-Type: application/json

{
    "episodes": [
        {
            "id": 1,
            "description": "my first sequence",
            "created_date": "2017-06-23T14:57:52Z",
            "owner": {
                "id": 1,
                "created_date": "0001-01-01T00:00:00Z"
            },
            "episode_number": 1
        },
        {
            "id": 2,
            "created_date": "2017-06-23T14:57:52Z",
            "owner": {
                "id": 1,
                "created_date": "0001-01-01T00:00:00Z"
            }
        }
    ]
}

List all the episodes in a show.

URL Parameters

Parameter Description
showId The ID of the parent Show.

Create a Episode

POST /show/{showId}/episode HTTP/1.1
Authorization: FNAUTH <signature>

{
    {
        "description": "my first sequence",
        "episode_number": 1
    }
}

HTTP/1.1 201 Created
Content-Type: application/json

{
    {
        "id": 1,
        "description": "my first sequence",
        "created_date": "2017-06-23T14:57:52Z",
        "owner": {
            "id": 1,
            "created_date": "0001-01-01T00:00:00Z"
        },
        "episode_number": 1
    }
}

URL Parameters

Parameter Description
showId The ID of the parent Show.

Get a Episode

GET /show/{showId}/episode/{episodeId} HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 200 OK
Content-Type: application/json

{
    {
        "id": 1,
        "description": "my first sequence",
        "created_date": "2017-06-23T14:57:52Z",
        "owner": {
            "id": 1,
            "created_date": "0001-01-01T00:00:00Z"
        },
        "episode_number": 1
    }
}

URL Parameters

Parameter Description
showId The ID of the parent Show.
episodeId The ID of the episode

Update a Episode

PATCH /show/{showId}/episode/{episodeId} HTTP/1.1
Authorization: FNAUTH <signature>

{
    {
        "episode_number": 42
    }
}

HTTP/1.1 200 OK
Content-Type: application/json

{
    {
        "id": 1,
        "description": "my first sequence",
        "created_date": "2017-06-23T14:57:52Z",
        "owner": {
            "id": 1,
            "created_date": "0001-01-01T00:00:00Z"
        },
        "episode_number": 42
    }
}

URL Parameters

Parameter Description
showId The ID of the parent Show.
episodeId The ID of the episode

Remove a Episode

DELETE /show/{showId}/episode/{episodeId} HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 204 No Content

URL Parameters

Parameter Description
showId The ID of the parent Show.
episodeId The ID of the episode

Dialogues

The dialogues api is for handling all dialogues within a show. Dialogues are created at the sequence revision level, and a single dialogue can be associated with one or more panels.

Dialogues can be retrieved in relation to a sequence revision, to get all dialogues for that revision, or can be retrieved for a panel, in order to get the dialogue revision history for that panel, regardless of sequence revision.

List All Dialogues

GET /show/{showId}/sequence/{sequenceId}/revision/{revisionId}/dialogues HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 200 OK
Content-Type: application/json

{
    "dialogues": [
        {
            "dialogue_id": 1,
            "created_date": "2018-01-01T00:00:00Z",
            "text": "<div>Dialogue text 1</div>",
            "owner_id": {
                "id": 0,
                "username": "admin",
                "is_admin": false,
                "is_system": false,
                "owner_id": 0,
                "type": "flix",
                "is_third_party": false
            },
            "revision_id": 2,
            "panel_id": 1
        },
        {
            "dialogue_id": 2,
            ...
        },
        {
            "dialogue_id": 3,
            ...
        }
    ]
}

This endpoint returns all the dialogues within a sequence revision.

URL Parameters

Parameter Description
show_id The ID of the show to get dialogues from.
sequence_id The ID of the sequence to get dialogues from.
revision_id The ID of the sequence revision to get dialogues from

Get Dialogue Revisions

This endpoint is for retrieving all dialogues that have been associated with a panel

GET /show/{show_Id}/sequence/{sequence_Id}/panel/{panel_Id}/dialogues HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 200 OK
Content-Type: application/json

{
    "dialogues": [
        {
            "dialogue_id": 1,
            "created_date": "2018-01-01T00:00:00Z",
            "text": "<div>Dialogue text</div>",
            "owner_id": {
                "id": 0,
                "username": "admin",
                "is_admin": false,
                "is_system": false,
                "owner_id": 0,
                "type": "flix",
                "is_third_party": false
            },
            "revision_id": 1,
            "panel_id": 1
        },
        {
            "dialogue_id": 2,
            "created_date": "2018-01-01T00:01:00Z",
            "text": "<div>Dialogue text revised</div>",
            "owner_id": {
                "id": 0,
                ...
            },
            "revision_id": 2,
            "panel_id": 1
        },
        {
            "dialogue_id": 3,
            "created_date": "2018-01-01T00:02:00Z",
            "text": "<div>Dialogue text revised again</div>",
            "owner_id": {
                "id": 0,
                ...
            },
            "revision_id": 3,
            "panel_id": 1
        }
    ]
}

URL Parameters

Parameter Description
show_id The ID of the show the panel is contained in
sequence_id The ID of the sequence to retrieve
panel_id The ID of the panel to retrieve the dialogues for

Create a Dialogue

POST /show/{show_Id}/dialogue HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: application/json

{
    "text": "new dialogue"
}


HTTP/1.1 201 CREATED
Content-Type: application/json

{
    "dialogue_id": 1,
    "created_date": "2018-01-01T00:00:00Z",
    "text": "<div>new dialogue</div>",
    "owner_id": {
        "id": 1,
        "username": "admin",
        "email": "myname@mycompany.com",
        "created_date": "2018-01-01T00:00:00Z",
        "is_admin": true,
        "is_system": false,
        "owner_id": 0,
        "groups": [
            {
                "id": 1,
                "title": "default"
            }
        ],
        "type": "flix",
        "is_third_party": false
    }
}

Posting to the dialogue endpoint will create a new dialogue. The dialogue id will be incremented and the new id/text pair will be returned.

A dialogue is immutable, you cannot modify the text within it. In order to update text you must create a new dialogue.

URL Parameters

Parameter Description
show_id The ID of the show the dialogue is contained in

Body Parameters

Parameter Description
text The text representing the dialogue

Panels

The panels api is for handling all panels within a show. Panels are created at the show level, and can be shared between sequences.

Create a Panel

POST /show/{show_id}/panel HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 200 OK
Content-Type: application/json

{
    "id":1,
    "created_date":"2018-03-05T14:56:17Z",
    "owner":{
        "id":1,
        "username":"test.user",
        "email":"test.user",
        "created_date":"2018-02-19T00:00:00Z"
    },
    "asset":{
        "id":null
    },
    "deleted":false
}

Making a post request to this endpoint generate a new panel on a specific show. Then the server will return the created panel object on response.

URL Parameters

Parameter Description
show_id The ID of the show

List Panels

GET /show/{show_id}/panels HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 200 OK
Content-Type: application/json

{
    "panels": [
      {
          "id": 1
      },
      {
          "id": 2
      }
    ]
}

This endpoint returns all the panels within the show.

URL Parameters

Parameter Description
show_id The ID of the show to get panels from.

Get a Specific Panel

GET /show/{show_id}/panel/{panel_id} HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 200 OK
Content-Type: application/json

{
    "id": 1,
    "created_date": "2017-06-23T14:57:52Z",
    "revision_counter": 54
}

This endpoint retrieves a specific panel. The panel contains the revision_counter property, which indicates the number of revisions the panel has gone through. You can determine from this number the revisions IDs which you can obtain specific revision information. The higher the revision counter value, the newer the revision will be. 1 being the first revision.

URL Parameters

Parameter Description
show_id The ID of the show the panel is contained in
panel_id The ID of the panel to retrieve

Get Panel Revision

This endpoint is for retriving a specific version of a Panel’s data.

GET /show/{show_id}/panel/{panel_id}/revision/{revision_id} HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 200 OK
Content-Type: application/json

{
    "revision_number": 1,
    "created_date": "2017-06-23T14:57:52Z",
    "data": {
        ...
    }
}

URL Parameters

Parameter Description
show_id The ID of the show the panel is contained in
panel_id The ID of the panel to retrieve
revision_id The ID of the revision to retrieve

List Panel Revisions

This endpoint is for retrieving a list of panel revisions, filtered by the provided parameters.

GET /show/{show_id}/sequence/{sequence_id}/panels HTTP/1.1

or

GET /show/{show_id}/episode/{episode_id}/panels HTTP/1.1

Authorization: FNAUTH <signature>

HTTP/1.1 200 OK
Content-Type: application/json

{
    "revision_number": 1,
    "created_date": "2017-06-23T14:57:52Z",
    "data": {
        ...
    }
}

URL Parameters

Parameter Description
show_id The ID of the show the panel is contained in
sequence_id The ID of the sequence the panel is contained in
episode_id The ID of the episode the panel is contained in

Query Parameters

Parameter Description Required
page The page number yes
panelId The ID of a specific panel no
ownerId The ID of the owner who created the panel no
startDate The date on or after which the panel(s) were created no
endDate The date on or before which the panel(s) were created no
showAll True for all revisions, false for only the latest revision no

Create a Panel Revision

POST /show/{show_id}/panel/{panel_id}/revision HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: application/json

{
  "data": {
      "value": 1
  },
  "assets": [
    {
        "id": 1
    },
    {
        "id": 2
    }
  ]
}


HTTP/1.1 201 CREATED
Content-Type: application/json

{
    "revision_number": 1,
    "created_date": "2017-06-23T14:57:52Z",
    "data": {
        "value": 1
    }
}

Posting to the Panel Revision endpoint will create a new revision of the panel. The panel revisions counter on the panel endpoint will be atomically incremented. It is acceptable to post an arbitary data into the ‘data’ property of the revision.

A panel revision is immutable, you cannot modify the data within it. In order to update a panel data you must create a new revision. Data within a revision is monolithic, there is no incremental changes between revisions.

URL Parameters

Parameter Description
show_id The ID of the show the panel is contained in
panel_id The ID of the panel to retrieve

Body Parameters

Parameter Description
data An arbitary JSON object containing the data you require for this revision.
assets An array of asset reference objects

Assets

Assets are any type of media object you wish to store in Flix. Assets are immutable so once you have stored its data, you can no longer update it. Assets can be associated with Panels in various ways. For example you may map an Asset to a Panel as “artwork”, or it may be mapped as “audio”. Assets are stored globally in Flix, so it is possible to use the same Asset across multiple shows, during Asset creation which detect if it is a duplicate and will ultilise the previously store data to reduce storage.

When an Asset is stored in Flix it is then replicated across other Flix Servers for high-availability and redundancy. When you retrieve an Asset object using the API, it will contain various locations where the Asset Data resides, you can then fetch the file from whichever location suits you best.

Flix has a transcode and asset processing system will can run image processing operations on Assets after they have been uploaded. You can customise this process however you wish, but it is especially useful for creating thumbnails, or cropping large images.

List Assets

GET /show/{showId}/sequence/{sequenceId}/revision/{revisionId}/assets HTTP/1.1
or
GET /show/{showId}/episode/{episodeId}/sequence/{sequenceId}/revision/{revisionId}/assets HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 200 OK
Content-Type: application/json

{
  "assets": [
    {
      "asset_id": 19,
      "show_id": 1,
      "owner_id": {
        "id": 1,
        "username": "admin",
        "email": "flix-admin@foundry.com",
        "created_date": "2018-12-05T11:36:53Z",
        "is_admin": false,
        "is_system": false,
        "owner_id": 0,
        "type": "flix",
        "is_third_party": false
      },
      "media_objects": {
        "artwork": [
          {
            "id": 73,
            "name": "1 copy 2.png",
            "content_type": "image/png",
            "content_length": 32139,
            "content_hash": "a8a0d57eab20c7cacbcc17f1a490a8fe",
            "created_date": "2018-12-05T11:41:11Z",
            "status": 1,
            "owner_id": {
              "id": 0,
              "is_admin": false,
              "is_system": false,
              "owner_id": 0,
              "type": "flix",
              "is_third_party": false
            },
            "servers": [
              "289a0d44-ba48-4e6b-887a-18cfbc19a3f4"
            ]
          }
        ],
        "fullres": [
          {
            "id": 89,
            "name": "ccc978c7-18ac-4ac4-a539-6f88f32e0abc.png",
            "content_type": "image/png",
            "content_length": 30196,
            "content_hash": "e84a651784cab2aa94901cf79b3e99b2",
            "created_date": "2018-12-05T11:41:13Z",
            "status": 1,
            "owner_id": {
              "id": 0,
              "is_admin": false,
              "is_system": false,
              "owner_id": 0,
              "type": "flix",
              "is_third_party": false
            },
            "servers": [
              "289a0d44-ba48-4e6b-887a-18cfbc19a3f4"
            ]
          }
        ],
        "scaled": [
          {
            "id": 84,
            "name": "45ea39cd-8937-4959-be57-a549ecd5ec1d.png",
            "content_type": "image/png",
            "content_length": 23550,
            "content_hash": "73868db15d9c65dbda07131a99188d77",
            "created_date": "2018-12-05T11:41:13Z",
            "status": 1,
            "owner_id": {
              "id": 0,
              "is_admin": false,
              "is_system": false,
              "owner_id": 0,
              "type": "flix",
              "is_third_party": false
            },
            "servers": [
              "289a0d44-ba48-4e6b-887a-18cfbc19a3f4"
            ]
          }
        ],
        "thumbnail": [
          {
            "id": 79,
            "name": "77487968-4ca5-4721-863b-5f6c793e0c5e.png",
            "content_type": "image/png",
            "content_length": 22885,
            "content_hash": "b2c3d0d12df15403cdc1808af9709c24",
            "created_date": "2018-12-05T11:41:12Z",
            "status": 1,
            "owner_id": {
              "id": 0,
              "is_admin": false,
              "is_system": false,
              "owner_id": 0,
              "type": "flix",
              "is_third_party": false
            },
            "servers": [
              "289a0d44-ba48-4e6b-887a-18cfbc19a3f4"
            ]
          }
        ]
      }
    }
  ]
}

This endpoint returns all assets that belong to the requested sequence revision.

URL Parameters

Parameter Type Description
showId integer The ID of the parent Show
sequenceId integer The ID of the sequence
episodeId integer The ID of the episode
revisionId integer The Sequence Revision number

Get an Asset

GET /asset/{assetId} HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 200 OK
Content-Type: application/json

{
  "asset_id": 19,
  "show_id": 1,
  "created_date": "2018-12-05T11:41:11Z",
  "owner_id": {
    "id": 1,
    "username": "admin",
    "email": "flix-admin@foundry.com",
    "created_date": "2018-12-05T11:36:53Z",
    "is_admin": false,
    "is_system": false,
    "owner_id": 0,
    "type": "flix",
    "is_third_party": false
  },
  "media_objects": {
    "artwork": [
      {
        "id": 73,
        "name": "1 copy 2.png",
        "content_type": "image/png",
        "content_length": 32139,
        "content_hash": "a8a0d57eab20c7cacbcc17f1a490a8fe",
        "created_date": "2018-12-05T11:41:11Z",
        "status": 1,
        "owner_id": {
          "id": 0,
          "is_admin": false,
          "is_system": false,
          "owner_id": 0,
          "type": "flix",
          "is_third_party": false
        },
        "servers": [
          "289a0d44-ba48-4e6b-887a-18cfbc19a3f4"
        ]
      }
    ],
    "fullres": [
      {
        "id": 89,
        "name": "ccc978c7-18ac-4ac4-a539-6f88f32e0abc.png",
        "content_type": "image/png",
        "content_length": 30196,
        "content_hash": "e84a651784cab2aa94901cf79b3e99b2",
        "created_date": "2018-12-05T11:41:13Z",
        "status": 1,
        "owner_id": {
          "id": 0,
          "is_admin": false,
          "is_system": false,
          "owner_id": 0,
          "type": "flix",
          "is_third_party": false
        },
        "servers": [
          "289a0d44-ba48-4e6b-887a-18cfbc19a3f4"
        ]
      }
    ],
    "scaled": [
      {
        "id": 84,
        "name": "45ea39cd-8937-4959-be57-a549ecd5ec1d.png",
        "content_type": "image/png",
        "content_length": 23550,
        "content_hash": "73868db15d9c65dbda07131a99188d77",
        "created_date": "2018-12-05T11:41:13Z",
        "status": 1,
        "owner_id": {
          "id": 0,
          "is_admin": false,
          "is_system": false,
          "owner_id": 0,
          "type": "flix",
          "is_third_party": false
        },
        "servers": [
          "289a0d44-ba48-4e6b-887a-18cfbc19a3f4"
        ]
      }
    ],
    "thumbnail": [
      {
        "id": 79,
        "name": "77487968-4ca5-4721-863b-5f6c793e0c5e.png",
        "content_type": "image/png",
        "content_length": 22885,
        "content_hash": "b2c3d0d12df15403cdc1808af9709c24",
        "created_date": "2018-12-05T11:41:12Z",
        "status": 1,
        "owner_id": {
          "id": 0,
          "is_admin": false,
          "is_system": false,
          "owner_id": 0,
          "type": "flix",
          "is_third_party": false
        },
        "servers": [
          "289a0d44-ba48-4e6b-887a-18cfbc19a3f4"
        ]
      }
    ]
  }
}

This endpoint allows to fetch all relevant information and media objects of a single asset.

URL Parameters

Parameter Type Description
assetId integer The ID of the asset

Create an Asset

POST /show/{showId}/asset HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: application/json

{
  "name": "1 copy 2.png",
  "content_type": "image/png",
  "content_length": 32139,
  "ref": "artwork"
}

HTTP/1.1 201 CREATED
Content-Type: application/json

{
  "asset_id": 19,
  "show_id": 1,
  "created_date": "2018-12-05T11:41:10.820595529Z",
  "owner_id": {
    "id": 1,
    "username": "admin",
    "email": "flix-admin@foundry.com",
    "created_date": "2018-12-05T11:36:53Z",
    "is_admin": true,
    "is_system": false,
    "owner_id": 0,
    "groups": [
      {
        "id": 1,
        "title": "default"
      }
    ],
    "type": "flix",
    "is_third_party": false
  },
  "media_objects": {
    "artwork": [
      {
        "id": 73,
        "name": "1 copy 2.png",
        "content_type": "image/png",
        "content_length": 32139,
        "created_date": "2018-12-05T11:41:11Z",
        "status": 0,
        "owner_id": {
          "id": 0,
          "is_admin": false,
          "is_system": false,
          "owner_id": 0,
          "type": "flix",
          "is_third_party": false
        },
        "token": "605f7ee1-69af-498a-ad98-4037a0d660d3",
        "servers": [
          "00000000-0000-0000-0000-000000000000"
        ]
      }
    ]
  }
}

This endpoint creates an asset object and assigns it to the provided show ID.

URL Parameters

Parameter Type Description
showId integer The ID of the show the newly created asset should belong to

Request Properties

Property Type Description
Name string Name of the asset file
ContentType string Type of the asset file
ContentLength integer Size of the asset file
Ref string Reference type of the asset file

Store Asset Data

POST /asset/{assetId}/data HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: none

Body of the request must contain contents of a file

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": 1,
  "name": "1 copy 2.png",
  "content_type": "image/png",
  "content_length": 32139,
  "content_hash": "a8a0d57eab20c7cacbcc17f1a490a8fe",
  "created_date": "2018-12-05T11:40:49Z",
  "status": 1,
  "owner_id": {
    "id": 0,
    "is_admin": false,
    "is_system": false,
    "owner_id": 0,
    "type": "flix",
    "is_third_party": false
  }
}

This endpoint allows to upload file data that belongs to the specified asset.

URL Parameters

Parameter Type Description
assetId integer The ID of the asset that uploaded data belongs to

Get masters from an Asset

GET /asset/{assetId}/masters HTTP/1.1
Authorization: FNAUTH <signature>


HTTP/1.1 200 OK
Content-Type: application/json

{
  "masters": [
    {
      "master_id": 3,
      "sequence_id": 0,
      "show_id": 0,
      "revision": 1,
      "master_media_object_id": 145,
      "asset_ids": [],
      "thumb_media_object_id": 146,
      "created_date": "2018-12-05T12:42:15Z",
      "owner_id": {
        "ID": 1,
        "Username": "",
        "PasswordHash": "",
        "Email": "",
        "CreatedDate": "0001-01-01T00:00:00Z",
        "IsAdmin": false,
        "IsSystem": false,
        "IsThirdparty": false,
        "Owner": {
          "ID": 0,
          "Username": "",
          "PasswordHash": "",
          "Email": "",
          "CreatedDate": "0001-01-01T00:00:00Z",
          "IsAdmin": false,
          "IsSystem": false,
          "IsThirdparty": false,
          "Owner": null,
          "Groups": null,
          "Type": ""
        },
        "Groups": null,
        "Type": "flix"
      }
    }
  ]
}

This endpoint returns a list of masters related to the specified asset.

URL Parameters

Parameter Type Description
assetId integer The ID of the asset that masters should be retrieved for

Users

A Flix user is a person who has an account in Flix system and is able to create, access or manage shows and sequences.

Default admin account will be created when Flix system is started for the first time. The account will have following credentials:

username: admin
password: admin

List Users

GET /users HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 200 OK
Content-Type: application/json

{
  "users": [
    {
      "id": 1,
      "username": "admin",
      "email": "flix-admin@foundry.com",
      "created_date": "2018-11-30T10:28:00Z",
      "is_admin": true,
      "is_system": false,
      "owner_id": 0,
      "groups": [
        {
          "id": 1,
          "title": "default"
        }
      ],
      "type": "flix",
      "is_third_party": false
    },
    {
      "id": 5,
      "username": "Stuart",
      "email": "stuartdlockett@gmail.com",
      "created_date": "2018-11-30T10:49:46Z",
      "is_admin": true,
      "is_system": false,
      "owner_id": 1,
      "groups": [
        {
          "id": 1,
          "title": "default"
        }
      ],
      "type": "flix",
      "is_third_party": false
    },
    {
      "id": 8,
      "username": "rusty",
      "created_date": "2018-11-30T11:10:15Z",
      "is_admin": false,
      "is_system": false,
      "owner_id": 1,
      "groups": [
        {
          "id": 1,
          "title": "default"
        },
        {
          "id": 5,
          "title": "test"
        }
      ],
      "type": "flix",
      "is_third_party": false
    }
  ]
}

This endpoint will return the list of currently registered user accounts.

Create a User

POST /user HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: application/json

{
  "password": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "is_admin": true,
  "username": "user",
  "email": "user@user.com",
  "groups": [
    {
      "id": 1,
      "title": "default"
    }
  ]
}


HTTP/1.1 201 CREATED
Content-Type: application/json

{
  "id": 12,
  "username": "user",
  "email": "user@tuser.com",
  "created_date": "2018-12-03T14:33:07Z",
  "is_admin": true,
  "is_system": false,
  "owner_id": 1,
  "groups": [
    {
      "id": 1,
      "title": "default"
    }
  ],
  "type": "flix",
  "is_third_party": false
}

This endpoint allows to create a user account.

User Data Properties

Property Type Description
Username string Username of the created user
Password string Sha256 hashed password
Admin bool Is user is an admin?
Email string Email of the user
Groups []Group Groups that the user belongs to

Update a User

PATCH /user/{id} HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: application/json

{
  "password": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "is_admin": true,
  "username": "user",
  "email": "user@user.com",
  "groups": [
    {
      "id": 1,
      "title": "default"
    }
  ]
}


HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": 12,
  "username": "user",
  "email": "user@tuser.com",
  "created_date": "2018-12-03T14:33:07Z",
  "is_admin": true,
  "is_system": false,
  "owner_id": 1,
  "groups": [
    {
      "id": 1,
      "title": "default"
    }
  ],
  "type": "flix",
  "is_third_party": false
}

This endpoint allows to update an existing user.

URL Parameters

Parameter Description
id The id of the user to update

User Data Properties

Property Type Description
Username string Username of the updated user
Password string Sha256 hashed password
Admin bool Is user is an admin?
Email string Email of the user
Groups []Group Groups that the user belongs to

Delete a User

DELETE /user/{id} HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 204 NO CONTENT
Content-Type: application/json

This endpoint allows to delete an existing user.

URL Parameters

Parameter Description
id The id of the user to delete

Groups

A group is a structural unit, that allows to organize users together based on various characteristics.

Default group named “default” will be created when Flix system is started for the first time.

List Groups

GET /groups HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 200 OK
Content-Type: application/json

{
  "groups": [
    {
      "id": 1,
      "title": "default"
    },
    {
      "id": 5,
      "title": "editors"
    }
  ]
}

This endpoint will return the list of currently existing user groups.

Create a Group

POST /group HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: application/json

{
  "title": "editor"
}

HTTP/1.1 201 CREATED
Content-Type: application/json

{
  "id": 17,
  "title": "editor"
}

This endpoint allows to create a user group.

Group Data Properties

Property Type Description
Title string Name of the group

Update a Group

PATCH /group/{id} HTTP/1.1
Authorization: FNAUTH <signature>
Content-Type: application/json

{
  "title": "editor"
}


HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": 17,
  "title": "editor"
}

This endpoint allows to update an existing user group.

URL Parameters

Parameter Description
id The id of the Group to update

Group Data Properties

Property Type Description
Title string Name of the group

Delete a Group

DELETE /group/{id} HTTP/1.1
Authorization: FNAUTH <signature>

HTTP/1.1 204 NO CONTENT
Content-Type: application/json

This endpoint allows to delete an existing user group.

URL Parameters

Parameter Description
id The id of the group to delete

Info

GET /info HTTP/1.1

HTTP/1.1 200
Content-Type: application/json

{
  "version": "6.0.0+20",
  "expiryDate": "2018-12-15T12:58:51Z"
}

Info endpoint is useful for gathering some information based on the server.

Errors

Error Messages

HTTP/1.1 401
Content-Type: application/json

{
  "error_number": 0,
  "message": "Authentication failed",
  "status_code": 401
}

Flix will return a JSON response containing an error object which can be useful for determining what went wrong.

We are currently working on providing unique error numbers for logging and referencing error messages.

HTTP Status Codes

HTTP Requests will return one of the follow errors to give you a clear indication of the outcome of the request.

Code Name Description
200 OK Standard response for successful HTTP requests.
201 Created The request has been fulfilled, resulting in the creation of a new resource.
202 Accepted The request has been accepted for processing, but the processing has not been completed.
204 No Content The server successfully processed the request and is not returning any content.
400 Bad Request The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing).
401 Unauthorized Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.
403 Forbidden The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource.
404 Not Found The requested resource could not be found but may be available in the future.
405 Method Not Allowed A request method is not supported for the requested resource; for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.
413 Payload Too Large The request is larger than the server is willing or able to process.
500 Internal Server Error A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
501 Not Implemented The server either does not recognize the request method, or it lacks the ability to fulfil the request. Usually this implies future availability (e.g., a new feature of a web-service API).
503 Service Unavailable The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.