Slide background

Cessfull API

Bienvenue sur l'API de Cessfull.

Laissez libre cours à votre imagination et construisez votre propre application pour Cessfull.
feature

### Preamble

Requests must be made via a URL secured by SSL (https).
All responses are in JSON.
Sizes are in bytes

### Authentification

The authentication method is JWT (Json Web Token). More information https://jwt.io/introduction/

How to get a token:
curl -X POST -d "email=cessfull@cessfull.com&password=abc123" https://www.cessfull.com/api/v2/users/login/

Vhere is how the requests will be built to communicate with the API:
curl -H "Authorization: Token " URL_API

### Account

Account informations:
https://www.cessfull.com/api/v2/profile

	Request [GET]:
			No arguments are required
	Response:
		{
			"status":"OK",
			"sexe": "MAN",
			"language":"FR",
			"quota":268435456000,
			"quotause":10435713296,
			"privilege":"Ultra",
			"remaining_days":"2016-10-18 08:18:43+00:00",
			"email":"cessfull@cessfull.com",
			"name":"Cessfull"
		}

### Torrents

Torrents list:
https://www.cessfull.com/api/v2/torrents/list

	Request [GET]:
		No arguments are required
	Response:
		{
		"status":"OK",
		"torrents":[
			{"peerconnect":0,
			"creator":"https://www.trackername.com",
			"done_date":1449425660,
			"private":true,
			"creation_date":1449425567,
			"pourcent":100,
			"ischeck":0,"message":
			"Torrent non enregistré",
			"size":"113.00 MB",
			"ratio":0.01,
			"add_date":1449425487,
			"state":"stopped",
			"uploaded":"1.25 MB",
			"dl":"0 B/s",
			"hash":"8713894dc4ac8769ddd6dfd68d34e4083cdf8f93",
			"downloaded":"113.82 MB",
			"peers":[],
			"name":"File name",
			"trackers":[{
				"tier":0,"announce":"https://trackername.com/XXXXXXXXXXXXXXXXXXXXXX/announce","id":0,"scrape":"https://trackername.com/XXXXXXXXXXXXXXXXXXXXXX/scrape"
			}],
			"ul":"0 B/s",
			"eta":0,
			"urltracker":"https://trackername.com/XXXXXXXXXXXXXXXXXXXXXX/announce"},
		]}

Torrent control:
https://www.cessfull.com/api/v2/torrents/control

	Request [POST]:
		hashfile ==> (Ex: 8713894dc4ac8769ddd6dfd68d34e4083cdf8f93)
		command ==>  Allowed arguments [start, stop, delete]
	Response:
		{
			"status": "OK",
		}

Add torrents:
https://www.cessfull.com/api/v2/torrents/add

	Request [POST]:
		filetorrent ==> Torrent file input field name
		or
		listmagnetorrent ==>  Field to put magnet links separated by a comma
		or
		urltorrent ==>  Field to put a single link
	Response:
		{
			"status": "OK",
		}

### Drive

Files list:
https://www.cessfull.com/api/v2/files/list

	Request [POST]:
		path ==> The location of the folder (for the root just put / ) and take the "current" parameter when responding to change location
	Response:
		{
		"status":"OK",
		"currentfolder":"/",
		"breadcrumbs":[],
		"listfolder":null,
		"VIP":true,
		"path":[{
			"parent":"",
			"current":"/Filesname.zip",
			"is_music":false,
			"urldl":"https://xxxx.cessfull.com/dl/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Filesname.zip",
			"extension":"zip",
			"editname":"Filesname.zip",
			"selected":false,*
			"back":false,
			"is_stream":false,
			"is_share":true,
			"size":68274229,
			"content_type":"archive",
			"id":"b5f9098b4457ab8f3042e6e2b7684204e9c4e8ac5385ff057dbd0052572def01",
			"icon":"archive",
			"is_archive":true,
			"is_folder":false,
			"name":"Filesname.zip"
			}]
		}

Files control:
https://www.cessfull.com/api/v2/files/control
	
	Request [POST]:
		command ==> Allowed arguments [ delete, rename, move, createfolder, unzip, zip]
	Response:
		{
			"status": "OK",
		}


### Remote

Remote list:
https://www.cessfull.com/api/v2/remotes/list

	Request [GET]:
		No arguments are required
	Response:
		{
		"status":"OK",
		"remotes":[{
			"hoster":"uptobox.com",
			"add_date":"2023-01-26 10:22:39.520146+00:00",
			"percent":100,
			"label":"filesname.pdf",
			"state":"COMPLETED","link":"http://uptobox.com/xxxxxxxxxx",
			"size":108970659}]
		}

Add remote link:
https://www.cessfull.com/api/v2/remotes/add

	Request [POST]:
		link ==> One link at a time
	Response:
		{
			"status": "OK",
		}