Adding an image to Cognos Analytics
Use the image.sh script with the -c upload option to add an image to a Cognos Analytics service instance.
Synopsis
./image.sh
-c upload
-n
instance_namespace
-t
tethered_namespace
-u
user_name
-p
password
-i
image_file_name [-d
portal_subdirectory] [-h]
Options
- -d portal_subdirectory
- The destination subdirectory for the image file.
- -i image_file_name
- The name of the image file.
- -n instance_namespace
- The namespace or project.
- -p password
- Cloud Pak for Data user password.
- -t tethered_namespace
- Namespace in which Cognos Analytics is provisioned.
- -u user_name
- Cloud Pak for Data username.
- -h
- Prints help to the console and exits.
Example
The following example adds the image1.gif file to the /opt/ibm/cognos/analytics/webcontent/bi/images/customImages/portal_subdir directory:
export ADMIN_NAME=<IBM Software Hub platform administrator user name>
export ADMIN_PASSWORD=<IBM Software Hub platform administrator password>
./image.sh -c upload -n ${PROJECT_CPD_INST_OPERANDS} -t ${PROJECT_CPD_INSTANCE_TETHERED} -u ${ADMIN_NAME} -p ${ADMIN_PASSWORD} -i image1.gif -d portal_subdir
If the image upload is successful, the script displays details of the file:
[{"id":"2f908a2fcb2b11bfbbef8db36823422510ed8e79c178b5aa484b51e411b91243","imageFilePath":"portal_subdir/image1.gif","createdAt":1709755597}]
Script file
For more information about creating the image.sh script, see Creating administration scripts.