Editor
Unpublished changes diff
Compare the variant’s draft state (files, settings, quizzes, A/B traffic weights) against its live published state and return a git-like diff: added, modified and deleted entries, with unified hunks and per-line changes for text content. Returns 400 if the lander is not published or has no changes to be published.
GET
/
api
/
v2
/
workspaces
/
{workspaceId}
/
editors
/
{variantId}
/
changes
Unpublished changes diff
curl --request GET \
--url https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"summary": {
"added": 123,
"modified": 123,
"deleted": 123,
"additions": 123,
"deletions": 123,
"settingsChanged": true,
"quizzesChanged": 123,
"abTestChanged": 123
},
"files": [
{
"path": "<string>",
"status": "added",
"binary": true,
"additions": 123,
"deletions": 123,
"diffTooLarge": true,
"hunks": [
{
"oldStart": 123,
"oldLines": 123,
"newStart": 123,
"newLines": 123,
"lines": [
{
"type": "context",
"content": "<string>",
"oldLine": 123,
"newLine": 123,
"ranges": [
[
123,
123
]
]
}
]
}
]
}
],
"settings": {
"status": "added",
"additions": 123,
"deletions": 123,
"diffTooLarge": true,
"hunks": [
{
"oldStart": 123,
"oldLines": 123,
"newStart": 123,
"newLines": 123,
"lines": [
{
"type": "context",
"content": "<string>",
"oldLine": 123,
"newLine": 123,
"ranges": [
[
123,
123
]
]
}
]
}
]
},
"quizzes": [
{
"id": "<string>",
"name": "<string>",
"status": "added",
"additions": 123,
"deletions": 123,
"diffTooLarge": true,
"hunks": [
{
"oldStart": 123,
"oldLines": 123,
"newStart": 123,
"newLines": 123,
"lines": [
{
"type": "context",
"content": "<string>",
"oldLine": 123,
"newLine": 123,
"ranges": [
[
123,
123
]
]
}
]
}
]
}
],
"abTest": [
{
"variantId": 123,
"name": "<string>",
"encryptedId": "<string>",
"liveWeight": 123,
"draftWeight": 123,
"status": "added"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
API key with ll_live_ prefix
Path Parameters
Was this page helpful?
⌘I
Unpublished changes diff
curl --request GET \
--url https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.landerlab.dev/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"summary": {
"added": 123,
"modified": 123,
"deleted": 123,
"additions": 123,
"deletions": 123,
"settingsChanged": true,
"quizzesChanged": 123,
"abTestChanged": 123
},
"files": [
{
"path": "<string>",
"status": "added",
"binary": true,
"additions": 123,
"deletions": 123,
"diffTooLarge": true,
"hunks": [
{
"oldStart": 123,
"oldLines": 123,
"newStart": 123,
"newLines": 123,
"lines": [
{
"type": "context",
"content": "<string>",
"oldLine": 123,
"newLine": 123,
"ranges": [
[
123,
123
]
]
}
]
}
]
}
],
"settings": {
"status": "added",
"additions": 123,
"deletions": 123,
"diffTooLarge": true,
"hunks": [
{
"oldStart": 123,
"oldLines": 123,
"newStart": 123,
"newLines": 123,
"lines": [
{
"type": "context",
"content": "<string>",
"oldLine": 123,
"newLine": 123,
"ranges": [
[
123,
123
]
]
}
]
}
]
},
"quizzes": [
{
"id": "<string>",
"name": "<string>",
"status": "added",
"additions": 123,
"deletions": 123,
"diffTooLarge": true,
"hunks": [
{
"oldStart": 123,
"oldLines": 123,
"newStart": 123,
"newLines": 123,
"lines": [
{
"type": "context",
"content": "<string>",
"oldLine": 123,
"newLine": 123,
"ranges": [
[
123,
123
]
]
}
]
}
]
}
],
"abTest": [
{
"variantId": 123,
"name": "<string>",
"encryptedId": "<string>",
"liveWeight": 123,
"draftWeight": 123,
"status": "added"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}