{"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"}}},"export_revision":4223,"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":4223,"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>The predicate property <code>is_dependency_ignored<\/code> defaults to false. When true,\nconnections using this predicate do not keep their object resource alive during\n<code>is_dependent<\/code> cleanup. Protected resources are still kept. This does not change\nordinary connection queries. <code>dependency_ignored\/1<\/code> returns the cached list of\npredicate IDs with this property enabled.<\/p>\n<p><code>all\/1<\/code> and <code>m.predicate.all<\/code> return a map keyed by binary predicate name.\nEach value contains the binary keys <code>id<\/code>, <code>name<\/code>, <code>uri<\/code>, <code>title<\/code>, <code>summary<\/code> and <code>reversed<\/code>.\n<code>get\/2<\/code>, <code>m.predicate.author<\/code> and <code>m.predicate[104]<\/code> return the same minimal\nmap for a visible predicate, or <code>undefined<\/code>. Visibility is checked per caller,\nafter reading the shared structural cache.<\/p>\n<p>The four display properties are read with property permissions for the current\ncaller; denied or missing values are <code>undefined<\/code>. Read other resource properties\nvia <code>m.rsc[p.id]<\/code>. Use <code>object_category<\/code> and <code>subject_category<\/code> for\nrestriction lists (lists of integer category IDs). Model routes reject hidden\npredicates\/categories. The <code>is_used<\/code> model route additionally requires edit\npermission because it inspects connections irrespective of their visibility.<\/p>\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 minimal visible predicate maps (same as <code>\/all<\/code>), keyed by binary name.<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/all\/...<\/code><\/td><td>Return minimal visible predicate maps with binary <code>id<\/code>, <code>name<\/code>, <code>uri<\/code>, <code>title<\/code>, <code>summary<\/code> and <code>reversed<\/code> keys.<\/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 identity and ACL-checked display 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":"e0d0bbc1c548f0f45eb46b2b3c9c1cac3913b8b782c930afba2bbbfbb9fa3987","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":"2f7425ff448ef8fccc62544a9294970018b0cde7\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-11-30T14:47:40Z","title_slug":"predicate"},"uri":"https:\/\/zotonic.com\/id\/1910","uri_template":"https:\/\/zotonic.com\/id\/:id","version":4223,"websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1910"}},"status":"ok"}