|
108 | 108 | </li>
|
109 | 109 | </ul>
|
110 | 110 |
|
| 111 | + <b class="mt-4 mb-2 d-block border-bottom fw-bold">Storage: File Download</b> |
| 112 | + <p>Generate a CDP-accessible ticket for a specified stored file on the server via assigned name. If successful, the file will be accessible on <span class="bg-secondary px-1 border d-inline">api/cdp.php?ticket=<generated_ticket></span></p> |
| 113 | + <pre class="bg-secondary border-gray border rounded p-2">api/index.php?action=file_download</pre> |
| 114 | + |
| 115 | + <p>Payload Structure:</p> |
| 116 | + <ul> |
| 117 | + <li><i>assigned_name</i> — The assigned name of the file for the ticket to be generated.</li> |
| 118 | + <li><i>expiring</i> — Boolean value to specify if the ticket will expire. (<i>0</i> for <i>false</i> and <i>1</i> for <i>true</i>)</li> |
| 119 | + </ul> |
| 120 | + |
| 121 | + <pre class="bg-secondary border-gray border rounded p-2"><span class="text-primary">{</span> |
| 122 | + <span class="text-warning">"name"</span>: <span class="text-danger">"<assigned_name>"</span>, |
| 123 | + <span class="text-warning">"should_expire"</span>: <span class="text-danger">"<expiring>"</span> |
| 124 | +<span class="text-primary">}</span></pre> |
| 125 | + |
| 126 | + <b>Response Data</b> |
| 127 | + <ul> |
| 128 | + <li><i>value</i> — The ticket string in UUID form for the CDP-accessible file.</li> |
| 129 | + </ul> |
| 130 | + |
| 131 | + <b class="mt-4 mb-2 d-block border-bottom fw-bold">Storage: File Fetch All</b> |
| 132 | + <p>Fetch the assigned name, original file name, mime type, and the checksum of all the uploaded files.</p> |
| 133 | + <pre class="bg-secondary border-gray border rounded p-2">api/index.php?action=file_fetch_all</pre> |
| 134 | + |
| 135 | + <b>Example Payload</b> |
| 136 | + <pre class="bg-secondary border-gray border rounded p-2"><span class="text-primary">{}</span></pre> |
| 137 | + |
| 138 | + <b>Response Data</b> |
| 139 | + <ul> |
| 140 | + <li> |
| 141 | + <i>value</i> — This key will contain a 2D array of all the fetched file information |
| 142 | + <table class="table table-hover"> |
| 143 | + <tr> |
| 144 | + <th>Array Index</th> |
| 145 | + <th>Index Content</th> |
| 146 | + </tr> |
| 147 | + <tr> |
| 148 | + <td>0</td> |
| 149 | + <td>Assigned file name for the fetched file</td> |
| 150 | + </tr> |
| 151 | + <tr> |
| 152 | + <td>1</td> |
| 153 | + <td>Original file name when it was uploaded</td> |
| 154 | + </tr> |
| 155 | + <tr> |
| 156 | + <td>2</td> |
| 157 | + <td>File mime type of the fetched file</td> |
| 158 | + </tr> |
| 159 | + <tr> |
| 160 | + <td>3</td> |
| 161 | + <td>Checksum of the fetched file in MD5 hash</td> |
| 162 | + </tr> |
| 163 | + </table> |
| 164 | + </li> |
| 165 | + </ul> |
| 166 | + |
| 167 | + <b class="mt-4 mb-2 d-block border-bottom fw-bold">CDP: Expire All</b> |
| 168 | + <p>Expire all the tickets generated for the CDP (Content Delivery Page). This action will revoke all the generated tickets including the no expiration tickets.</p> |
| 169 | + <pre class="bg-secondary border-gray border rounded p-2">api/index.php?action=cdp_expire_all</pre> |
| 170 | + |
| 171 | + <b>Example Payload</b> |
| 172 | + <pre class="bg-secondary border-gray border rounded p-2"><span class="text-primary">{}</span></pre> |
| 173 | + |
| 174 | + <b class="mt-4 mb-2 d-block border-bottom fw-bold">CDP: Expire Ticket</b> |
| 175 | + <p>Revoke a specified generated ticket for the CDP (Content Delivery Page).</p> |
| 176 | + <pre class="bg-secondary border-gray border rounded p-2">api/index.php?action=cdp_expire_ticket</pre> |
| 177 | + |
| 178 | + <p>Payload Structure:</p> |
| 179 | + <ul> |
| 180 | + <li><i>id</i> — The generated ticket to be revoked.</li> |
| 181 | + </ul> |
| 182 | + |
| 183 | + <pre class="bg-secondary border-gray border rounded p-2"><span class="text-primary">{</span> |
| 184 | + <span class="text-warning">"ticket"</span>: <span class="text-danger">"<id>"</span> |
| 185 | +<span class="text-primary">}</span></pre> |
| 186 | + |
111 | 187 | <div class="row">
|
112 | 188 | <div class="col-6">
|
113 | 189 | <RouterLink to="/database" class="btn btn-primary">
|
|
0 commit comments