From 824748df9e0a2dcae78112dc01dc522b3a378b74 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sun, 3 Dec 2023 10:24:54 +0100 Subject: [PATCH] API - Updating documentation --- changedetectionio/api/api_v1.py | 2 +- docs/api_v1/assets/main.bundle.js | 6 +++--- docs/api_v1/index.html | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/changedetectionio/api/api_v1.py b/changedetectionio/api/api_v1.py index 689af011..d51f47ed 100644 --- a/changedetectionio/api/api_v1.py +++ b/changedetectionio/api/api_v1.py @@ -304,7 +304,7 @@ class Import(Resource): @auth.check_token def post(self): """ - @api {post} /api/v1/import - Import a list of watched URLs + @api {post} /api/v1/import Import a list of watched URLs @apiDescription Accepts a line-feed separated list of URLs to import, additionally with ?tag_uuids=(tag id), ?tag=(name), ?proxy={key}, ?dedupe=true (default true) one URL per line. @apiExample {curl} Example usage: curl http://localhost:5000/api/v1/import --data-binary @list-of-sites.txt -H"x-api-key:8a111a21bc2f8f1dd9b9353bbd46049a" diff --git a/docs/api_v1/assets/main.bundle.js b/docs/api_v1/assets/main.bundle.js index 08d31131..08eac6e5 100644 --- a/docs/api_v1/assets/main.bundle.js +++ b/docs/api_v1/assets/main.bundle.js @@ -103,8 +103,8 @@ HTTP/1.0 200 'uptime': 38344.55, 'watch_count': 800, 'version': "0.40.1" -}`,type:"curl"}],name:"Get_Info",group:"System_Information",version:"0.0.0",filename:"api_v1.py",groupTitle:"System_Information"},{type:"post",url:"/api/v1/watch",title:"Create a single watch",description:'

Requires atleast url set, can accept the same structure as get single watch information to create.

',examples:[{title:"Example usage:",content:`curl http://localhost:4000/api/v1/watch -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json" -d '{"url": "https://my-nice.com" , "tag": "nice list"}'`,type:"curl"}],name:"Create",group:"Watch",success:{fields:{200:[{group:"200",type:"String",optional:!1,field:"OK",description:"

Was created

"}],500:[{group:"500",type:"String",optional:!1,field:"ERR",description:"

Some other error

"}]}},version:"0.0.0",filename:"api_v1.py",groupTitle:"Watch"},{type:"delete",url:"/api/v1/watch/:uuid",title:"Delete a watch and related history",examples:[{title:"Example usage:",content:'curl http://localhost:4000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091 -X DELETE -H"x-api-key:813031b16330fe25e3780cf0325daa45"',type:"curl"}],parameter:{fields:{Parameter:[{group:"Parameter",type:"uuid",optional:!1,field:"uuid",description:"

Watch unique ID.

"}]}},name:"Delete",group:"Watch",success:{fields:{200:[{group:"200",type:"String",optional:!1,field:"OK",description:"

Was deleted

"}]}},version:"0.0.0",filename:"api_v1.py",groupTitle:"Watch"},{type:"put",url:"/api/v1/watch/:uuid",title:"Update watch information",examples:[{title:"Example usage:",content:`Update (PUT) -curl http://localhost:4000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091 -X PUT -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json" -d '{"url": "https://my-nice.com" , "tag": "new list"}'`,type:"curl"}],description:'

Updates an existing watch using JSON, accepts the same structure as returned in get single watch information

',parameter:{fields:{Parameter:[{group:"Parameter",type:"uuid",optional:!1,field:"uuid",description:"

Watch unique ID.

"}]}},name:"Update_a_watch",group:"Watch",success:{fields:{200:[{group:"200",type:"String",optional:!1,field:"OK",description:"

Was updated

"}],500:[{group:"500",type:"String",optional:!1,field:"ERR",description:"

Some other error

"}]}},version:"0.0.0",filename:"api_v1.py",groupTitle:"Watch"},{type:"get",url:"/api/v1/watch/:uuid",title:"Get a single watch data",description:"

Retrieve watch information and set muted/paused status

",examples:[{title:"Example usage:",content:`curl http://localhost:4000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091 -H"x-api-key:813031b16330fe25e3780cf0325daa45" +}`,type:"curl"}],name:"Get_Info",group:"System_Information",version:"0.0.0",filename:"api_v1.py",groupTitle:"System_Information"},{type:"post",url:"/api/v1/watch",title:"Create a single watch",description:'

Requires atleast url set, can accept the same structure as get single watch information to create.

',examples:[{title:"Example usage:",content:`curl http://localhost:4000/api/v1/watch -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json" -d '{"url": "https://my-nice.com" , "tag": "nice list"}'`,type:"curl"}],name:"Create",group:"Watch",success:{fields:{200:[{group:"200",type:"String",optional:!1,field:"OK",description:"

Was created

"}],500:[{group:"500",type:"String",optional:!1,field:"ERR",description:"

Some other error

"}]}},version:"0.0.0",filename:"api_v1.py",groupTitle:"Watch"},{type:"delete",url:"/api/v1/watch/:uuid",title:"Delete a watch and related history",examples:[{title:"Example usage:",content:'curl http://localhost:4000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091 -X DELETE -H"x-api-key:813031b16330fe25e3780cf0325daa45"',type:"curl"}],parameter:{fields:{Parameter:[{group:"Parameter",type:"uuid",optional:!1,field:"uuid",description:"

Watch unique ID.

"}]}},name:"Delete",group:"Watch",success:{fields:{200:[{group:"200",type:"String",optional:!1,field:"OK",description:"

Was deleted

"}]}},version:"0.0.0",filename:"api_v1.py",groupTitle:"Watch"},{type:"post",url:"/api/v1/import",title:"Import a list of watched URLs",description:"

Accepts a line-feed separated list of URLs to import, additionally with ?tag_uuids=(tag id), ?tag=(name), ?proxy={key}, ?dedupe=true (default true) one URL per line.

",examples:[{title:"Example usage:",content:'curl http://localhost:5000/api/v1/import --data-binary @list-of-sites.txt -H"x-api-key:8a111a21bc2f8f1dd9b9353bbd46049a"',type:"curl"}],name:"Import",group:"Watch",success:{fields:{200:[{group:"200",type:"List",optional:!1,field:"OK",description:"

List of watch UUIDs added

"}],500:[{group:"500",type:"String",optional:!1,field:"ERR",description:"

Some other error

"}]}},version:"0.0.0",filename:"api_v1.py",groupTitle:"Watch"},{type:"put",url:"/api/v1/watch/:uuid",title:"Update watch information",examples:[{title:"Example usage:",content:`Update (PUT) +curl http://localhost:4000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091 -X PUT -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json" -d '{"url": "https://my-nice.com" , "tag": "new list"}'`,type:"curl"}],description:'

Updates an existing watch using JSON, accepts the same structure as returned in get single watch information

',parameter:{fields:{Parameter:[{group:"Parameter",type:"uuid",optional:!1,field:"uuid",description:"

Watch unique ID.

"}]}},name:"Update_a_watch",group:"Watch",success:{fields:{200:[{group:"200",type:"String",optional:!1,field:"OK",description:"

Was updated

"}],500:[{group:"500",type:"String",optional:!1,field:"ERR",description:"

Some other error

"}]}},version:"0.0.0",filename:"api_v1.py",groupTitle:"Watch"},{type:"get",url:"/api/v1/watch/:uuid",title:"Single watch - get data, recheck, pause, mute.",description:"

Retrieve watch information and set muted/paused status

",examples:[{title:"Example usage:",content:`curl http://localhost:4000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091 -H"x-api-key:813031b16330fe25e3780cf0325daa45" curl "http://localhost:4000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091?muted=unmuted" -H"x-api-key:813031b16330fe25e3780cf0325daa45" curl "http://localhost:4000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091?paused=unpaused" -H"x-api-key:813031b16330fe25e3780cf0325daa45"`,type:"curl"}],name:"Watch",group:"Watch",parameter:{fields:{Parameter:[{group:"Parameter",type:"uuid",optional:!1,field:"uuid",description:"

Watch unique ID.

"}]}},query:[{group:"Query",type:"Boolean",optional:!0,field:"recheck",description:"

Recheck this watch recheck=1

"},{group:"Query",type:"String",optional:!0,field:"paused",description:"

=paused or =unpaused , Sets the PAUSED state

"},{group:"Query",type:"String",optional:!0,field:"muted",description:"

=muted or =unmuted , Sets the MUTE NOTIFICATIONS state

"}],success:{fields:{200:[{group:"200",type:"String",optional:!1,field:"OK",description:"

When paused/muted/recheck operation OR full JSON object of the watch

"},{group:"200",type:"JSON",optional:!1,field:"WatchJSON",description:"

JSON Full JSON object of the watch

"}]}},version:"0.0.0",filename:"api_v1.py",groupTitle:"Watch"},{type:"get",url:"/api/v1/watch//history",title:"Get a list of all historical snapshots available for a watch",description:"

Requires uuid, returns list

",examples:[{title:"Example usage:",content:`curl http://localhost:4000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091/history -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json" { @@ -127,4 +127,4 @@ curl "http://localhost:4000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091?pa "title": "QuickLook", "url": "https://github.com/QL-Win/QuickLook/tags" } -}`,type:"curl"}],parameter:{fields:{Parameter:[{group:"Parameter",type:"String",optional:!0,field:"recheck_all",description:"

Optional Set to =1 to force recheck of all watches

"},{group:"Parameter",type:"String",optional:!0,field:"tag",description:"

Optional name of tag to limit results

"}]}},name:"ListWatches",group:"Watch_Management",success:{fields:{200:[{group:"200",type:"String",optional:!1,field:"OK",description:"

Was created

"}]}},version:"0.0.0",filename:"api_v1.py",groupTitle:"Watch_Management"}];const lt={name:"changedetection.io API",version:"0.1.0",description:"Manage your changedetection.io watches via API, requires the `x-api-key` header which is found in the settings UI.",title:"changedetection.io API",url:"",sampleUrl:!1,defaultVersion:"0.0.0",apidoc:"0.3.0",generator:{name:"apidoc",time:"Wed Feb 22 2023 23:42:16 GMT+0100 (Central European Standard Time)",url:"https://apidocjs.com",version:"0.54.0"}};kt();const Ct=u().compile(E()("#template-header").html()),It=u().compile(E()("#template-footer").html()),st=u().compile(E()("#template-article").html()),mt=u().compile(E()("#template-compare-article").html()),vt=u().compile(E()("#template-generator").html()),St=u().compile(E()("#template-project").html()),Zt=u().compile(E()("#template-sections").html()),Xt=u().compile(E()("#template-sidenav").html()),jt={aloneDisplay:!1,showRequiredLabels:!1,withGenerator:!0,withCompare:!0};lt.template=Object.assign(jt,(Z=lt.template)!=null?Z:{}),lt.template.forceLanguage&&Ot(lt.template.forceLanguage);const _t=(0,o.groupBy)(Ft,J=>J.group),Gt={};E().each(_t,(J,U)=>{Gt[J]=(0,o.groupBy)(U,q=>q.name)});const Qt=[];E().each(Gt,(J,U)=>{let q=[];E().each(U,(tt,at)=>{const ht=at[0].title;ht&&q.push(ht.toLowerCase()+"#~#"+tt)}),q.sort(),lt.order&&(q=M(q,lt.order,"#~#")),q.forEach(tt=>{const ht=tt.split("#~#")[1];U[ht].forEach(gt=>{Qt.push(gt)})})}),Ft=Qt;let qt={};const He={};let Oe={};Oe[lt.version]=1,E().each(Ft,(J,U)=>{qt[U.group]=1,He[U.group]=U.groupTitle||U.group,Oe[U.version]=1}),qt=Object.keys(qt),qt.sort(),lt.order&&(qt=G(He,lt.order)),Oe=Object.keys(Oe),Oe.sort(r().compare),Oe.reverse();const Ce=[];qt.forEach(J=>{Ce.push({group:J,isHeader:!0,title:He[J]});let U="";Ft.forEach(q=>{q.group===J&&(U!==q.name?Ce.push({title:q.title,group:J,name:q.name,type:q.type,version:q.version,url:q.url}):Ce.push({title:q.title,group:J,hidden:!0,name:q.name,type:q.type,version:q.version,url:q.url}),U=q.name)})});function Tn(J,U,q){let tt=!1;if(!U)return tt;const at=U.match(/(.+?)<\/h(1|2)>/gi);return at&&at.forEach(function(ht){const gt=ht.substring(2,3),wt=ht.replace(/<.+?>/g,""),Tt=ht.match(/id="api-([^-]+)(?:-(.+))?"/),Lt=Tt?Tt[1]:null,Yt=Tt?Tt[2]:null;gt==="1"&&wt&&Lt&&(J.splice(q,0,{group:Lt,isHeader:!0,title:wt,isFixed:!0}),q++,tt=!0),gt==="2"&&wt&&Lt&&Yt&&(J.splice(q,0,{group:Lt,name:Yt,isHeader:!1,title:wt,isFixed:!1,version:"1.0"}),q++)}),tt}let sn;if(lt.header&&(sn=Tn(Ce,lt.header.content,0),sn||Ce.unshift({group:"_header",isHeader:!0,title:lt.header.title==null?yt("General"):lt.header.title,isFixed:!0})),lt.footer){const J=Ce.length;sn=Tn(Ce,lt.footer.content,Ce.length),!sn&<.footer.title!=null&&Ce.splice(J,0,{group:"_footer",isHeader:!0,title:lt.footer.title,isFixed:!0})}const Ue=lt.title?lt.title:"apiDoc: "+lt.name+" - "+lt.version;E()(document).attr("title",Ue),E()("#loader").remove();const dn={nav:Ce};E()("#sidenav").append(Xt(dn)),E()("#generator").append(vt(lt)),(0,o.extend)(lt,{versions:Oe}),E()("#project").append(St(lt)),lt.header&&E()("#header").append(Ct(lt.header)),lt.footer&&(E()("#footer").append(It(lt.footer)),lt.template.aloneDisplay&&document.getElementById("api-_footer").classList.add("hide"));const Me={};let gn="";qt.forEach(function(J){const U=[];let q="",tt={},at=J,ht="";Me[J]={},Ft.forEach(function(gt){J===gt.group&&(q!==gt.name?(Ft.forEach(function(wt){J===wt.group&>.name===wt.name&&(Object.prototype.hasOwnProperty.call(Me[gt.group],gt.name)||(Me[gt.group][gt.name]=[]),Me[gt.group][gt.name].push(wt.version))}),tt={article:gt,versions:Me[gt.group][gt.name]}):tt={article:gt,hidden:!0,versions:Me[gt.group][gt.name]},lt.sampleUrl&<.sampleUrl===!0&&(lt.sampleUrl=window.location.origin),lt.url&&tt.article.url.substr(0,4).toLowerCase()!=="http"&&(tt.article.url=lt.url+tt.article.url),Cn(tt,gt),gt.groupTitle&&(at=gt.groupTitle),gt.groupDescription&&(ht=gt.groupDescription),U.push({article:st(tt),group:gt.group,name:gt.name,aloneDisplay:lt.template.aloneDisplay}),q=gt.name)}),tt={group:J,title:at,description:ht,articles:U,aloneDisplay:lt.template.aloneDisplay},gn+=Zt(tt)}),E()("#sections").append(gn),lt.template.aloneDisplay||(document.body.dataset.spy="scroll",E()("body").scrollspy({target:"#scrollingNav"})),E()(".form-control").on("focus change",function(){E()(this).removeClass("border-danger")}),E()(".sidenav").find("a").on("click",function(J){J.preventDefault();const U=this.getAttribute("href");if(lt.template.aloneDisplay){const q=document.querySelector(".sidenav > li.active");q&&q.classList.remove("active"),this.parentNode.classList.add("active")}else{const q=document.querySelector(U);q&&E()("html,body").animate({scrollTop:q.offsetTop},400)}window.location.hash=U});function me(J){let U=!1;return E().each(J,q=>{U=U||(0,o.some)(J[q],tt=>tt.type)}),U}function Dn(){E()('button[data-toggle="popover"]').popover().click(function(U){U.preventDefault()});const J=E()("#version strong").html();if(E()("#sidenav li").removeClass("is-new"),lt.template.withCompare&&E()("#sidenav li[data-version='"+J+"']").each(function(){const U=E()(this).data("group"),q=E()(this).data("name"),tt=E()("#sidenav li[data-group='"+U+"'][data-name='"+q+"']").length,at=E()("#sidenav li[data-group='"+U+"'][data-name='"+q+"']").index(E()(this));(tt===1||at===tt-1)&&E()(this).addClass("is-new")}),E()(".nav-tabs-examples a").click(function(U){U.preventDefault(),E()(this).tab("show")}),E()(".nav-tabs-examples").find("a:first").tab("show"),E()(".sample-request-content-type-switch").change(function(){E()(this).val()==="body-form-data"?(E()("#sample-request-body-json-input-"+E()(this).data("id")).hide(),E()("#sample-request-body-form-input-"+E()(this).data("id")).show()):(E()("#sample-request-body-form-input-"+E()(this).data("id")).hide(),E()("#sample-request-body-json-input-"+E()(this).data("id")).show())}),lt.template.aloneDisplay&&(E()(".show-group").click(function(){const U="."+E()(this).attr("data-group")+"-group",q="."+E()(this).attr("data-group")+"-article";E()(".show-api-group").addClass("hide"),E()(U).removeClass("hide"),E()(".show-api-article").addClass("hide"),E()(q).removeClass("hide")}),E()(".show-api").click(function(){const U=this.getAttribute("href").substring(1),q=document.getElementById("version").textContent.trim(),tt=`.${this.dataset.name}-article`,at=`[id="${U}-${q}"]`,ht=`.${this.dataset.group}-group`;E()(".show-api-group").addClass("hide"),E()(ht).removeClass("hide"),E()(".show-api-article").addClass("hide");let gt=E()(tt);E()(at).length&&(gt=E()(at).parent()),gt.removeClass("hide"),U.match(/_(header|footer)/)&&document.getElementById(U).classList.remove("hide")})),lt.template.aloneDisplay||E()("body").scrollspy("refresh"),lt.template.aloneDisplay){const U=decodeURI(window.location.hash);if(U!=null&&U.length!==0){const q=document.getElementById("version").textContent.trim(),tt=document.querySelector(`li .${U.slice(1)}-init`),at=document.querySelector(`li[data-version="${q}"] .show-api.${U.slice(1)}-init`);let ht=tt;at&&(ht=at),ht.click()}}}function Bn(J){typeof J=="undefined"?J=E()("#version strong").html():E()("#version strong").html(J),E()("article").addClass("hide"),E()("#sidenav li:not(.nav-fixed)").addClass("hide");const U={};document.querySelectorAll("article[data-version]").forEach(q=>{const tt=q.dataset.group,at=q.dataset.name,ht=q.dataset.version,gt=tt+at;!U[gt]&&r().lte(ht,J)&&(U[gt]=!0,document.querySelector(`article[data-group="${tt}"][data-name="${at}"][data-version="${ht}"]`).classList.remove("hide"),document.querySelector(`#sidenav li[data-group="${tt}"][data-name="${at}"][data-version="${ht}"]`).classList.remove("hide"),document.querySelector(`#sidenav li.nav-header[data-group="${tt}"]`).classList.remove("hide"))}),E()("article[data-version]").each(function(q){const tt=E()(this).data("group");E()("section#api-"+tt).removeClass("hide"),E()("section#api-"+tt+" article:visible").length===0?E()("section#api-"+tt).addClass("hide"):E()("section#api-"+tt).removeClass("hide")})}if(Bn(),E()("#versions li.version a").on("click",function(J){J.preventDefault(),Bn(E()(this).html())}),E()("#compareAllWithPredecessor").on("click",$n),E()("article .versions li.version a").on("click",fn),E().urlParam=function(J){const U=new RegExp("[\\?&]"+J+"=([^&#]*)").exec(window.location.href);return U&&U[1]?U[1]:null},E().urlParam("compare")&&E()("#compareAllWithPredecessor").trigger("click"),window.location.hash){const J=decodeURI(window.location.hash);E()(J).length>0&&E()("html,body").animate({scrollTop:parseInt(E()(J).offset().top)},0)}E()("#scrollingNav .sidenav-search input.search").focus(),E()('[data-action="filter-search"]').on("keyup",J=>{const U=J.currentTarget.value.toLowerCase();E()(".sidenav").find("a.nav-list-item").each((q,tt)=>{E()(tt).show(),tt.innerText.toLowerCase().includes(U)||E()(tt).hide()})}),E()("span.search-reset").on("click",function(){E()("#scrollingNav .sidenav-search input.search").val("").focus(),E()(".sidenav").find("a.nav-list-item").show()});function fn(J){J.preventDefault();const U=E()(this).parents("article"),q=E()(this).html(),tt=U.find(".version"),at=tt.find("strong").html();tt.find("strong").html(q);const ht=U.data("group"),gt=U.data("name"),wt=U.data("version"),Tt=U.data("compare-version");if(Tt!==q&&!(!Tt&&wt===q)){if(Tt&&Me[ht][gt][0]===q||wt===q)Xn(ht,gt,wt);else{let Lt={},Yt={};E().each(Gt[ht][gt],function(se,Je){Je.version===wt&&(Lt=Je),Je.version===q&&(Yt=Je)});const Et={article:Lt,compare:Yt,versions:Me[ht][gt]};Et.article.id=Et.article.group+"-"+Et.article.name+"-"+Et.article.version,Et.article.id=Et.article.id.replace(/\./g,"_"),Et.compare.id=Et.compare.group+"-"+Et.compare.name+"-"+Et.compare.version,Et.compare.id=Et.compare.id.replace(/\./g,"_");let Mt=Lt;Mt.parameter&&Mt.parameter.fields&&(Et._hasTypeInParameterFields=me(Mt.parameter.fields)),Mt.error&&Mt.error.fields&&(Et._hasTypeInErrorFields=me(Mt.error.fields)),Mt.success&&Mt.success.fields&&(Et._hasTypeInSuccessFields=me(Mt.success.fields)),Mt.info&&Mt.info.fields&&(Et._hasTypeInInfoFields=me(Mt.info.fields)),Mt=Yt,Et._hasTypeInParameterFields!==!0&&Mt.parameter&&Mt.parameter.fields&&(Et._hasTypeInParameterFields=me(Mt.parameter.fields)),Et._hasTypeInErrorFields!==!0&&Mt.error&&Mt.error.fields&&(Et._hasTypeInErrorFields=me(Mt.error.fields)),Et._hasTypeInSuccessFields!==!0&&Mt.success&&Mt.success.fields&&(Et._hasTypeInSuccessFields=me(Mt.success.fields)),Et._hasTypeInInfoFields!==!0&&Mt.info&&Mt.info.fields&&(Et._hasTypeInInfoFields=me(Mt.info.fields));const Ee=mt(Et);U.after(Ee),U.next().find(".versions li.version a").on("click",fn),E()("#sidenav li[data-group='"+ht+"'][data-name='"+gt+"'][data-version='"+at+"']").addClass("has-modifications"),U.remove()}v().highlightAll()}}function $n(J){J.preventDefault(),E()("article:visible .versions").each(function(){const q=E()(this).parents("article").data("version");let tt=null;E()(this).find("li.version a").each(function(){E()(this).html(){Object.keys(J).forEach(at=>{J[at].replace(/_/g," ")===tt&&q.push(at)})}),Object.keys(J).forEach(tt=>{q.indexOf(tt)===-1&&q.push(tt)}),q}Dn()}})()})(); +}`,type:"curl"}],parameter:{fields:{Parameter:[{group:"Parameter",type:"String",optional:!0,field:"recheck_all",description:"

Optional Set to =1 to force recheck of all watches

"},{group:"Parameter",type:"String",optional:!0,field:"tag",description:"

Optional name of tag to limit results

"}]}},name:"ListWatches",group:"Watch_Management",success:{fields:{200:[{group:"200",type:"String",optional:!1,field:"OK",description:"

JSON dict

"}]}},version:"0.0.0",filename:"api_v1.py",groupTitle:"Watch_Management"}];const lt={name:"changedetection.io API",version:"0.1.0",description:"Manage your changedetection.io watches via API, requires the `x-api-key` header which is found in the settings UI.",title:"changedetection.io API",url:"",sampleUrl:!1,defaultVersion:"0.0.0",apidoc:"0.3.0",generator:{name:"apidoc",time:"Sun Dec 03 2023 10:24:43 GMT+0100 (Central European Standard Time)",url:"https://apidocjs.com",version:"0.54.0"}};kt();const Ct=u().compile(E()("#template-header").html()),It=u().compile(E()("#template-footer").html()),st=u().compile(E()("#template-article").html()),mt=u().compile(E()("#template-compare-article").html()),vt=u().compile(E()("#template-generator").html()),St=u().compile(E()("#template-project").html()),Zt=u().compile(E()("#template-sections").html()),Xt=u().compile(E()("#template-sidenav").html()),jt={aloneDisplay:!1,showRequiredLabels:!1,withGenerator:!0,withCompare:!0};lt.template=Object.assign(jt,(Z=lt.template)!=null?Z:{}),lt.template.forceLanguage&&Ot(lt.template.forceLanguage);const _t=(0,o.groupBy)(Ft,J=>J.group),Gt={};E().each(_t,(J,U)=>{Gt[J]=(0,o.groupBy)(U,q=>q.name)});const Qt=[];E().each(Gt,(J,U)=>{let q=[];E().each(U,(tt,at)=>{const ht=at[0].title;ht&&q.push(ht.toLowerCase()+"#~#"+tt)}),q.sort(),lt.order&&(q=M(q,lt.order,"#~#")),q.forEach(tt=>{const ht=tt.split("#~#")[1];U[ht].forEach(gt=>{Qt.push(gt)})})}),Ft=Qt;let qt={};const He={};let Oe={};Oe[lt.version]=1,E().each(Ft,(J,U)=>{qt[U.group]=1,He[U.group]=U.groupTitle||U.group,Oe[U.version]=1}),qt=Object.keys(qt),qt.sort(),lt.order&&(qt=G(He,lt.order)),Oe=Object.keys(Oe),Oe.sort(r().compare),Oe.reverse();const Ce=[];qt.forEach(J=>{Ce.push({group:J,isHeader:!0,title:He[J]});let U="";Ft.forEach(q=>{q.group===J&&(U!==q.name?Ce.push({title:q.title,group:J,name:q.name,type:q.type,version:q.version,url:q.url}):Ce.push({title:q.title,group:J,hidden:!0,name:q.name,type:q.type,version:q.version,url:q.url}),U=q.name)})});function Tn(J,U,q){let tt=!1;if(!U)return tt;const at=U.match(/(.+?)<\/h(1|2)>/gi);return at&&at.forEach(function(ht){const gt=ht.substring(2,3),wt=ht.replace(/<.+?>/g,""),Tt=ht.match(/id="api-([^-]+)(?:-(.+))?"/),Lt=Tt?Tt[1]:null,Yt=Tt?Tt[2]:null;gt==="1"&&wt&&Lt&&(J.splice(q,0,{group:Lt,isHeader:!0,title:wt,isFixed:!0}),q++,tt=!0),gt==="2"&&wt&&Lt&&Yt&&(J.splice(q,0,{group:Lt,name:Yt,isHeader:!1,title:wt,isFixed:!1,version:"1.0"}),q++)}),tt}let sn;if(lt.header&&(sn=Tn(Ce,lt.header.content,0),sn||Ce.unshift({group:"_header",isHeader:!0,title:lt.header.title==null?yt("General"):lt.header.title,isFixed:!0})),lt.footer){const J=Ce.length;sn=Tn(Ce,lt.footer.content,Ce.length),!sn&<.footer.title!=null&&Ce.splice(J,0,{group:"_footer",isHeader:!0,title:lt.footer.title,isFixed:!0})}const Ue=lt.title?lt.title:"apiDoc: "+lt.name+" - "+lt.version;E()(document).attr("title",Ue),E()("#loader").remove();const dn={nav:Ce};E()("#sidenav").append(Xt(dn)),E()("#generator").append(vt(lt)),(0,o.extend)(lt,{versions:Oe}),E()("#project").append(St(lt)),lt.header&&E()("#header").append(Ct(lt.header)),lt.footer&&(E()("#footer").append(It(lt.footer)),lt.template.aloneDisplay&&document.getElementById("api-_footer").classList.add("hide"));const Me={};let gn="";qt.forEach(function(J){const U=[];let q="",tt={},at=J,ht="";Me[J]={},Ft.forEach(function(gt){J===gt.group&&(q!==gt.name?(Ft.forEach(function(wt){J===wt.group&>.name===wt.name&&(Object.prototype.hasOwnProperty.call(Me[gt.group],gt.name)||(Me[gt.group][gt.name]=[]),Me[gt.group][gt.name].push(wt.version))}),tt={article:gt,versions:Me[gt.group][gt.name]}):tt={article:gt,hidden:!0,versions:Me[gt.group][gt.name]},lt.sampleUrl&<.sampleUrl===!0&&(lt.sampleUrl=window.location.origin),lt.url&&tt.article.url.substr(0,4).toLowerCase()!=="http"&&(tt.article.url=lt.url+tt.article.url),Cn(tt,gt),gt.groupTitle&&(at=gt.groupTitle),gt.groupDescription&&(ht=gt.groupDescription),U.push({article:st(tt),group:gt.group,name:gt.name,aloneDisplay:lt.template.aloneDisplay}),q=gt.name)}),tt={group:J,title:at,description:ht,articles:U,aloneDisplay:lt.template.aloneDisplay},gn+=Zt(tt)}),E()("#sections").append(gn),lt.template.aloneDisplay||(document.body.dataset.spy="scroll",E()("body").scrollspy({target:"#scrollingNav"})),E()(".form-control").on("focus change",function(){E()(this).removeClass("border-danger")}),E()(".sidenav").find("a").on("click",function(J){J.preventDefault();const U=this.getAttribute("href");if(lt.template.aloneDisplay){const q=document.querySelector(".sidenav > li.active");q&&q.classList.remove("active"),this.parentNode.classList.add("active")}else{const q=document.querySelector(U);q&&E()("html,body").animate({scrollTop:q.offsetTop},400)}window.location.hash=U});function me(J){let U=!1;return E().each(J,q=>{U=U||(0,o.some)(J[q],tt=>tt.type)}),U}function Dn(){E()('button[data-toggle="popover"]').popover().click(function(U){U.preventDefault()});const J=E()("#version strong").html();if(E()("#sidenav li").removeClass("is-new"),lt.template.withCompare&&E()("#sidenav li[data-version='"+J+"']").each(function(){const U=E()(this).data("group"),q=E()(this).data("name"),tt=E()("#sidenav li[data-group='"+U+"'][data-name='"+q+"']").length,at=E()("#sidenav li[data-group='"+U+"'][data-name='"+q+"']").index(E()(this));(tt===1||at===tt-1)&&E()(this).addClass("is-new")}),E()(".nav-tabs-examples a").click(function(U){U.preventDefault(),E()(this).tab("show")}),E()(".nav-tabs-examples").find("a:first").tab("show"),E()(".sample-request-content-type-switch").change(function(){E()(this).val()==="body-form-data"?(E()("#sample-request-body-json-input-"+E()(this).data("id")).hide(),E()("#sample-request-body-form-input-"+E()(this).data("id")).show()):(E()("#sample-request-body-form-input-"+E()(this).data("id")).hide(),E()("#sample-request-body-json-input-"+E()(this).data("id")).show())}),lt.template.aloneDisplay&&(E()(".show-group").click(function(){const U="."+E()(this).attr("data-group")+"-group",q="."+E()(this).attr("data-group")+"-article";E()(".show-api-group").addClass("hide"),E()(U).removeClass("hide"),E()(".show-api-article").addClass("hide"),E()(q).removeClass("hide")}),E()(".show-api").click(function(){const U=this.getAttribute("href").substring(1),q=document.getElementById("version").textContent.trim(),tt=`.${this.dataset.name}-article`,at=`[id="${U}-${q}"]`,ht=`.${this.dataset.group}-group`;E()(".show-api-group").addClass("hide"),E()(ht).removeClass("hide"),E()(".show-api-article").addClass("hide");let gt=E()(tt);E()(at).length&&(gt=E()(at).parent()),gt.removeClass("hide"),U.match(/_(header|footer)/)&&document.getElementById(U).classList.remove("hide")})),lt.template.aloneDisplay||E()("body").scrollspy("refresh"),lt.template.aloneDisplay){const U=decodeURI(window.location.hash);if(U!=null&&U.length!==0){const q=document.getElementById("version").textContent.trim(),tt=document.querySelector(`li .${U.slice(1)}-init`),at=document.querySelector(`li[data-version="${q}"] .show-api.${U.slice(1)}-init`);let ht=tt;at&&(ht=at),ht.click()}}}function Bn(J){typeof J=="undefined"?J=E()("#version strong").html():E()("#version strong").html(J),E()("article").addClass("hide"),E()("#sidenav li:not(.nav-fixed)").addClass("hide");const U={};document.querySelectorAll("article[data-version]").forEach(q=>{const tt=q.dataset.group,at=q.dataset.name,ht=q.dataset.version,gt=tt+at;!U[gt]&&r().lte(ht,J)&&(U[gt]=!0,document.querySelector(`article[data-group="${tt}"][data-name="${at}"][data-version="${ht}"]`).classList.remove("hide"),document.querySelector(`#sidenav li[data-group="${tt}"][data-name="${at}"][data-version="${ht}"]`).classList.remove("hide"),document.querySelector(`#sidenav li.nav-header[data-group="${tt}"]`).classList.remove("hide"))}),E()("article[data-version]").each(function(q){const tt=E()(this).data("group");E()("section#api-"+tt).removeClass("hide"),E()("section#api-"+tt+" article:visible").length===0?E()("section#api-"+tt).addClass("hide"):E()("section#api-"+tt).removeClass("hide")})}if(Bn(),E()("#versions li.version a").on("click",function(J){J.preventDefault(),Bn(E()(this).html())}),E()("#compareAllWithPredecessor").on("click",$n),E()("article .versions li.version a").on("click",fn),E().urlParam=function(J){const U=new RegExp("[\\?&]"+J+"=([^&#]*)").exec(window.location.href);return U&&U[1]?U[1]:null},E().urlParam("compare")&&E()("#compareAllWithPredecessor").trigger("click"),window.location.hash){const J=decodeURI(window.location.hash);E()(J).length>0&&E()("html,body").animate({scrollTop:parseInt(E()(J).offset().top)},0)}E()("#scrollingNav .sidenav-search input.search").focus(),E()('[data-action="filter-search"]').on("keyup",J=>{const U=J.currentTarget.value.toLowerCase();E()(".sidenav").find("a.nav-list-item").each((q,tt)=>{E()(tt).show(),tt.innerText.toLowerCase().includes(U)||E()(tt).hide()})}),E()("span.search-reset").on("click",function(){E()("#scrollingNav .sidenav-search input.search").val("").focus(),E()(".sidenav").find("a.nav-list-item").show()});function fn(J){J.preventDefault();const U=E()(this).parents("article"),q=E()(this).html(),tt=U.find(".version"),at=tt.find("strong").html();tt.find("strong").html(q);const ht=U.data("group"),gt=U.data("name"),wt=U.data("version"),Tt=U.data("compare-version");if(Tt!==q&&!(!Tt&&wt===q)){if(Tt&&Me[ht][gt][0]===q||wt===q)Xn(ht,gt,wt);else{let Lt={},Yt={};E().each(Gt[ht][gt],function(se,Je){Je.version===wt&&(Lt=Je),Je.version===q&&(Yt=Je)});const Et={article:Lt,compare:Yt,versions:Me[ht][gt]};Et.article.id=Et.article.group+"-"+Et.article.name+"-"+Et.article.version,Et.article.id=Et.article.id.replace(/\./g,"_"),Et.compare.id=Et.compare.group+"-"+Et.compare.name+"-"+Et.compare.version,Et.compare.id=Et.compare.id.replace(/\./g,"_");let Mt=Lt;Mt.parameter&&Mt.parameter.fields&&(Et._hasTypeInParameterFields=me(Mt.parameter.fields)),Mt.error&&Mt.error.fields&&(Et._hasTypeInErrorFields=me(Mt.error.fields)),Mt.success&&Mt.success.fields&&(Et._hasTypeInSuccessFields=me(Mt.success.fields)),Mt.info&&Mt.info.fields&&(Et._hasTypeInInfoFields=me(Mt.info.fields)),Mt=Yt,Et._hasTypeInParameterFields!==!0&&Mt.parameter&&Mt.parameter.fields&&(Et._hasTypeInParameterFields=me(Mt.parameter.fields)),Et._hasTypeInErrorFields!==!0&&Mt.error&&Mt.error.fields&&(Et._hasTypeInErrorFields=me(Mt.error.fields)),Et._hasTypeInSuccessFields!==!0&&Mt.success&&Mt.success.fields&&(Et._hasTypeInSuccessFields=me(Mt.success.fields)),Et._hasTypeInInfoFields!==!0&&Mt.info&&Mt.info.fields&&(Et._hasTypeInInfoFields=me(Mt.info.fields));const Ee=mt(Et);U.after(Ee),U.next().find(".versions li.version a").on("click",fn),E()("#sidenav li[data-group='"+ht+"'][data-name='"+gt+"'][data-version='"+at+"']").addClass("has-modifications"),U.remove()}v().highlightAll()}}function $n(J){J.preventDefault(),E()("article:visible .versions").each(function(){const q=E()(this).parents("article").data("version");let tt=null;E()(this).find("li.version a").each(function(){E()(this).html(){Object.keys(J).forEach(at=>{J[at].replace(/_/g," ")===tt&&q.push(at)})}),Object.keys(J).forEach(tt=>{q.indexOf(tt)===-1&&q.push(tt)}),q}Dn()}})()})(); diff --git a/docs/api_v1/index.html b/docs/api_v1/index.html index 75ffe449..bcd57bee 100644 --- a/docs/api_v1/index.html +++ b/docs/api_v1/index.html @@ -5,13 +5,13 @@ - - - - - - - + + + + + + + @@ -928,6 +928,6 @@ - +