You can modify the default icon in the service catalog to display a custom image. When you modify the icon, it changes for all tenants. You cannot configure tenant-specific icons for the catalog.

Before you begin

  • Convert the image to a base64 encoded string. You can use a conversion tool such as www.dailycoding.com/UTILS/CONVERTER/IMAGETOBASE64.ASPX.

  • cURL must be installed on the machine where you run the commands.

  • You must have the credentials for a vRealize Automation user with the system administrator role.

About this task

Commands are provided for Linux or Mac and Windows so that you can run the cURL commands on any of those operating systems.

Procedure

  1. Set the VCAC variable in the terminal session for the cURL commands.

    Operating System

    Command

    Linux/Mac

    export VCAC=<VA URL>

    Windows

    set VCAC=<VA URL>

  2. Retrieve the authentication token for the system administrator user.

    Operating System

    Command

    Linux/Mac

    curl https://$VCAC/identity/api/tokens --insecure -H "Accept: application/json" -H 'Content-Type: application/json' --data '{"username":"<Catalog Administrator User>","password":"<password>","tenant":"vsphere.local"}'

    Windows

    curl https://%VCAC%/identity/api/tokens --insecure -H "Accept:application/json" -H "Content-Type:application/json" --data "{\"username\":\"<Catalog Administrator User>\",\"password\":\"<password>\",\"tenant\":\"vsphere.local\"}"

    An authentication token is generated.

  3. Set the authentication token variable by replacing <Auth Token> with the token string you generated in the previous step.

    Operating System

    Command

    Linux/Mac

    export AUTH="Bearer <Auth Token>"

    Windows

    set AUTH=Bearer <Auth Token>

  4. Add the base64 encoded string for the image.

    Operating System

    Command

    Linux/Mac

    curl https://$VCAC/catalog-service/api/icons --insecure -H "Accept: application/json" -H 'Content-Type: application/json' -H "Authorization: $AUTH" --data '{"id":"cafe_default_icon_genericAllServices","fileName":"<filename>","contentType":"image/png","image":"<IMAGE DATA as base64 string>"}'

    Windows

    curl https://%VCAC%/catalog-service/api/icons --insecure -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: %AUTH%" --data "{\"id\":\"cafe_default_icon_genericAllServices\",\"fileName\":\"<filename>\",\"contentType\":\"image/png\",\"image\":\"<IMAGE DATA as base64 string>\"}"

Results

The new services icon appears in the service catalog after approximately five minutes.

If you want to revert to the default icon, you can run the following command after you follow steps 1-3..

Operating System

Command

Linux/Mac

curl https://$VCAC/catalog-service/api/icons/cafe_default_icon_genericAllServices --insecure -H "Authorization: $AUTH" --request DELETE

Windows

curl https://%VCAC%/catalog-service/api/icons/cafe_default_icon_genericAllServices --insecure -H "Authorization: %AUTH%" --request DELETE