Subscription Information
This feature is supported with the Enterprise+ license.
Description: Prepares evidence in accordance with the DSSE standard that can then be attached to an artifact in Artifactory with the Deploy Evidence REST API. Use these two APIs as an alternative to using the Create Evidence CLI.
Note
For the complete workflow, see Create Evidence using REST APIs.
Since: 7.129.1
Security: Requires a valid token; requires Read and Annotate permissions to the subject repository path
Usage: POST /evidence/api/v1/evidence/prepare
Content Type: application/json
Query Parameters (optional):
Parameter | Type | Description |
|---|---|---|
| boolean | When set to The default value is |
Request Body Parameters:
Parameter | Required | Type | Description |
|---|---|---|---|
| required | string | A unique, URL-style identifier that serves as a schema or category for the evidence. The predicate type allows for programmatic querying and policy enforcement based on the evidence type. |
| required | json object | Contains the actual body of the evidence, which is comprised of arbitrary claims about the evidence subject. For more information, see Evidence Predicate. |
| optional | string | A markdown version of the predicate. |
| optional | string | The name of the provider who owns the predicate. If provided, the platform UI will display a relevant icon for that provider alongside the evidence. |
| optional | string | The project associated with the evidence subject. For example, if the subject is an AppTrust application version, enter the |
| required | object | The subject of the evidence being prepared. Each evidence item can have a single subject. |
| optional | string | When provided, the Evidence service validates the sha256 of the subject's leading file. |
| required | string | The evidence subject type:
|
| required for subject type | string | The repository key and path to the artifact (for example, generic-local/docs/readme.txt). |
| required for subject type | string | The build name. |
| required for subject type | string | The build number. |
| optional for subject type | string | The timestamp of the build in ISO 8601 format. |
| required for subject type | string | The Release Bundle name. |
| required for subject type | string | The Release Bundle version. |
| required for subject type | string | The repository containing the package. |
| required for subject type | string | The package name. |
| required for subject type | string | The package version. |
| required for subject type | string | The unique application identifier. |
| required for subject type | string | The application version. |
Sample Request:
curl -X POST -H 'Content-Type: application/json' \ -H "Authorization: Bearer $DEMO_TOKEN" \ --data @prepare_request.json -o prepare_response.json \ http://localhost:8182/evidence/api/v1/evidence/prepare?include_pae=true
Sample Request Body:
For sample requests using different types of payload subjects, see Prepare Evidence - Sample Payloads.
{
"predicate_type": "https://example.com/test/v1",
"predicate": {
"description": "QA manager approval",
"approver": {
"role": "QA manager",
"name": "John Bill"
}
},
"project_key": "catalina",
"subject": {
"subject_type": "artifact",
"repo_path": "catalina-dev-generic-local/catalina-1.0.0.txt"
}
}Sample Response:
{
"post_url" : "/evidence/api/v1/subject/catalina-application-versions/test-app-promotion-e2e-1764232143962/1.0.0/release-bundle.json.evd?providerId=sonar",
"dsse_payload" : "eyJfdHlwZSI6Imh0dHBzOi8vaW4tdG90by5pby9TdGF0ZW1lbnQvdjEiLCJjcmVhdGVkQXQiOiIyMDI1LTExLTI3VDA4OjI5OjE5LjQwNFoiLCJjcmVhdGVkQnkiOiJjcmVhdGVfZHNzZV91c2VyIiwicHJlZGljYXRlIjp7InFhX3N0YXR1cyI6InBhc3NlZCIsInRlc3RlciI6InFhLXRlYW0iLCJ0ZXN0c19leGVjdXRlZCI6NDIsInRlc3RzX2ZhaWxlZCI6MCwidGVzdHNfcGFzc2VkIjo0Mn0sInByZWRpY2F0ZVR5cGUiOiJodHRwczovL3NvbmFyLmNvbS9ldmlkZW5jZS9zb25hcnF1YmUvdjEiLCJzdGFnZSI6IlFBIiwic3ViamVjdCI6W3siZGlnZXN0Ijp7InNoYTI1NiI6ImExMDhhY2U4ZDk5MWM2ZDJiMDlkZDE4ZmVhOTFlYjZhMmI3MGE2MzQxYmZmNzI2MzhiMDUxYzQzZmU0Mjg2ZTMifX1dfQ==",
"dsse_payload_type" : "application/vnd.in-toto+json",
"pre_authentication_encoding" : "DSSEv1 28 application/vnd.in-toto+json 394 {\"_type\":\"https://in-toto.io/Statement/v1\",\"createdAt\":\"2025-11-27T08:29:19.404Z\",\"createdBy\":\"create_dsse_user\",\"predicate\":{\"qa_status\":\"passed\",\"tester\":\"qa-team\",\"tests_executed\":42,\"tests_failed\":0,\"tests_passed\":42},\"predicateType\":\"https://sonar.com/evidence/sonarqube/v1\",\"stage\":\"QA\",\"subject\":[{\"digest\":{\"sha256\":\"a108ace8d991c6d2b09dd18fea91eb6a2b70a6341bff72638b051c43fe4286e3\"}}]}"
}The response contains the following:
Parameter | Type | Description |
|---|---|---|
| string | The url to be used by the client to upload the DSSE payload after signing the in-toto payload returned by the |
| base64 string | The encoded NoteIf the evidence subject is an application version or Release Bundle v2 version, the payload will include the version's current stage. When you use the Deploy Evidence API, the evidence will be associated with this stage in the platform UI. |
| string | The |
| string | Relevant only when the The PAE consists of the DSSE version, the length of the payload_type, the text of the payload type, the length of the payload, and the decoded text of the payload. |
Status Codes:
Code | Description |
|---|---|
201 | Created |
401 | Bad Credentials |
403 | Permission Denied |
404 | Not Found |