Create Application Version

JFrog REST APIs

Content Type
REST API

Description: Creates a new version of an application.

Since: AppTrust 1.16.4

Usage: POST https://{{artifactory-host}}/apptrust/api/v1/applications/{{application_key}}/versions/

Request Headers:

Parameter

Description

X-JFrog-Signing-Key-Name

The GPG/RSA key-pair name given in Artifactory. If no key is provided, the command creates or uses the default key.

Query Parameters (optional):

Parameter

Type

Description

async

boolean

Determines whether the operation should be asynchronous (true) or synchronous (false).

The default value is true, which means that Artifactory waits for application version creation to complete before allowing you to move on to the next task.

Consumes: application/json

Request Body:

Parameter

Required/Optional

Type

Description

version

required

string

The application version to be created.

Note

It is recommended to use SemVer formatting to maintain clarity and support CI/CD pipeline automations.

sources

required

array:object

The list of sources to include in the version. Sources can include:

  • artifacts

  • packages

  • builds

  • Release Bundles

  • other application versions (from this or other applications)

Important

You must define at least one source. Each source type has at least one required parameter.

sources.aql

optional

object

The contents of the AQL query to include in the application version.

sources.skip_docker_manifest_resolution

optional

boolean

Determines whether to skip the resolution of the Docker manifest, which adds the image layers to the application version.

The default value is false (the manifest is resolved and image layers are included).

sources.artifacts

optional

array:object

The list of artifacts to include in the application version.

sources.artifacts.path

required

string

The path to the artifact.

sources.artifacts.sha256

optional

string

The SHA256 of the artifact.

sources.packages

optional

array:object

The list of packages to include in the application version.

sources.packages.type

required

string

The package type (for example, Docker).

sources.packages.name

required

string

The package name.

sources.packages.version

required

string

The package version.

sources.packages.repository_key

required

string

The repository key of the package.

sources.builds

optional

array:object

The list of builds to include in the application version.

sources.builds.repository_key

optional

string

The repository key of the build. If the key is omitted, the default repository is used (artifactory-build-info).

sources.builds.name

required

string

The build name.

sources.builds.number

required

string

The build number (run).

sources.builds.started

optional

string

The timestamp (ISO 8601 standard) when the build was created. If this is omitted, the system uses the run, as identified by the build_name and build_number combination.

sources.builds.include_dependencies

optional

boolean

Determines whether to include build dependencies in the application version.

The default value is false.

sources.release_bundles

optional

array:object

The list of Release Bundles v2 to include in the application version.

sources.release_bundles.project_key

required

string

The project key associated with the Release Bundle.

sources.release_bundles.repository_key

required

string

The repository key associated with the Release Bundle.

sources.release_bundles.name

required

string

The Release Bundle name.

sources.release_bundles.version

required

string

The Release Bundle version.

sources.versions

optional

array:object

The list of application versions to include in this application version.

sources.versions.application_key

optional

string

The application key. The default is the same application_key as the application for which this version is being created.

sources.versions.version

required

string

The application version.

tag

optional

string

A tag to be associated with the application version. A tag is a single free text value, limited to 128 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics in between. The tag is usually used to represent the branch.

Response Body:

Parameter

Type

Description

application_key

string

The unique key of the application for which the version was created.

version

string

The application version (e.g., 1.0.0).

created_by

string

The user ID who created this application version.

created

string

The ISO 8601 timestamp that indicates when the application version was created.

tag

string

The tag associated with the application version, if one was provided during creation.

status

string

The initial status of the application version (for example, IN_PROGRESS if async).

Sample Request:

POST 'https://{host}.jfrog.io/apptrust/api/v1/applications/my-super-app/versions?async=false'
X-JFrog-Signing-Key-Name: my-signing-key 
Content-Type: application/json
Authorization: ••••••

{
    "version": "1.2.3",
    "sources": {
      "artifacts": [
        {
          "path": "my-repo/path/to/artifact.jar",
          "sha256": "a1b2c3d4e5f6..."
        }
      ],
      "builds": [
        {
          "name": "my-app-build",
          "number": "15",
          "include_dependencies": true
        }
      ],
      "versions": [
        {
          "application_key": "alpha-app",
          "version": "2.5.0"
        }
      ]
    },
    "tag": "stable-release"
  }

Sample Response:

{
  "application_key": "my-super-app",
  "version": "1.2.3",
  "created_by": "user@example.com",
  "created": "2025-05-30T10:00:00Z",
  "tag": "stable-release",
  "status": "IN_PROGRESS"
}

Status Codes:

Code

Description

201

Success (synchronous)

202

Success (asynchronous)

400

Bad Request

401

Bad Credentials

403

Permission Denied

404

Not Found

409

Conflict