Asset

Create an asset

Creates a new asset.

post/asset

Request body

type'docker-image' | 'lambda' | 'bundle' required

The type of the asset.

urlstring uri required

The url of the asset.

• For docker-image assets, this should be the local tagged image or image name.

• For lambda assets, this should be the file path of the lambda package.

namestring required

The name of the asset.

build_idinteger required

The ID of the build that the asset belongs to.

application_idinteger required

The ID of the application that the asset belongs to.

commit-shastring

The commit SHA that the asset was built from.

platform'x86_64' | 'arm_64'

The platform of the asset.

Example request

{
  "type": "docker-image",
  "url": "https://example.com/my-asset.jpg",
  "name": "My asset",
  "build_id": 345,
  "application_id": 234,
  "commit-sha": "1234",
  "metadata": {
    "key": "value"
  },
  "platform": "arm_64"
}

Response

The operation was successful.

idinteger required

The ID of the asset.

namestring

The name of the asset.

build_idinteger required

The ID of the build that the asset belongs to.

type'docker-image' | 'lambda' | 'bundle' required

The type of the asset.

platform'x86_64' | 'arm_64'

The platform of the asset.

urlstring uri required

The url of the asset.

•For docker-image assets, this should be the local tagged image or image name.

•For lambda assets, this should be the file path of the lambda package.

nrnstring

The resource name (NRN) uniquely identifying the asset.

branchstring

The branch that the asset was built from.

Example response

{
  "id": 123,
  "name": "My Asset",
  "build_id": 345,
  "type": "docker-image",
  "platform": "arm_64",
  "url": "https://example.com/my-asset.jpg",
  "nrn": "organization=1:account=2:namespace=4:application=4:build=345:asset=123",
  "branch": "main",
  "commit": {
    "id": 234,
    "permalink": "https://example.com/1234"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.