### Get Test User with Python Source: https://docs.buildprint.ai/api-reference/documentation/test-users/get-api-public-v1-test-users-test-user-id This Python example uses the `requests` library to perform a GET request for test user information. It shows how to set up the URL, headers, and print the response. ```python import requests url = "https://api.buildprint.ai/api/public/v1/test-users/{TESTUSERID}" headers = { "Authorization": "Bearer YOUR_SECRET_TOKEN", } response = requests.request("GET", url, headers=headers) print(response.status_code) print(response.text) ``` -------------------------------- ### Start Agent Run Request Example (cURL) Source: https://docs.buildprint.ai/api-reference/documentation/agents/post-api-public-v1-agents Use this cURL command to send a POST request to start an agent run. Ensure you replace YOUR_SECRET_TOKEN with your actual Bearer token and provide the necessary JSON data in the request body. ```bash curl --request POST \ --url 'https://api.buildprint.ai/api/public/v1/agents' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ \ "key": "value" \ }' ``` -------------------------------- ### Get Code Reviews with Python Source: https://docs.buildprint.ai/api-reference/documentation/code-reviews/get-api-public-v1-code-reviews This Python example uses the requests library to retrieve code reviews. It demonstrates setting up the URL, headers, and making the GET request. Replace YOUR_SECRET_TOKEN with your token. ```python import requests url = "https://api.buildprint.ai/api/public/v1/code-reviews?appId=%3Cstring%3E&limit=100" headers = { "Authorization": "Bearer YOUR_SECRET_TOKEN", } response = requests.request("GET", url, headers=headers) print(response.status_code) print(response.text) ``` -------------------------------- ### Get Test Run Details with Go Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/get-api-public-v1-test-runs-run-id Make a GET request to fetch test run details using Go's standard net/http package. This example includes error handling for the request creation, execution, and response body reading. ```go package main import ( "fmt" "io" "net/http" ) func main() { req, err := http.NewRequest("GET", "https://api.buildprint.ai/api/public/v1/test-runs/{RUNID}", nil) if err != nil { panic(err) } req.Header.Set("Authorization", "Bearer YOUR_SECRET_TOKEN") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Println("Status:", resp.Status) fmt.Println(string(body)) } ``` -------------------------------- ### Test Run Started Response Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/post-api-public-v1-test-runs This is an example of a successful response when a test run is started. It contains the unique identifier for the newly created run. ```json { "runId": "" } ``` -------------------------------- ### Install Gemini CLI Source: https://docs.buildprint.ai/connect-chatgpt-claude-gemini-subscription-jx3bk Install the Gemini CLI globally using npm. This is required to connect your Gemini subscription to Buildprint. ```bash npm install -g @google/gemini-cli ``` -------------------------------- ### Get Code Reviews with Java Source: https://docs.buildprint.ai/api-reference/documentation/code-reviews/get-api-public-v1-code-reviews This Java example demonstrates fetching code reviews using the built-in HttpClient. It sets up the request with the correct URI and Authorization header. Replace YOUR_SECRET_TOKEN with your token. ```java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class ApiExample { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://api.buildprint.ai/api/public/v1/code-reviews?appId=%3Cstring%3E&limit=100")) .header("Authorization", "Bearer YOUR_SECRET_TOKEN") .method("GET", HttpRequest.BodyPublishers.noBody()); HttpResponse response = client.send( requestBuilder.build(), HttpResponse.BodyHandlers.ofString() ); System.out.println("Status: " + response.statusCode()); System.out.println(response.body()); } } ``` -------------------------------- ### Get Test Users via Java Source: https://docs.buildprint.ai/api-reference/documentation/test-users/get-api-public-v1-test-users This Java example demonstrates fetching test users using the HttpClient. Remember to replace the appId and YOUR_SECRET_TOKEN. ```java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class ApiExample { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://api.buildprint.ai/api/public/v1/test-users?appId=%3Cstring%3E")) .header("Authorization", "Bearer YOUR_SECRET_TOKEN") .method("GET", HttpRequest.BodyPublishers.noBody()); HttpResponse response = client.send( requestBuilder.build(), HttpResponse.BodyHandlers.ofString() ); System.out.println("Status: " + response.statusCode()); System.out.println(response.body()); } } ``` -------------------------------- ### Get Test Run Details with Java Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/get-api-public-v1-test-runs-run-id Retrieve test run details using Java's built-in HttpClient. This example demonstrates building an HTTP GET request with the necessary Authorization header and handling the response. ```java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class ApiExample { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://api.buildprint.ai/api/public/v1/test-runs/{RUNID}")) .header("Authorization", "Bearer YOUR_SECRET_TOKEN") .method("GET", HttpRequest.BodyPublishers.noBody()); HttpResponse response = client.send( requestBuilder.build(), HttpResponse.BodyHandlers.ofString() ); System.out.println("Status: " + response.statusCode()); System.out.println(response.body()); } } ``` -------------------------------- ### Get Tests with JavaScript Source: https://docs.buildprint.ai/api-reference/documentation/tests/get-api-public-v1-tests This JavaScript example demonstrates how to fetch test data using the Fetch API. Remember to include your authorization token and specify the appId. ```javascript const response = await fetch("https://api.buildprint.ai/api/public/v1/tests?appId=%3Cstring%3E", { method: 'GET', headers: { "Authorization": "Bearer YOUR_SECRET_TOKEN" } }); console.log(`Status: ${response.status}`); console.log(await response.text()); ``` -------------------------------- ### Get Test Run Details with PHP Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/get-api-public-v1-test-runs-run-id Retrieve test run details using PHP's cURL extension. This example configures the cURL options for the GET request, including the URL and Authorization header, then executes the request and outputs the status code and response. ```php 'https://api.buildprint.ai/api/public/v1/test-runs/{RUNID}', CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'Authorization: Bearer YOUR_SECRET_TOKEN', ], ]); $response = curl_exec($ch); $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo "Status: " . $statusCode . PHP_EOL; echo $response; ``` -------------------------------- ### Get Tests with Java Source: https://docs.buildprint.ai/api-reference/documentation/tests/get-api-public-v1-tests This Java example utilizes the built-in HttpClient to fetch test data. Ensure you handle potential IO and InterruptedException. ```java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class ApiExample { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://api.buildprint.ai/api/public/v1/tests?appId=%3Cstring%3E")) .header("Authorization", "Bearer YOUR_SECRET_TOKEN") .method("GET", HttpRequest.BodyPublishers.noBody()); HttpResponse response = client.send( requestBuilder.build(), HttpResponse.BodyHandlers.ofString() ); System.out.println("Status: " + response.statusCode()); System.out.println(response.body()); } } ``` -------------------------------- ### Install Buildprint CLI Source: https://docs.buildprint.ai/cli/installation-and-authentication-iwixh Install the Buildprint CLI globally using npm. This command makes the buildprint executable available in your terminal. ```bash npm install -g buildprint ``` -------------------------------- ### Get Automations (Java) Source: https://docs.buildprint.ai/api-reference/documentation/automations/get-api-public-v1-automations Example of how to fetch automations using Java's built-in HttpClient. This code sets the Authorization header and prints the response status and body. Ensure placeholders are updated. ```java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class ApiExample { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://api.buildprint.ai/api/public/v1/automations?appId=%3Cstring%3E")) .header("Authorization", "Bearer YOUR_SECRET_TOKEN") .method("GET", HttpRequest.BodyPublishers.noBody()); HttpResponse response = client.send( requestBuilder.build(), HttpResponse.BodyHandlers.ofString() ); System.out.println("Status: " + response.statusCode()); System.out.println(response.body()); } } ``` -------------------------------- ### Get Test Run Details with JavaScript (Fetch API) Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/get-api-public-v1-test-runs-run-id Fetch test run details using the JavaScript Fetch API. This example shows how to set the request method, URL, and the required Authorization header. It logs the response status and body to the console. ```javascript const response = await fetch("https://api.buildprint.ai/api/public/v1/test-runs/{RUNID}", { method: 'GET', headers: { "Authorization": "Bearer YOUR_SECRET_TOKEN" } }); console.log(`Status: ${response.status}`); console.log(await response.text()); ``` -------------------------------- ### Create Test Run using Go Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/post-api-public-v1-test-runs Employ Go's net/http package to construct and send a POST request with the necessary headers and body. ```go package main import ( "fmt" "io" "net/http" "strings" ) func main() { payload := `{ "key": "value" }` req, err := http.NewRequest("POST", "https://api.buildprint.ai/api/public/v1/test-runs", strings.NewReader(payload)) if err != nil { panic(err) } req.Header.Set("Authorization", "Bearer YOUR_SECRET_TOKEN") req.Header.Set("Content-Type", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Println("Status:", resp.Status) fmt.Println(string(body)) ``` -------------------------------- ### Successful Response Example Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/post-api-public-v1-test-group-runs This is an example of a successful response when a test group run is started. It contains the opaque identifier for the grouped project test run. ```json { "groupRunId": "" } ``` -------------------------------- ### Install Buildprint MCP Server Source: https://docs.buildprint.ai/cli/installation-and-authentication-iwixh Install the Buildprint MCP server, which is designed to work alongside the Buildprint CLI. Replace with your specific client identifier. Use `buildprint mcp --help` for more detailed instructions. ```bash buildprint mcp install --client ``` -------------------------------- ### Get API Version Status with Java Source: https://docs.buildprint.ai/api-reference/documentation/versions/get-api-public-v1-versions-status Use Java's HttpClient to get the API version status. This example demonstrates building the request, setting headers, and handling the response. ```java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class ApiExample { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://api.buildprint.ai/api/public/v1/versions/status?appId=%3Cstring%3E&versionId=%3Cstring%3E")) .header("Authorization", "Bearer YOUR_SECRET_TOKEN") .method("GET", HttpRequest.BodyPublishers.noBody()); HttpResponse response = client.send( requestBuilder.build(), HttpResponse.BodyHandlers.ofString() ); System.out.println("Status: " + response.statusCode()); System.out.println(response.body()); } } ``` -------------------------------- ### Create Agent using Go Source: https://docs.buildprint.ai/api-reference/documentation/agents/post-api-public-v1-agents This Go program illustrates how to create an agent using the net/http package. It constructs an HTTP POST request with the required headers and JSON payload, then prints the response status and body. ```go package main import ( "fmt" "io" "net/http" "strings" ) func main() { payload := `{ "key": "value" }` req, err := http.NewRequest("POST", "https://api.buildprint.ai/api/public/v1/agents", strings.NewReader(payload)) if err != nil { panic(err) } req.Header.Set("Authorization", "Bearer YOUR_SECRET_TOKEN") req.Header.Set("Content-Type", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Println("Status:", resp.Status) fmt.Println(string(body)) } ``` -------------------------------- ### Workflow Folder Structure Example Source: https://docs.buildprint.ai/cli/filesystem-jn9sk Illustrates the directory structure for workflow folders, including config files and individual workflows. ```text api/ / config.json # { "name": "Billing" } / workflow.json actions/0.json / # workflow with no parent folder workflow.json actions/0.json ``` -------------------------------- ### Create Test Run using Ruby Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/post-api-public-v1-test-runs Leverage Ruby's Net::HTTP library to establish a connection and send a POST request with authentication. ```ruby require 'uri' require 'net/http' uri = URI("https://api.buildprint.ai/api/public/v1/test-runs") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = uri.scheme == 'https' request = Net::HTTP::Post.new(uri) request["Authorization"] = 'Bearer YOUR_SECRET_TOKEN' request["Content-Type"] = 'application/json' request.body = '{ "key": "value" }' response = http.request(request) puts "Status: #{response.code}" puts response.body ``` -------------------------------- ### Get Code Review Request Example Source: https://docs.buildprint.ai/api-reference/documentation/code-reviews/get-api-public-v1-code-reviews-review-id Use this cURL command to make a GET request to retrieve a code review. Replace `{REVIEWID}` with the actual review ID and `YOUR_SECRET_TOKEN` with your Bearer token. ```bash curl --request GET \ --url 'https://api.buildprint.ai/api/public/v1/code-reviews/{REVIEWID}' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### Get Test Group Request Example Source: https://docs.buildprint.ai/api-reference/documentation/test-groups/get-api-public-v1-test-groups-group-id Use this cURL command to make a GET request to retrieve a specific test group. Replace `{GROUPID}` with the actual ID and `YOUR_SECRET_TOKEN` with your API token. ```bash curl --request GET \ --url 'https://api.buildprint.ai/api/public/v1/test-groups/{GROUPID}' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### Create Test Run using Java Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/post-api-public-v1-test-group-runs This Java example demonstrates creating a test run using the built-in HttpClient. Ensure the Authorization header includes your secret token and the Content-Type is set to application/json. ```java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class ApiExample { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://api.buildprint.ai/api/public/v1/test-group-runs")) .header("Authorization", "Bearer YOUR_SECRET_TOKEN") .header("Content-Type", "application/json") .method("POST", HttpRequest.BodyPublishers.ofString("{\n \"key\": \"value\"\n}")); HttpResponse response = client.send( requestBuilder.build(), HttpResponse.BodyHandlers.ofString() ); System.out.println("Status: " + response.statusCode()); System.out.println(response.body()); } } ``` -------------------------------- ### Get API Version Status with Dart Source: https://docs.buildprint.ai/api-reference/documentation/versions/get-api-public-v1-versions-status Fetch the API version status using Dart's http package. This asynchronous example sends a GET request and prints the status code and body. ```dart import 'package:http/http.dart' as http; Future main() async { final url = Uri.parse("https://api.buildprint.ai/api/public/v1/versions/status?appId=%3Cstring%3E&versionId=%3Cstring%3E"); final request = http.Request("GET", url); request.headers.addAll({ "Authorization": "Bearer YOUR_SECRET_TOKEN", }); final streamed = await request.send(); final response = await http.Response.fromStream(streamed); print('Status: ${response.statusCode}'); print(response.body); } ``` -------------------------------- ### Create Test User with Go Source: https://docs.buildprint.ai/api-reference/documentation/test-users/post-api-public-v1-test-users Use Go's net/http package to construct and send a POST request to create a test user. The request body must be a string reader. ```go package main import ( "fmt" "io" "net/http" "strings" ) func main() { payload := `{ "key": "value" }` req, err := http.NewRequest("POST", "https://api.buildprint.ai/api/public/v1/test-users", strings.NewReader(payload)) if err != nil { panic(err) } req.Header.Set("Authorization", "Bearer YOUR_SECRET_TOKEN") req.Header.Set("Content-Type", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Println("Status:", resp.Status) fmt.Println(string(body)) } ``` -------------------------------- ### Get Agent Details (Go) Source: https://docs.buildprint.ai/api-reference/documentation/agents/get-api-public-v1-agents-agent-id Make a GET request to fetch agent details using Go's standard http package. Replace placeholders for AGENTID and YOUR_SECRET_TOKEN. The historyLimit query parameter is included as an example. ```go package main import ( "fmt" "io" "net/http" ) func main() { req, err := http.NewRequest("GET", "https://api.buildprint.ai/api/public/v1/agents/{AGENTID}?historyLimit=100", nil) if err != nil { panic(err) } req.Header.Set("Authorization", "Bearer YOUR_SECRET_TOKEN") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Println("Status:", resp.Status) fmt.Println(string(body)) } ``` -------------------------------- ### Get Test Details with Java Source: https://docs.buildprint.ai/api-reference/documentation/tests/get-api-public-v1-tests-test-id Example of retrieving test details in Java using `java.net.http.HttpClient`. Remember to update `{TESTID}` and `YOUR_SECRET_TOKEN`. ```java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class ApiExample { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://api.buildprint.ai/api/public/v1/tests/{TESTID}")) .header("Authorization", "Bearer YOUR_SECRET_TOKEN") .method("GET", HttpRequest.BodyPublishers.noBody()); HttpResponse response = client.send( requestBuilder.build(), HttpResponse.BodyHandlers.ofString() ); System.out.println("Status: " + response.statusCode()); System.out.println(response.body()); } } ``` -------------------------------- ### Sync Versions API Request (Go) Source: https://docs.buildprint.ai/api-reference/documentation/versions/post-api-public-v1-versions-sync This Go program illustrates how to perform a POST request to synchronize versions. It sets up the HTTP request with the correct headers and body, then prints the response status and body. ```go package main import ( "fmt" "io" "net/http" "strings" ) func main() { payload := `{ "key": "value" }` req, err := http.NewRequest("POST", "https://api.buildprint.ai/api/public/v1/versions/sync", strings.NewReader(payload)) if err != nil { panic(err) } req.Header.Set("Authorization", "Bearer YOUR_SECRET_TOKEN") req.Header.Set("Content-Type", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Println("Status:", resp.Status) fmt.Println(string(body)) } ``` -------------------------------- ### Get Test Users via PHP Source: https://docs.buildprint.ai/api-reference/documentation/test-users/get-api-public-v1-test-users This PHP example uses cURL to fetch test users. Replace the appId and YOUR_SECRET_TOKEN. ```php 'https://api.buildprint.ai/api/public/v1/test-users?appId=%3Cstring%3E', CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'Authorization: Bearer YOUR_SECRET_TOKEN', ], ]); $response = curl_exec($ch); $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo "Status: " . $statusCode . PHP_EOL; echo $response; ``` -------------------------------- ### Search Buildprint Documentation Source: https://docs.buildprint.ai/cli/installation-and-authentication-iwixh Access Buildprint's help center to find documentation and guides. This command can be used to confirm that the CLI can reach and query the help system. ```bash buildprint docs buildprint "getting started" ``` -------------------------------- ### Create an Agent Source: https://docs.buildprint.ai/getting-started-9tpqr This example demonstrates how to create a new agent using the Buildprint API. It includes the necessary headers and a sample request body. ```APIDOC ## POST /agents ### Description Creates a new agent to perform tasks on your Bubble app. ### Method POST ### Endpoint https://api.buildprint.ai/api/public/v1/agents ### Parameters #### Request Body - **appId** (string) - Required - The ID of your Bubble application. - **prompt** (string) - Required - The instruction for the agent. - **model** (string) - Required - The model to use for the agent. - **completionWebhookUrl** (string) - Optional - URL to receive completion notifications. ### Request Example ```json { "appId": "your-bubble-app-id", "prompt": "Inspect the checkout flow and tell me why the webhook retry path fails.", "model": "buildprint-gpt-5.3-codex" } ``` ### Response #### Success Response (200) - **agentId** (string) - The ID of the created agent. - **status** (string) - The initial status of the agent run (e.g., "queued"). #### Response Example ```json { "agentId": "agent_12345", "status": "queued" } ``` ``` -------------------------------- ### Create Test Run using Python Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/post-api-public-v1-test-runs Utilize the requests library to make a POST request, including your authentication token and JSON payload. ```python import requests import json url = "https://api.buildprint.ai/api/public/v1/test-runs" headers = { "Authorization": "Bearer YOUR_SECRET_TOKEN", "Content-Type": "application/json", } payload = json.loads(""" { "key": "value" } """) response = requests.request("POST", url, headers=headers, json=payload) print(response.status_code) print(response.text) ``` -------------------------------- ### Get Code Reviews with Go Source: https://docs.buildprint.ai/api-reference/documentation/code-reviews/get-api-public-v1-code-reviews This Go program illustrates how to fetch code reviews using the net/http package. It constructs an HTTP GET request, sets the Authorization header, and prints the response status and body. Replace YOUR_SECRET_TOKEN. ```go package main import ( "fmt" "io" "net/http" ) func main() { req, err := http.NewRequest("GET", "https://api.buildprint.ai/api/public/v1/code-reviews?appId=%3Cstring%3E&limit=100", nil) if err != nil { panic(err) } req.Header.Set("Authorization", "Bearer YOUR_SECRET_TOKEN") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Println("Status:", resp.Status) fmt.Println(string(body)) } ``` -------------------------------- ### Get Test Details with Dart Source: https://docs.buildprint.ai/api-reference/documentation/tests/get-api-public-v1-tests-test-id This Dart example shows how to fetch test details using the `http` package. Update `{TESTID}` and `YOUR_SECRET_TOKEN` as needed. ```dart import 'package:http/http.dart' as http; Future main() async { final url = Uri.parse("https://api.buildprint.ai/api/public/v1/tests/{TESTID}"); final request = http.Request("GET", url); request.headers.addAll({ "Authorization": "Bearer YOUR_SECRET_TOKEN", }); final streamed = await request.send(); final response = await http.Response.fromStream(streamed); print('Status: ${response.statusCode}'); print(response.body); } ``` -------------------------------- ### Create Agent using JavaScript Source: https://docs.buildprint.ai/api-reference/documentation/agents/post-api-public-v1-agents This JavaScript example demonstrates how to create an agent using the Fetch API. It includes setting the necessary headers and sending a JSON payload. The response status and body are logged to the console. ```javascript const payload = { "key": "value" }; const response = await fetch("https://api.buildprint.ai/api/public/v1/agents", { method: 'POST', headers: { "Authorization": "Bearer YOUR_SECRET_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify(payload) }); console.log(`Status: ${response.status}`); console.log(await response.text()); ``` -------------------------------- ### Get Tests with PHP Source: https://docs.buildprint.ai/api-reference/documentation/tests/get-api-public-v1-tests This PHP example uses cURL to interact with the tests API. It sets the necessary headers and retrieves the status code and response body. ```php 'https://api.buildprint.ai/api/public/v1/tests?appId=%3Cstring%3E', CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'Authorization: Bearer YOUR_SECRET_TOKEN', ], ]); $response = curl_exec($ch); $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo "Status: " . $statusCode . PHP_EOL; echo $response; ``` -------------------------------- ### Create Test Run using Ruby Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/post-api-public-v1-test-group-runs Initiate a test run via a POST request using Ruby's Net::HTTP library. The request must include the Authorization header with your token and the Content-Type set to application/json. ```ruby require 'uri' require 'net/http' uri = URI("https://api.buildprint.ai/api/public/v1/test-group-runs") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = uri.scheme == 'https' request = Net::HTTP::Post.new(uri) request["Authorization"] = 'Bearer YOUR_SECRET_TOKEN' request["Content-Type"] = 'application/json' request.body = '{ "key": "value" }' response = http.request(request) puts "Status: #{response.code}" puts response.body ``` -------------------------------- ### Create Test Run using Python Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/post-api-public-v1-test-group-runs Utilize the requests library to make a POST request for creating a test run. The payload should be a JSON string, and the Authorization header must contain your secret token. ```python import requests import json url = "https://api.buildprint.ai/api/public/v1/test-group-runs" headers = { "Authorization": "Bearer YOUR_SECRET_TOKEN", "Content-Type": "application/json", } payload = json.loads(""" { "key": "value" }""") response = requests.request("POST", url, headers=headers, json=payload) print(response.status_code) print(response.text) ``` -------------------------------- ### Get API Versions with Java Source: https://docs.buildprint.ai/api-reference/documentation/versions/get-api-public-v1-versions Use Java's HttpClient to fetch API versions. This example demonstrates building the request, setting headers, and handling the response. ```java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class ApiExample { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://api.buildprint.ai/api/public/v1/versions?appId=%3Cstring%3E&version=%3Cstring%3E&cursor=%3Cstring%3E&limit=100")) .header("Authorization", "Bearer YOUR_SECRET_TOKEN") .method("GET", HttpRequest.BodyPublishers.noBody()); HttpResponse response = client.send( requestBuilder.build(), HttpResponse.BodyHandlers.ofString() ); System.out.println("Status: " + response.statusCode()); System.out.println(response.body()); } } ``` -------------------------------- ### Create Test Run using JavaScript Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/post-api-public-v1-test-runs Use the fetch API to send a POST request with your payload and authentication token. ```javascript const payload = { "key": "value" }; const response = await fetch("https://api.buildprint.ai/api/public/v1/test-runs", { method: 'POST', headers: { "Authorization": "Bearer YOUR_SECRET_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify(payload) }); console.log(`Status: ${response.status}`); console.log(await response.text()); ``` -------------------------------- ### Get API Version Status with JavaScript Source: https://docs.buildprint.ai/api-reference/documentation/versions/get-api-public-v1-versions-status Fetch the API version status using JavaScript's fetch API. This example logs the response status and body. ```javascript const response = await fetch("https://api.buildprint.ai/api/public/v1/versions/status?appId=%3Cstring%3E&versionId=%3Cstring%3E", { method: 'GET', headers: { "Authorization": "Bearer YOUR_SECRET_TOKEN" } }); console.log(`Status: ${response.status}`); console.log(await response.text()); ``` -------------------------------- ### Create Test Run using PHP Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/post-api-public-v1-test-runs Use cURL to send a POST request, setting the appropriate headers and JSON payload. ```php 'https://api.buildprint.ai/api/public/v1/test-runs', CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'Authorization: Bearer YOUR_SECRET_TOKEN', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{ "key": "value" }', ]); $response = curl_exec($ch); $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo "Status: " . $statusCode . PHP_EOL; echo $response; ``` -------------------------------- ### Curl Request Example Source: https://docs.buildprint.ai/api-reference/documentation/tests/get-api-public-v1-tests-test-id Use this cURL command to make a GET request to retrieve a specific test. Replace YOUR_SECRET_TOKEN and {TESTID} with your actual token and the test ID. ```bash curl --request GET \ --url 'https://api.buildprint.ai/api/public/v1/tests/{TESTID}' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### Get App Summary Source: https://docs.buildprint.ai/cli/exploring-an-app-kqt3e Lists pages, mobile views, reusable elements, and more. Use `--json` for machine-readable output. ```bash buildprint summary ``` ```bash buildprint summary --json ``` -------------------------------- ### Get Agent Details (Java) Source: https://docs.buildprint.ai/api-reference/documentation/agents/get-api-public-v1-agents-agent-id Example of retrieving agent data using Java's HttpClient. Remember to replace AGENTID and YOUR_SECRET_TOKEN. The historyLimit parameter is demonstrated. ```java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class ApiExample { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://api.buildprint.ai/api/public/v1/agents/{AGENTID}?historyLimit=100")) .header("Authorization", "Bearer YOUR_SECRET_TOKEN") .method("GET", HttpRequest.BodyPublishers.noBody()); HttpResponse response = client.send( requestBuilder.build(), HttpResponse.BodyHandlers.ofString() ); System.out.println("Status: " + response.statusCode()); System.out.println(response.body()); } } ``` -------------------------------- ### Get API Versions with Go Source: https://docs.buildprint.ai/api-reference/documentation/versions/get-api-public-v1-versions Retrieve API versions using Go's net/http package. This example includes error handling for the request and response body reading. ```go package main import ( "fmt" "io" "net/http" ) func main() { req, err := http.NewRequest("GET", "https://api.buildprint.ai/api/public/v1/versions?appId=%3Cstring%3E&version=%3Cstring%3E&cursor=%3Cstring%3E&limit=100", nil) if err != nil { panic(err) } req.Header.Set("Authorization", "Bearer YOUR_SECRET_TOKEN") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Println("Status:", resp.Status) fmt.Println(string(body)) } ``` -------------------------------- ### Style Directory Structure Example Source: https://docs.buildprint.ai/cli/filesystem-jn9sk Shows the organization of style files within the styles directory, categorized by element type. ```text styles/ Button/ primary.json secondary.json Text/ heading.json body.json tokens.json # color_tokens, color_tokens_user defaults.json # default_styles, default_icon_set fonts.json # font_tokens, font_tokens_user, fonts ``` -------------------------------- ### Get API Versions with JavaScript Source: https://docs.buildprint.ai/api-reference/documentation/versions/get-api-public-v1-versions Fetch API versions using the JavaScript fetch API. This example shows how to set the Authorization header and log the response status and body. ```javascript const response = await fetch("https://api.buildprint.ai/api/public/v1/versions?appId=%3Cstring%3E&version=%3Cstring%3E&cursor=%3Cstring%3E&limit=100", { method: 'GET', headers: { "Authorization": "Bearer YOUR_SECRET_TOKEN" } }); console.log(`Status: ${response.status}`); console.log(await response.text()); ``` -------------------------------- ### List Accessible Projects Source: https://docs.buildprint.ai/cli/installation-and-authentication-iwixh Verify your CLI link by listing all projects your authentication token can access. This command helps confirm successful authentication and project scope. ```bash buildprint project list ``` -------------------------------- ### Run Automation in Dart Source: https://docs.buildprint.ai/api-reference/documentation/automations/post-api-public-v1-automations-automation-id-run This Dart example demonstrates making a POST request using the http package. Ensure you replace the placeholders. ```dart import 'package:http/http.dart' as http; Future main() async { final url = Uri.parse("https://api.buildprint.ai/api/public/v1/automations/{AUTOMATIONID}/run"); final request = http.Request("POST", url); request.headers.addAll({ "Authorization": "Bearer YOUR_SECRET_TOKEN", }); final streamed = await request.send(); final response = await http.Response.fromStream(streamed); print('Status: ${response.statusCode}'); print(response.body); } ``` -------------------------------- ### Get Test Group Run Details (Python) Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/get-api-public-v1-test-group-runs-group-run-id This Python example uses the `requests` library to retrieve information about a test group run. Remember to substitute `{GROUPRUNID}` and `YOUR_SECRET_TOKEN`. ```python import requests url = "https://api.buildprint.ai/api/public/v1/test-group-runs/{GROUPRUNID}" headers = { "Authorization": "Bearer YOUR_SECRET_TOKEN", } response = requests.request("GET", url, headers=headers) print(response.status_code) print(response.text) ``` -------------------------------- ### Get Agent Details (Dart) Source: https://docs.buildprint.ai/api-reference/documentation/agents/get-api-public-v1-agents-agent-id This Dart example shows how to fetch agent data using the http package. Replace AGENTID and YOUR_SECRET_TOKEN. The historyLimit parameter is included in the request URL. ```dart import 'package:http/http.dart' as http; Future main() async { final url = Uri.parse("https://api.buildprint.ai/api/public/v1/agents/{AGENTID}?historyLimit=100"); final request = http.Request("GET", url); request.headers.addAll({ "Authorization": "Bearer YOUR_SECRET_TOKEN", }); final streamed = await request.send(); final response = await http.Response.fromStream(streamed); print('Status: ${response.statusCode}'); print(response.body); } ``` -------------------------------- ### Sync Version Request Example Source: https://docs.buildprint.ai/api-reference/documentation/versions/post-api-public-v1-versions-sync Use this cURL command to schedule a sync for a Bubble branch. Replace YOUR_SECRET_TOKEN with your actual Buildprint API token. ```bash curl --request POST \ --url 'https://api.buildprint.ai/api/public/v1/versions/sync' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ \ "key": "value" \ }' ``` -------------------------------- ### Start Test Run with cURL Source: https://docs.buildprint.ai/api-reference/documentation/test-runs/post-api-public-v1-test-runs Use this cURL command to start a new test run. Ensure you replace YOUR_SECRET_TOKEN with your actual API token and provide the correct JSON payload. ```bash curl --request POST \ --url 'https://api.buildprint.ai/api/public/v1/test-runs' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ \ "key": "value" \ }' ``` -------------------------------- ### Get API Versions with Ruby Source: https://docs.buildprint.ai/api-reference/documentation/versions/get-api-public-v1-versions Retrieve API versions using Ruby's Net::HTTP library. This example shows how to construct the URI, set the Authorization header, and process the response. ```ruby require 'uri' require 'net/http' uri = URI("https://api.buildprint.ai/api/public/v1/versions?appId=%3Cstring%3E&version=%3Cstring%3E&cursor=%3Cstring%3E&limit=100") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = uri.scheme == 'https' request = Net::HTTP::Get.new(uri) request["Authorization"] = 'Bearer YOUR_SECRET_TOKEN' response = http.request(request) puts "Status: #{response.code}" puts response.body ``` -------------------------------- ### Get API Version Status with Ruby Source: https://docs.buildprint.ai/api-reference/documentation/versions/get-api-public-v1-versions-status Retrieve the API version status using Ruby's Net::HTTP library. This example sets up the HTTP connection, request, and prints the response. ```ruby require 'uri' require 'net/http' uri = URI("https://api.buildprint.ai/api/public/v1/versions/status?appId=%3Cstring%3E&versionId=%3Cstring%3E") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = uri.scheme == 'https' request = Net::HTTP::Get.new(uri) request["Authorization"] = 'Bearer YOUR_SECRET_TOKEN' response = http.request(request) puts "Status: #{response.code}" puts response.body ```