apiPolicyTemplateCreate
Creates a new policy template. Each rule entry can reference existing rules via ruleIds and/or define new rules inline via rules.
Input Parameters:
template: Configuration object containing the template name, description, and rules. Response:- Returns the created DeployedApiPolicyTemplate object with all template details, including IDs of any newly created inline rules. Example Request:
mutation {
apiPolicyTemplateCreate(
template: {
name: "Security Policy Template",
description: "Standard security policies for production APIs",
rules: [
{
ruleIds: ["<xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx>", "<yyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy>"],
appliedWhen: BEFORE_REQUEST_AFTER_STANDARD_POLICIES
},
{
rules: [
{
name: "Rate Limit 1000/min",
description: "Throttle to 1000 requests per minute",
type: "ratelimit",
methods: [GET, POST],
configuration: "{\"limit\":1000,\"periodTime\":60,\"periodTimeUnit\":\"SECONDS\"}"
}
],
appliedWhen: BEFORE_REQUEST_BEFORE_STANDARD_POLICIES
}
]
}
) {
id,
name,
description,
version,
rules {
rules { id, name },
appliedWhen
}
}
}
apiPolicyTemplateCreate(
template: DeployedApiPolicyTemplateCreateInput!
): DeployedApiPolicyTemplate!
Arguments
apiPolicyTemplateCreate.template ● DeployedApiPolicyTemplateCreateInput! non-null input platform {#template}
Type
DeployedApiPolicyTemplate object platform
Represents a reusable policy template that can be applied to multiple API deployments.
Was this topic helpful?