Skip to main content

Manage Assets

Share project as asset

To share a project with other users or teams, open the project and navigate to the Overview page and then select the Share project capability at the top right of the page. Then you are asked to enter the following information for sharing the project as an asset:

  • Asset Name: The display name of the asset (required)
  • Asset Catalog: The catalog name in which you want to share this asset (required)
  • Version: The version of this asset (e.g. 1.0.0). Each version will be represented as its own asset in the selected catalog (required)
  • Tags: Tags that allow other users to search for (optional)
  • Contributed By: Name or organization (required)
  • Description: Description of the asset (optional)
  • Replace existing version: If enabled, it will replace the existing version of this asset. By default, it is disabled (optional)

Confirming the entries will create an asset in the selected asset catalog, which can be reused by other users having access to this asset catalog.

ℹ️note

The Share project button will only be enabled for user's having either of the below mentioned accesses:

  • admin access in Git and dc_developer in Solution Designer.
  • write access in Git and dc_developer in Solution Designer.
  • write access in Git and dc_analyst in Solution Designer.

Export an Asset as a zip file

This feature allows user to download an asset as a zip file and then share this asset to a different cluster without having a direct connection between two systems/cluster. To Download an asset as a zip file, user need to use the api interface for k5-asset-manager. By default the external route for service is disabled and can be enabled by updating the configuration in Extended configuration. Once the route is enabled use the api "/export" with GET method and following parameters:

  • catalogAlias: Alias of the asset catalog where asset is available
  • acronym: Acronym for the asset that need to be exported
  • version: asset version to be exported

Curl for api call:

curl -X 'GET' \
'{{K5_ASSET_MANAGER_BASE_URL}}/api/v1/{{catalogAlias}}/assets/{{acronym}}/{{version}}/export' \
-H 'accept: application/json; charset=utf-8' \
-H 'Authorization: Bearer {{Bearer_Token}}'

Once this api request is successful, the asset will be available to download as a zip file.

Import Asset from Zip

This feature allows user to use the zip file of an asset exported with Export Asset and import it as a new asset in a different designer/cluster. To import an asset from a zip file, user need to use the api interface for k5-asset-manager. By default the external route for service is disabled and can be enabled by updating the configuration in Extended configuration.

Use the api "/importAsset" with GET method and following parameters:

  • file: zip file from previous step
  • catalogAlias: Alias of the asset catalog in new designer where asset has to be shared
  • gitProviderAlias: git provider alias in the new designer where user want to store the asset
  • groupKey: groupKey in the new designer where user want to store the asset
  • repositoryKey: repositoryKey in the new designer where user want to store the asset, this can be same as acronym of original asset only if it's already not used by a different service project in the designer where we want to import the asset. Multiple versions of same asset can use the same acronym.

Curl for api call:

curl -X 'POST' \
'{{K5_ASSET_MANAGER_BASE_URL}}/api/v1/{{catalogAlias}}/assets/importAsset' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {{Bearer_Token}}' \
-H 'Content-Type: multipart/form-data' \
-F 'file={{ASSET_ZIP}};type=application/zip' \
-F 'gitProviderAlias={{GIT_PROVIDER_ALIAS}}' \
-F 'groupKey={{GROUP_KEY}}' \
-F 'repositoryKey={{REPOSITORY_KEY}}'

Once this API operation is successful, the asset should be available to use in the catalog {{catalogAlias}} with the acronym specified in the request.