API reference / Editing

List editable layers

GET/v1/versions/{versionId}/layers

The text, image and video layers of the version's data.json, each with the layer id that replacements use: in a render or a render batch for a changed video alone, or in an edit to change the project itself (a new head). Also the composition's width and height, its fonts, the version's audio files and its default soundtrack. A text, name, font or asset id longer than 16,383 characters is listed cut to its first 16,383, ending with '…'.

Request

curl -s $BLITFRAME/versions/772c657e-ac9c-4550-8ecf-9f77201cbb95/layers \
  -H "Authorization: Bearer $BLITFRAME_API_KEY"
import os, requests

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

uri = URI(ENV["BLITFRAME"] + '/versions/772c657e-ac9c-4550-8ecf-9f77201cbb95/layers')
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer " + ENV["BLITFRAME_API_KEY"]
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/layers", nil)
	if err != nil {
		panic(err)
	}
	request.Header.Set("Authorization", "Bearer "+os.Getenv("BLITFRAME_API_KEY"))
	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/layers");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("BLITFRAME_API_KEY"));
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/layers"))
            .header("Authorization", "Bearer " + System.getenv("BLITFRAME_API_KEY"))
            .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

Headers

  • AuthorizationBearer Blitframe API keyrequired

    API key from the developer console.

Try it

GET/v1/versions/{versionId}/layers

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 · LayersDto

  • widthinteger
  • heightinteger
  • textLayersarray of TextLayerDto
    TextLayerDto fields
    • layerstring
    • namestring or null
    • textstring
    • fontstring or null
    • fontSizenumber or null
    • textFitboolean
  • imageLayersarray of MediaLayerDto
    MediaLayerDto fields
    • layerstring
    • namestring or null
    • assetIdstring
    • pathstring or null
    • widthinteger
    • heightinteger
  • videoLayersarray of MediaLayerDto
    MediaLayerDto fields
    • layerstring
    • namestring or null
    • assetIdstring
    • pathstring or null
    • widthinteger
    • heightinteger
  • fontsarray of CompositionFontDto
    CompositionFontDto fields
    • namestring
    • familystring
    • stylestring
    • One of project library missing

  • audioFilesarray of string
  • soundtrackAudioTrack or null
    AudioTrack fields
    • pathstring
    • offsetSecondsnumber

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.