What is the use of Jq in Microservice Deployment

What product/components do you use and which version/fix level are you on?

Cumulocity IoT

Is your question related to the free trial, or to a production (customer) instance?

Free Trial

What are you trying to achieve? Please describe it in detail.

I was using the microservice utility tool to deploy the microservices. There is a jq as a prerequisite in the documentation, and as per my knowledge jq is used for filtering JSON data. So does it do anything with the cumulocity.json file or is there anything else? Please let me know why the tool uses the jq internally and what is the main purpose of using jq in the deployment of the microservice.

Do you get any error messages? Please provide a full error message screenshot and log file.

Have you installed all the latest fixes for the products and systems you are using?

Hi,

jq is used to extract information from the responses of Cumulocity IoT during deployment. You can see this in the source code of the script:

  • The application id is extracted from the response to check if deployment was successful
  • In case of an error response, it is used to extract the error message from the response
1 Like

Hi Harald,

So on the successful deployment, we get a JSON response as similar to the Cumulocity Microservice API right?

Regards,
Harald

the utility uses the Cumulocity API to do the deployment, so it receives JSON responses. It then uses jq to parse them and as a user of the utility you will only receive human-readable responses.

Ohh okay, it’s much clear now. I am using a Free trial so I don’t have the response that it gives after a successful deployment, if possible can you show the response jq parse and all?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.