Canonical · Schema
PromptingRule
An object describing the structure of a rule.
CanonicalCloudLinuxOpen SourceUbuntuContainersBare MetalCharmsIdentity
Properties
| Name | Type | Description |
|---|---|---|
| id | string | Unique rule identifier. |
| timestamp | string | Timestamp of rule creation/modification. |
| user | integer | The UID for which the rule applies. |
| snap | string | The name of the snap for which the rule applies. |
| interface | string | The interface for which the rule applies. |
| constraints | object |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/canonical/main/json-schema/canonical-prompting-rule-schema.json",
"title": "PromptingRule",
"description": "An object describing the structure of a rule.",
"x-generated": "2026-10-04",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/canonical-experimental-api-openapi.yml#/components/schemas/PromptingRule",
"type": "object",
"required": [
"id",
"timestamp",
"user",
"snap",
"interface",
"constraints"
],
"properties": {
"id": {
"type": "string",
"description": "Unique rule identifier."
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp of rule creation/modification."
},
"user": {
"type": "integer",
"description": "The UID for which the rule applies."
},
"snap": {
"type": "string",
"description": "The name of the snap for which the rule applies."
},
"interface": {
"type": "string",
"description": "The interface for which the rule applies.",
"enum": [
"camera",
"home"
]
},
"constraints": {
"oneOf": [
{
"$ref": "#/$defs/PromptingRuleConstraintsCamera"
},
{
"$ref": "#/$defs/PromptingRuleConstraintsHome"
}
]
}
},
"$defs": {
"PromptingPermissionRuleEntry": {
"type": "object",
"required": [
"outcome",
"lifespan"
],
"properties": {
"outcome": {
"type": "string",
"enum": [
"allow",
"deny"
]
},
"lifespan": {
"type": "string",
"description": "The lifespan for which the permission applies.\n\ntimespan: the permission applies for the given duration specified by the\nduration field or until it is deleted\n\nsession: the permission applies until the user logs out (specifically,\nuntil the systemd user session ends)\n\nforever: the permission applies until it is deleted",
"enum": [
"timespan",
"session",
"forever"
]
},
"expiration": {
"type": "string",
"format": "date-time",
"description": "The timestamp at which the permission will expire. Required if lifespan\nis timespan, otherwise must be omitted."
},
"session-id": {
"type": "string",
"description": "The opaque session ID used for session-based permissions. Required if\nlifespan is session, otherwise must be omitted."
}
}
},
"PromptingRuleConstraintsCamera": {
"type": "object",
"description": "Details about the applicability of the existing rule to requests.",
"required": [
"permissions"
],
"properties": {
"permissions": {
"type": "object",
"description": "A map linking the permission name to it's respective information.",
"additionalProperties": {
"$ref": "#/$defs/PromptingPermissionRuleEntry"
}
}
}
},
"PromptingRuleConstraintsHome": {
"type": "object",
"description": "Details about the applicability of the existing rule to requests.",
"required": [
"path-pattern",
"permissions"
],
"properties": {
"path-pattern": {
"type": "string",
"description": "Path glob matching filepaths for which the rule applies."
},
"permissions": {
"type": "object",
"description": "A map linking the permission name to it's respective information.",
"additionalProperties": {
"$ref": "#/$defs/PromptingPermissionRuleEntry"
}
}
}
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/canonical-prompting-rule"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.