{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2020-12-12T11:51:04Z","object_id":{"id":2207,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_site_update","title":"mod_site_update","uri":"https:\/\/zotonic.com\/id\/2207"},"seq":1000000}],"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:13Z","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:13Z","object_id":{"id":2566,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_operator","title":"Operator","uri":"https:\/\/zotonic.com\/id\/2566"},"seq":2},{"created":"2026-09-09T13:48:13Z","object_id":{"id":2605,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_site_management","title":"Site management","uri":"https:\/\/zotonic.com\/id\/2605"},"seq":3},{"created":"2026-09-09T13:48:13Z","object_id":{"id":2625,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_model","title":"Model","uri":"https:\/\/zotonic.com\/id\/2625"},"seq":4},{"created":"2026-09-09T13:48:13Z","object_id":{"id":2658,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_migrate","title":"Migrate","uri":"https:\/\/zotonic.com\/id\/2658"},"seq":5},{"created":"2026-09-09T13:48:13Z","object_id":{"id":2685,"is_a":["categorization","keyword","keyword_quality"],"name":"zotonic_topic_security","title":"Security","uri":"https:\/\/zotonic.com\/id\/2685"},"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":2208,"is_a":["text","documentation","reference","model"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2208"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_model_model_site_update","page_url":{"en":"https:\/\/zotonic.com\/docs\/2208\/site_update","x-default":"https:\/\/zotonic.com\/docs\/2208\/site_update"},"preview_url":null,"resource":{"version":3697,"pivot_location_lat":null,"title":"site_update","is_authoritative":true,"body":"<p>Model for checking if a site has version control enabled.<\/p>\n<p>Also implements the webhook to force a pull of new code from the version control system.<\/p>\n<p>The URL for the webhook is:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">https:\/\/yoursite.test\/api\/model\/site_update\/post\/webhook\/&lt;token&gt;\n<\/code><\/pre>\n<p>Where <code>&lt;token&gt;<\/code> should be replaced with your configured token.<\/p>\n<p>The token can be configured in the admin on System &gt; Modules and then the config of the mod_site_update module.<\/p>\n<p>The token is saved in the config key <code>mod_site_update.webhook_token<\/code>.<\/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>\/is_vcs_site\/...<\/code><\/td><td>Return whether the current site source directory resolves to a VCS checkout (<code>.git<\/code>, <code>.hg<\/code>, or symlinked checkout).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/vcs_site\/+site\/...<\/code><\/td><td>Return admin-only VCS tuple for site <code>+site<\/code> (`{git<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/vcs_zotonic\/...<\/code><\/td><td>Return admin-only VCS tuple for the Zotonic core library directory (`{git<\/td><\/tr><tr><td><code>post<\/code><\/td><td><code>\/webhook<\/code><\/td><td>Read webhook token from query arg <code>token<\/code>; if it matches <code>mod_site_update.webhook_token<\/code>, run VCS update (<code>git pull<\/code>\/<code>hg pull -u<\/code>) for the current site. No further lookups.<\/td><\/tr><tr><td><code>post<\/code><\/td><td><code>\/webhook\/+token<\/code><\/td><td>Use path token <code>+token<\/code>; if it matches <code>mod_site_update.webhook_token<\/code>, run VCS update (<code>git pull<\/code>\/<code>hg pull -u<\/code>) for the current site. No further lookups.<\/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":"site_update","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"60c34e3719a3171a63bb2463627138f764c8120714d3667d54431e716a47de7b","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_mod_site_update\/src\/models\/m_site_update.erl","publication_start":"2023-06-24T08:17:54Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_site_update\/src\/models\/m_site_update.erl","pivot_location_lng":null,"doc_source_kind":"model","name":"doc_model_model_site_update","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-12-12T11:50:47Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_site_update","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":"c34f80c7ab6700e5d77ac5730deaae0e4710e159\n","erlang_module":"m_site_update","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-19T13:18:32Z","title_slug":"site_update"},"uri":"https:\/\/zotonic.com\/id\/2208","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2208"}},"status":"ok"}