Die Downloads-API gibt die Liste der Downloads zurück, die von den Nutzern des jeweiligen Kontos vorbereitet wurden:
URL: https://orbitvu.co/api/v1/downloads [.json|.xml]
Methode: GET
<p>{
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "created_at": "2018-08-08T14:54:57",
            "file_name": "kNYSKJPWkwqmyx66Dug3PU.zip",
            "complete": true,
            "viewer": "ORBITVU VIEWER My360",
            "presentations": [
                "xyzxyzxyzxyzxyzXYZ1233"
            ],
            "url": "https://orbitvu.co/api/v1/downloads/1",
            "download_url": "https://orbitvu.co/api/v1/downloads/1/download",
            "user_email": "[email protected]",
            "user_url": "https://orbitvu.co/api/v1/account/users/1"
        },
        {
            "created_at": "2018-08-08T11:44:30",
            "file_name": "jqYpnFNsjKuok22XGrFx4G.zip",
            "complete": true,
            "viewer": "ORBITVU VIEWER Free360",
            "presentations": [
                "xyzxyzxyzxyzxyzXYZ1234",
                "xyzxyzxyzxyzxyzXYZ1235",
                "xyzxyzxyzxyzxyzXYZ1236",
                "xyzxyzxyzxyzxyzXYZ1237"
            ],
            "url": "https://orbitvu.co/api/v1/downloads/2",
            "download_url": "https://orbitvu.co/api/v1/downloads/2/download",
            "user_email": "[email protected]",
            "user_url": "https://orbitvu.co/api/v1/account/users/2"
        }]
}</p>Suche
- exakt
 Suche nach Abschlussstatus oder nach UID der Präsentation
<p># match downloads that are completed
https://orbitvu.co/api/v1/downloads.json?complete=true
# match downloads that are not yet completed
https://orbitvu.co/api/v1/downloads.json?complete=false
# match downloads containing presentation with uid xyzxyzxyzxyzxyzXYZ1235
https://orbitvu.co/api/v1/downloads.json?uid=xyzxyzxyzxyzxyzXYZ1235</p>Sortierung
sortiert nach: created_at, complete
<p># ascending
https://orbitvu.co/api/v1/downloads/?ordering=created_at
https://orbitvu.co/api/v1/downloads/?ordering=complete
# descending
https://orbitvu.co/api/v1/downoads/?ordering=-created_at
https://orbitvu.co/api/v1/downloads/?ordering=-complete</p>Neuen Download erstellen
Initialisiert die Erstellung des neuen Download-Objekts. Das Download-Objekt besteht aus einer oder mehreren Präsentationen, dem Orbitvu Viewer und HTML-Dateien.
URL: https://orbitvu.co/api/v1/downloads [.json|.xml]
Methode: POST
Parameter:
- viewer_license_id - erforderlich; ID des Orbitvu-Viewers, der mit der/den Präsentation(en) heruntergeladen werden soll (kann dem API-Endpunkt des Viewers entnommen werden)
- presentation_ids - erforderlich; ids der herunterzuladenden Präsentationen
- format_flat - 1 oder 0 - Archivformat
- extra_emails - durch Kommas getrennte Liste von E-Mail-Adressen, die einen Download-Link erhalten
Zurückgegebene Werte:
id - Download ID
message - Nachricht
status - OK | ERROR
Beispiel (Python) Code:
<p>import requests
requests.post(
    'https://orbitvu.co/api/v1/downloads.json',
    data={'viewer_license_id': 1, 'presentation_ids': [1, 2]},
    headers={'Authorization': 'token xxxxxxxxxxxxxxxxxxxx'})</p>Beispiel PHP Code:
<p>5, 'ordering' => 'sku']); 
// GET VIEWER LICENSES
$viewerLicenses = callApi("https://orbitvu.co/api/v1/account/viewers");
if ($viewerLicenses && $presentations['results']) {
    // choose first presentation to download
    $prToDownload = $presentations['results'][1]; 
    // choose another presentation to download
    $prToDownload2 = $presentations['results'][4]; 
    // choose some viewer license
    $vLicense = $viewerLicenses[0];  
    // set request data
    $data =  "viewer_license_id=".$vLicense['id']."&presentation_ids=".$prToDownload['id']."&presentation_ids=".$prToDownload2['id'];
    // generate downloads
    $download = callApi("https://orbitvu.co/api/v1/downloads", [], 'post', $data); 
}
</p>Download Details
Gibt Details eines bestimmten Downloads zurück
URL: https://orbitvu.co/api/v1/downloads/<id>/ [.json|.xml]
Methode: GET
Zurückgegebene Beispieldaten:
<p>{
    "created_at": "2018-08-08T11:44:30",
    "file_name": "jqYpnFNsjKuok22XGrFx4G.zip",
    "complete": true,
    "viewer": "ORBITVU VIEWER Free360",
    "presentations": [
        "xyzxyzxyzxyzxyzXYZ1234",
        "xyzxyzxyzxyzxyzXYZ1235",
        "xyzxyzxyzxyzxyzXYZ1236",
        "xyzxyzxyzxyzxyzXYZ1237"
    ],
    "url": "https://orbitvu.co/api/v1/downloads/2",
    "download_url": "https://orbitvu.co/api/v1/downloads/2/download",
    "user_email": "[email protected]",
    "user_url": "https://orbitvu.co/api/v1/account/users/2"
}</p>Download löschen
Löschen Sie ein bestimmtes Download-Objekt, das durch die ID identifiziert wird
URL: https://orbitvu.co/api/v1/downloads/<id>/ [.json|.xml]
Methode: DELETE
Zurückgegebener Code: 204 (kein Inhalt)
Beispiel Python Code:
<p>import requests
requests.delete('https://orbitvu.co/api/v1/downloads/1/.json', headers={'Authorization': 'token xxxxxxxxxxxxxxxxxxxxxx'})
</p>