Upload a hosted version
curl --request POST \
--url https://api.reintersect.com/v0/apps/{appId}/versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reintersect.com/v0/apps/{appId}/versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reintersect.com/v0/apps/{appId}/versions', 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.reintersect.com/v0/apps/{appId}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.reintersect.com/v0/apps/{appId}/versions"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.reintersect.com/v0/apps/{appId}/versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reintersect.com/v0/apps/{appId}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyDeploy
Upload a hosted version
Upload a Workers bundle and its manifest as a new version of a hosted app.
POST
/
v0
/
apps
/
{appId}
/
versions
Upload a hosted version
curl --request POST \
--url https://api.reintersect.com/v0/apps/{appId}/versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reintersect.com/v0/apps/{appId}/versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reintersect.com/v0/apps/{appId}/versions', 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.reintersect.com/v0/apps/{appId}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.reintersect.com/v0/apps/{appId}/versions"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.reintersect.com/v0/apps/{appId}/versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reintersect.com/v0/apps/{appId}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
Creates a version of a Reintersect-hosted app from a bundle and publishes it to the target. The CLI’s
reintersect deploy calls this for hosted apps.
Authenticate with a member API key of the app’s owner or of a workspace owner or admin, a deploy
token for this app, or an agent builder token for an app the member owns. Any other caller gets
ReintersectAppNotFoundError.
Body
multipart/form-data with:
| Part | Description |
|---|---|
bundle | The ES module bundle (app.mjs, application/javascript+module), at most 10 MB. |
manifest | The manifest as JSON. |
compatDate | The Workers compatibility date, YYYY-MM-DD. |
target | preview or production. |
Response
The version:| Field | Description |
|---|---|
id | The version id. |
appId | The app. |
number | The version number, increasing per app. |
status | preview, published or superseded. |
target | preview or production. |
manifestHash | A hash of the manifest. |
bundleSha | The bundle’s SHA-256, or null for self-hosted apps. |
reconsentRequired | true when some installs wait for an admin to approve new access. |
playgroundUrl | The playground link for a preview, or null. |
createdAt | ISO 8601. |
Errors
_tag | Status | Cause |
|---|---|---|
ReintersectAppNotFoundError | 404 | No such app, or you may not deploy it. |
ReintersectAppDeployTargetForbiddenError | 403 | A preview-only deploy token or an agent builder token asked for production. |
ReintersectAppManifestInvalidError | 422 | The manifest breaks a rule; reason says which. See Manifest validation. |
ReintersectAppPatternInvalidError | 422 | A reference pattern is invalid; reason says why. |
ReintersectAppBundleInvalidError | 422 | The bundle is empty, too large or not a module. |