Getting Started

Get started with dotPlay's API.


Introduction

Our API has predictable resource-oriented URLs, accepts form-data request bodies, returns JSON-encoded responses, and uses standard HTTP response codes.

Base URL:
https://dotplay.co/api/user

Each request needs to include the following parameters:

  1. key - Use this value Y0IhQjP9xfAENFbX7ZUM.
  2. email - Your account email address.
  3. password - Your account password.

API Requests

Below you can find all the available API requests of dotPlay.


Upload

Upload a media file to your account and convert it to a Play file.

Endpoint:
POST /1.0/uploadFile

Parameters:

Name Type Description Required
file File A media file to upload. Yes
numberOfPlaybacks Integer Number of remaining playbacks. Values allowed: -1 (Infinite), 1, 5, 10, 20, 35, 50, 100. Yes
playbackDuration Integer Playback session length in seconds. Values allowed: -1 (Infinite), 5, 10, 20, 30, 60, 120, 300, 600, 1200, 1800, 3600, 7200, 10800, 18000, 36000, 86400. Yes
copyProtection Integer Enable/Disable copy protection. Values allowed: 0 (Disabled), 1 (Enabled). Yes
storageMode Integer Toggle between local and remote storage modes. Values allowed: 0 (Local), 1 (Remote). Yes
acceleration Integer Enable/Disable the acceleration of the current conversion process. Values allowed: 0 (Off), 1 (On). Yes

Return Values:

Name Type Description
status Boolean The status of the upload request.
message String If the status return value is false, an error message will appear. Otherwise, a current upload/convert status message will be shown instead.
id Integer The uploaded/converted file ID. Use this ID to get the file's status.
Example:
					
{
	"status": true,
	"message": "Pending in queue",
	"id": 2
}
					
				

Upload Status

Get the uploaded/converted file status.

Endpoint:
POST /1.0/getConvertStatus

Parameters:

Name Type Description Required
id Integer Upload file ID. This ID is returned by the upload request. Yes

Return Values:

Name Type Description
status Boolean The status of the upload request.
message String If the status return value is false, an error message will appear. Otherwise, a current upload/convert status message will be shown instead.
percent Integer The current location of the conversion process in percentage.
Example:
					
{
    "status": true,
    "message": "File was created successfully",
    "percent": 100
}
					
				

Search a file in your account by name.

Endpoint:
POST /1.0/searchFiles

Parameters:

Name Type Description Required
name String Filename (can also include a small part of it) or * to get all files. Yes

Return Values:

Name Type Description
status Boolean The status of the search request.
message String If the status return value is false, an error message will appear. Otherwise, an empty message will be displayed instead.
files Integer List of files (should they exist).
Example:

Update

Update Play file settings.

Endpoint:
POST /1.0/updateFile

Parameters:

Name Type Description Required
id Integer Play file ID. You can get the Play file ID by using the search file request. Yes
numberOfPlaybacks Integer Number of remaining playbacks. Values allowed: -1 (Infinite), 1, 5, 10, 20, 35, 50, 100. No
playbackDuration Integer Playback session length in seconds. Values allowed: -1 (Infinite), 5, 10, 20, 30, 60, 120, 300, 600, 1200, 1800, 3600, 7200, 10800, 18000, 36000, 86400. No
copyProtection Integer Enable/Disable copy protection. Values allowed: 0 (Disabled), 1 (Enabled). No
storageMode Integer Toggle between local and remote storage modes. Values allowed: 0 (Local), 1 (Remote). No

Return Values:

Name Type Description
status Boolean The status of the update request.
message String If the status return value is false, an error message will appear. Otherwise, an empty message will be displayed instead.
Example:
					
{
	"status": true,
	"message": ""
}
					
				

Delete

Delete a Play file.

Endpoint:
POST /1.0/deleteFile

Parameters:

Name Type Description Required
id Integer Play file ID. You can get the Play file ID by using the search file request. Yes

Return Values:

Name Type Description
status Boolean The status of the delete request.
message String If the status return value is false, an error message will appear. Otherwise, an empty message will be displayed instead.
Example:
					
{
	"status": true,
	"message": ""
}