Get setup
curl --request GET \
--url https://capy.ai/api/v1/projects/{projectId}/setup \
--header 'Authorization: Bearer <token>'import requests
url = "https://capy.ai/api/v1/projects/{projectId}/setup"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://capy.ai/api/v1/projects/{projectId}/setup', 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://capy.ai/api/v1/projects/{projectId}/setup",
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://capy.ai/api/v1/projects/{projectId}/setup"
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://capy.ai/api/v1/projects/{projectId}/setup")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://capy.ai/api/v1/projects/{projectId}/setup")
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{
"legacyHooks": {
"repositories": [
"<string>"
],
"checkComplete": true
},
"setup": {
"repositories": [
{
"repository": "<string>",
"branch": "<string>",
"scripts": {
"initialize": "<string>",
"updateAfterCheckout": "<string>",
"startup": "<string>"
},
"commands": [
{
"name": "<string>",
"command": "<string>"
}
],
"timeouts": {
"initialize": 1830,
"updateAfterCheckout": 1830,
"startup": 1830
}
}
],
"hooks": {
"pre": {},
"post": {},
"context": {
"maxOutputLength": 123
}
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Setup
Get Setup
Get Setup used for future project runs. Setup contains VM size, three automatic repository scripts, opt-in Commands, terminals, previews, and pre/post tool hooks. Environment variables are configured separately.
GET
/
v1
/
projects
/
{projectId}
/
setup
Get setup
curl --request GET \
--url https://capy.ai/api/v1/projects/{projectId}/setup \
--header 'Authorization: Bearer <token>'import requests
url = "https://capy.ai/api/v1/projects/{projectId}/setup"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://capy.ai/api/v1/projects/{projectId}/setup', 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://capy.ai/api/v1/projects/{projectId}/setup",
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://capy.ai/api/v1/projects/{projectId}/setup"
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://capy.ai/api/v1/projects/{projectId}/setup")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://capy.ai/api/v1/projects/{projectId}/setup")
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{
"legacyHooks": {
"repositories": [
"<string>"
],
"checkComplete": true
},
"setup": {
"repositories": [
{
"repository": "<string>",
"branch": "<string>",
"scripts": {
"initialize": "<string>",
"updateAfterCheckout": "<string>",
"startup": "<string>"
},
"commands": [
{
"name": "<string>",
"command": "<string>"
}
],
"timeouts": {
"initialize": 1830,
"updateAfterCheckout": 1830,
"startup": 1830
}
}
],
"hooks": {
"pre": {},
"post": {},
"context": {
"maxOutputLength": 123
}
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
API token (capy_xxxx). Generate at capy.ai/settings/tokens
Path Parameters
Project ID.
Was this page helpful?
⌘I