Get Evidence CLI
Export evidence for an artifact or Release Bundle v2 using the JFrog CLI Get Evidence command.
The Get Evidence command exports a list of all evidence associated with an artifact or a Release Bundle v2.
Note
You can also get evidence using a GraphQL API command. For more information, see Get Evidence.
Syntax
JFrog CLI uses the following syntax for getting evidence:
Artifact Evidence
jf evd get --subject-repo-path <target-path> --output <file-name>Release Bundle v2 Evidence
jf evd get --release-bundle <name> --release-bundle-version <version-number> --output <file-name>Note
For sample commands, see Get Evidence CLI - Sample Commands.
Command Parameters
The following table describes the parameters common to all Get Evidence commands.
| Parameter | Required/Optional | Type | Description |
|---|---|---|---|
--output | optional | string | Name of the file to which evidence is exported. If not provided, the output is printed to the console. |
--include-predicate | optional | boolean | Flag that determines whether the predicate is included in the exported file. Default: false. |
--format | optional | string | Enables extended output. Supported formats: json, jsonl |
--project | optional | string | Project key associated with the created evidence. |
Tip
Consider excluding the predicate when the evidence list is large. Including it can significantly increase file size.
Artifact Command Parameters
The following table describes the artifact-specific Get Evidence command parameters.
| Parameter | Required/Optional | Type | Description |
|---|---|---|---|
--subject-repo-path | required for artifact evidence | string | The path of the evidence target. Each evidence file must contain a single subject and must include the path. Artifacts located in local repositories that are aggregated inside virtual repositories are supported. |
Release Bundle v2 Command Parameters
The following table describes the Release Bundle v2-specific Get Evidence command parameters.
| Parameter | Required/Optional | Type | Description |
|---|---|---|---|
--release-bundle | required for Release Bundle evidence | string | The Release Bundle name. |
--release-bundle-version | required for Release Bundle evidence | string | The Release Bundle version. |
--artifacts-limit | optional | integer | The maximum number of artifacts in the Release Bundle to include in the evidence list. The default is 1,000 artifacts. |
Frequently Asked Questions
Common questions about getting evidence with the JFrog CLI.
FAQs
Q: How do I export evidence for an artifact using the JFrog CLI?
A: Run jf evd get --subject-repo-path <target-path> --output <file-name> to export the evidence list for that artifact to a file. See the Command Parameters table for all supported flags.
Q: What happens if I don't specify the --output parameter?
--output parameter?A: The exported evidence list prints to the console instead of being saved to a file.
Q: What is the difference between exporting evidence for an artifact and for a Release Bundle v2?
A: Artifact evidence export targets a single artifact with --subject-repo-path. Release Bundle v2 evidence export uses --release-bundle and --release-bundle-version, and you can limit the number of artifacts included with --artifacts-limit (default 1,000).
Q: Can I include the evidence predicate in the exported file?
A: Yes, set --include-predicate to true. Consider leaving it disabled for large evidence lists because the predicate can significantly increase file size.
Q: Can I get evidence using an API instead of the JFrog CLI?
A: Yes, you can retrieve evidence using a GraphQL API command. For more information, see Get Evidence.
Related Topics
Updated 2 days ago
