curl --request GET \
--url https://cp.chainloop.dev/discover/{digest} \
--header 'Authorization: Bearer <token>'import requests
url = "https://cp.chainloop.dev/discover/{digest}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cp.chainloop.dev/discover/{digest}', 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://cp.chainloop.dev/discover/{digest}",
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://cp.chainloop.dev/discover/{digest}"
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://cp.chainloop.dev/discover/{digest}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cp.chainloop.dev/discover/{digest}")
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{
"result": {
"downloadable": true,
"metadata": {
"key": "metadata"
},
"references": [
null,
null
],
"kind": "kind",
"digest": "digest",
"created_at": "2000-01-23T04:56:07.000+00:00",
"annotations": {
"key": "annotations"
}
},
"pagination": {
"next_cursor": "next_cursor"
}
}{
"code": 0,
"details": [
{
"@type": "@type"
},
{
"@type": "@type"
}
],
"message": "message"
}Discover private referrer
Returns the referrer item for a given digest in the organizations of the logged-in user
curl --request GET \
--url https://cp.chainloop.dev/discover/{digest} \
--header 'Authorization: Bearer <token>'import requests
url = "https://cp.chainloop.dev/discover/{digest}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cp.chainloop.dev/discover/{digest}', 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://cp.chainloop.dev/discover/{digest}",
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://cp.chainloop.dev/discover/{digest}"
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://cp.chainloop.dev/discover/{digest}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cp.chainloop.dev/discover/{digest}")
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{
"result": {
"downloadable": true,
"metadata": {
"key": "metadata"
},
"references": [
null,
null
],
"kind": "kind",
"digest": "digest",
"created_at": "2000-01-23T04:56:07.000+00:00",
"annotations": {
"key": "annotations"
}
},
"pagination": {
"next_cursor": "next_cursor"
}
}{
"code": 0,
"details": [
{
"@type": "@type"
},
{
"@type": "@type"
}
],
"message": "message"
}Authorizations
Bearer token for authentication
Path Parameters
Digest is the unique identifier of the referrer to discover
Query Parameters
Kind is the optional type of referrer, i.e CONTAINER_IMAGE, GIT_HEAD, ... Used to filter and resolve ambiguities
Limit pagination to 100
ProjectName optionally scopes the discovery to a project by name. Can be set on its own (project-wide filter) or together with project_version (project + version filter).
ProjectVersion optionally scopes the discovery to a project version (by name, e.g. v1.2.0). Requires project_name, since a version name is unique only within a project.
Response
A successful response.
Response for the DiscoverPrivate method
It represents a referrer object in the system
Show child attributes
Show child attributes
{
"downloadable": true,
"metadata": { "key": "metadata" },
"references": [null, null],
"kind": "kind",
"digest": "digest",
"created_at": "2000-01-23T04:56:07.000+00:00",
"annotations": { "key": "annotations" }
}
Show child attributes
Show child attributes
{ "next_cursor": "next_cursor" }
