Uploaded/installed packages are placed in function specific folders.
How can I query via curl to get the folder location?
I would hate to have to install/locate manually to get that location before replicating.
Solved! Go to Solution.
Views
Replies
Total Likes
Packages are always grouped based on 'group' property of the package. For example, core components have mentioned group as 'adobe/cq60' and is placed at /etc/packages/adobe/cq60/core.wcm.components.config-2.2.2.zip
If you want the full list of packages you can use the package list API at http://localhost:4502/crx/packmgr/list.jsp
Packages are always grouped based on 'group' property of the package. For example, core components have mentioned group as 'adobe/cq60' and is placed at /etc/packages/adobe/cq60/core.wcm.components.config-2.2.2.zip
If you want the full list of packages you can use the package list API at http://localhost:4502/crx/packmgr/list.jsp
You can use the GET command below:
http://<host>:<port>/etc/packages/my_packages.infinity.json
Where "my_packages" is one of the folders under /etc/packages where packages will be stored. You can replace this with your custom folder name.
Views
Replies
Total Likes
The following document may be helpful:
Views
Replies
Total Likes
Views
Replies
Total Likes
You can refer to the following documents to send POST request using Python 3 requests library:
https://requests.readthedocs.io/en/master/user/quickstart/
https://www.geeksforgeeks.org/get-post-requests-using-python/
Views
Replies
Total Likes
To find the folder location of uploaded or installed packages programmatically, you can use a curl command to query the relevant endpoint if your environment supports API access to retrieve this information. Here are some general steps:
Identify the API Endpoint:
Use curl to Query the API:
Once you have identified the API endpoint, use curl to query it. For example:
Replace https://yourserver.com/api/packages with the actual endpoint for your system, and provide an appropriate authorization token if needed.
Filter for Folder Locations:
Parse the response to identify the folder locations. Many APIs return data in JSON format, so you can use jq to extract specific fields like the folder path:
This command fetches all packages and extracts their name and folder location.
Automate Replication:
If the system doesn’t provide an API for querying package locations, you may have to check for documentation on other commands (e.g., via a CLI if available) that could list installed packages and their locations. If no direct API is available, another option is to automate an SSH script that lists directories within the base folder where packages are typically installed.
Source: https://talenttitan.com/candidates/interview-preparation/
Views
Replies
Total Likes
Views
Likes
Replies