Curl command for a bundle status | Community
Skip to main content
hitesh_m
Level 3
July 6, 2017
Solved

Curl command for a bundle status

  • July 6, 2017
  • 1 reply
  • 4769 views

Hi,

I am looking for a curl command that can tell me the status of my bundle (Active, Resolved etc).

I am using following to start but it returns me results like - {"fragment":false,"stateRaw":32}

curl -u  admin:admin http://localhost:4502/system/console/bundles/com.my.aem-project-bundle -Faction=start

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

curl -u admin:admin http://localhost:4502/system/console/bundles/<bundleSymbolicName>.json

check for response.data.state

Bundle id can also be used instead of Symbolic Name.

How to check if a CQ bundle is Active

curl -u admin:admin http://localhost:4502/system/console/bundles/<bundle number or symbolic name>.json | jsawk -n 'if(this.data[0].state=="Active")' | echo "Bundle is Active"

How to check if All bundles are active

curl -u admin:admin http://localhost:4502/system/console/bundles/<bundle number or symbolic name>.json | jsawk -n 'if(this.s[3] + this.s[4] > 0)' | echo "There is some problem not all bundle is active"

I hope this helps.

~kautuk

1 reply

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
July 7, 2017

curl -u admin:admin http://localhost:4502/system/console/bundles/<bundleSymbolicName>.json

check for response.data.state

Bundle id can also be used instead of Symbolic Name.

How to check if a CQ bundle is Active

curl -u admin:admin http://localhost:4502/system/console/bundles/<bundle number or symbolic name>.json | jsawk -n 'if(this.data[0].state=="Active")' | echo "Bundle is Active"

How to check if All bundles are active

curl -u admin:admin http://localhost:4502/system/console/bundles/<bundle number or symbolic name>.json | jsawk -n 'if(this.s[3] + this.s[4] > 0)' | echo "There is some problem not all bundle is active"

I hope this helps.

~kautuk

Kautuk Sahni