API

General informations

This section will get you up and running with the library. You'll find specific instructions below depending on the type of installation method (NPM or CDN), library (HTML, React, etc.), and provider (Audio, Video, HLS, etc.) you opt to use.

Browser Support

INFO

We support at minimum ~92.74% of users tracked on caniuse.

Don't forget to include the Video.js CSS, located at video.js/dist/video-js.css.

          /* vjs-player.component.css */
@import '~video.js/dist/video-js.css';

        

You can then use it like this.

          <app-vjs-player options="{ autoplay: true, controls: true, sources: [{ src: '/path/to/video.mp4', type: 'video/mp4' }]}"></app-vjs-player>
        

Bundle vs. CDN

So you can best decide what install method is best for you, we'll quickly look at some good reasons to locally bundle instead of using a CDN.
  • It provides the greatest control over the library. If you're looking to build your own player elements or modify certain behaviour, then this is the path of least resistance.
  • It provides the optimal development experience working with the library because your IDE can provide you with type/value validation and documentation. We also ship a helpful integration for VSCode so you can get autocomplete suggestions for our custom elements when writing HTML.

INFO

This API has been adapted to match the specification from other services. However there are small differences, be aware of them!

Base-URL for our API is https://api.streamify.io

All requests to the API shall be HTTP GET or POST
Please make sure to use the API with https only, http requests will result in a HTTP 302 redirect to https.

Most requests require an API Login & API Key, you can find both in the User Panel at the "Account Settings" Tab.

          <app-vjs-player options="{ autoplay: true, controls: true, sources: [{ src: '/path/to/video.mp4', type: 'video/mp4' }]}"></app-vjs-player>
        

File Manager

Get folder contents

Response samples

Content Type

application/json

Show items (folders & files) inside a given folder

Name Type Description Required
folder_code

string

Code of folder to view. Defaults to the user's root folder.optional
sort_by

string

Fields to sort items by. "type" here means file-or-folder (folders first). Defaults to user preferences.optional
limit

integer

How many files or folders (maximum) to retrieve in this query.optional
after_value

array of string

(Front-end developers need not concern themselves with how to set this value - it is set automatically by the back-end, and returned inside the "pagination.prevUrl" and "pagination.nextUrl" strings.) Ask for the items that come directly after this one.optional
before_value

array of string

(Front-end developers need not concern themselves with how to set this value - it is set automatically by the back-end, and returned inside the "pagination.prevUrl" and "pagination.nextUrl" strings.) Ask for the items that come directly before this one.optional
including

integer

(Front-end developers need not concern themselves with how to set this value - it is set automatically by the back-end, and returned inside the "pagination.prevUrl" and "pagination.nextUrl" strings.) Whether the item described in before_value or after_value should be included in the results.optional

Responses

Example:

Rename item

Response samples

Content Type

application/json

Rename file or folder (= item). Can't rename the root folder.

Request body schema: application/json

code

required

string

17 characters

^[a-zA-Z0-9_-]+$

Code of item to rename

new_name

required

string

[1 .. 260] characters

Responses

Example:

Create folder

Response samples

Content Type

application/json

Create new folder inside some other given folder

Request body schema: application/json

parent_code

required

string

17 characters

^[a-zA-Z0-9_-]+$

Code of folder to create the new folder in

name

required

string

[1 .. 260] characters
Name of new folder

Responses

Example:

Delete folder

Response samples

Content Type

application/json

Delete folder

Name Type Description Required
code

string

Code of folder to deleterequired
recursive

number

Whether to delete all files and folders contained withinoptional

Responses

Example:

Copy files

Response samples

Content Type

application/json

Copy files to a destination folder. Destination filename will always start with 'Copy of ', and will also end with ' ($number)' if a file with same name already exists on destination folder. The new files will consume bytes from user's space. Subtitles will not be copied. Non-existent file codes will be skipped.

Request body schema: application/json

file_codes

required

array of string

non-empty
Code names of files to copy

dest_folder_code

required

string

17 characters

^[a-zA-Z0-9_-]+$

Code name of destination folder

Responses

Example:

Move files

Response samples

Content Type

application/json

Move files to a destination folder. If the 'allow_rename' parameter has not been set, an error response with the conflicts will be generated in case of name conflicts. If there are no conflicts, the files will be moved as normal. If the 'allow_rename' parameter has been set, then in case of conflict a " ($number)" string will be appended to the conflicting filenames. Non-existent file codes will be skipped.

Request body schema: application/json

allow_rename

required

boolean

Whether, in case of name conflict, operation should take place or not, with auto-renaming of conflicting filenames

file_codes

required

array of string

non-empty
Code names of files to move

dest_folder_code

required

string

17 characters

^[a-zA-Z0-9_-]+$

Code name of destination folder

Responses

Example:

Delete files

Response samples

Content Type

application/json

Delete a bunch of files from file manager. Non-existent file codes will be skipped.

Request body schema: application/json

file_codes

required

array of string

non-empty
Code names of files to delete

Responses

Example:

Upload

Add remote URLs

Response samples

Content Type

application/json

Remote upload. User passes 1-50 URLs, we ask Core to validate and download them (using the appropriate plugin for each one). If `retry_of` is set, then that upload will be stored in the user's home folder if the target folder does not exist.

Request body schema: application/json

Responses

Example:

Get all remote uploads

Response samples

Content Type

application/json

Returns a list of all of this user's remote uploads (active, failed and finished).

Responses

Example:

Remove remote rows

Response samples

Content Type

application/json

Removed rows from the user's 'remote upload' page.

Request body schema: application/json

codes

required

array of string

non-empty
the upload codes to remove

Responses

Example: