Pelle API v10 » Historique » Version 18
Nicolas BERTRAND, 09/09/2016 10:23
1 | 1 | Nicolas BERTRAND | h1. Pelle API v10 |
---|---|---|---|
2 | 2 | Nicolas BERTRAND | |
3 | 2 | Nicolas BERTRAND | h2. API Base URL |
4 | 3 | Nicolas BERTRAND | |
5 | 3 | Nicolas BERTRAND | |
6 | 2 | Nicolas BERTRAND | <pre> |
7 | 2 | Nicolas BERTRAND | https://tuco.tdcpb.org/pelle/v1.0 |
8 | 2 | Nicolas BERTRAND | </pre> |
9 | 2 | Nicolas BERTRAND | |
10 | 2 | Nicolas BERTRAND | h2. Authentication |
11 | 2 | Nicolas BERTRAND | |
12 | 2 | Nicolas BERTRAND | HTTP requests to the REST API are protected with HTTP Basic authentication |
13 | 2 | Nicolas BERTRAND | |
14 | 2 | Nicolas BERTRAND | Example: |
15 | 2 | Nicolas BERTRAND | <pre> |
16 | 2 | Nicolas BERTRAND | curl -u <username>:<pass> -H "Content-Type: application/json" -X GET https://tuco.tdcpb.org/pelle/v1.0/exhibitors |
17 | 2 | Nicolas BERTRAND | </pre> |
18 | 4 | Nicolas BERTRAND | |
19 | 9 | Nicolas BERTRAND | h2. Exhibitors Resources |
20 | 4 | Nicolas BERTRAND | |
21 | 6 | Nicolas BERTRAND | h3. Exhibitor Properties |
22 | 8 | Nicolas BERTRAND | |
23 | 8 | Nicolas BERTRAND | |_. NAME |_. DESCRIPTION | |
24 | 7 | Nicolas BERTRAND | | cncid | Unique exhibitor authorization ID given by CNC | |
25 | 7 | Nicolas BERTRAND | | id | Unique ID given by tuco (internal usage) | |
26 | 7 | Nicolas BERTRAND | | name | Theater name | |
27 | 7 | Nicolas BERTRAND | | address | Exhibitor address | |
28 | 7 | Nicolas BERTRAND | | city | Exhibitor city | |
29 | 7 | Nicolas BERTRAND | | contact | Person to contact | |
30 | 1 | Nicolas BERTRAND | |
31 | 7 | Nicolas BERTRAND | |
32 | 6 | Nicolas BERTRAND | |
33 | 5 | Nicolas BERTRAND | |
34 | 4 | Nicolas BERTRAND | h3. List all exhibitors |
35 | 4 | Nicolas BERTRAND | |
36 | 4 | Nicolas BERTRAND | <pre> |
37 | 4 | Nicolas BERTRAND | GET exhibitors |
38 | 4 | Nicolas BERTRAND | </pre> |
39 | 4 | Nicolas BERTRAND | |
40 | 9 | Nicolas BERTRAND | Output sample: |
41 | 1 | Nicolas BERTRAND | |
42 | 1 | Nicolas BERTRAND | <pre> |
43 | 1 | Nicolas BERTRAND | { |
44 | 5 | Nicolas BERTRAND | exhibitors:[ |
45 | 5 | Nicolas BERTRAND | { |
46 | 1 | Nicolas BERTRAND | 'cncid': '123456', |
47 | 9 | Nicolas BERTRAND | 'name': 'UN CINEMA' |
48 | 1 | Nicolas BERTRAND | 'city' : LA VILLE |
49 | 9 | Nicolas BERTRAND | }, |
50 | 9 | Nicolas BERTRAND | .... |
51 | 1 | Nicolas BERTRAND | ] |
52 | 9 | Nicolas BERTRAND | } |
53 | 9 | Nicolas BERTRAND | </pre> |
54 | 9 | Nicolas BERTRAND | |
55 | 9 | Nicolas BERTRAND | h3. Retrieve a exhibitor |
56 | 9 | Nicolas BERTRAND | |
57 | 9 | Nicolas BERTRAND | <pre> |
58 | 9 | Nicolas BERTRAND | GET exhibitors/<cncid> |
59 | 9 | Nicolas BERTRAND | </pre> |
60 | 9 | Nicolas BERTRAND | |
61 | 9 | Nicolas BERTRAND | |
62 | 9 | Nicolas BERTRAND | Output sample: |
63 | 9 | Nicolas BERTRAND | |
64 | 9 | Nicolas BERTRAND | <pre> |
65 | 9 | Nicolas BERTRAND | { |
66 | 9 | Nicolas BERTRAND | exhibitors: |
67 | 9 | Nicolas BERTRAND | { |
68 | 9 | Nicolas BERTRAND | 'cncid': '123456', |
69 | 9 | Nicolas BERTRAND | 'name': 'UN CINEMA' |
70 | 9 | Nicolas BERTRAND | 'city' : LA VILLE |
71 | 9 | Nicolas BERTRAND | }, |
72 | 4 | Nicolas BERTRAND | } |
73 | 4 | Nicolas BERTRAND | </pre> |
74 | 10 | Nicolas BERTRAND | |
75 | 10 | Nicolas BERTRAND | |
76 | 10 | Nicolas BERTRAND | h3. Retrieve a exhibitor current downloads |
77 | 10 | Nicolas BERTRAND | |
78 | 10 | Nicolas BERTRAND | |
79 | 10 | Nicolas BERTRAND | <pre> |
80 | 10 | Nicolas BERTRAND | GET exhibitors/<cncid>/current_downloads |
81 | 10 | Nicolas BERTRAND | </pre> |
82 | 10 | Nicolas BERTRAND | |
83 | 10 | Nicolas BERTRAND | |
84 | 10 | Nicolas BERTRAND | Output sample: |
85 | 10 | Nicolas BERTRAND | <pre> |
86 | 10 | Nicolas BERTRAND | </pre> |
87 | 11 | Nicolas BERTRAND | |
88 | 11 | Nicolas BERTRAND | |
89 | 11 | Nicolas BERTRAND | |
90 | 11 | Nicolas BERTRAND | h2. Distributor Resources |
91 | 11 | Nicolas BERTRAND | |
92 | 11 | Nicolas BERTRAND | h3. Distributor Properties |
93 | 11 | Nicolas BERTRAND | |
94 | 11 | Nicolas BERTRAND | h3. List all distributors |
95 | 11 | Nicolas BERTRAND | |
96 | 11 | Nicolas BERTRAND | <pre> |
97 | 11 | Nicolas BERTRAND | GET distributors |
98 | 11 | Nicolas BERTRAND | </pre> |
99 | 11 | Nicolas BERTRAND | |
100 | 11 | Nicolas BERTRAND | Output sample: |
101 | 11 | Nicolas BERTRAND | |
102 | 11 | Nicolas BERTRAND | h3. Retrieve a distributor |
103 | 11 | Nicolas BERTRAND | |
104 | 11 | Nicolas BERTRAND | <pre> |
105 | 11 | Nicolas BERTRAND | GET distributors/<cncid> |
106 | 11 | Nicolas BERTRAND | </pre> |
107 | 11 | Nicolas BERTRAND | |
108 | 11 | Nicolas BERTRAND | |
109 | 11 | Nicolas BERTRAND | Output sample: |
110 | 12 | Nicolas BERTRAND | |
111 | 12 | Nicolas BERTRAND | h3. List distributor catalog |
112 | 12 | Nicolas BERTRAND | <pre> |
113 | 12 | Nicolas BERTRAND | GET distributors/<cncid>/movies |
114 | 12 | Nicolas BERTRAND | </pre> |
115 | 12 | Nicolas BERTRAND | |
116 | 12 | Nicolas BERTRAND | |
117 | 12 | Nicolas BERTRAND | Output sample: |
118 | 12 | Nicolas BERTRAND | |
119 | 13 | Nicolas BERTRAND | |
120 | 13 | Nicolas BERTRAND | h2. Distribution Resources |
121 | 13 | Nicolas BERTRAND | |
122 | 17 | Nicolas BERTRAND | h3. properties |
123 | 17 | Nicolas BERTRAND | |
124 | 17 | Nicolas BERTRAND | |_. NAME |_. DESCRIPTION | |
125 | 17 | Nicolas BERTRAND | | autorisation_date | Date of distribution autorisation | |
126 | 17 | Nicolas BERTRAND | | dcp | DCP name on distribution | |
127 | 17 | Nicolas BERTRAND | | dcpid | Id of DCP on distribution | |
128 | 17 | Nicolas BERTRAND | | eta | Estimated Time of Accomplishment for DCP download in theater (available when _status_ is _Distribution started_ , _N/A_ else) | |
129 | 18 | Nicolas BERTRAND | | exhibitor | Exhibitor name | |
130 | 18 | Nicolas BERTRAND | | exhibitor_cncid | Unique exhibitor authorization ID given by CNC | |
131 | 18 | Nicolas BERTRAND | | finished_transfer_date | Finished transfer to theater date | |
132 | 18 | Nicolas BERTRAND | | proress | DCP download progress in percent (available when _status_ is _Distribution started_ , _N/A_ else) | |
133 | 18 | Nicolas BERTRAND | | started_transfer_date |DCP download start date | |
134 | 18 | Nicolas BERTRAND | | status | Distribution status| |
135 | 17 | Nicolas BERTRAND | |
136 | 17 | Nicolas BERTRAND | |
137 | 18 | Nicolas BERTRAND | Distribution status state: |
138 | 18 | Nicolas BERTRAND | |
139 | 18 | Nicolas BERTRAND | |_. NAME | |
140 | 17 | Nicolas BERTRAND | |
141 | 17 | Nicolas BERTRAND | |
142 | 14 | Nicolas BERTRAND | h3. Retrieve distribution status of DCP <dcpid> to exhibitor <cncid> |
143 | 14 | Nicolas BERTRAND | |
144 | 14 | Nicolas BERTRAND | <pre> |
145 | 14 | Nicolas BERTRAND | GET distributions/<cncid>/<dcpid> |
146 | 14 | Nicolas BERTRAND | </pre> |
147 | 14 | Nicolas BERTRAND | |
148 | 16 | Nicolas BERTRAND | Sample output |
149 | 16 | Nicolas BERTRAND | <pre> |
150 | 16 | Nicolas BERTRAND | { |
151 | 16 | Nicolas BERTRAND | "distributions": { |
152 | 16 | Nicolas BERTRAND | "autorisation_date": "2016-07-04T07:25:16", |
153 | 16 | Nicolas BERTRAND | "dcp": "HAUT-ET-COURT_TONI-ERDMANN_2K-F-185_51-DE_ST-FR_DCP-24-IOP-CPT_1606TVS7354", |
154 | 16 | Nicolas BERTRAND | "dcpid": 1024, |
155 | 16 | Nicolas BERTRAND | "eta": "N/A", |
156 | 16 | Nicolas BERTRAND | "exhibitor": "UTOPIA TOURNEFEUILLE", |
157 | 16 | Nicolas BERTRAND | "exhibitor_cncid": 431352, |
158 | 16 | Nicolas BERTRAND | "finished_transfer_date": "2016-07-08T11:30:55", |
159 | 16 | Nicolas BERTRAND | "progress": "N/A", |
160 | 16 | Nicolas BERTRAND | "started_transfer_date": "2016-07-04T13:29:07", |
161 | 16 | Nicolas BERTRAND | "status": "Distribution finished", |
162 | 16 | Nicolas BERTRAND | "statusId": 0 |
163 | 16 | Nicolas BERTRAND | } |
164 | 16 | Nicolas BERTRAND | } |
165 | 16 | Nicolas BERTRAND | </pre> |
166 | 13 | Nicolas BERTRAND | |
167 | 12 | Nicolas BERTRAND | h3. Distribute a DCP to a distributor |
168 | 12 | Nicolas BERTRAND | |
169 | 12 | Nicolas BERTRAND | <pre> |
170 | 15 | Nicolas BERTRAND | POST distributions |
171 | 1 | Nicolas BERTRAND | </pre> |
172 | 15 | Nicolas BERTRAND | |
173 | 15 | Nicolas BERTRAND | Parameters |
174 | 15 | Nicolas BERTRAND | |
175 | 15 | Nicolas BERTRAND | |_. NAME |_. DESCRIPTION | |
176 | 15 | Nicolas BERTRAND | | cncid | Unique exhibitor authorization ID given by CNC | |
177 | 15 | Nicolas BERTRAND | | dcpid | Id of DCP to distribute | |
178 | 16 | Nicolas BERTRAND | |
179 | 16 | Nicolas BERTRAND | *Sample* |
180 | 16 | Nicolas BERTRAND | Distribute Toni Erdman FTR DCP (dcpid: 1024) to Utopia tournefeuille( cncid: 431352 ) |
181 | 16 | Nicolas BERTRAND | _Input_ |
182 | 16 | Nicolas BERTRAND | <pre> |
183 | 16 | Nicolas BERTRAND | curl -H "Content-Type: application/json" \ |
184 | 16 | Nicolas BERTRAND | -u username:password \ |
185 | 16 | Nicolas BERTRAND | -X POST\ |
186 | 16 | Nicolas BERTRAND | -d '{"cncid": "431352", "dcpid": "1024" }'\ |
187 | 16 | Nicolas BERTRAND | -i https://tuco.tdcpb.org/pelle/v1.0/distributions |
188 | 16 | Nicolas BERTRAND | </pre> |