Client integration

P4V and P4VS can integrate with Swarm. To indicate how these applications should connect with Swarm, Swarm sets the P4.Swarm.URL property set in Helix Core Server. P4V and P4VS read this property, and if set, they connect to the specified URL to make Swarm API calls. If the property is unset, Swarm integration features are disabled.


If you make a configuration change, Swarm will not use it until the configuration cache has been reloaded, this forces Swarm to use the new configuration. You must be an admin or super user to reload the Swarm config cache. Navigate to the User id dropdown menu, select System Information, click the Cache Info tab, and click the Reload Configuration button.

When P4.Swarm.URL is set, P4V provides the following integration features:

  • Request a review: requests a review for pending or committed changelists.
  • Update a review: updates a review from the current state of a pending changelist. This works for changelists that are already associated with a review, or for unassociated changelists.
  • Open review in Swarm: opens the review associated with the selected changelist in your system's default web browser.
  • Review Id and State columns: adds Review Id and Review State columns to both the Pending and Submitted tabs.

By default, the first Swarm worker auto-detects the URL it is running under and sets P4.Swarm.URL accordingly. Swarm checks and updates this property every 10 minutes.

Customized Swarm installations

For customized Swarm installations, the auto-detected URL might not use the correct protocol, hostname, or port. In these scenarios, you can disable the URL auto-detection by editing the SWARM_ROOT/data/config.php file and setting the auto_register_url item to false in the p4 configuration block. For example:

'p4' => array(
'auto_register_url' => false,

If you disable this feature, you should:

Manually set P4.Swarm.URL in the Helix Core Server

If you disable auto_register_url, you should manually set the P4.Swarm.URL property in Helix Core Server to the URL for your Swarm installation:

p4 property -a -n P4.Swarm.URL -v https://myswarm.url:port/

Replace https://myswarm.url:port/ with the URL for your Swarm installation.

To find out what the current P4.Swarm.URL value is for all users, run:

p4 property -Al -n P4.Swarm.URL


P4V uses an integration timeout, specified in the P4.Swarm.Timeout property, to limit delays in the P4V user interface. The default timeout is 10 seconds.

To change the integration timeout, run:

p4 property -a -n P4.Swarm.Timeout -v 10

Replace the 10 with the desired timeout in seconds. Increasing the timeout could cause notable delays in the P4V user interface, and decreasing the timeout could cause sporadic integration failures if Swarm's API responses take longer than the specified timeout.

Set the external_url in Swarm

If you disable auto_register_url, you should usually set the external_url for Swarm. For information about setting the external_url for Swarm, see external_url.