7.4

Table Of Contents
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":"<filena
me>","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>\"}"
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..
Managing vRealize Automation
VMware, Inc. 39