{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2026-09-09T13:48:11Z","object_id":{"id":335,"is_a":["text","documentation","reference","module"],"name":"doc_core","title":"Zotonic Core","uri":"https:\/\/zotonic.com\/id\/335"},"seq":1}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"subject":{"objects":[{"created":"2026-09-09T13:48:11Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:48:11Z","object_id":{"id":2564,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_backend_developer","title":"Backend developer","uri":"https:\/\/zotonic.com\/id\/2564"},"seq":2},{"created":"2026-09-09T13:48:11Z","object_id":{"id":2574,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_content_relationships","title":"Content relationships","uri":"https:\/\/zotonic.com\/id\/2574"},"seq":3},{"created":"2026-09-09T13:48:11Z","object_id":{"id":2616,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_predicate","title":"Predicate","uri":"https:\/\/zotonic.com\/id\/2616"},"seq":4},{"created":"2026-09-09T13:48:11Z","object_id":{"id":2625,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_model","title":"Model","uri":"https:\/\/zotonic.com\/id\/2625"},"seq":5},{"created":"2026-09-09T13:48:11Z","object_id":{"id":2643,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_query","title":"Query","uri":"https:\/\/zotonic.com\/id\/2643"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1910,"is_a":["text","documentation","reference","model"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1910"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_model_model_predicate","page_url":{"en":"https:\/\/zotonic.com\/docs\/1910\/predicate","x-default":"https:\/\/zotonic.com\/docs\/1910\/predicate"},"preview_url":null,"resource":{"version":3991,"pivot_location_lat":null,"title":"predicate","is_authoritative":true,"body":"<p>Retrieve information about predicates. Predicates are the labels on edges (connections between resources) that give\nmeaning to an edge. An example is the predicate &quot;author&quot; which refers to the authors of an article. Predicates form\ntogether with the referring and the referred page a triple <code>{subject, predicate, object}<\/code>.<\/p>\n<p>Each predicate has a list of valid subject categories and valid object categories. This is used to filter the list of\npredicates in the admin edit page, and also to filter the list of found potential objects when making a connection.<\/p>\n<p>A full predicate definition can be fetched by name or id with:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{{ m.predicate.author }}\n{{ m.predicate[104] }}\n<\/code><\/pre>\n<p>Which both return a property list with information about the predicate. The property list contains all page properties\nand the properties: &quot;pred&quot; which is the atomic predicate name, &quot;subject&quot; which is a list of valid subject\ncategories and &quot;object&quot; with is a list of valid object categories.<\/p>\n<p>The following m_predicate model properties are available in templates:<\/p>\n<table class=\"table\"><thead><tr><th>Property<\/th><th>Description<\/th><th>Example value<\/th><\/tr><\/thead><tbody><tr><td>all<\/td><td>Return a property list of all predicates. Keys are the atomic predicate name, values are property lists with information about the predicate. The property list contains all page properties and the properties: &quot;pred&quot; which is the atomic predicate name, &quot;subject&quot; which is a list of valid subject categories and &quot;object&quot; with is a list of valid object categories.<\/td><td><code>[{about, [{pred,about}, {subject,[104]}, {object,[]}, {id,300}, ...]}]<\/code><\/td><\/tr><tr><td>object_category<\/td><td>Used to derive the list of valid object categories for a predicate. Example usage: <code>m.predicate.object_category.author<\/code> Note: Each id is a 1-tuple.<\/td><td><code>[{104}, ...]<\/code><\/td><\/tr><tr><td>subject_category<\/td><td>Used to derive the list of valid subject categories for a predicate. Example usage: <code>m.predicate.subject_category.author<\/code> Note: Each id is a 1-tuple.<\/td><td><code>[{674}, ...]<\/code><\/td><\/tr><\/tbody><\/table>\n<h2>Available Model API Paths<\/h2>\n<table class=\"table\"><thead><tr><th>Method<\/th><th>Path pattern<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>get<\/code><\/td><td><code>\/<\/code><\/td><td>Return full predicate definition list (same as <code>\/all<\/code>), keyed by predicate name. No further lookups.<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/all\/...<\/code><\/td><td>Return all predicate definitions with allowed subject\/object categories and predicate metadata.<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/is_used\/+pred\/...<\/code><\/td><td>Return whether predicate <code>+pred<\/code> is referenced by at least one row in <code>edge<\/code>.<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/object_resources\/+key\/...<\/code><\/td><td>Return visible\/published resources allowed as objects for predicate <code>+key<\/code>, bucketed by matching valid object category and title-sorted.<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/object_category\/+key\/...<\/code><\/td><td>Return list of valid object category ids for predicate <code>+key<\/code> (empty means unrestricted).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/subject_category\/+key\/...<\/code><\/td><td>Return list of valid subject category ids for predicate <code>+key<\/code> (empty means unrestricted).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/is_valid_object_in_category\/+predicate\/+category\/...<\/code><\/td><td>Return whether category <code>+category<\/code> is valid for objects of <code>+predicate<\/code>, including inverse ancestor matching fallback.<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/is_valid_object_subcategory\/+predicate\/+category\/...<\/code><\/td><td>Return whether <code>+category<\/code> is valid object category for <code>+predicate<\/code>, allowing ancestor matches (<code>IsSubcats=true<\/code>).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/is_valid_object_category\/+predicate\/+category\/...<\/code><\/td><td>Return whether <code>+category<\/code> is directly valid object category for <code>+predicate<\/code> (<code>IsSubcats=false<\/code>).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/is_valid_subject_subcategory\/+predicate\/+category\/...<\/code><\/td><td>Return whether <code>+category<\/code> is valid subject category for <code>+predicate<\/code>, including subject ancestor\/subcategory matching (<code>IsSubcats=true<\/code>).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/is_valid_subject_category\/+predicate\/+category\/...<\/code><\/td><td>Return whether <code>+category<\/code> is directly valid subject category for <code>+predicate<\/code> (<code>IsSubcats=false<\/code>).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/predicate\/+key\/...<\/code><\/td><td>Return predicate definition for <code>+key<\/code> (id\/name), including <code>pred<\/code>, <code>subject<\/code>, and <code>object<\/code> fields; <code>undefined<\/code> if unknown.<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/+key\/...<\/code><\/td><td>Alias for <code>\/predicate\/+key\/...<\/code>; return predicate definition for <code>+key<\/code> or <code>undefined<\/code>.<\/td><\/tr><\/tbody><\/table>\n<p><code>\/+name<\/code> marks a variable path segment. A trailing <code>\/...<\/code> means extra path segments are accepted for further lookups.<\/p>","slug":"predicate","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"e6c7c68273519b1c7d260c62f83d1cf7dbfe59a4cb1c11a872051907f35ab1bc","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":322,"is_a":["meta","category"],"name":"model","title":"Models","uri":"https:\/\/test.zotonic.com\/id\/322"},"doc_source_path":"apps\/zotonic_core\/src\/models\/m_predicate.erl","publication_start":"2023-06-24T08:17:50Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_core\/src\/models\/m_predicate.erl","pivot_location_lng":null,"doc_source_kind":"model","name":"doc_model_model_predicate","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:43Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_core","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"b8c4b2ccdc223257f311968fbd17b2d66f0c4156\n","erlang_module":"m_predicate","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-09-30T09:39:53Z","title_slug":"predicate"},"uri":"https:\/\/zotonic.com\/id\/1910","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1910"}},"status":"ok"}