I want to know how to retrieve a deployed package given the id in a zip format with all the deployed components and its package.xml :

enter image description here

I can access the list of components that have been deployed using metadata api via workbench by executing following rest API request :

/services/data/v53.0/metadata/deployRequest/<id of deployment>?includeDetails=true

Which will give me a list like this one : enter image description here

Where each item represent a component been uploaded. But it only show me the name of the component, and not the file itself, nor the package.xml for all the components.

  • 1
    There are different types of package. If you are discussing managed packages, these are Intellectual Property ("IP") Protected - you cannot access internal details of the package, only the parts that are deliberately exposed for access on subscriber orgs. All apex code is invisible except for classes, properties and methods that are declared with global access modifier (and then you can only see the "signature"). Other package types, such as unlocked packages, allow you access to the package content.
    – Phil W
    Commented May 31, 2022 at 18:59
  • Also note that packages don't have a package.xml as part of the metadata.
    – Phil W
    Commented May 31, 2022 at 19:19
  • As you can see in the diagram, it is not managed packaged. It it is an sfdx standard package deployed via bitbucket pipeline
    – vanessen
    Commented Jun 1, 2022 at 4:58
  • 1
    What is an "sfdx standard package"? If you mean metadata that is sent via sfdx force:source:deploy this is not really a package, it is unpackaged metadata. Here the package.xml is simply an instruction as to what to deploy at the time the deployment is performed. To see the content you will need to retrieve the metadata again, but there is no way to retrieve the package.xml itself as such since that isn't a metadata item, just the deployment content "mask".
    – Phil W
    Commented Jun 1, 2022 at 6:10
  • (I did miss the fact that the deployment shows 43/43 components which was the clue, since deployment of a package would show 1/1; the package is counted as a single component during deployment.)
    – Phil W
    Commented Jun 1, 2022 at 6:17


You must log in to answer this question.

Browse other questions tagged .