Base-URL for our API is http://youwatch.org/api
All requests to the API shall be HTTP/1.1 GET
Please make sure to use the API with https only.
Most requests require a API Login & API Key, you can find both in the User Panel at the "User Settings" Tab.
Response is 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>
}
200: Everything is OK. Request succeeded
400: Bad request (e.g. wrong parameters)
403: Permission denied (wrong api login/key, action on a file which does not belong to you, ...)
404: File not found
451: Unavailable For Legal Reasons
509: Bandwidth usage exceeded. Please try again later or use Browser Download. (you might see this during peak hours)
50x: Server errors. You should not see this, but be prepared.
This message gives more detailed information in case there is an error.
You can use this for displaying it to the user, but please don't use it for checking if the request succeeded. That's what the status code is for.
holds the response of the request if succeeded. Might hold an array of data or just a boolean true/false, depending on the request
account related (username, money)
Requesthttp://youwatch.org/api?key=APIKEY&op=account_info
Parameters
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
200 Content-Type: application/json
{ login: 'smith', money: '4050.00' }
Get an Upload URL
Requesthttp://youwatch.org/api?key=APIKEY&op=upload_url&url=http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4&folder=name_folderParameters
Name | Description | Example | Required |
---|---|---|---|
key | API-Key | Fa89_X13 | yes |
url | url-file to upload to | http://clips.vorwae...bunny.mp4/ | yes |
folder | save file in folder, if folder not exist will be created | name_folder | no |
200 Content-Type: application/json
{ queue_id: '121212' }
Get status Upload URL
Requesthttp://youwatch.org/api?key=APIKEY&op=check_upload_url&id=queue_idParameters
Name | Description | Example | Required |
---|---|---|---|
key | API-Key | Fa89_X13 | yes |
id | ID Queue URL Upload | queue_id | yes |
200 Content-Type: application/json
{ status: 'status_of_upload', url: 'your_url' }
OR
{ file_code: '1c1c1c1c1c1c' }
Get an Upload Server
http://youwatch.org/api?key=APIKEY&op=get_upload_server
http://youwatch.org/api?op=check_files&key=APIKEY&list=fd1autuiifhc,fd1autuiifh1,fd1autuiifh2(output is file codes of not found files)
http://youwatch.org/api?key=APIKEY&op=file_renew&file_code=3WGI2ZA99MG2
http://youwatch.org/api?key=APIKEY&op=file_clone&file_code=fd1autuiifhc&new_title=111.avi&folder=name_folder(new_title and folder parameters is optional)
Get All Files Deleted per DMCA
Requesthttp://youwatch.org/api?key=APIKEY&op=files_dmca&date=YYYY-MM-DD&order=upParameters
Name | Description | Example | Required |
---|---|---|---|
key | API-Key | Fa89_X13 | yes |
date | Set date you prefer | YYYY-MM-DD | no |
order | Set order to return, default is down | up or down | no |
200 Content-Type: application/json
[ { file_code: '1a1a1a1a1a1a', dmca_created: 'YYYY-MM-DD', dmca_expire: 'YYYY-MM-DD' }, { file_code: '1b1b1b1b1b1b', dmca_created: 'YYYY-MM-DD', dmca_expire: 'YYYY-MM-DD' } ]