Page MenuHomePhabricator

Locations Scenario: Add API Support
Closed, ResolvedPublic

Description

Phabricator's developer API is called "Conduit". We can implement API support for Locations so users can write scripts to interact with locations programmatically.

  • Create a new class to define locations.location.search. You can follow PasteSearchConduitAPIMethod as an example.
  • Create a new class to define locations.location.edit. You can follow PasteEditConduitAPIMethod as an example.
  • Run arc liberate.
  • Visit /conduit/ and you should see your new API methods.
  • Call your API methods using cURL or arc call-conduit to make sure they work (you can include CLI output in your test plan).

To improve locations.location.search so it returns more information:

  • Have LocationsLocation implement PhabricatorConduitResultInterface. You can follow ManiphestTask as an example.
  • Have it return the location name and any additional fields which exist by now.
  • Call the method and make sure it returns names.