I need to get the PHIDs for one project and several users in our Phabricator install. It seems like it should be trivial to find out how to do this, but I've searched the docs to no avail. Am I looking in the wrong place or something?
Asked
Active
Viewed 1.1k times
2 Answers
27
Easiest way:
Go to the project
Click New Task
Look at the URL, it will have a parameter like:
?projects=PHID-PROJ-owipizovyry4fatifwfd
- PHID is "PHID-PROJ-owipizovyry4fatifwfd"
Option 2:
Go to your Conduit at
https://phabricator.example/conduit
Find the method
project.query
Enter the name in a JSON encoded array (i.e. ["project name"])
Click Call Method
PHID will be one of the data elements:
{ "data" : { "PHID-PROJ-oybqquyhhke4awiw2akz" : { "id" : "19", "phid" : "PHID-PROJ-oybqquyhhke4awiw2akz", "name" : "project name", "members" : [ "PHID-USER-gapak5h34h6d5yvl67dx", "PHID-USER-674vq754zfuhyxgvvq7x", "PHID-USER-qvcdsyc4oz7rzpzziiyk", "PHID-USER-qmefzjtsrmnxjxpc45km", "PHID-USER-pbhygge7rgpdowz3s5vk" ], "slugs" : [ "project_name" ], "dateCreated" : "1396666703", "dateModified" : "1396668261" } } }

Timo Tijhof
- 10,032
- 6
- 34
- 48

CEPA
- 2,592
- 25
- 31
-
Awesome, thank you! The second method also works to find PHIDs of users. – Ben Kuhn Sep 09 '14 at 22:08
-
any similar way to determine PHID of a dashboard? – ha100 Apr 29 '16 at 10:40
-
It doesn't seem that they do. :( That's one of the few I haven't tried until just now and it doesn't work. – CEPA May 02 '16 at 15:07
-
I have problem to find PHID of diffusion, any idea? – Ganesh Kunwar Jun 22 '16 at 09:09
-
This should probably be asked as it's own question... in Conduit, there is a method named `phid.lookup`. If you go there and enter your repo name(s) (or key(s)), you will find a similar output. for repos you are looking for rABC type key. For example, if I was on https://secure.phabricator.com/conduit/method/phid.lookup/ and I wanted to know about the Phabricator repo, I would enter this for the name: `["rP"]` and I would get a json response that included the PHID (and a few other details). If you create a question, please post the link so I can answer officially. – CEPA Jun 27 '16 at 20:02
9
A more robust method would be to call the conduit method phid.lookup
:
https://<your install>/conduit/method/phid.lookup/
Then enter in names
something like @user
, #project
or Z2
and you'll get the PHID.

magnetik
- 4,351
- 41
- 58