curl --request GET \
--url https://api.tastelabs.com/design/submissions/{id}/result \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tastelabs.com/design/submissions/{id}/result"
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.tastelabs.com/design/submissions/{id}/result', 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.tastelabs.com/design/submissions/{id}/result",
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.tastelabs.com/design/submissions/{id}/result"
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.tastelabs.com/design/submissions/{id}/result")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tastelabs.com/design/submissions/{id}/result")
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{
"submission_id": "<string>",
"status": "<string>",
"source_url": "<string>",
"extraction_id": "<string>",
"current_step": "<string>",
"step_started_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"result_updated_at": "2023-11-07T05:31:56Z",
"cache_hit": true,
"accepted_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"result": {
"design_system": {},
"artifacts": {
"html": {
"path": "<string>",
"url": "<string>",
"content_type": "<string>"
},
"css": {
"path": "<string>",
"url": "<string>",
"content_type": "<string>"
},
"screenshot": {
"path": "<string>",
"url": "<string>",
"content_type": "<string>"
},
"full_page_screenshot": {
"path": "<string>",
"url": "<string>",
"content_type": "<string>"
},
"element_layout": {
"path": "<string>",
"url": "<string>",
"content_type": "<string>"
}
}
}
}{
"detail": {
"error": "NOT_FOUND",
"message": "Submission not found"
}
}{
"detail": {
"error": "NOT_READY",
"message": "Result is not ready yet."
}
}{
"detail": {
"error": "INVALID_REQUEST",
"message": "Unknown section name."
}
}"Internal Server Error"Get submission result
Returns the unified result envelope for a submission, including the extracted design system and stored artifacts.
Results stream in: while the job runs you may receive a 200 with a partial design_system, and before the first checkpoint lands you receive 409 NOT_READY. Keep polling until status is completed or failed.
Use sections to narrow result.design_system to the sections you actually read. The full document is large, and assets and layout are commonly most of it.
curl --request GET \
--url https://api.tastelabs.com/design/submissions/{id}/result \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tastelabs.com/design/submissions/{id}/result"
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.tastelabs.com/design/submissions/{id}/result', 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.tastelabs.com/design/submissions/{id}/result",
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.tastelabs.com/design/submissions/{id}/result"
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.tastelabs.com/design/submissions/{id}/result")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tastelabs.com/design/submissions/{id}/result")
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{
"submission_id": "<string>",
"status": "<string>",
"source_url": "<string>",
"extraction_id": "<string>",
"current_step": "<string>",
"step_started_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"result_updated_at": "2023-11-07T05:31:56Z",
"cache_hit": true,
"accepted_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"result": {
"design_system": {},
"artifacts": {
"html": {
"path": "<string>",
"url": "<string>",
"content_type": "<string>"
},
"css": {
"path": "<string>",
"url": "<string>",
"content_type": "<string>"
},
"screenshot": {
"path": "<string>",
"url": "<string>",
"content_type": "<string>"
},
"full_page_screenshot": {
"path": "<string>",
"url": "<string>",
"content_type": "<string>"
},
"element_layout": {
"path": "<string>",
"url": "<string>",
"content_type": "<string>"
}
}
}
}{
"detail": {
"error": "NOT_FOUND",
"message": "Submission not found"
}
}{
"detail": {
"error": "NOT_READY",
"message": "Result is not ready yet."
}
}{
"detail": {
"error": "INVALID_REQUEST",
"message": "Unknown section name."
}
}"Internal Server Error"Authorizations
API key issued by the Taste Engine. Create one in the dashboard at https://engine.tastelabs.com/app/api-keys.
Path Parameters
The submission_id returned when the submission was created.
Query Parameters
Comma-separated list of design-system sections to include, e.g. ?sections=colors,typography. Omit for the full design system. Only result.design_system is filtered: the envelope and result.artifacts are always returned. An unknown section name returns 422.
A top-level section of result.design_system.
profile, layout, colors, typography, surfaces, elevation, interactions, actions, navigation, data_display, structure, icons, assets, sections Response
The result envelope. May be partial while later steps complete.
Unified result envelope. May be partial while later steps complete.
Submission status, e.g. completed or failed.
Identifier of the extraction this submission produced. null until one exists.
Whether the result was served from cache. When true, completed_at reflects the original extraction, not this request.
When the extraction completed: the freshness of the result. On a cache hit (cache_hit is true) this is the original extraction, not the current request, so it may predate this request. null while the submission is still running.
Show child attributes
Show child attributes
Was this page helpful?

