Freeze an app's draft as a revision (AS6)
curl --request POST \
--url https://api.eddy.engineer/v1/apps/{id}/revisionsimport requests
url = "https://api.eddy.engineer/v1/apps/{id}/revisions"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.eddy.engineer/v1/apps/{id}/revisions', 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.eddy.engineer/v1/apps/{id}/revisions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.eddy.engineer/v1/apps/{id}/revisions"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/apps/{id}/revisions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/apps/{id}/revisions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"app": "<string>",
"bytes": 123,
"entry": "<string>",
"host": "<string>",
"rev": "<string>",
"scopes": [
"<string>"
],
"url": "<string>"
}Meta
Freeze an app's draft as a revision (AS6)
A revision is the draft frozen by content (`ss.app.rev/1`: the app's id beside its document) and named by the hash of those bytes: the same document is the same revision, and a revision never changes. A draft with any problem is refused 422 APP_INVALID. Answers the revision, its file URL (`/apps/{id}/{rev}/{entry}`, served in an opaque-origin sandbox) and its host page (`/a/{org}/{id}?rev=`). Freezing the draft is an editor's preview (403 PROJECT_FORBIDDEN for a viewer, who runs published versions, AS15). The reply's `version` is the draft's save counter, not a published v<n>.
POST
/
v1
/
apps
/
{id}
/
revisions
Freeze an app's draft as a revision (AS6)
curl --request POST \
--url https://api.eddy.engineer/v1/apps/{id}/revisionsimport requests
url = "https://api.eddy.engineer/v1/apps/{id}/revisions"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.eddy.engineer/v1/apps/{id}/revisions', 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.eddy.engineer/v1/apps/{id}/revisions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.eddy.engineer/v1/apps/{id}/revisions"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/apps/{id}/revisions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/apps/{id}/revisions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"app": "<string>",
"bytes": 123,
"entry": "<string>",
"host": "<string>",
"rev": "<string>",
"scopes": [
"<string>"
],
"url": "<string>"
}