Open an app or an exact draft preview
curl --request GET \
--url https://api.openworklabs.com/v1/apps/{appId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openworklabs.com/v1/apps/{appId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openworklabs.com/v1/apps/{appId}', 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.openworklabs.com/v1/apps/{appId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.openworklabs.com/v1/apps/{appId}"
req, _ := http.NewRequest("GET", 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.get("https://api.openworklabs.com/v1/apps/{appId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/apps/{appId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"view": {
"id": "<string>",
"configObjectId": "<string>",
"title": "<string>",
"description": "<string>",
"status": "active",
"activeRevisionId": "<string>",
"revisions": [
{
"id": "<string>",
"artifactViewId": "<string>",
"resourceUri": "<string>",
"buildStatus": "ready",
"sourceDigest": "<string>",
"resourceDigest": "<string>",
"outputSchemaDigest": "<string>",
"csp": {
"connectDomains": [
"<string>"
],
"resourceDomains": [
"<string>"
],
"frameDomains": [
"<string>"
],
"baseUriDomains": [
"<string>"
]
},
"diagnostics": [
{
"level": "error",
"message": "<string>",
"line": 4503599627370495,
"column": 4503599627370495
}
],
"compilerName": "<string>",
"compilerVersion": "<string>",
"reactVersion": "<string>",
"compiledHtmlBytes": 4503599627370495,
"retiredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"useInWorkflow": true
},
"workflowTitle": "<string>",
"canManage": true,
"onDashboard": true,
"revision": {
"id": "<string>",
"artifactViewId": "<string>",
"resourceUri": "<string>",
"buildStatus": "ready",
"sourceDigest": "<string>",
"resourceDigest": "<string>",
"outputSchemaDigest": "<string>",
"csp": {
"connectDomains": [
"<string>"
],
"resourceDomains": [
"<string>"
],
"frameDomains": [
"<string>"
],
"baseUriDomains": [
"<string>"
]
},
"diagnostics": [
{
"level": "error",
"message": "<string>",
"line": 4503599627370495,
"column": 4503599627370495
}
],
"compilerName": "<string>",
"compilerVersion": "<string>",
"reactVersion": "<string>",
"compiledHtmlBytes": 4503599627370495,
"retiredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
},
"html": "<string>",
"payload": {
"schemaVersion": "1",
"artifact": {
"title": "<string>",
"description": "<string>",
"pluginId": "<string>",
"configObjectId": "<string>",
"configObjectVersionId": "<string>",
"receiptId": "<string>",
"automationRunId": "<string>",
"source": "manual",
"generatedAt": "2023-11-07T05:31:56Z",
"resultDigest": "<string>",
"rendererVersion": "codemode-markdown-v1",
"freshness": {
"state": "never_run"
}
},
"data": "<unknown>"
},
"previewNotice": "<string>"
}Apps
Open an app or an exact draft preview
Returns the app with the compiled HTML of one revision and the artifact payload it should render. Without revisionId the active saved revision is used; pass revisionId to preview an exact draft revision instead. The data comes from the Workflow’s latest successful snapshot, or from the snapshot named by receiptId. When the revision has not finished building, no readable successful result exists, or the result’s output schema no longer matches the revision, html and payload are null and previewNotice explains why.
GET
/
v1
/
apps
/
{appId}
Open an app or an exact draft preview
curl --request GET \
--url https://api.openworklabs.com/v1/apps/{appId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openworklabs.com/v1/apps/{appId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openworklabs.com/v1/apps/{appId}', 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.openworklabs.com/v1/apps/{appId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.openworklabs.com/v1/apps/{appId}"
req, _ := http.NewRequest("GET", 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.get("https://api.openworklabs.com/v1/apps/{appId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/apps/{appId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"view": {
"id": "<string>",
"configObjectId": "<string>",
"title": "<string>",
"description": "<string>",
"status": "active",
"activeRevisionId": "<string>",
"revisions": [
{
"id": "<string>",
"artifactViewId": "<string>",
"resourceUri": "<string>",
"buildStatus": "ready",
"sourceDigest": "<string>",
"resourceDigest": "<string>",
"outputSchemaDigest": "<string>",
"csp": {
"connectDomains": [
"<string>"
],
"resourceDomains": [
"<string>"
],
"frameDomains": [
"<string>"
],
"baseUriDomains": [
"<string>"
]
},
"diagnostics": [
{
"level": "error",
"message": "<string>",
"line": 4503599627370495,
"column": 4503599627370495
}
],
"compilerName": "<string>",
"compilerVersion": "<string>",
"reactVersion": "<string>",
"compiledHtmlBytes": 4503599627370495,
"retiredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"useInWorkflow": true
},
"workflowTitle": "<string>",
"canManage": true,
"onDashboard": true,
"revision": {
"id": "<string>",
"artifactViewId": "<string>",
"resourceUri": "<string>",
"buildStatus": "ready",
"sourceDigest": "<string>",
"resourceDigest": "<string>",
"outputSchemaDigest": "<string>",
"csp": {
"connectDomains": [
"<string>"
],
"resourceDomains": [
"<string>"
],
"frameDomains": [
"<string>"
],
"baseUriDomains": [
"<string>"
]
},
"diagnostics": [
{
"level": "error",
"message": "<string>",
"line": 4503599627370495,
"column": 4503599627370495
}
],
"compilerName": "<string>",
"compilerVersion": "<string>",
"reactVersion": "<string>",
"compiledHtmlBytes": 4503599627370495,
"retiredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
},
"html": "<string>",
"payload": {
"schemaVersion": "1",
"artifact": {
"title": "<string>",
"description": "<string>",
"pluginId": "<string>",
"configObjectId": "<string>",
"configObjectVersionId": "<string>",
"receiptId": "<string>",
"automationRunId": "<string>",
"source": "manual",
"generatedAt": "2023-11-07T05:31:56Z",
"resultDigest": "<string>",
"rendererVersion": "codemode-markdown-v1",
"freshness": {
"state": "never_run"
}
},
"data": "<unknown>"
},
"previewNotice": "<string>"
}Authorizations
bearerAuthdenApiKey
Session token passed as Authorization: Bearer <session-token> for user-authenticated Den routes.
Path Parameters
Query Parameters
Required string length:
1 - 160Required string length:
1 - 160Response
200 - application/json
App preview returned.
Was this page helpful?