Create Release Bundle v2 Version – Examples

JFrog REST APIs

Content Type
REST API

The following examples show how to create a Release Bundle v2 version using different source types.

Source Type – AQL

# Request
curl -X POST -u <USERNAME>:<TOKEN> -H "Content-Type: application/json" \
"https://jfrog-platform.example.com/lifecycle/api/v2/release_bundle?repository_key=release-bundles-repo" \
-d '{
      "release_bundle_name": "aql-example",
      "release_bundle_version": "1.0",
      "sources": [
        {
          "source_type": "aql",
          "aql": "items.find({\"repo\":\"generic-local\",\"path\":{\"$match\":\"configs/*\"}})"
        }
      ]
    }'

Source Type – Artifacts

# Request
curl -X POST -u <USERNAME>:<TOKEN> -H "Content-Type: application/json" \
"https://jfrog-platform.example.com/lifecycle/api/v2/release_bundle?repository_key=release-bundles-repo" \
-d '{
      "release_bundle_name": "artifacts-example",
      "release_bundle_version": "1.0",
      "sources": [
        {
          "source_type": "artifacts",
          "artifacts": [
            { "path": "generic-local/app.jar", "sha256": "f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2" },
            { "path": "generic-local/config.yaml" }
          ]
        }
      ]
    }'

Source Type – Builds

# Request
curl -X POST -u <USERNAME>:<TOKEN> -H "Content-Type: application/json" \
"https://jfrog-platform.example.com/lifecycle/api/v2/release_bundle?repository_key=release-bundles-repo" \
-d '{
    "release_bundle_name": "builds-example",
    "release_bundle_version": "1.0",
    "sources": [
        {
            "source_type": "builds",
            "builds": [
                {
                    "build_repository": "artifactory-build-info",
                    "build_name": "my-app-build",
                    "build_number": "42",
                    "build_started": "2025-07-06T10:00:00.000Z"
                }
            ]
        }
    ]
}'

Source Type – Packages

# Request
curl -X POST -u <USERNAME>:<TOKEN> -H "Content-Type: application/json" \
"https://jfrog-platform.example.com/lifecycle/api/v2/release_bundle?repository_key=release-bundles-repo" \
-d '{
    "release_bundle_name": "packages-example",
    "release_bundle_version": "1.0",
    "sources": [
        {
            "source_type": "packages",
            "packages": [
                {
                    "repository_key": "npm-local",
                    "package_type": "maven",
                    "package_name": "my-npm-package",
                    "package_version": "2.1.5"
                }
            ]
        }
    ]
}'

Source Type – Release Bundles

# Request
curl -X POST -u <USERNAME>:<TOKEN> -H "Content-Type: application/json" \
"https://jfrog-platform.example.com/lifecycle/api/v2/release_bundle?repository_key=release-bundles-repo" \
-d '{
    "release_bundle_name": "release-bundle-example",
    "release_bundle_version": "2.0",
    "sources": [
        {
            "source_type": "release_bundles",
            "release_bundles": [
                {
                    "repository_key": "release-bundles-repo",
                    "release_bundle_name": "base-platform",
                    "release_bundle_version": "1.5"
                }
            ]
        }
    ]
}'

Multiple Source Types

The following example creates a major release by combining artifacts from all possible source types into a single Release Bundle version.

Request:

curl -X POST -u <USERNAME>:<TOKEN> \
  -H "Content-Type: application/json" \
  -H "X-JFrog-Signing-Key-Name: my-signing-key" \
  "https://jfrog-platform.example.com/lifecycle/api/v2/release_bundle?repository_key=release-bundles-repo&async=true" \
  -d @request-body.json

request-body.json

{
    "release_bundle_name": "Mega-Release",
    "release_bundle_version": "v3.0.0-GA",
    "tag": "general-availability",
    "sources": [
        {
            "source_type": "builds",
            "builds": [
                {
                    "build_repository": "artifactory-build-info",
                    "build_name": "backend-service",
                    "build_number": "288",
                    "build_started": "2025-07-06T18:00:00.000Z",
                    "include_dependencies": true
                }
            ]
        },
        {
            "source_type": "packages",
            "packages": [
                {
                    "repository_key": "npm-local",
                    "package_type": "npm",
                    "package_name": "frontend-ui-kit",
                    "package_version": "4.1.0"
                }
            ]
        },
        {
            "source_type": "release_bundles",
            "release_bundles": [
                {
                    "project_key": "shared-svcs",
                    "release_bundle_name": "auth-service",
                    "release_bundle_version": "1.8.2"
                }
            ]
        },
        {
            "source_type": "artifacts",
            "artifacts": [
                {
                    "path": "generic-local/legal/EULA.pdf"
                }
            ]
        },
        {
            "source_type": "aql",
            "aql": "items.find({\"repo\":\"docker-local\",\"path\":{\"$match\":\"base-images/ubi\"},\"name\":{\"$match\":\"8.*\"}})"
        }
    ]
}

Successful response (asynchronous):

{
    "repository_key": "release-bundles-repo",
    "release_bundle_name": "Mega-Release",
    "release_bundle_version": "v3.0.0-GA",
    "created": "2025-07-06T13:20:00.000Z"
}

Bad Request:

The following request is missing a required field (release_bundle_name):

curl -X POST -u <USERNAME>:<TOKEN> \
  -H "Content-Type: application/json" \
  "https://jfrog-platform.example.com/lifecycle/api/v2/release_bundle?repository_key=release-bundles-repo" \
  -d '{
        "release_bundle_version": "1.0.0",
        "sources": [
            {
                "source_type": "aql",
                "aql": "items.find({\"repo\":\"generic-local\"})"
            }
        ]
     }'

Error Response (400 Bad Request):

{
  "errors": [
    {
      "status": 400,
      "message": "release_bundle_name is mandatory"
    }
  ]
}

Dry Run

# Request
curl -X POST -u <USERNAME>:<TOKEN> -H "Content-Type: application/json" \
"https://jfrog-platform.example.com/lifecycle/api/v2/release_bundle?dry_run=true" \
-d '{  
    "release_bundle_name": "Multi-Bundle",
    "release_bundle_version": "3.0.0",
    "sources": [
        {
            "source_type": "release_bundles",
            "release_bundles": [
                {
                    "project_key": "default",
                    "repository_key": "release-bundles-v2",
                    "release_bundle_name": "bundle-9567994892",
                    "release_bundle_version": "v-9751670631"
                }
            ]
        }
    ],
    "filters": {
        "included": [
            {}
        ],
        "excluded": [
            {"sha256": "c059d2a00e3d491a6723b8f1bab20cd51554860ca2d76194513452bc0ef741e9"}
        ]
    }
}