The custom tags configuration file may be uploaded manually using the GUI (Graphical User Interface) or programmatically via the UNUM Insight Analytics Flow REST API.


Programmatic upload allows you, the Administrator, to perform updates of the file based on changing conditions in your infrastructure.


For example, upload a new file automatically every time an employee joins a project team, a new VM is brought online, or a server is added to the server pool and load sharing group to provide a service.


The uploading of the custom tags configuration file requires the establishment of an HTTPS session, followed by the uploading operation.


The following paragraphs describe how to establish the HTTPS session and perform the file uploading using the CLI command “curl” as an example.  The REST client is supported on a variety of programming language, so you should adapt the example to the programming environment of choice.


Session Authentication                        

Currently, UNUM Insight Analytics Flow supports authentication through dropped cookie session ids. Obtain a session cookie before performing the tags file upload. To obtain the session cookie:                        

URL: https://<vcf-ia-server>/vcf-center/auth/ss_login        

               

Method: POST                

       

Content-type: application/x-www-form-urlencoded        

               

Form parameters: username=<vcfia-login-user>, password=<vcfia-login-password>


Example using 'curl' command:


Custom Tags Configuration - Successful Upload Example



Note: (-k: forces curl to trust the server, -c session.txt: stores the new session cookie locally in session.txt)



Once the session cookie is available, the file upload may be performed in two different methods:


    1. Upload via Message Body


To upload the tags file in XML format:


URL: https://<vcf-ia-server>/maestro/projects/


Method: POST


Content-type: application/xml, or text/xml


Request body: (the xml data)


Example using 'curl' command:

curl -k -b session.txt -XPOST "https://<vcf-ia-server>/maestro/projects" -H "Content-Type: application/xml" --data-binary @./simple.xml


(-b session.txt: re-uses the saved authenticated session cookie, --data-binary: forces curl to respect new line characters in simple.xml and upload contents of simple.xml in message body)


To upload the tags file in CSV format:


URL: https://<vcf-ia-server>/maestro/projects/


Method: POST


Content-type: application/csv, or text/csv


Request-body: (the csv data)


Example using 'curl' command:


curl -k -b session.txt -XPOST "https://<vcf-ia-server>/maestro/projects" -H "Content-Type: application/csv" --data-binary @./simple.csv


(-b session.txt: re-uses the saved authenticated session cookie, --data-binary: forces curl to respect new line characters in simple.csv and upload contents of simple.csv in message body)

       

    1. Upload via Multipart Form


To upload the tags file in XML format:


URL: https://<vcf-ia-server>/maestro/projects/_upload/xml


Method: POST


Content-type: multipart/form-data


Parameter name: "file"


Example using 'curl' command:


curl -k -b session.txt -XPOST https://<vcf-ia-server>/maestro/projects/_upload/xml -H "Content-Type: multipart/form-data" -F file=@./simple.xml


To upload the tags file in CSV format:


URL: https://<vcf-ia-server>/maestro/projects/_upload/csv


Method: POST


Content-type: multipart/form-data


Parameter name: "file"


Example using 'curl' command:


curl -k -b session.txt -XPOST https://<vcf-ia-server>/maestro/projects/_upload/csv -H "Content-Type: multipart/form-data" -F file=@./simple.csv