List repositories consuming this artifact, with pinned versions.
curl --request GET \
--url https://api.example.com/api/v1/artifacts/{artifact_id}/consumers \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.example.com/api/v1/artifacts/{artifact_id}/consumers"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.example.com/api/v1/artifacts/{artifact_id}/consumers', 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.example.com/api/v1/artifacts/{artifact_id}/consumers",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/artifacts/{artifact_id}/consumers"
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))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/artifacts/{artifact_id}/consumers")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/artifacts/{artifact_id}/consumers")
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{
"artifact": {
"artifact_type": "<string>",
"connected_org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"registry_url": "<string>",
"source_repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"version": "<string>",
"consumer_count": 0,
"is_orphan": false,
"source_repository": {
"full_path": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
},
"consumers": [
{
"is_latest": true,
"repository": {
"full_path": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"source_file": "<string>",
"source_line": 123,
"version_constraint": "<string>",
"import_count": 1,
"version_constraint_state": "absent"
}
],
"consumers_lagging": 123,
"consumers_on_latest": 123,
"latest_version": "<string>",
"total_consumers": 123,
"state_breakdown": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}artifacts
List repositories consuming this artifact, with pinned versions.
List repositories consuming this artifact from the latest scan, with each pinned version, on-latest vs lagging counts, and a version-state breakdown. Pro feature.
GET
/
api
/
v1
/
artifacts
/
{artifact_id}
/
consumers
List repositories consuming this artifact, with pinned versions.
curl --request GET \
--url https://api.example.com/api/v1/artifacts/{artifact_id}/consumers \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.example.com/api/v1/artifacts/{artifact_id}/consumers"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.example.com/api/v1/artifacts/{artifact_id}/consumers', 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.example.com/api/v1/artifacts/{artifact_id}/consumers",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/artifacts/{artifact_id}/consumers"
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))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/artifacts/{artifact_id}/consumers")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/artifacts/{artifact_id}/consumers")
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{
"artifact": {
"artifact_type": "<string>",
"connected_org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"registry_url": "<string>",
"source_repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"version": "<string>",
"consumer_count": 0,
"is_orphan": false,
"source_repository": {
"full_path": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
},
"consumers": [
{
"is_latest": true,
"repository": {
"full_path": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"source_file": "<string>",
"source_line": 123,
"version_constraint": "<string>",
"import_count": 1,
"version_constraint_state": "absent"
}
],
"consumers_lagging": 123,
"consumers_on_latest": 123,
"latest_version": "<string>",
"total_consumers": 123,
"state_breakdown": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
APIKeyHeaderHTTPBearer
Headers
Path Parameters
Cookies
Response
Successful Response
All consumers of a specific artifact.
An artifact (Docker image, Python package, Terraform module, etc.).
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Get a single artifact by ID, with consumer count and orphan flag.List all versions of this artifact seen across the org, with consumer counts.
⌘I
