I'm trying to pull the components (fields/objects....) from the un-managed package but I could not find any way using APIs or APEX is that even possible ?

Here is the example:

enter image description here


Yes, sfdx force:source:retrieve has a "package name" option:

sfdx force:source:retrieve -n "My Package Name"

You can also retrieve a package using the MDAPI by specifying a package name (e.g. via the Ant Migration Tool, Workbench, etc). DX has an MDAPI option, too:

sfdx force:mdapi:retrieve -p "My Package Name"
  • thanks @sfdcfox, is that possible using rest apis ?
    – Nick Kahn
    Feb 13 '20 at 19:59
  • @NickKahn I've never seen one, you'd have to look through the docs. What's your actual objective? It feels like you may have actually asked an X-Y question.
    – sfdcfox
    Feb 13 '20 at 20:07
  • my actual objective is to find out what components in that package using apis :)
    – Nick Kahn
    Feb 13 '20 at 20:10
  • @NickKahn As long as you're not trying to do it in Apex, SFDX is probably the easiest solution at the moment.
    – sfdcfox
    Feb 13 '20 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.