Server extension session variables
This section assumes you have read the Server extension callbacks page.
A server extension can get the data about the current command context from the server. The server extension is responsible for interpreting and using these appropriately.
The maxError…
variables refer to circumstances that
prevented the server from completing a command. For example, an operating
system resource issue. Note also that client-side errors are not always
visible to the server and might not be included in the
maxError
count.
The terminated
variable indicates
whether the command exited early and why.
Argument | Description | Available for type |
---|---|---|
|
Either null or a string reflecting an action taken to a changelist or job. For example," |
|
%archiveList%
|
Filename containing files to be pulled | pull-archive
|
|
Command argument count. |
all except archive |
|
Command argument string. |
all except archive |
|
Command argument string that contains the command arguments as a percent-encoded comma-separated list. |
all except archive |
|
The number of the changelist being submitted. The abbreviated
form A A |
|
|
The root path of files submitted. |
|
|
Calling user’s client workspace name. |
all |
|
Client’s current working directory. |
all except archive |
|
Hostname of the user’s workstation (even if connected through a proxy, broker, replica, or an edge server.) |
all |
|
The IP address of the user’s workstation (even if connected through a proxy, broker, replica, or an edge server.) |
all |
|
The name of the user’s client application. For example, P4V, P4Win |
all |
|
The version of the user’s client application. |
all |
|
Command name. |
all except archive |
%depotName%
|
The graph depot in which the repo resides. |
|
%email%
|
The user's email address. |
|
|
Path of archive file based on depot’s |
|
|
First new changelist number. |
|
|
Path to temporary form specification file. To modify the form
from an |
|
|
Name of form (for instance, a branch name or a changelist number). |
|
|
Type of form (for instance, |
|
%fullname%
|
The user's fullname. |
|
|
List of groups to which the user belongs, space-separated. |
all except archive |
%host%
|
The IP address of the host of the user. |
|
|
A broker or proxy is present. |
all except archive |
|
A string of job numbers, expanded to one argument for each job
number specified on a |
|
|
Last new changelist number. |
|
|
One of |
all except archive |
|
Error number and text. |
all except archive |
|
A user-specified value that specifies the number of milliseconds for the longest permissible database lock. If this variable is set, it means the user has overridden the group setting for this value. |
all except archive |
|
A user-specified value that specifies the amount of data buffered during command execution. If this variable is set, it means the user has overridden the group setting for this value. |
all except archive |
|
A user-specified value that specifies the maximum number of rows scanned in a single operation. If this variable is set, it means the user has overridden the group setting for this value. |
all except archive |
%method%
|
The authentication method from list-methods (may be set to "unknown"). | |
%newValue%
|
Graph depot new SHA value. | graph-push-reference
|
|
If a changelist is renumbered on submit, this variable contains the old changelist number. |
|
%oldPassword%
|
The old value of the password. | auth-set |
%oldValue%
|
Graph depot previous SHA value. | graph-push-reference
|
|
Operation: |
|
%password%
|
The value of the password. | auth-check |
|
If the command was sent through a proxy, broker, replica, or
edge server, the hostname of the proxy, broker, replica, or edge
server. (If the command was sent directly,
|
all |
|
If the command was sent through a proxy, broker, replica, or
edge server, the IP address of the proxy, broker, replica, or
edge server. (If the command was sent directly,
|
all |
|
The host port to which the client connects. If the client
connects to the server through an intermediary, this will hold
the port number of the intermediary. If there’s no intermediary,
this will hold the same value as the |
auth-check-sso (client-side script only) |
%pusher%
|
The user credited with the push. |
|
|
A double quote character. |
all |
%reference%
|
Graph depot reference information. |
|
%refFlags%
|
||
%refType%
|
||
%repo%
|
The repo, which has |
|
%repoName%
|
The name of the repo. |
|
|
Revision of archive file |
|
%scheme%
|
The authentication scheme set by init-auth (can be set to "unknown"). | auth-init-2fa
|
|
The IP address and port of the
Helix Core Server,
passable only in the context of a client-side script specified by
|
auth-check-sso (client-side script only) |
|
Hostname of the Helix Core Server. |
all |
|
The value of the
Helix Core Server’s
|
all |
|
The IP address of the server. |
all |
|
The value of the
Helix Core Server’s
|
all |
|
The transport, IP address and port of the
Helix Core Server, in
the format
prefix can be one of |
all |
|
The |
all |
|
A string specifying the role of the server. One of the following:
|
all except archive |
|
Version string for the server that terminated if the command
exited early. Reason for termination is given in
|
all except archive |
|
Expanded to the spec string of the form in question. |
|
|
If this is not a multi-server installation,
In a multi-server installation, for any change event:
If there is a forwarding replica between the commit server and
the edge server, then See |
Not available for |
|
The serverport of the target server being monitored. Corresponds to the P4TARGET or the |
|
|
The value of |
|
|
The reason for early termination. This might be one of the following:
See also |
all except archive |
%token%
|
The stashed token from the last init-auth (can be empty). | auth-init-2fa
|
%triggerdir%
|
Pull.trigger.dir used for tmp files. | edge-content
|
|
Third field in server extension definition. For a change-submit event, it is the path for which the server extension is expected to match. For a form-out event, it might be the form type to which the server extension is expected to apply. |
all except archive |
|
Server extension name: first field from server extension definition. |
all except archive |
|
Server extension type: second field in server extension definition. |
all except archive |
|
Helix Server username of the calling user. |
all |