curl --request DELETE \
--url https://app.trustivan.com/api/v1/assets/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/assets/{id}"
payload = { "reason": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: '<string>'})
};
fetch('https://app.trustivan.com/api/v1/assets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/assets/{id}"
payload := strings.NewReader("{\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "container_image",
"identity": "<string>",
"name": "<string>",
"registry": "<string>",
"repository": "<string>",
"tag": "<string>",
"last_digest": "<string>",
"operating_system": "<string>",
"attributes": {},
"discovery_source": "scan",
"environment": "unknown",
"criticality": "unknown",
"owner": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"last_scanned_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"archived_reason": "<string>",
"archived_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Retire an asset
Archives rather than destroys. The asset’s findings, components, scans and graph edges all survive; the asset leaves the listing, the severity roll-ups and the entitlement count. A true delete would cascade all four and destroy the triage history that is the product’s memory.
A reason is REQUIRED. Archiving is quieter than suppressing a finding and affects more (it silences every future scan of the asset), so it must not be cheaper to do. The reason is written to the administrative audit trail.
Archiving an already-archived asset answers 404 rather than overwriting the original reason and the record of who retired it.
Requires assets:write.
curl --request DELETE \
--url https://app.trustivan.com/api/v1/assets/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/assets/{id}"
payload = { "reason": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: '<string>'})
};
fetch('https://app.trustivan.com/api/v1/assets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/assets/{id}"
payload := strings.NewReader("{\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "container_image",
"identity": "<string>",
"name": "<string>",
"registry": "<string>",
"repository": "<string>",
"tag": "<string>",
"last_digest": "<string>",
"operating_system": "<string>",
"attributes": {},
"discovery_source": "scan",
"environment": "unknown",
"criticality": "unknown",
"owner": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"last_scanned_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"archived_reason": "<string>",
"archived_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Body
Response
The archived asset.
The thing being protected. Not a scan and not a build: if a rebuild produced a new asset, every finding would look new and every triage decision would be discarded on deploy.