Skip to main content

Synopsis

Get an attestation using its name or id. You can get an attestation from a trail or artifact using its name. The attestation name should be given WITHOUT dot-notation.
To get an attestation from a trail, specify the trail name using the --trail flag.
To get an attestation from an artifact, specify the artifact fingerprint using the --fingerprint flag.
These flags cannot be used together. In both cases the flow must also be specified using the --flow flag.
If there are multiple attestations with the same name on the trail or artifact, a list of all will be returned.
You can also get an attestation by its id using the --attestation-id flag. This cannot be used with the attestation name, or any of the --flow, --trail or --fingerprint flags.

Flags

FlagDescription
--attestation-id string[conditional] The unique identifier of the attestation to retrieve. Cannot be used together with ATTESTATION-NAME.
-F, --fingerprint string[conditional] The fingerprint of the artifact for the attestation. Cannot be used together with --trail or --attestation-id.
-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.
-h, --helphelp for attestation
-o, --output string[defaulted] The format of the output. Valid formats are: [table, json]. (default “table”)
-t, --trail string[conditional] The name of the Kosli trail for the attestation. Cannot be used together with --fingerprint or --attestation-id.

Flags inherited from parent commands

FlagDescription
-a, --api-token stringThe Kosli API token.
-c, --config-file string[optional] The Kosli config file path. (default “kosli”)
--debug[optional] Print debug logs to stdout.
-H, --host string[defaulted] The Kosli endpoint. (default “https://app.kosli.com”)
--http-proxy string[optional] The HTTP proxy URL including protocol and port number. e.g. http://proxy-server-ip:proxy-port
-r, --max-api-retries int[defaulted] How many times should API calls be retried when the API host is not reachable. (default 3)
--org stringThe Kosli organization.
-q, --quiet[optional] Suppress non-critical warning messages. Errors and normal output are not affected. If both --quiet and --debug are set, --debug wins.

Live Example

To view a live example of ‘kosli get attestation’ you can run the command below (for the cyber-dojo demo organization).

Examples Use Cases

These examples all assume that the flags --api-token, --org, --host, (and --flow, --trail when required), are set/provided.
Last modified on May 14, 2026