API reference / Projects

Get a version export

GET/v1/versions/{versionId}/export/{exportId}

Status (queued, building, ready or failed) and, once ready, a download URL valid for up to an hour. Send Prefer: wait=N (at most 50) to hold the answer until the export is ready or failed, or N seconds pass.

Request

curl -s $BLITFRAME/versions/772c657e-ac9c-4550-8ecf-9f77201cbb95/export/d95d714c-4298-4688-8a1b-fad6b23af6c2 \
  -H "Authorization: Bearer $BLITFRAME_API_KEY" \
  -H "Prefer: wait=50"
import os, requests

response = requests.get(
    f"{os.environ['BLITFRAME']}/versions/772c657e-ac9c-4550-8ecf-9f77201cbb95/export/d95d714c-4298-4688-8a1b-fad6b23af6c2",
    headers={"Authorization": f"Bearer {os.environ['BLITFRAME_API_KEY']}", "Prefer": "wait=50"},
)
print(response.json())
const response = await fetch(`${process.env.BLITFRAME}/versions/772c657e-ac9c-4550-8ecf-9f77201cbb95/export/d95d714c-4298-4688-8a1b-fad6b23af6c2`, {
  headers: { Authorization: `Bearer ${process.env.BLITFRAME_API_KEY}`, Prefer: "wait=50" },
});
console.log(await response.json());
<?php
$request = curl_init(getenv("BLITFRAME") . "/versions/772c657e-ac9c-4550-8ecf-9f77201cbb95/export/d95d714c-4298-4688-8a1b-fad6b23af6c2");
curl_setopt_array($request, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("BLITFRAME_API_KEY"),
        "Prefer: wait=50",
    ],
]);
$response = curl_exec($request);
echo $response;
require "net/http"

uri = URI(ENV["BLITFRAME"] + '/versions/772c657e-ac9c-4550-8ecf-9f77201cbb95/export/d95d714c-4298-4688-8a1b-fad6b23af6c2')
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer " + ENV["BLITFRAME_API_KEY"]
request['Prefer'] = 'wait=50'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	request, err := http.NewRequest("GET", os.Getenv("BLITFRAME")+"/versions/772c657e-ac9c-4550-8ecf-9f77201cbb95/export/d95d714c-4298-4688-8a1b-fad6b23af6c2", nil)
	if err != nil {
		panic(err)
	}
	request.Header.Set("Authorization", "Bearer "+os.Getenv("BLITFRAME_API_KEY"))
	request.Header.Set("Prefer", "wait=50")
	response, err := http.DefaultClient.Do(request)
	if err != nil {
		panic(err)
	}
	defer response.Body.Close()
	text, _ := io.ReadAll(response.Body)
	fmt.Println(string(text))
}
using System.Net.Http.Headers;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get,
    Environment.GetEnvironmentVariable("BLITFRAME") + "/versions/772c657e-ac9c-4550-8ecf-9f77201cbb95/export/d95d714c-4298-4688-8a1b-fad6b23af6c2");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("BLITFRAME_API_KEY"));
request.Headers.Add("Prefer", "wait=50");
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        var request = HttpRequest.newBuilder(URI.create(System.getenv("BLITFRAME") + "/versions/772c657e-ac9c-4550-8ecf-9f77201cbb95/export/d95d714c-4298-4688-8a1b-fad6b23af6c2"))
            .header("Authorization", "Bearer " + System.getenv("BLITFRAME_API_KEY"))
            .header("Prefer", "wait=50")
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();
        var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}

Path parameters

  • versionIdstring (uuid)required
  • exportIdstring (uuid)required

Headers

  • AuthorizationBearer Blitframe API keyrequired

    API key from the developer console.

  • Preferstring

Try it

GET/v1/versions/{versionId}/export/{exportId}

Used for the requests you send from this page only. It is not saved.

This sends a real request to your workspace: a render spends render seconds, and a delete is final.

Response

Send the request to see the answer here.

Responses

  • 200 OK

application/json · VersionExportDto

  • idstring (uuid)
  • versionIdstring (uuid)
  • One of queued building ready failed

  • fileNamestring
  • urlstring or null
  • sizeBytesinteger (int64) or null
  • errorApiError or null
    ApiError fields
    • codestring
    • messagestring
  • createdAtstring (date-time)
  • finishedAtstring (date-time) or null
  • expiresAtstring (date-time)

Errors

  • 400 Bad Request
  • 401 Unauthorized
  • 404 Not Found
  • 429 Too Many Requests

application/json · ErrorResponse

  • ApiError fields
    • codestring
    • messagestring

Errors lists the error codes and says when to retry.