<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.aagrinder.xyz/index.php?action=history&amp;feed=atom&amp;title=AAGRINDER_REST_api</id>
	<title>AAGRINDER REST api - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.aagrinder.xyz/index.php?action=history&amp;feed=atom&amp;title=AAGRINDER_REST_api"/>
	<link rel="alternate" type="text/html" href="https://wiki.aagrinder.xyz/index.php?title=AAGRINDER_REST_api&amp;action=history"/>
	<updated>2026-05-06T01:13:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.1</generator>
	<entry>
		<id>https://wiki.aagrinder.xyz/index.php?title=AAGRINDER_REST_api&amp;diff=177&amp;oldid=prev</id>
		<title>imported&gt;Maze: aagrinder.xyz</title>
		<link rel="alternate" type="text/html" href="https://wiki.aagrinder.xyz/index.php?title=AAGRINDER_REST_api&amp;diff=177&amp;oldid=prev"/>
		<updated>2019-10-31T21:36:10Z</updated>

		<summary type="html">&lt;p&gt;aagrinder.xyz&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 21:36, 31 October 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot; &gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page describes all the REST api endpoints. Not to be confused with [[AAGRINDER socket.io api|socket.io api endpoints]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page describes all the REST api endpoints. Not to be confused with [[AAGRINDER socket.io api|socket.io api endpoints]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The examples assume you have a local AAGRINDER server running on port 8080 (default port). See [[Setting up a server|how to set up a server]].&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Check name ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Check name ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l26&quot; &gt;Line 26:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Sample call ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Sample call ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;curl &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;localhost&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;8080&lt;/del&gt;/api/users/checkname --data &amp;quot;name=original&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;curl &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;https&lt;/ins&gt;:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;//aagrinder.xyz&lt;/ins&gt;/api/users/checkname --data &amp;quot;name=original&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l53&quot; &gt;Line 53:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 51:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Sample call ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Sample call ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;curl &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;localhost&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;8080&lt;/del&gt;/api/users/checkpass --data &amp;quot;name=original&amp;quot; --data &amp;quot;password=hihi&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;curl &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;https&lt;/ins&gt;:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;//aagrinder.xyz&lt;/ins&gt;/api/users/checkpass --data &amp;quot;name=original&amp;quot; --data &amp;quot;password=hihi&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l81&quot; &gt;Line 81:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 79:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Sample call ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Sample call ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;curl &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;localhost&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;8080&lt;/del&gt;/api/users/changepass --data &amp;quot;name=original&amp;quot; --data &amp;quot;oldpassword=hihi&amp;quot; --data &amp;quot;newpassword=hehe&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;curl &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;https&lt;/ins&gt;:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;//aagrinder.xyz&lt;/ins&gt;/api/users/changepass --data &amp;quot;name=original&amp;quot; --data &amp;quot;oldpassword=hihi&amp;quot; --data &amp;quot;newpassword=hehe&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l113&quot; &gt;Line 113:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 111:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Sample call ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Sample call ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;curl &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;localhost&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;8080&lt;/del&gt;/api/users/register --data &amp;quot;name=original&amp;quot; --data &amp;quot;password=hihi&amp;quot; --data &amp;quot;color=fdbcb4&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;curl &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;https&lt;/ins&gt;:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;//aagrinder.xyz&lt;/ins&gt;/api/users/register --data &amp;quot;name=original&amp;quot; --data &amp;quot;password=hihi&amp;quot; --data &amp;quot;color=fdbcb4&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Maze</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.aagrinder.xyz/index.php?title=AAGRINDER_REST_api&amp;diff=176&amp;oldid=prev</id>
		<title>imported&gt;Maze: Created page with &quot;The AAGRINDER server exposes a simple REST api which is used for account operations. The code for this api can be found at https://gitlab.com/MRAAGH/aag...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.aagrinder.xyz/index.php?title=AAGRINDER_REST_api&amp;diff=176&amp;oldid=prev"/>
		<updated>2019-10-28T19:21:36Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The AAGRINDER server exposes a simple &lt;a href=&quot;https://en.wikipedia.org/wiki/rest_api&quot; class=&quot;extiw&quot; title=&quot;wikipedia:rest api&quot;&gt;REST api&lt;/a&gt; which is used for account operations. The code for this api can be found at https://gitlab.com/MRAAGH/aag...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The AAGRINDER server exposes a simple [[wikipedia:rest api|REST api]] which is used for account operations. The code for this api can be found at https://gitlab.com/MRAAGH/aagrinder/blob/master/server/api/User.js&lt;br /&gt;
&lt;br /&gt;
This page describes all the REST api endpoints. Not to be confused with [[AAGRINDER socket.io api|socket.io api endpoints]].&lt;br /&gt;
&lt;br /&gt;
The examples assume you have a local AAGRINDER server running on port 8080 (default port). See [[Setting up a server|how to set up a server]].&lt;br /&gt;
&lt;br /&gt;
== Check name ==&lt;br /&gt;
Checks whether an account name is available for registration&lt;br /&gt;
=== URL ===&lt;br /&gt;
/api/users/checkname&lt;br /&gt;
=== Method ===&lt;br /&gt;
&amp;lt;pre&amp;gt;POST&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== URL Params ===&lt;br /&gt;
None&lt;br /&gt;
=== Data Params ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
name=[string]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Possible responses ===&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Registration is not possible on this server. You should try to log in directly.&amp;#039;, success: false, insecure: true }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Missing form data&amp;#039;, success: false}&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Username invalid ^[A-Za-z]([A-Za-z0-9 ]{0,10}[A-Za-z0-9])?$&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Server error&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Username taken&amp;#039;, success: false, color: existingUser[0].color }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;OK&amp;#039;, success: true }&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Sample call ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl localhost:8080/api/users/checkname --data &amp;quot;name=original&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check password ==&lt;br /&gt;
Checks whether a password for an account is correct&lt;br /&gt;
=== URL ===&lt;br /&gt;
/api/users/checkpass&lt;br /&gt;
=== Method ===&lt;br /&gt;
&amp;lt;pre&amp;gt;POST&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== URL Params ===&lt;br /&gt;
None&lt;br /&gt;
=== Data Params ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
name=[string]&lt;br /&gt;
password=[string]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Possible responses ===&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;This server does not use passwords.&amp;#039;, success: false, insecure: true }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Missing form data&amp;#039;, success: false}&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Username invalid ^[A-Za-z]([A-Za-z0-9 ]{0,10}[A-Za-z0-9])?$&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Password invalid ^.+$&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Server error&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Wrong password&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;User does not exist&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;OK&amp;#039;, success: true }&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Sample call ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl localhost:8080/api/users/checkpass --data &amp;quot;name=original&amp;quot; --data &amp;quot;password=hihi&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change password ==&lt;br /&gt;
Changes an account password&lt;br /&gt;
=== URL ===&lt;br /&gt;
/api/users/changepass&lt;br /&gt;
=== Method ===&lt;br /&gt;
&amp;lt;pre&amp;gt;POST&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== URL Params ===&lt;br /&gt;
None&lt;br /&gt;
=== Data Params ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
name=[string]&lt;br /&gt;
oldpassword=[string]&lt;br /&gt;
newpassword=[string]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Possible responses ===&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;This server does not use passwords.&amp;#039;, success: false, insecure: true }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Missing form data&amp;#039;, success: false}&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Username invalid ^[A-Za-z]([A-Za-z0-9 ]{0,10}[A-Za-z0-9])?$&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Password invalid ^.+$&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Server error&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Wrong password&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;User does not exist&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Password changed.&amp;#039;, success: true }&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Sample call ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl localhost:8080/api/users/changepass --data &amp;quot;name=original&amp;quot; --data &amp;quot;oldpassword=hihi&amp;quot; --data &amp;quot;newpassword=hehe&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Register an account ==&lt;br /&gt;
Create a new account on the AAGRINDER server&lt;br /&gt;
=== URL ===&lt;br /&gt;
/api/users/register&lt;br /&gt;
=== Method ===&lt;br /&gt;
&amp;lt;pre&amp;gt;POST&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== URL Params ===&lt;br /&gt;
None&lt;br /&gt;
=== Data Params ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
name=[string]&lt;br /&gt;
password=[string]&lt;br /&gt;
color=[string]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Possible responses ===&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Missing form data&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Username invalid ^[A-Za-z]([A-Za-z0-9 ]{0,10}[A-Za-z0-9])?$&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Password invalid ^.+$&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Color invalid ^[0-9a-f]{6}$&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Color too dark&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Server error&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Username taken&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Server error&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Server error&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;Server error&amp;#039;, success: false }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;User created&amp;#039;, success: true }&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;pre&amp;gt;{ message: &amp;#039;User created. Hi there, soru O.O&amp;#039;, success: true }&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Sample call ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl localhost:8080/api/users/register --data &amp;quot;name=original&amp;quot; --data &amp;quot;password=hihi&amp;quot; --data &amp;quot;color=fdbcb4&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Maze</name></author>
		
	</entry>
</feed>