Server Extension JSON manifest fields

The server extension manifest is a UTF-8 encoded JSON file containing supporting metadata that the P4 Serverr uses.

Fields

Name Description

api_version

The version of the API exposed to the runtime. Valid values are: '1' (2018.2) and '20191' (2019.1). This is a required field.

compatible_products

An array enumerating the list of Perforce P4 products the server extension works with. Valid values are p4 or p4d. This is a required field.

default_locale

When no locale is specified or detected, use this value for translated messages. This is a required field.

description

A block of text giving a high-level description of the server extension. This is a required field.

developer

The name of the server extension developer (or company). This is a required field.

homepage_url

URL where information regarding the server extension can be found. This is a required field.

key

UUID for the server extension. The sample server extension created by the p4 extension --sample command creates a random value for this, but any valid UUID can be used. This is a required field.

license

The name of the license the server extension is released under. This is a required field.

license_body

The body of the license text.

limit_instance When set to multiple, which is the default, users can create multiple instance configurations of the extension.
When set to single, users receive a message that additional instance configurations of that extension are not allowed.
manifest_version

This number specifies the format of the manifest. Incompatible changes to the manifest in future server releases will increment it. Valid value is 1. This is a required field.

name

This is the name of the server extension. It must consist of the characters in [0-9a-zA-Z_-], that is, number, letters, underscore, and hyphen. No other special characters are allowed. The name is a required field.

namespace

This is the organization that authored the server extension. For example, ExampleInc. This, combined with the name field form the fully-qualified name for the server extension. For example, ExampleInc::extName and this is a required field.

require_user

 

This boolean determines whether the ExtP4USER specification field is required, which is the default in 2025.2 and later.

For an Extension to run P4 commands against the server, the extension needs a P4 user account.
If the extension does not need to run P4 commands, the require_user field can be set to false. and that extensions doe not need a user account. To learn more, see ExtP4USER under Fields that can be modified in the extension configuration spec.

script_runtime

Name and version of the scripting runtime. Valid values are: 'Lua' and '5.3'. For example,

"language":"Lua",

"version":"5.3"

supported_locales

List of locales the server extension will work with.

update_url

URL where automatic updates can be checked for.

version

This is the numeric version of the server extension. For example, 1.2.3 and this is a required field.

version_name

This is the named version string of the server extension. For example, '1.2.3 alpha' or "1.2.3 alpha"

The ‘Perforce’ and ‘Helix’ names are reserved for Perforce, so do not use them for server extension that you write.

Example manifest.json

Copy
{
    "manifest_version":1,
    "api_version":1,
    "script_runtime":{
    "language":"Lua",
    "version":"5.3"
    },
    "key":"aaaaa-aaaa-aaaa-aaaa-aaaaa",
    "name":"ExtName",
    "namespace":"ExampleInc",
    "version":"1.0",
    "version_name":"1.0 beta",
    "limit_instance":"single",
    "description":"Example Extension to illustrate concepts.",
    "compatible_products":[
"p4d"
    ],
    "default_locale":"en",
    "supported_locales":[
        "en",
        "jp"
    ],
    "developer":{
        "name":"Example Extensions Inc.",
        "url":"https://p4-extensions.example.com/"
    },
    "homepage_url":"https://p4-extensions.example.org/ExtName",
    "license":"BSD",
    "license_body":"Redistribution and use in source and binary forms..."
}