How can I get a list of installed packages' names (not their namespace prefixes) through API in java?

This answer describes how to get their namespace prefixes like "Rknews" for example, but not the whole name like "Redhot News" . How to get a list of the managed packages (including version numbers) installed in an org?

This is an answer for my question, but I hope a better way to do that exists. How do i retrieve all installed packages names through API?

I need this to get all installed packages using "retrieve" call, where I have to list their names. If there is another way to get all installed package files, please tell me also.

2 Answers 2


I don't think it's possible to get the package name via the Metadata API. As you stated, you can get the namespace and the version, but not the name itself.

One thing you can do is verify that a package with name X is installed in the org. With the ant migration tool, you can attempt a retrieve of the package. If the package with that name (managed or unmanaged) does not exist in the org, you get an INVALID CROSS REFERENCE ID error on the package name.

  • Thank you, but that's not what I need. Maybe you know any way to retrieve just all packages installed in my org without providing their names? Oct 28, 2014 at 14:46
  • I completely understand what you want to do, but I'm not sure of a way to do it via the available api's. The Metadata API doesn't provide a way to retrieve Packages, only InstalledPackages which contain a namespace and a version number only. The only way I can think of would be to use Selenium to get the list. Here's an example of a python script we use to automate beta package uploads. It goes to the package page and selects a package so it could be modified to just get all package names from that page: github.com/SalesforceFoundation/CumulusCI/blob/master/ci/… Oct 28, 2014 at 15:48

This question is already answered on stackexchange, Please check below link:

How to get a list of the managed packages (including version numbers) installed in an org?

  • Thank you for the answer, but in my question I gave a link to this answer and wrote that is NOT an answer to my question, because these ways I can retrieve Namespace Prefix but NOT Names. Oct 27, 2014 at 18:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .