Custom Properties - phax/phoss-smp GitHub Wiki

Custom Properties (since v8.1.0) allow attaching arbitrary key-value metadata to Service Groups. Each property has a type, a name, and a value.

Property Type

Each custom property has a type that controls its visibility:

Type Description
public Visible to everyone, including unauthenticated REST API callers
private Visible only to the authenticated owner of the Service Group

Property Name Constraints

Property names are case-sensitive and must satisfy the following rules:

  • Minimum length: 1 character
  • Maximum length: 256 characters
  • Allowed characters: letters (a-z, A-Z), digits (0-9), dot (.), hyphen (-), and underscore (_)
  • The regex pattern is: [a-zA-Z0-9.\-_]{1,256}

Property Value Constraints

Property values must satisfy the following rules:

  • Minimum length: 0 characters (empty values are allowed)
  • Maximum length: 256 characters
  • The following characters are forbidden: carriage return (\r), line feed (\n), and null (\0)

Management

Custom properties can be managed via:

Predefined Custom Properties

Some property names have a well-known meaning and are subject to additional value validation rules. When using a predefined property name, the value must conform to the specific rules listed below. Predefined properties are visually highlighted in the Administration UI with a badge showing their display name.

Property Name Description Value Rule
hr.oib Croatian OIB number Must be exactly 11 digits (\d{11})

The predefined property names follow the same naming constraints as regular custom properties. Using a predefined property name with an invalid value will result in a validation error when saving via the UI or REST API.