Pelle API v10 » Historique » Version 19
« Précédent -
Version 19/45
(diff) -
Suivant » -
Version actuelle
Nicolas BERTRAND, 09/09/2016 11:37
Pelle API v10¶
API Base URL¶
https://tuco.tdcpb.org/pelle/v1.0
Authentication¶
HTTP requests to the REST API are protected with HTTP Basic authentication
Example:
curl -u <username>:<pass> -H "Content-Type: application/json" -X GET https://tuco.tdcpb.org/pelle/v1.0/exhibitors
Exhibitors Resources¶
Exhibitor Properties¶
NAME | DESCRIPTION |
---|---|
cncid | Unique exhibitor authorization ID given by CNC |
id | Unique ID given by tuco (internal usage) |
name | Theater name |
address | Exhibitor address |
city | Exhibitor city |
contact | Person to contact |
List all exhibitors¶
GET exhibitors
Output sample:
{ exhibitors:[ { 'cncid': '123456', 'name': 'UN CINEMA' 'city' : LA VILLE }, .... ] }
Retrieve a exhibitor¶
GET exhibitors/<cncid>
Output sample:
{ exhibitors: { 'cncid': '123456', 'name': 'UN CINEMA' 'city' : LA VILLE }, }
Retrieve a exhibitor current downloads¶
GET exhibitors/<cncid>/current_downloads
Output sample:
Distributor Resources¶
Distributor Properties¶
List all distributors¶
GET distributors
Output sample:
Retrieve a distributor¶
GET distributors/<cncid>
Output sample:
List distributor catalog
GET distributors/<cncid>/movies
Output sample:
Distribution Resources¶
properties¶
NAME | DESCRIPTION |
---|---|
autorisation_date | Date of distribution autorisation |
dcp | DCP name on distribution |
dcpid | Id of DCP on distribution |
eta | Estimated Time of Accomplishment for DCP download in theater (available when status is Distribution started , N/A else) |
exhibitor | Exhibitor name |
exhibitor_cncid | Unique exhibitor authorization ID given by CNC |
finished_transfer_date | Finished transfer to theater date |
proress | DCP download progress in percent (available when status is Distribution started , N/A else) |
started_transfer_date | DCP download start date |
status | Distribution status (cf. next table) |
Distribution status states:
NAME |
---|
'Distribution not allowed' |
'Distribution allowed' |
'Distribution started' |
'Distribution finished' |
'Distribution error' |
Retrieve distribution status of DCP <dcpid> to exhibitor <cncid>¶
GET distributions/<cncid>/<dcpid>
Sample output
{ "distributions": { "autorisation_date": "2016-07-04T07:25:16", "dcp": "HAUT-ET-COURT_TONI-ERDMANN_2K-F-185_51-DE_ST-FR_DCP-24-IOP-CPT_1606TVS7354", "dcpid": 1024, "eta": "N/A", "exhibitor": "UTOPIA TOURNEFEUILLE", "exhibitor_cncid": 431352, "finished_transfer_date": "2016-07-08T11:30:55", "progress": "N/A", "started_transfer_date": "2016-07-04T13:29:07", "status": "Distribution finished", "statusId": 0 } }
Distribute a DCP to a distributor¶
POST distributions
Parameters
NAME | DESCRIPTION |
---|---|
cncid | Unique exhibitor authorization ID given by CNC |
dcpid | Id of DCP to distribute |
Sample
Distribute Toni Erdman FTR DCP (dcpid: 1024) to Utopia tournefeuille( cncid: 431352 )
Input
curl -H "Content-Type: application/json" \ -u username:password \ -X POST\ -d '{"cncid": "431352", "dcpid": "1024" }'\ -i https://tuco.tdcpb.org/pelle/v1.0/distributions