You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs.kosli.com/content/client_reference/kosli_get_attestation.md
+24-15Lines changed: 24 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,37 +2,39 @@
2
2
title: "kosli get attestation"
3
3
beta: false
4
4
deprecated: false
5
-
summary: "Get attestation by name from a specified trail or artifact. "
5
+
summary: "Get an attestation using its name or id. "
6
6
---
7
7
8
8
# kosli get attestation
9
9
10
10
## Synopsis
11
11
12
12
```shell
13
-
kosli get attestation ATTESTATION-NAME [flags]
13
+
kosli get attestation [ATTESTATION-NAME] [flags]
14
14
```
15
15
16
-
Get attestation by name from a specified trail or artifact.
17
-
You can get an attestation from a trail or artifact using its name. The attestation name should be given
18
-
WITHOUT dot-notation.
19
-
20
-
To get an attestation from a trail, specify the trail name using the --trail flag.
21
-
To get an attestation from an artifact, specify the artifact fingerprint using the --fingerprint flag.
22
-
23
-
In both cases the flow must also be specified using the --flow flag.
16
+
Get an attestation using its name or id.
24
17
18
+
You can get an attestation from a trail or artifact using its name. The attestation name should be given
19
+
WITHOUT dot-notation.
20
+
To get an attestation from a trail, specify the trail name using the `--trail` flag.
21
+
To get an attestation from an artifact, specify the artifact fingerprint using the `--fingerprint` flag.
22
+
These flags cannot be used together. In both cases the flow must also be specified using the `--flow` flag.
25
23
If there are multiple attestations with the same name on the trail or artifact, a list of all will be returned.
26
24
25
+
You can also get an attestation by its id using the `--attestation-id` flag. This cannot be used with the attestation name,
26
+
or any of the `--flow`, `--trail` or `--fingerprint` flags.
27
+
27
28
28
29
## Flags
29
30
| Flag | Description |
30
31
| :--- | :--- |
31
-
| -F, --fingerprint string |[conditional] The fingerprint of the artifact for the attestation. Cannot be used together with --trail. |
32
-
| -f, --flow string | The Kosli flow name. |
32
+
| --attestation-id string |[conditional] The unique identifier of the attestation to retrieve. Cannot be used together with ATTESTATION-NAME. |
33
+
| -F, --fingerprint string |[conditional] The fingerprint of the artifact for the attestation. Cannot be used together with --trail or --attestation-id. |
34
+
| -f, --flow string |[conditional] The name of the Kosli flow for the attestation. Required if ATTESTATION-NAME provided. Cannot be used together with --attestation-id. |
33
35
| -h, --help | help for attestation |
34
36
| -o, --output string |[defaulted] The format of the output. Valid formats are: [table, json]. (default "table") |
35
-
| -t, --trail string |[conditional] The name of the Kosli trailfor the attestation. Cannot be used together with --fingerprint. |
37
+
| -t, --trail string |[conditional] The name of the Kosli trail for the attestation. Cannot be used together with --fingerprint or --attestation-id. |
36
38
37
39
38
40
## Flags inherited from parent commands
@@ -57,17 +59,24 @@ kosli get attestation snyk-container-scan --flow=differ-ci --fingerprint=0cbbe3a
57
59
58
60
These examples all assume that the flags `--api-token`, `--org`, `--host`, (and `--flow`, `--trail` when required), are [set/provided](https://docs.kosli.com/getting_started/install/#assigning-flags-via-environment-variables).
59
61
60
-
##### get an attestation from a trail (requires the --trail flag)
62
+
##### get an attestation by name from a trail (requires the --trail flag)
61
63
62
64
```shell
63
65
kosli get attestation attestationName
64
66
65
67
```
66
68
67
-
##### get an attestation from an artifact
69
+
##### get an attestation by name from an artifact
68
70
69
71
```shell
70
72
kosli get attestation attestationName
71
73
--fingerprint fingerprint
74
+
75
+
```
76
+
77
+
##### get an attestation by its id
78
+
79
+
```shell
80
+
kosli get attestation --attestation-id attestationID
0 commit comments