Get all versions of a component - Gable Docs
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
GET
/v0/component/versions/{id}
Try it
Get all versions of a component
cURL
curl --request GET \
--url https://demo-api.gable.ai/v0/component/versions/{id} \
--header 'X-API-KEY: <api-key>'
Python
import requests
url = "https://demo-api.gable.ai/v0/component/versions/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)
JavaScript
const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://demo-api.gable.ai/v0/component/versions/{id}', 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://demo-api.gable.ai/v0/component/versions/{id}",\
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;
}
Go
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://demo-api.gable.ai/v0/component/versions/{id}"
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))
}
Java
HttpResponse<String> response = Unirest.get("https://demo-api.gable.ai/v0/component/versions/{id}")
.header("X-API-KEY", "<api-key>")
.asString();
Ruby
require 'uri'
require 'net/http'
url = URI("https://demo-api.gable.ai/v0/component/versions/{id}")
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
Response
200
400
500
[
{
"versionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"isLatestVersion": true,
"job_trigger": "<string>",
"event_repo": "<string>",
"repo_commit": "<string>",
"repo_commit_timestamp": "<string>",
"job_id": "<string>",
"dependencies": [
{
"repo_name": "<string>",
"commit_sha": "<string>",
"commit_timestamp": "<string>"
}
]
}
]
{
"message": "<string>",
"id": 123,
"title": "<string>"
}
{
"message": "<string>",
"id": 123,
"title": "<string>"
}
Authorizations
- X-API-KEY: string (header) required
Path Parameters
- id: string
(required) UUID of the component
Query Parameters
- versionId: string (Optional version ID to filter or focus on a specific version)
Response
- 200: application/json Component versions retrieved successfully
- versionId: string The version ID (runId) of the component.
- createdAt: string
The timestamp when the component version was created. - isLatestVersion: boolean Indicates if this version is the latest version of the component.
- job_trigger: string Type of the event that triggered this version.
- event_repo: string Name of the repository from the event that triggered this version.
- repo_commit: string The commit SHA that triggered the version.
- repo_commit_timestamp: string The timestamp of the commit.
- job_status: enum
Status of the job that created this version. Available options: pending,processing,success,error - job_id: string ID of the job that created this version.
- dependencies: object[] List of version-specific dependencies for this component version.