Describe a component
curl --request GET \
--url https://api.app.chainloop.dev/v1/components/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.app.chainloop.dev/v1/components/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.app.chainloop.dev/v1/components/{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://api.app.chainloop.dev/v1/components/{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 => [
"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.app.chainloop.dev/v1/components/{id}"
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.app.chainloop.dev/v1/components/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.chainloop.dev/v1/components/{id}")
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{
"component": {
"component_type": "component_type",
"children": [
null,
null
],
"name": "name",
"cpe": "cpe",
"created_at": "2000-01-23T04:56:07.000Z",
"id": "id",
"purl": "purl",
"findings_summary": {
"total": 0,
"high": 1,
"critical": 6,
"low": 5,
"medium": 5,
"unknown": 2
},
"version": "version",
"auto_generated_purl": true,
"parents": [
null,
null
]
},
"projects": [
{
"project_id": "project_id",
"versions": [
{
"project_version_name": "project_version_name",
"sboms": [
{
"digest": "digest"
},
{
"digest": "digest"
}
],
"project_version_id": "project_version_id"
},
{
"project_version_name": "project_version_name",
"sboms": [
{
"digest": "digest"
},
{
"digest": "digest"
}
],
"project_version_id": "project_version_id"
}
],
"project_name": "project_name"
},
{
"project_id": "project_id",
"versions": [
{
"project_version_name": "project_version_name",
"sboms": [
{
"digest": "digest"
},
{
"digest": "digest"
}
],
"project_version_id": "project_version_id"
},
{
"project_version_name": "project_version_name",
"sboms": [
{
"digest": "digest"
},
{
"digest": "digest"
}
],
"project_version_id": "project_version_id"
}
],
"project_name": "project_name"
}
],
"artifacts": [
{
"kind": "kind",
"name": "name",
"digest": "digest",
"version": "version"
},
{
"kind": "kind",
"name": "name",
"digest": "digest",
"version": "version"
}
]
}{
"code": 0,
"details": [
"details",
"details"
],
"message": "message"
}{
"code": 6,
"details": [
"details",
"details"
],
"message": "message"
}{
"code": 1,
"details": [
"details",
"details"
],
"message": "message"
}{
"code": 5,
"details": [
"details",
"details"
],
"message": "message"
}{
"code": 5,
"details": [
{
"@type": "@type"
},
{
"@type": "@type"
}
],
"message": "message"
}Describe a component
Returns detailed information about a component and all projects/versions where it appears
GET
/
v1
/
components
/
{id}
Describe a component
curl --request GET \
--url https://api.app.chainloop.dev/v1/components/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.app.chainloop.dev/v1/components/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.app.chainloop.dev/v1/components/{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://api.app.chainloop.dev/v1/components/{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 => [
"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.app.chainloop.dev/v1/components/{id}"
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.app.chainloop.dev/v1/components/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.chainloop.dev/v1/components/{id}")
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{
"component": {
"component_type": "component_type",
"children": [
null,
null
],
"name": "name",
"cpe": "cpe",
"created_at": "2000-01-23T04:56:07.000Z",
"id": "id",
"purl": "purl",
"findings_summary": {
"total": 0,
"high": 1,
"critical": 6,
"low": 5,
"medium": 5,
"unknown": 2
},
"version": "version",
"auto_generated_purl": true,
"parents": [
null,
null
]
},
"projects": [
{
"project_id": "project_id",
"versions": [
{
"project_version_name": "project_version_name",
"sboms": [
{
"digest": "digest"
},
{
"digest": "digest"
}
],
"project_version_id": "project_version_id"
},
{
"project_version_name": "project_version_name",
"sboms": [
{
"digest": "digest"
},
{
"digest": "digest"
}
],
"project_version_id": "project_version_id"
}
],
"project_name": "project_name"
},
{
"project_id": "project_id",
"versions": [
{
"project_version_name": "project_version_name",
"sboms": [
{
"digest": "digest"
},
{
"digest": "digest"
}
],
"project_version_id": "project_version_id"
},
{
"project_version_name": "project_version_name",
"sboms": [
{
"digest": "digest"
},
{
"digest": "digest"
}
],
"project_version_id": "project_version_id"
}
],
"project_name": "project_name"
}
],
"artifacts": [
{
"kind": "kind",
"name": "name",
"digest": "digest",
"version": "version"
},
{
"kind": "kind",
"name": "name",
"digest": "digest",
"version": "version"
}
]
}{
"code": 0,
"details": [
"details",
"details"
],
"message": "message"
}{
"code": 6,
"details": [
"details",
"details"
],
"message": "message"
}{
"code": 1,
"details": [
"details",
"details"
],
"message": "message"
}{
"code": 5,
"details": [
"details",
"details"
],
"message": "message"
}{
"code": 5,
"details": [
{
"@type": "@type"
},
{
"@type": "@type"
}
],
"message": "message"
}Authorizations
Bearer token for authentication
Path Parameters
UUID of the component to describe
Query Parameters
ProjectName optionally scopes results to this project
Project name to scope component details to
Project version name to scope component details to. Requires project_name.
Response
A successful response.
Response containing component details and usage information
It represents an item in the list of components
Show child attributes
Show child attributes
Example:
{
"component_type": "component_type",
"children": [null, null],
"name": "name",
"cpe": "cpe",
"created_at": "2000-01-23T04:56:07.000Z",
"id": "id",
"purl": "purl",
"findings_summary": {
"total": 0,
"high": 1,
"critical": 6,
"low": 5,
"medium": 5,
"unknown": 2
},
"version": "version",
"auto_generated_purl": true,
"parents": [null, null]
}
List of projects where this component appears
Show child attributes
Show child attributes
Artifacts associated with this component (e.g., container images that this component represents). Only populated for main components.
Show child attributes
Show child attributes
⌘I
