Login to your account

API

General

Our APIs base URL is https://api.fruithosted.net

API requests must be HTTP/1.1 GET

Make sure to sent requests in HTTPS only

Most requests require an API Login and API Key, which can be located in your User Account Panel at the User Settings tab.

Response in json, structure is as follows:

{
	"status": <status-code>,
	"msg": "<informational message. might vary, use the status code in your code!>",
	"result": <result of the request. varies depending on the request>
}

Status Codes: STATUS

200: Request Success

400: Bad request (check parameters)

403: Permission denied (wrong API keys or the file does not belong to you)

404: File or Folder not found

451: Not available due to legal reasons.

509: Exceeded bandwidth usage. Try again later or use browser, you might encounter this in peak hours.

50X: Server errors

Message: MSG

Delivers detailed information in on errors. You can use these to display the error to your users, please don't use it for check, that's what the STATUS should be used for.

Response: RESULT

Depending on the request it holds either an array of data or boolean true/false as response.

Download Ticket

generating a download

Request

https://api.fruithosted.net/file/dlticket?file={file}&login={login}&key={key}

Parameters

Name Description Example Required
file File-ID 72fA-_Lq8Ak yes
login API-Login 5147a8f8e924bc82 no
key API-Key / API-Password Fa89_X13-37a8CKR no

Response

200 (OK)
Content-Type: application/json
{
	"status": 200,
	"msg": "OK",
	"result": {
		"ticket": "72fA-_Lq8Ak~~1440353112~n~~0~nXtN3RI-nsEa28Iq",
		"captcha_url": "https://streamcherry.com/dlcaptcha/b92eY_nfjV4.png",
		"captcha_w": 140,
		"captcha_h": 70,
		"wait_time": 10,
		"valid_until": "2015-08-23 18:20:13"
	}
}

File info check

status check of a file / does it exist?

Request

https://api.fruithosted.net/file/info?file={file}&login={login}&key={key}

Parameters

Name Description Example Required
file File-ID(s), single file or comma-separated (max. 50) 72fA-_Lq8Ak,72fA-_Lq8Ak4,72fA-_Lq8Ak5,72fA-_Lq8Ak6 yes
login API-Login 5147a8f8e924bc82 no
key API-Key / API-Password Fa89_X13-37a8CKR no

Response

200 (OK)
Content-Type: application/json
{
	"status": 200,
	"msg": "OK",
	"result": {
	   "72fA-_Lq8Ak3": {
			"id": "72fA-_Lq8Ak3",
			"status": 200,
			"name": "The quick brown fox.txt",
			"size": 123456789012,
			"sha1": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
			"content_type": "plain/text",
		},
		"72fA-_Lq8Ak4": {
			"id": "72fA-_Lq8Ak4",
			"status": 500,
			"name": "The quick brown fox.txt",
			"size": false,
			"sha1": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
			"content_type": "plain/text",
		},
		"72fA-_Lq8Ak5": {
			"id": "72fA-_Lq8Ak5",
			"status": 404,
			"name": false,
			"size": false,
			"sha1": false,
			"content_type": false,
		},
		"72fA-_Lq8Ak6": {
			"id": "72fA-_Lq8Ak6",
			"status": 451,
			"name": "The quick brown fox.txt",
			"size": 123456789012,
			"sha1": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
			"content_type": "plain/text",
		}
	}
}

Upload

Get the upload URL

Uploads must be POSTed to the upload URL returned by the API and must be encoded in multipart/form-data. e.g.

curl -F file1=@path-to/your/file.jpg https://1h24hs.streamango.com/ul/uTsFsa5U88

Request

https://api.fruithosted.net/file/ul?login={login}&key={key}&folder={folder}&sha1={sha1}&httponly={httponly}

Parameters

Name Description Example Required
login API-Login 5147a8f8e924bc82 no
key API-Key / API-Password Fa89_X13-37a8CKR no
folder Folder-ID to upload to 1234 no
sha1 Expected sha1
If sha1 of uploaded file doesn't match this value, upload fails
2fd4e1c67a2d28fced849ee1bb76e7391b93eb12 no
httponly If this is set to true, use only http upload links 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12 no

Response

200 (OK)
Content-Type: application/json
{
	"status": 200,
	"msg": "OK",
	"result": {
		"url": "https://13abc37.example.com/ul/fCgaPthr_ys",
		"valid_until": "2015-01-09 00:02:50"
	}
}

Remote Upload

Adding a file to Remote Upload

Request

https://api.fruithosted.net/remotedl/add?login={login}&key={key}&url={url}&folder={folder}&headers={headers}

Parameters

Name Description Example Required
login API-Login 5147a8f8e924bc82 yes
key API-Key / API-Password Fa89_X13-37a8CKR yes
url Remote URL http://google.com/favicon.ico yes
folder Folder-ID to upload to 1234 no
headers additional HTTP headers, separated by newline (e.g. Cookies or HTTP Basic-Auth) User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0
Cookie: auth=1234;
no

Response

200 (OK)
Content-Type: application/json
{
  "status": 200,
  "msg": "OK",
  "result": {
	"id": "12",
	"folderid": "4248"
  }
}

Remote Upload Status

Checking the status

Request

https://api.fruithosted.net/remotedl/status?login={login}&key={key}&limit={limit}&id={id}

Parameters

Name Description Example Required
login API-Login 5147a8f8e924bc82 yes
key API-Key / API-Password Fa89_X13-37a8CKR yes
limit Maximum number of results (Default: 5, Maximum: 100) 5 no
id Remote Upload ID 1234 no

Response

200 (OK)
Content-Type: application/json
{
  "status": 200,
  "msg": "OK",
  "result": {
	24: {
	  "id": 24,
	  "remoteurl": "http://proof.ovh.net/files/100Mio.dat",
	  "status": "new",
	  "bytes_loaded": null,
	  "bytes_total": null,
	  "folderid": "4248",
	  "added": "2015-02-21 09:20:26",
	  "last_update": "2015-02-21 09:20:26",
	  "extid": false,
	  "url": false
	},
	22: {
	  "id": 22,
	  "remoteurl": "http://proof.ovh.net/files/1Gio.dat",
	  "status": "downloading",
	  "bytes_loaded": "823997062",
	  "bytes_total": "1073741824",
	  "folderid": "4248",
	  "added": "2015-02-21 09:20:26",
	  "last_update": "2015-02-21 09:21:56",
	  "extid": false,
	  "url": false
	},
	20: {
	  "id": 20,
	  "remoteurl": "http://google.de/favicon.ico",
	  "status": "finished",
	  "bytes_loaded": "229",
	  "bytes_total": "229",
	  "folderid": "4248",
	  "added": "2015-02-21 09:03:47",
	  "last_update": "2015-02-21 09:04:04",
	  "extid": "ANAaeBZus-Q",
	  "url": "https://streamcherry.com/f/ANAaeBZus-Q"
	},
	3: {
	  "id": 3,
	  "remoteurl": "http://127.0.0.1/",
	  "status": "error",
	  "bytes_loaded": "162",
	  "bytes_total": "162",
	  "folderid": "4",
	  "added": "2015-02-17 18:58:11",
	  "last_update": "2015-02-19 18:07:45",
	  "extid": false,
	  "url": false
	}
  }
}

File Conversion

CConvert your uploaded files into a browser stream friendly version (h.264 o. mp4)

Request

https://api.fruithosted.net/file/convert?login={login}&key={key}&file={file}

Parameters

Name Description Example Required
login API-Login 5147a8f8e924bc82 yes
key API-Key / API-Password Fa89_X13-37a8CKR yes
file File-ID UPPjeAk--30 yes

Response

200 (OK)
Content-Type: application/json
{
  "status": 200,
  "msg": "OK",
  "result": true
}

Running File Conversions

List currently running file conversions by folder

Request

https://api.fruithosted.net/file/runningconverts?login={login}&key={key}&folder={folder}

Parameters

Name Description Example Required
login API-Login 5147a8f8e924bc82 yes
key API-Key / API-Password Fa89_X13-37a8CKR yes
folder Folder-ID 5 no

Response

200 (OK)
Content-Type: application/json
{
  "status": 200,
  "msg": "OK",
  "result": [
	{
	  "name": "Geysir.AVI",
	  "id": "3565411",
	  "status": "pending",
	  "last_update": "2015-08-23 19:41:40",
	  "progress": 0.32,
	  "retries": "0",
	  "link": "https://streamcherry.com/f/f02JFG293J8/Geysir.AVI",
	  "linkextid": "f02JFG293J8"
	}
  ]
}

List failed conversion

List the failed file conversions by folder

Not ready yet

Get splash images

Get video thumbnail

Request

https://api.fruithosted.net/file/getsplash?login={login}&key={key}&file={file}

Parameters

Name Description Example Required
login API-Login 5147a8f8e924bc82 yes
key API-Key / API-Password Fa89_X13-37a8CKR yes
file File-ID AYgHe95d1E4 yes

Response

200 (OK)
Content-Type: application/json
{
  "status": 200,
  "msg": "OK",
  "result": "https://streamcherry.com/splash/AYgHe95d1E4/zt8uSEmk56s.jpg"
}

Folder Index

List the content of your folders

Request

https://api.fruithosted.net/file/listfolder?login={login}&key={key}&folder={folder}

Parameters

Name Description Example Required
login API-Login 5147a8f8e924bc82 yes
key API-Key / API-Password Fa89_X13-37a8CKR yes
folder Folder-ID 5 no

Response

200 (OK)
Content-Type: application/json
{
  "status": 200,
  "msg": "OK",
  "result": {
	"folders": [
	  {
		"id": "5144",
		"name": ".videothumb"
	  },
	  {
		"id": "5792",
		"name": ".subtitles"
	  },
	  {
		"id": "6272",
		"name": "test"
	  },
	  {
		"id": "6288",
		"name": "video"
	  },
	  {
		"id": "6396",
		"name": "images"
	  },
	  {
		"id": "6990",
		"name": "tmp"
	  }
	],
	"files": [
	  {
		"name": "big_buck_bunny.mp4.mp4",
		"sha1": "c6531f5ce9669d6547023d92aea4805b7c45d133",
		"folderid": "4258",
		"upload_at": "1419791256",
		"status": "active",
		"size": "5114011",
		"content_type": "video/mp4",
		"download_count": "48",
		"cstatus": "ok",
		"link": "https://streamcherry.com/f/UPPjeAk--30/big_buck_bunny.mp4.mp4",
		"linkextid": "UPPjeAk--30"
	  },
	  {
		"name": "Sintel.2010.1080p.mkv.mp4",
		"sha1": "7ca6da73b4f0881bd8dca78e9059e2e6830acce6",
		"folderid": "4258",
		"upload_at": "1426534681",
		"status": "active",
		"size": "1116102098",
		"content_type": "video/mp4",
		"download_count": "37",
		"cstatus": "ok",
		"link": "https://streamcherry.com/f/AYgHe95d1E4/Sintel.2010.1080p.mkv.mp4",
		"linkextid": "AYgHe95d1E4"
	  }
	]
  }
}

Folder renaming

Rename a folder

Request

https://api.fruithosted.net/file/renamefolder?login={login}&key={key}&folder={folder}&name={name}

Parameters

Name Description Example Required
login API-Login 5147a8f8e924bc82 yes
key API-Key / API-Password Fa89_X13-37a8CKR yes
folder Folder-ID 5 yes
name new Folder-Name my%20new%20foldername yes

Response

200 (OK)
Content-Type: application/json
{
  "status": 200,
  "msg": "OK",
  "result": true
}

File Renaming

Rename a file

Request

https://api.fruithosted.net/file/rename?login={login}&key={key}&file={file}&name={name}

Parameters

Name Description Example Required
login API-Login 5147a8f8e924bc82 yes
key API-Key / API-Password Fa89_X13-37a8CKR yes
file File ID UPPjeAk--30 yes
name new File-Name My%20File%20Backup_2017.zip yes

Response

200 (OK)
Content-Type: application/json
{
  "status": 200,
  "msg": "OK",
  "result": true
}

ACCOUNT INFORMATION

Get account related information e.g. rewards, ID etc.

Request

https://api.fruithosted.net/account/info?login={login}&key={key}

Parameters

Name Description Example Required
login API-Login 5147a8f8e924bc82 yes
key API-Key / API-Password Fa89_X13-37a8CKR yes

Response

200 (OK)
Content-Type: application/json
{
	"status": 200,
	"msg": "OK",
	"result": {
		"extid": "extuserid",
		"email": "jeff@streamcherry.com",
		"signup_at": "2015-01-09 23:59:54",
		"storage_left": -1,
		"storage_used": "32922117680",
		"traffic": {
		  "left": -1,
		  "used_24h": 0
		},
		"balance": 0
	}
}