A registry credential's discovery settings and recent tags
curl --request GET \
--url https://app.trustivan.com/api/v1/registry-credentials/{id}/discovery \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/registry-credentials/{id}/discovery"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/registry-credentials/{id}/discovery', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/registry-credentials/{id}/discovery"
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))
}{
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true,
"repositories": [
"<string>"
],
"scan_new_tags": true,
"recent_tags": [
{
"repository": "<string>",
"tag": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"scan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scan_status": "<string>"
}
],
"last_run_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"repositories_seen": 123,
"tags_seen": 123
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}A registry credential's discovery settings
Discovery lists the repositories and tags the credential can see every
hour and, with scan_new_tags, queues a scan of each tag that appeared
since the last run. The first run records what is there without
scanning it. A credential that never had discovery set reads as off.
recent_tags is the fifty most recently seen. Behind credentials:read.
GET
/
registry-credentials
/
{id}
/
discovery
A registry credential's discovery settings and recent tags
curl --request GET \
--url https://app.trustivan.com/api/v1/registry-credentials/{id}/discovery \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/registry-credentials/{id}/discovery"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/registry-credentials/{id}/discovery', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/registry-credentials/{id}/discovery"
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))
}{
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true,
"repositories": [
"<string>"
],
"scan_new_tags": true,
"recent_tags": [
{
"repository": "<string>",
"tag": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"scan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scan_status": "<string>"
}
],
"last_run_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"repositories_seen": 123,
"tags_seen": 123
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}