HTTP-API
URLs:
/api/search/?bytes=1234567
/getxml.php?ofsb=1234567
/api/search/?name=File_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi
/getxml.php?name=File_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi
/api/cutlist/9012345/?key=abcdefghij1234567890
/getfile.php?id=9012345
/api/upload/?key=abcdefghij1234567890
/api/rate/9012345/?quality=[1-3]
/api/rate/9012345/?quality=[1-3]&duplicate=[0-1]&key=abcdefghij1234567890
quality: 1="perfect", 2="suitable" 3="inaccurate"
duplicate: 0="no duplicate scenes (left)", 1="still contains duplicate scenes"
/rate.php?rate=9012345&rating=[3-5]
converted to:
5 = "perfect" + "no duplicate scenes (left)"
4 = "suitable" (no information about duplicate scenes)
3 = "inaccurate" (no information about duplicate scenes)
/api/delete/9012345/?key=abcdefghij1234567890
/delete_cutlist.php?cutlistid=9012345&userid=1234567890ABCDEF1234
/api/bestcutlist/?bytes=1234567
/api/bestcutlist/?name=File_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi
returns a CuliX-cutlist like /api/cutlist/
/bestcutlist/?file=File_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi
returns an old cutlist like getfile.php
/api/append/9012345/?after=9012350&key=abcdefghij1234567890
to append the missing ending from 9012350 to 9012345
/api/append/9012345/?before=9012340&random=1234567890abcdef1234567890abcdef
to append the missing beginning from 9012340 to 9012345
Optional GET-Parameters:
encoding=utf-8 (=Default)
encoding=iso-8859-1
Existing software:
Settings:
Cutlist-Server: http://cutlist.at/ (/user/abcdefghij1234567890/)
Upload-URL: http://cutlist.at/ (/user/abcdefghij1234567890/)
(UserID: 1234567890ABCDEF1234) (CutAssistant only)
Search:
GET /getxml.php?ofsb=1234567
GET /getxml.php?name=File_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi
Download:
GET /getfile.php?id=9012345
GET /user/abcdefghij1234567890/getfile.php?id=9012345
Upload:
POST / [userfile=FILE.cutlist]
POST / [userfile=FILE.cutlist , userid=1234567890ABCDEF1234]
POST /user/abcdefghij1234567890/ [userfile=FILE.cutlist]
Rating:
GET /rate.php?rate=9012345&rating=5
GET /user/abcdefghij1234567890/rate.php?rate=9012345&rating=5
Delete:
GET /delete_cutlist.php?cutlistid=9012345&userid=1234567890ABCDEF1234
GET /user/abcdefghij1234567890/delete_cutlist.php?cutlistid=9012345
Software using the new API:
Settings:
Cutlist-Server: cutlist.at
Secret-Key: abcdefghij1234567890
(Random-Token: 1234567890abcdef1234567890abcdef)
Search:
GET /api/search/?bytes=1234567
GET /api/search/?name=File_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi
Download:
GET /api/cutlist/9012345/
GET /api/cutlist/9012345/?key=abcdefghij1234567890
Upload:
POST /api/upload/?key=abcdefghij1234567890 [cutlist=FILE.CuLiX]
POST /api/upload/?random=1234567890abcdef1234567890abcdef [cutlist=FILE.CuLiX]
You can send the cutlist as as file upload named "cutlist".
POST /api/upload/?key=abcdefghij1234567890 [content="{CuLiX-JSON}"]
POST /api/upload/?random=1234567890abcdef1234567890abcdef [content="{CuLiX-JSON}"]
Or you can send it's content as a text-parameter named "content".
Rating:
GET /api/rate/9012345/?quality=1&duplicate=0
GET /api/rate/9012345/?quality=1&duplicate=0&key=abcdefghij1234567890
Delete:
GET /api/delete/9012345/?key=abcdefghij1234567890
GET /api/delete/9012345/?random=1234567890abcdef1234567890abcdef
Append:
GET /api/append/9012345/?after=9012350&key=abcdefghij1234567890
to append the missing ending containded in 9012350 to 9012345
GET /api/append/9012345/?before=9012340&random=1234567890abcdef1234567890abcdef
to append the missing beginning containded in 9012340 to 9012345
JSON-API
All responses are stringified JSON-objects WITHOUT line breaks or indents!
So the empty search response looks like this: {"count":0,"results":[],"info":{}}
Search:
GET /api/search/?ofsb=1234567
GET /api/search/?filename=Scrubs_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi
Response:
{
"count": 0,
"results": [],
"info": {}
}
or
{
"count": 2,
"results": [
{
"id": 9012345,
"originalid": 0,
"author": "Author1",
"inputfile": "Scrubs_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi",
"bytes": 1234567,
"outputname": "Scrubs 10.10.2010 xyz",
"usercomment": "",
"quality": 1.25,
"duplicates": 0,
"errors": [],
"ratingcount": 4,
"downloads": 12,
"revisions": [
{
"id": 321,
"author": "Author3",
"comment": "falsche Ratio (ist eine alte Folge) und Name eingetragen"
"changed": ["outputname","ratio"],
"confirmed": 3
}
]
},{
"id": 9012366,
"originalid": 9012345,
"author": "Author2",
"inputfile": "Scrubs_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi",
"bytes": 1234567,
"outputname": "Scrubs 1x01 Mein erster Tag",
"usercomment": "verbesserte Fassung, Vorlage von Author1",
"quality": 1,
"duplicates": 0,
"errors": [],
"ratingcount": 0,
"downloads": 0,
"revisions": []
}
],
"info": {
"type": "SHOW",
"name": "Scrubs",
"fullname": "Scrubs - Die Anfänger",
"season": 1,
"episode": 1,
"title": "Mein erster Tag",
"language": "DE"
}
}
Description of the "error"-array:
Example: "errors": ["BEGINNING","EPG"]
Error-Strings: BEGINNING, ENDING, VIDEO, AUDIO, ASYNC, EPG
(Notice: The 6-Byte-Error-String used by old cutlists contains 0 or 1 for each Error-String above using the same order)
Description of the "revisions"-array and object:
The "revisions"-array may be empty or contains one or more revision-objects.
Each revision-object contains an "id", an "author"(-name), a "confirmed"-value and a "changed"-array.
The "changed"-array contains one or more of the following values:
"outputname", "errors", "ratio", "appendbefore", "appendafter"
"confirmed" is the number of users who confirmed the given information as valid.
Description of the "info"-object:
"type" could be: SHOW, MOVIE, OTHER
always:
language: DE, EN, FR or an empty string ""
SHOW:
name
fullname
season (number)
episode (number)
title
MOVIE:
title
fulltitle
year (number, 4digit)
Download cutlists:
/api/cutlist/9012345/?key=abcdef1234567890xyz
/api/cutlist/9012345/
Response:
Content-type: application/x-CuLiX; charset=utf-8
Content-Disposition: attachment; filename=Scrubs_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi.CuLiX
{
"author": "Author2",
"inputfile": "Scrubs_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi",
"bytes": 1234567,
"outputname": "Scrubs 10.10.2010 xyz",
"usercomment": "verbesserte Fassung, Vorlage von Author1",
"fps": 25,
"ratio": "16:9",
"quality": 1,
"duplicates": 0,
"appendbefore": 0,
"appendafter": 0,
"errors": [],
"revision": {
"id": 321,
"author": "Author3",
"comment": "falsche Ratio (ist eine alte Folge) und Name eingetragen",
"outputname": "S1E01 Mein erster tag",
"ratio": "4:3"
},
"info": {
"type": "SHOW",
"name": "Scrubs",
"fullname": "Scrubs - Die Anfänger",
"season": 1,
"episode": 1,
"title": "Mein erster Tag",
"language": "DE"
},
"cutcount": 3,
"cuts": [
{
"start": 344.84,
"startframe": 8621,
"duration": 1357.96,
"durationframes": 33949,
"tag": ""
},{
"start": 2203.2,
"startframe": 55080,
"duration": 424.28,
"durationframes": 10607,
"tag": ""
},{
"start": 3115.56,
"startframe": 77889,
"duration": 697.6,
"durationframes": 17440,
"tag": ""
}
]
}
Description of appendbefore/appendafter:
"appendbefore" and/or "appendafter" may contain a Cutlist-ID of a recording that should be appended before/after the current one.
- "appendbefore" is used to specify a recording that contains a missing beginning
- "appendafter" is used to specify a recording that contains a missing ending
You can append cutlists to others after uploading using the "/api/append/"-API.
Description of the "revision"-object:
The revision-object contains an "id", an "author"(-name), a "comment", "confirmed" and one or more of the following values:
"outputname", "errors", "ratio", "appendbefore", "appendafter"
These values may be used to override missing or wrong information given by the original cutlist.
"confirmed" is the number of users who confirmed the given information as valid.
Description of "tag":
Tags allow to identify cuts some users may want to remove while other users do not.
List of Tags: OPENING, PREVIOUSLY, END_CREDITS, END_CREDITS_COMMERCIAL
An empty tag is used to specify the primary parts of the recording.
Cutlist for uploading:
Scrubs_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi.CuLiX
{
"generator": "ColdCut/3.0.0",
"originalid": 9012345,
"author": "Author2",
"inputfile": "Scrubs_10.10.10_20.15_xyz_10_TVOON_DE.mpg.avi",
"bytes": 1234567,
"outputname": "Scrubs 10.10.2010 xyz",
"usercomment": "verbesserte Fassung, Vorlage von Author1",
"fps": 25,
"ratio": "16:9",
"quality": 1,
"duplicates": 0,
"appendbefore": "",
"appendafter": "",
"errors": [],
"cutcount": 3,
"cuts": [
{
"start": 344.84,
"startframe": 8621,
"duration": 1357.96,
"durationframes": 33949,
"tag": ""
},{
"start": 2203.2,
"startframe": 55080,
"duration": 424.28,
"durationframes": 10607,
"tag": ""
},{
"start": 3115.56,
"startframe": 77889,
"duration": 697.6,
"durationframes": 17440,
"tag": ""
}
]
}
"originalid" is 0 or the ID of a previously downloaded and edited cutlist.
(this can be used to build an upload-history displayed as a tree...)
Response:
{
"success": 1,
"id": 9012345,
"error": ""
}
or
{
"success": 0,
"id": 0,
"error": "INVALID_JSON"
}
or
{
"success": 2,
"id": 0,
"error": "CREATED_REVISION",
"revisionid": 321
}
Error-Strings: INVALID_JSON, INVALID_CUTLIST, DUPLICATE, AUTHORNAME_IN_USE, BLOCKED and CREATED_REVISION
User rating:
/api/rate/9012345/?quality=1&duplicate=0&key=abcdef1234567890xyz
/api/rate/9012345/?quality=3&duplicate=1
quality: 1="perfect", 2="suitable", 3="inaccurate"
duplicate: 0="no duplicate scenes (left)", 1="still contains duplicate scenes"
Response:
{
"success": 1,
"error": ""
}
or
{
"success": 0,
"error": "INVALID_RATING"
}
Error-Strings: INVALID_RATING, INVALID_ID, DUPLICATE, NO_DOWNLOAD, OWN_CUTLIST, BLOCKED
Delete cutlists:
/api/delete/9012345/?key=abcdef1234567890xyz
Response:
{
"success": 1,
"error": ""
}
or
{
"success": 0,
"error": "INVALID_KEY"
}
Error-Strings: INVALID_KEY, INVALID_ID, BLOCKED
Merge cutlists:
/api/append/9012345/?after=9012350&key=abcdefghij1234567890
to append the missing ending from 9012350 to 9012345
/api/append/9012345/?before=9012340&random=1234567890abcdef1234567890abcdef
to append the missing beginning from 9012340 to 9012345
Response:
{
"success": 1,
"error": ""
}
or
{
"success": 0,
"error": "INVALID_KEY"
}
Error-Strings: INVALID_KEY, INVALID_ID, BLOCKED
Cutlist-IDs:
Cutlist.at 1.0 9xxxxxx < 10 ^ 7
Cutlist.at 2.0 1xxxxxxx > 10 ^ 7
(Technicaly there is no difference between these ranges.)