---
updatedAt: 2026-08-17T17:12:51.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/governance/llms.txt
---

# Get a specific template

Retrieve detailed information about a specific template by its unique identifier.


# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "JFrog Unified Policy Service APIs",
    "description": "JFrog Unified Policy Service APIs for managing policies across the JFrog Platform.\n\nThis API provides endpoints for creating, updating, and managing policies\nthat can be applied to various JFrog platform resources.\n\n## Authentication\nAll API requests require a valid JWT bearer token in the Authorization header.\n",
    "version": "1.0.0",
    "contact": {
      "name": "JFrog Support",
      "url": "https://jfrog.com/contact-us/",
      "email": "support@jfrog.com"
    },
    "license": {
      "name": "JFrog Terms of Service",
      "url": "https://jfrog.com/terms-and-conditions/"
    }
  },
  "servers": [
    {
      "url": "https://api.jfrog.com/unifiedpolicy/api/v1",
      "description": "JFrog Unified Policy Service API"
    }
  ],
  "tags": [
    {
      "name": "template",
      "description": "template rule with optional parameters to customize."
    }
  ],
  "paths": {
    "/templates/{templateId}": {
      "get": {
        "summary": "Get a specific template",
        "description": "Retrieve detailed information about a specific template by its unique identifier.\n",
        "tags": [
          "template"
        ],
        "operationId": "templatesGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/templateIdPathParam"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/TemplateResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "unifiedPolicyAuth": [
              "template:read"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "description": "JWT Bearer token authentication",
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "unifiedPolicyAuth": {
        "description": "Unified Policy OAuth2 security scheme defining required permission scopes.\nUses JFrog's permission scope format: <resource-type>:<target>:<action>\n\nWhile OAuth2 is defined here for permission documentation, the actual \nimplementation uses JWT Bearer tokens transported via Authorization header.\n\nPermission scopes follow JFrog's standard format:\n- policy:*:read - Read access to all policies\n- policy:project-key:write - Write access to project-specific policies\n- template:*:manage - Full management access to all templates\n- rule:rule-id:delete - Delete access to specific rule\n",
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://your-jfrog-instance.com/access/oauth/authorize",
            "tokenUrl": "https://your-domain.jfrog.io/access/oauth/token",
            "scopes": {
              "policy:read": "Read access to policies",
              "policy:manage": "Full management access to policies",
              "policy:*:read": "Read access to all policies",
              "policy:*:write": "Write access to all policies",
              "policy:*:delete": "Delete access to all policies",
              "policy:*:manage": "Full management access to all policies",
              "policy:*:execute": "Execute/evaluate all policies",
              "policy:project:read": "Read access to project-scoped policies",
              "policy:project:write": "Write access to project-scoped policies",
              "policy:project:delete": "Delete access to project-scoped policies",
              "policy:project:manage": "Full management of project-scoped policies",
              "policy:project:execute": "Execute project-scoped policies",
              "template:read": "Read access to templates",
              "template:manage": "Full management access to templates",
              "template:*:read": "Read access to all templates",
              "template:*:write": "Write access to all templates",
              "template:*:delete": "Delete access to all templates",
              "template:*:manage": "Full management access to all templates",
              "rule:read": "Read access to rules",
              "rule:*:read": "Read access to all rules",
              "rule:*:write": "Write access to all rules",
              "rule:*:delete": "Delete access to all rules",
              "rule:*:manage": "Full management access to all rules",
              "evaluation:*:read": "Read access to all evaluations",
              "evaluation:*:write": "Write access to create evaluations",
              "evaluation:*:delete": "Delete access to evaluations",
              "system:admin": "Full system administrative access",
              "internal:developer:w": "Internal developer write access",
              "unifiedpolicy:admin": "Full unified policy administrative access"
            }
          }
        }
      }
    },
    "parameters": {
      "templateIdPathParam": {
        "name": "templateId",
        "in": "path",
        "description": "Template identifier.",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/JFrogId"
        }
      }
    },
    "schemas": {
      "ResourceBase": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "$ref": "#/components/schemas/JFrogResourceName"
          },
          "description": {
            "$ref": "#/components/schemas/JFrogResourceDescription"
          }
        },
        "description": "Foundation schema for all named resources in the system.\nProvides common name and description fields that all resources inherit.\nUsed as the base for all resource payload schemas.\n"
      },
      "ResourceIdentity": {
        "type": "object",
        "required": [
          "id",
          "created_at",
          "created_by",
          "updated_at",
          "updated_by"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/JFrogId"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the resource was created"
          },
          "created_by": {
            "$ref": "#/components/schemas/JFPrincipal"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the resource was last updated"
          },
          "updated_by": {
            "$ref": "#/components/schemas/JFPrincipal"
          }
        },
        "description": "System-managed identity and audit trail fields for all resources.\nThese fields are automatically managed by the system and cannot be modified by clients.\nIncluded in all resource response schemas to provide complete resource information.\n"
      },
      "CustomResource": {
        "description": "Custom resource flag\n",
        "type": "object",
        "properties": {
          "is_custom": {
            "$ref": "#/components/schemas/IsCustom"
          }
        }
      },
      "TemplatePayloadBase": {
        "description": "Base template data without data_source_type field.\nUsed as a base for both TemplatePayload and TemplateCreatePayload.\n",
        "allOf": [
          {
            "$ref": "#/components/schemas/ResourceBase"
          },
          {
            "type": "object",
            "required": [
              "version",
              "category",
              "rego",
              "parameters"
            ],
            "properties": {
              "version": {
                "$ref": "#/components/schemas/TemplateVersion"
              },
              "category": {
                "$ref": "#/components/schemas/TemplateCategory",
                "x-oapi-codegen-extra-tags": {
                  "binding": "required"
                }
              },
              "scanners": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TemplateScannerType"
                },
                "description": "List of scanner types that this template supports. Defaults to empty array if not provided.",
                "minItems": 0,
                "maxItems": 10,
                "default": [],
                "x-oapi-codegen-extra-tags": {
                  "binding": "omitempty,min=0,max=10,dive,oneof=secrets sca exposures contextual_analysis malicious_package"
                }
              },
              "rego": {
                "$ref": "#/components/schemas/Rego",
                "x-oapi-codegen-extra-tags": {
                  "binding": "required"
                }
              },
              "parameters": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TemplateParameter"
                },
                "description": "List of configurable parameters for the template",
                "maxItems": 20,
                "x-oapi-codegen-extra-tags": {
                  "binding": "max=20,dive"
                }
              }
            }
          }
        ]
      },
      "TemplatePayload": {
        "description": "Template data for create and update operations.\nContains the template configuration without system-managed fields.\n",
        "allOf": [
          {
            "$ref": "#/components/schemas/TemplatePayloadBase"
          },
          {
            "type": "object",
            "required": [
              "data_source_type"
            ],
            "properties": {
              "data_source_type": {
                "$ref": "#/components/schemas/TemplateDataSourceType",
                "x-oapi-codegen-extra-tags": {
                  "binding": "required"
                }
              }
            }
          }
        ]
      },
      "Template": {
        "description": "Complete template resource including system-managed identity fields.\nReturned in all template response operations.\n",
        "allOf": [
          {
            "$ref": "#/components/schemas/TemplatePayload"
          },
          {
            "$ref": "#/components/schemas/CustomResource"
          },
          {
            "$ref": "#/components/schemas/ResourceIdentity"
          }
        ]
      },
      "IsCustom": {
        "type": "boolean",
        "description": "Whether the resource is custom or built-in."
      },
      "TemplateCategory": {
        "type": "string",
        "enum": [
          "security",
          "legal",
          "operational",
          "quality",
          "audit",
          "workflow"
        ],
        "description": "Type/category of the rule.",
        "example": "security",
        "x-oapi-codegen-extra-tags": {
          "binding": "required,oneof=security legal operational quality audit workflow"
        }
      },
      "TemplateScannerType": {
        "type": "string",
        "maxLength": 50,
        "enum": [
          "secrets",
          "sca",
          "exposures",
          "contextual_analysis",
          "malicious_package"
        ],
        "description": "The type of scanner that the template's Rego policy expects to evaluate.",
        "example": "sca",
        "x-oapi-codegen-extra-tags": {
          "binding": "required,oneof=secrets sca exposures contextual_analysis malicious_package,max=50"
        }
      },
      "TemplateDataSourceType": {
        "type": "string",
        "enum": [
          "noop",
          "evidence",
          "onemodel_evidence",
          "public_vulnerability",
          "contextual_analysis",
          "exposures"
        ],
        "description": "The type of data source that the template's Rego policy expects to evaluate.\n- evidence: Evidence attestation data (SBOMs, signatures, gate certifications, etc.).\n- public_vulnerability: Evaluates all vulnerabilities regardless of applicability.\n- contextual_analysis: Evaluates all vulnerabilities only when they are applicable.\n- exposures: Evaluates JAS exposures findings (secrets, services, applications, and IaC).\n",
        "example": "public_vulnerability",
        "x-oapi-codegen-extra-tags": {
          "binding": "required,oneof=noop evidence onemodel_evidence public_vulnerability contextual_analysis exposures"
        }
      },
      "TemplateParameter": {
        "allOf": [
          {
            "type": "object",
            "required": [
              "name",
              "type"
            ],
            "properties": {
              "name": {
                "$ref": "#/components/schemas/TemplateParameterName"
              },
              "type": {
                "$ref": "#/components/schemas/TemplateParameterType"
              }
            },
            "description": "Configurable parameter for a template.\nTemplates can define parameters that can be customized when creating rules from the template.\n"
          }
        ]
      },
      "TemplateParameterName": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100,
        "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?$",
        "description": "Parameter name (must be unique within the template).\nMust begin and end with an alphanumeric character and may consist only of dashes, \nunderscores, dots and alphanumerics in between.\n",
        "example": "severity_threshold",
        "x-oapi-codegen-extra-tags": {
          "binding": "required,min=1,max=100,regex=^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?$"
        }
      },
      "TemplateParameterType": {
        "type": "string",
        "enum": [
          "string",
          "bool",
          "int",
          "float",
          "object"
        ],
        "description": "Data type of the parameter",
        "example": "string",
        "x-oapi-codegen-extra-tags": {
          "binding": "required,oneof=string bool int float object"
        }
      },
      "JFPrincipal": {
        "type": "string",
        "maxLength": 255,
        "description": "A human or system identifier that interacts with the API.\nExamples include usernames, email addresses, and system account identifiers.\n",
        "example": "john.doe",
        "x-oapi-codegen-extra-tags": {
          "binding": "required,max=255"
        }
      },
      "JFrogId": {
        "type": "string",
        "description": "A Snowflake unique identifier (64-bit integer, represented as a string).",
        "pattern": "^[0-9]*$",
        "minLength": 4,
        "maxLength": 20,
        "example": "123456789012345",
        "x-oapi-codegen-extra-tags": {
          "binding": "required,min=4,max=20,regex=^[0-9]*$"
        }
      },
      "JFrogResourceName": {
        "type": "string",
        "minLength": 1,
        "maxLength": 225,
        "pattern": "^[a-zA-Z0-9_ -]*$",
        "description": "A unique name for JFrog resources.\nMust be 1-225 alphanumeric characters, underscores, hyphens, and spaces.\n",
        "example": "resource-name",
        "x-oapi-codegen-extra-tags": {
          "binding": "min=1,max=225,regex=^[a-zA-Z0-9_ -]*$"
        }
      },
      "JFrogResourceDescription": {
        "type": "string",
        "maxLength": 2048,
        "description": "A human-readable description of the resource.\nOptional field with a maximum length of 2048 characters. Can contain any characters.\n",
        "example": "This is a description of a platform resource.",
        "x-oapi-codegen-extra-tags": {
          "binding": "omitempty,max=2048"
        }
      },
      "TemplateVersion": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100,
        "pattern": "^[a-zA-Z0-9_.:-]*$",
        "description": "Template version in the JFrog platform.\nMust be 1-100 alphanumeric characters, underscores, hyphens, periods, and colons.\nExamples: \"1.0.0\", \"v2.1.3\", \"1.0.0-beta.1\"\n",
        "example": "1.0.0",
        "x-oapi-codegen-extra-tags": {
          "binding": "min=1,max=100,regex=^[a-zA-Z0-9_.:-]*$"
        }
      },
      "Rego": {
        "type": "string",
        "minLength": 1,
        "maxLength": 65536,
        "description": "Rego policy language code for evaluation (Open Policy Agent policy language).\nMust be valid Rego syntax that defines evaluation logic. The policy should define\nan 'allow' rule that returns a boolean value.\n\nRego supports all standard programming language characters including:\n- Alphanumeric characters (a-z, A-Z, 0-9)\n- Special characters (!@#$%^&*()_+-=[]{}|;:'\",.<>?/~`)\n- Whitespace characters (spaces, tabs, newlines)\n- Unicode characters for identifiers and string literals\n\nSyntax validation should be performed by an OPA parser. This field only enforces\nlength constraints (1-65536 characters).\n\nFor Rego syntax reference, see: https://www.openpolicyagent.org/docs/latest/policy-language/\n",
        "example": "package policy\n\ndefault allow = false\n\nallow {\n  input.parameters.severity_threshold == \"critical\"\n  count(input.vulnerabilities) <= input.parameters.max_vulnerabilities\n}\n",
        "x-oapi-codegen-extra-tags": {
          "binding": "required,min=1,max=65536"
        }
      },
      "JFBaseError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "A unique, machine-readable code for the general error type.",
            "example": "resource_not_found",
            "x-oapi-codegen-extra-tags": {
              "binding": "required,min=1,max=100"
            }
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "description": "A human-readable message summarizing the error.",
            "example": "The resource with the specified ID was not found.",
            "x-oapi-codegen-extra-tags": {
              "binding": "required,min=1,max=1000"
            }
          },
          "trace_id": {
            "type": "string",
            "maxLength": 64,
            "description": "A unique trace identifier for distributed tracing, logging, and support purposes.\nTypically an uber trace id (hexadecimal string, 16 or 32 characters) matching the regex pattern ^[0-9a-fA-F-]{1,64}$,\nautomatically extracted from the 'uber-trace-id' header when available.\n",
            "example": "1a2b3c4d5e6f7890",
            "x-oapi-codegen-extra-tags": {
              "binding": "omitempty,max=64"
            }
          }
        },
        "required": [
          "code",
          "message"
        ],
        "x-oapi-codegen-extra-tags": {
          "binding": "required"
        }
      }
    },
    "responses": {
      "TemplateResponse": {
        "description": "The request has succeeded.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Template"
            }
          }
        }
      },
      "UnauthorizedError": {
        "description": "Authentication credentials are required or invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JFBaseError"
            },
            "examples": {
              "unauthorized": {
                "$ref": "#/components/examples/UnauthorizedErrorExample"
              }
            }
          }
        }
      },
      "ForbiddenError": {
        "description": "You do not have sufficient permissions to perform this action.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JFBaseError"
            },
            "examples": {
              "forbidden": {
                "$ref": "#/components/examples/ForbiddenErrorExample"
              }
            }
          }
        }
      },
      "NotFoundError": {
        "description": "The resource with the specified ID was not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JFBaseError"
            },
            "examples": {
              "not_found": {
                "$ref": "#/components/examples/NotFoundErrorExample"
              }
            }
          }
        }
      },
      "InternalServerError": {
        "description": "An unexpected error occurred. Please contact support.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JFBaseError"
            },
            "examples": {
              "internal_server_error": {
                "$ref": "#/components/examples/InternalServerErrorExample"
              }
            }
          }
        }
      }
    },
    "examples": {
      "UnauthorizedErrorExample": {
        "summary": "Unauthorized Error",
        "description": "Example of unauthorized error",
        "value": {
          "code": "unauthorized",
          "message": "Authentication token is required.",
          "trace_id": "c3d4e5f6-7890-9012-cdef-345678901234"
        }
      },
      "ForbiddenErrorExample": {
        "summary": "Forbidden Error",
        "description": "Example of forbidden error",
        "value": {
          "code": "forbidden",
          "message": "You do not have sufficient permissions to perform this action.",
          "trace_id": "e5f6a7b8-7890-1234-efab-567890123456"
        }
      },
      "NotFoundErrorExample": {
        "summary": "Not Found Error",
        "description": "Example of resource not found error",
        "value": {
          "code": "not_found",
          "message": "The requested resource was not found.",
          "trace_id": "a7b8c9d0-e1f2-3456-abcd-789012345678"
        }
      },
      "InternalServerErrorExample": {
        "summary": "Internal Server Error",
        "description": "Example of internal server error",
        "value": {
          "code": "internal_server_error",
          "message": "An unexpected error occurred while processing your request.",
          "trace_id": "c3d4e5f6-a7b8-9012-abcd-345678901234"
        }
      }
    }
  }
}
```