Create a new template

Create a new template in the system.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Template input object for create/update operations with simplified fields.

Template data for create and update operations.
Inherits all properties from TemplatePayloadBase with a restricted data_source_type.
See enum for possible values.

string
required
length between 1 and 225
^[a-zA-Z0-9_ -]*$

A unique name for JFrog resources.
Must be 1-225 alphanumeric characters, underscores, hyphens, and spaces.

string
length ≤ 2048

A human-readable description of the resource.
Optional field with a maximum length of 2048 characters. Can contain any characters.

string
required
length between 1 and 100
^[a-zA-Z0-9_.:-]*$

Template version in the JFrog platform.
Must be 1-100 alphanumeric characters, underscores, hyphens, periods, and colons.
Examples: "1.0.0", "v2.1.3", "1.0.0-beta.1"

string
enum
required

Type/category of the rule.

Allowed:
scanners
array of objects
length between 0 and 10
Defaults to []

List of scanner types that this template supports. Defaults to empty array if not provided.

scanners
Allowed:
string
required
length between 1 and 65536

Rego policy language code for evaluation (Open Policy Agent policy language).
Must be valid Rego syntax that defines evaluation logic. The policy should define
an 'allow' rule that returns a boolean value.

Rego supports all standard programming language characters including:

  • Alphanumeric characters (a-z, A-Z, 0-9)
  • Special characters (!@#$%^&*()_+-=[]{}|;:'",.<>?/~`)
  • Whitespace characters (spaces, tabs, newlines)
  • Unicode characters for identifiers and string literals

Syntax validation should be performed by an OPA parser. This field only enforces
length constraints (1-65536 characters).

For Rego syntax reference, see: https://www.openpolicyagent.org/docs/latest/policy-language/

parameters
array of objects
required
length ≤ 20

List of configurable parameters for the template

parameters*
string
enum
required

Restricted data source type for template creation. See enum for possible values.

Allowed:
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json