Get Release Bundle v2 Version (GraphQL)

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description: Returns the requested data for the Release Bundle v2 version defined by the One Model GraphQL query.

Since: 7.111.4

Security: Requires a valid token; requires Read permissions to the subject repository

Note

When using One Model GraphQL, make sure your token audience is configured as wildcard, or *@*. For more information, see Create Token.

Usage: POST /onemodel/api/v1/graphql

Sample query based on 'repositoryKey' in GraphQL format:

{
  releaseBundleVersion {
    getVersion(
      repositoryKey: "jfmd-release-bundles-v2"
      name: "metadata"
      version: "7.162.0"
    ) {
      createdBy
      createdAt
      evidenceConnection(first: 3) {
        totalCount
        pageInfo {
          hasNextPage
          hasPreviousPage
          startCursor
          endCursor
        }
        edges {
          cursor
          node {
            name
            createdAt
            createdBy
            verified
            signingKey {
              alias
            }
            predicateSlug
          }
        }
      }
      artifactsConnection(first: 3) {
        totalCount
        pageInfo {
          hasNextPage
          hasPreviousPage
          startCursor
          endCursor
        }
        edges {
          cursor
          node {
            path
            name
            sha256
            sourceRepositoryPath
            packageType
            packageName
            packageVersion
            size
            properties {
                key
                values
            }
            evidenceConnection {
              totalCount
              pageInfo {
                hasNextPage
                hasPreviousPage
                startCursor
                endCursor
              }
              edges {
                cursor
                node {
                  name
                  createdAt
                  createdBy
                  verified
                  signingKey {
                    alias
                  }
                  predicateSlug
                }
              }
            }
          }
        }
      }
      fromBuilds {
        name
        number
        startedAt
        repositoryKey
        evidenceConnection(first: 3) {
          totalCount
          pageInfo {
            hasNextPage
            hasPreviousPage
            startCursor
            endCursor
          }
          edges {
            cursor
            node {
              name
              createdAt
              createdBy
              verified
              signingKey {
                alias
              }
              predicateSlug
            }
          }
        }
      }
    }
  }
}

Sample query based on 'project' in GraphQL format:

{
  releaseBundleVersion {
    getVersion(
      projectKey: "jfmd"
      name: "metadata"
      version: "7.162.0"
    ) {
      createdBy
      createdAt
//    etc... [see sample above]
}

Query Criteria

The query uses the following criteria to determine which Release Bundle version to include in the response:

Field

Subfield

Mandatory/Optional

Description

getVersion

 

The criteria that define which Release Bundle v2 version to return.

 

repositoryKey

optional

The repository key that contains the Release Bundle version, release-bundles-v2 or [project_name]-release-bundles-v2.

 

projectKey

optional

The project key to which the Release Bundle version belongs.

Important

You must define either the repositoryKey or the projectKey.

However, if both are defined, only the repositoryKey is used.

 

name

optional

The name of the Release Bundle version.

version

optional

The Release Bundle version.

Fields to Return

The search query can include one or more of the following fields, which determine the data fields to return from the Release Bundle version:

Field

Description

createdBy

The user who created the Release Bundle version.

createdAt

The timestamp of when the Release Bundle version was created.

evidenceConnection

Information about evidence related to the Release Bundle. For complete details, see Search Evidence.

artifactsConnection

Information related to the artifacts in the Release Bundle. See Artifacts (artifactsConnection).

fromBuilds

Information related to the builds from which the Release Bundle was created (where applicable). See Builds (fromBuilds).

Artifacts (artifactsConnection)

The artifactsConnection section of the request returns the following fields about the artifacts in the Release Bundle version:

Field

Description

path

The artifact path inside the Release Bundle.

name

The artifact name.

sha256

The SHA256 of the artifact.

sourceRepositoryPath

The source path from which the artifact was added to the Release Bundle.

packageType

The package type of the package to which the artifact belongs.

packageName

The name of the package to which the artifact belongs.

packageVersion

The version of the package to which the artifact belongs.

size

The artifact size.

properties

User-defined properties defined for the artifact.

evidenceConnection

Information related to the evidence associated with each artifact. For more details about evidence, see Search Evidence.

Builds (fromBuilds)

When the Release Bundle version is based on a build, the fromBuilds section returns the following fields about the build:

Property

Description

name

The build name.

number

The build number.

startedAt

The timestamp of when the build was started.

repositoryKey

The repository that contains the build info.

evidenceConnection

Information related to the evidence associated with each artifact. For more details about evidence, see Search Evidence.

Note

For details about fields that are common across all One Model domains, see One Model GraphQL Common Patterns and Conventions.

Sample Response

{
    "data": {
        "releaseBundleVersion": {
            "getVersion": {
                "projectKey": "rtpkg"
                "name": "package_handler"
                "version": "5.95.0"
                "createdBy": "devf-auto-pipelines",
                "createdAt": "2025-03-23T00:35:13.328Z",
                "evidenceConnection": {
                    "totalCount": 4,
                    "pageInfo": {
                        "hasNextPage": true,
                        "hasPreviousPage": false,
                        "startCursor": "ZXZpZGVuY2U6MQ==",
                        "endCursor": "ZXZpZGVuY2U6Mw=="
                    },
                    "edges": [
                        {
                            "cursor": "ZXZpZGVuY2U6MQ==",
                            "node": {
                                "name": "cyclonedx-sbom-1742690121339.json",
                                "createdAt": "2025-03-23T00:35:21.015Z",
                                "createdBy": "jfxr@01g8dfvqf7z5czyd2e95bdar83",
                                "verified": true,
                                "signingKey": {
                                    "alias": "rbv2-gpg-key"
                                },
                                "predicateSlug": "cyclonedx-sbom"
                            }
                        },
                        {
                            "cursor": "ZXZpZGVuY2U6Mg==",
                            "node": {
                                "name": "cyclonedx-vex-1742690121379.json",
                                "createdAt": "2025-03-23T00:35:21.061Z",
                                "createdBy": "jfxr@01g8dfvqf7z5czyd2e95bdar83",
                                "verified": true,
                                "signingKey": {
                                    "alias": "rbv2-gpg-key"
                                },
                                "predicateSlug": "cyclonedx-vex"
                            }
                        },
                        {
                            "cursor": "ZXZpZGVuY2U6Mw==",
                            "node": {
                                "name": "promotion-1742690117602.json",
                                "createdAt": "2025-03-23T00:35:17.602Z",
                                "createdBy": "devf-auto-pipelines",
                                "verified": true,
                                "signingKey": {
                                    "alias": "rbv2-gpg-key"
                                },
                                "predicateSlug": "promotion"
                            }
                        }
                    ]
                },
                "artifactsConnection": {
                    "totalCount": 151,
                    "pageInfo": {
                        "hasNextPage": true,
                        "hasPreviousPage": false,
                        "startCursor": "YXJ0aWZhY3Q6MQ==",
                        "endCursor": "YXJ0aWZhY3Q6Mw=="
                    },
                    "edges": [
                        {
                            "cursor": "YXJ0aWZhY3Q6MQ==",
                            "node": {
                                "path": "package_handler/5.95.0/artifacts/maven/com/jfrog/ph/ph-npm/5.95.0",
                                "name": "ph-npm-5.95.0.jar",
                                "packageType": "maven",
                                "sourceRepositoryPath": "dev-releases-maven-local/com/jfrog/ph/ph-npm/5.95.0/ph-npm-5.95.0.jar",
                                "evidenceConnection": {
                                    "totalCount": 0,
                                    "pageInfo": {
                                        "hasNextPage": false,
                                        "hasPreviousPage": false,
                                        "startCursor": null,
                                        "endCursor": null
                                    },
                                    "edges": null
                                }
                            }
                        },
                        {
                            "cursor": "YXJ0aWZhY3Q6Mg==",
                            "node": {
                                "path": "package_handler/5.95.0/artifacts/maven/com/jfrog/ph/ph-npm/5.95.0",
                                "name": "ph-npm-5.95.0.pom",
                                "packageType": "maven",
                                "sourceRepositoryPath": "dev-releases-maven-local/com/jfrog/ph/ph-npm/5.95.0/ph-npm-5.95.0.pom",
                                "evidenceConnection": {
                                    "totalCount": 0,
                                    "pageInfo": {
                                        "hasNextPage": false,
                                        "hasPreviousPage": false,
                                        "startCursor": null,
                                        "endCursor": null
                                    },
                                    "edges": null
                                }
                            }
                        },
                        {
                            "cursor": "YXJ0aWZhY3Q6Mw==",
                            "node": {
                                "path": "package_handler/5.95.0/artifacts/maven/com/jfrog/ph/package-handler-acl/5.95.0",
                                "name": "package-handler-acl-5.95.0-packages-swagger.json",
                                "packageType": "maven",
                                "sourceRepositoryPath": "dev-releases-maven-local/com/jfrog/ph/package-handler-acl/5.95.0/package-handler-acl-5.95.0-packages-swagger.json",
                                "evidenceConnection": {
                                    "totalCount": 0,
                                    "pageInfo": {
                                        "hasNextPage": false,
                                        "hasPreviousPage": false,
                                        "startCursor": null,
                                        "endCursor": null
                                    },
                                    "edges": null
                                }
                            }
                        }
                    ]
                },
                "fromBuilds": [
                    {
                        "name": "package-handler-build-release",
                        "number": "5.95.0-20250322232601-1",
                        "startedAt": "2025-03-22T23:32:29.229Z",
                        "evidenceConnection": {
                            "totalCount": 1,
                            "pageInfo": {
                                "hasNextPage": false,
                                "hasPreviousPage": false,
                                "startCursor": "ZXZpZGVuY2U6MQ==",
                                "endCursor": "ZXZpZGVuY2U6MQ=="
                            },
                            "edges": [
                                {
                                    "cursor": "ZXZpZGVuY2U6MQ==",
                                    "node": {
                                        "name": "predicatetype-1742719269605.json",
                                        "createdAt": "2025-03-23T08:41:00.894Z",
                                        "createdBy": "shays",
                                        "verified": false,
                                        "signingKey": null,
                                        "predicateSlug": "predicatetype"
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        }
    }
}

Status Codes:

Code

Description

200

OK

401

Bad Credentials

403

Permission Denied