252 lines
		
	
	
		
			6.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			252 lines
		
	
	
		
			6.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<!DOCTYPE html>
							 | 
						||
| 
								 | 
							
								<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
							 | 
						||
| 
								 | 
							
								<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
							 | 
						||
| 
								 | 
							
								<head>
							 | 
						||
| 
								 | 
							
								  <meta charset="utf-8">
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								  <meta name="viewport" content="width=device-width, initial-scale=1.0">
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								  <title>Moto APIs — Moto 0.4.10 documentation</title>
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								    
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								        <link rel="index" title="Index"
							 | 
						||
| 
								 | 
							
								              href="genindex.html"/>
							 | 
						||
| 
								 | 
							
								        <link rel="search" title="Search" href="search.html"/>
							 | 
						||
| 
								 | 
							
								    <link rel="top" title="Moto 0.4.10 documentation" href="index.html"/>
							 | 
						||
| 
								 | 
							
								        <link rel="prev" title="Other languages" href="other_langs.html"/> 
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								  <script src="_static/js/modernizr.min.js"></script>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								</head>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<body class="wy-body-for-nav" role="document">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								   
							 | 
						||
| 
								 | 
							
								  <div class="wy-grid-for-nav">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    
							 | 
						||
| 
								 | 
							
								    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
							 | 
						||
| 
								 | 
							
								      <div class="wy-side-scroll">
							 | 
						||
| 
								 | 
							
								        <div class="wy-side-nav-search">
							 | 
						||
| 
								 | 
							
								          
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								          
							 | 
						||
| 
								 | 
							
								            <a href="index.html" class="icon icon-home"> Moto
							 | 
						||
| 
								 | 
							
								          
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								          
							 | 
						||
| 
								 | 
							
								          </a>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								          
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								              <div class="version">
							 | 
						||
| 
								 | 
							
								                0.4.10
							 | 
						||
| 
								 | 
							
								              </div>
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								          
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								          
							 | 
						||
| 
								 | 
							
								<div role="search">
							 | 
						||
| 
								 | 
							
								  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
							 | 
						||
| 
								 | 
							
								    <input type="text" name="q" placeholder="Search docs" />
							 | 
						||
| 
								 | 
							
								    <input type="hidden" name="check_keywords" value="yes" />
							 | 
						||
| 
								 | 
							
								    <input type="hidden" name="area" value="default" />
							 | 
						||
| 
								 | 
							
								  </form>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								          
							 | 
						||
| 
								 | 
							
								        </div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
							 | 
						||
| 
								 | 
							
								          
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								              
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								              <ul class="current">
							 | 
						||
| 
								 | 
							
								<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started with Moto</a></li>
							 | 
						||
| 
								 | 
							
								<li class="toctree-l1"><a class="reference internal" href="other_langs.html">Other languages</a></li>
							 | 
						||
| 
								 | 
							
								<li class="toctree-l1 current"><a class="current reference internal" href="#">Moto APIs</a><ul>
							 | 
						||
| 
								 | 
							
								<li class="toctree-l2"><a class="reference internal" href="#reset-api">Reset API</a></li>
							 | 
						||
| 
								 | 
							
								<li class="toctree-l2"><a class="reference internal" href="#dashboard">Dashboard</a></li>
							 | 
						||
| 
								 | 
							
								</ul>
							 | 
						||
| 
								 | 
							
								</li>
							 | 
						||
| 
								 | 
							
								</ul>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								          
							 | 
						||
| 
								 | 
							
								        </div>
							 | 
						||
| 
								 | 
							
								      </div>
							 | 
						||
| 
								 | 
							
								    </nav>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								      
							 | 
						||
| 
								 | 
							
								      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
							 | 
						||
| 
								 | 
							
								        
							 | 
						||
| 
								 | 
							
								          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
							 | 
						||
| 
								 | 
							
								          <a href="index.html">Moto</a>
							 | 
						||
| 
								 | 
							
								        
							 | 
						||
| 
								 | 
							
								      </nav>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								      
							 | 
						||
| 
								 | 
							
								      <div class="wy-nav-content">
							 | 
						||
| 
								 | 
							
								        <div class="rst-content">
							 | 
						||
| 
								 | 
							
								          
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<div role="navigation" aria-label="breadcrumbs navigation">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  <ul class="wy-breadcrumbs">
							 | 
						||
| 
								 | 
							
								    
							 | 
						||
| 
								 | 
							
								      <li><a href="index.html">Docs</a> »</li>
							 | 
						||
| 
								 | 
							
								        
							 | 
						||
| 
								 | 
							
								      <li>Moto APIs</li>
							 | 
						||
| 
								 | 
							
								    
							 | 
						||
| 
								 | 
							
								    
							 | 
						||
| 
								 | 
							
								      <li class="wy-breadcrumbs-aside">
							 | 
						||
| 
								 | 
							
								        
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								            <a href="_sources/moto_apis.rst.txt" rel="nofollow"> View page source</a>
							 | 
						||
| 
								 | 
							
								          
							 | 
						||
| 
								 | 
							
								        
							 | 
						||
| 
								 | 
							
								      </li>
							 | 
						||
| 
								 | 
							
								    
							 | 
						||
| 
								 | 
							
								  </ul>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								  <hr/>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
							 | 
						||
| 
								 | 
							
								           <div itemprop="articleBody">
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								  <div class="section" id="moto-apis">
							 | 
						||
| 
								 | 
							
								<span id="id1"></span><h1>Moto APIs<a class="headerlink" href="#moto-apis" title="Permalink to this headline">¶</a></h1>
							 | 
						||
| 
								 | 
							
								<p>Moto provides some internal APIs to view and change the state of the backends.</p>
							 | 
						||
| 
								 | 
							
								<div class="section" id="reset-api">
							 | 
						||
| 
								 | 
							
								<h2>Reset API<a class="headerlink" href="#reset-api" title="Permalink to this headline">¶</a></h2>
							 | 
						||
| 
								 | 
							
								<p>This API resets the state of all of the backends. Send an HTTP POST to reset:</p>
							 | 
						||
| 
								 | 
							
								<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">requests</span><span class="o">.</span><span class="n">post</span><span class="p">(</span><span class="s2">"http://motoapi.amazonaws.com/moto-api/reset"</span><span class="p">)</span>
							 | 
						||
| 
								 | 
							
								</pre></div>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								<div class="section" id="dashboard">
							 | 
						||
| 
								 | 
							
								<h2>Dashboard<a class="headerlink" href="#dashboard" title="Permalink to this headline">¶</a></h2>
							 | 
						||
| 
								 | 
							
								<p>Moto comes with a dashboard to view the current state of the system:</p>
							 | 
						||
| 
								 | 
							
								<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">5000</span><span class="o">/</span><span class="n">moto</span><span class="o">-</span><span class="n">api</span><span class="o">/</span>
							 | 
						||
| 
								 | 
							
								</pre></div>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								           </div>
							 | 
						||
| 
								 | 
							
								           <div class="articleComments">
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								           </div>
							 | 
						||
| 
								 | 
							
								          </div>
							 | 
						||
| 
								 | 
							
								          <footer>
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
							 | 
						||
| 
								 | 
							
								      
							 | 
						||
| 
								 | 
							
								      
							 | 
						||
| 
								 | 
							
								        <a href="other_langs.html" class="btn btn-neutral" title="Other languages" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
							 | 
						||
| 
								 | 
							
								      
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  <hr/>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  <div role="contentinfo">
							 | 
						||
| 
								 | 
							
								    <p>
							 | 
						||
| 
								 | 
							
								        © Copyright 2015, Steve Pulec.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    </p>
							 | 
						||
| 
								 | 
							
								  </div>
							 | 
						||
| 
								 | 
							
								  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								</footer>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        </div>
							 | 
						||
| 
								 | 
							
								      </div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    </section>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  </div>
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <script type="text/javascript">
							 | 
						||
| 
								 | 
							
								        var DOCUMENTATION_OPTIONS = {
							 | 
						||
| 
								 | 
							
								            URL_ROOT:'./',
							 | 
						||
| 
								 | 
							
								            VERSION:'0.4.10',
							 | 
						||
| 
								 | 
							
								            COLLAPSE_INDEX:false,
							 | 
						||
| 
								 | 
							
								            FILE_SUFFIX:'.html',
							 | 
						||
| 
								 | 
							
								            HAS_SOURCE:  true,
							 | 
						||
| 
								 | 
							
								            SOURCELINK_SUFFIX: '.txt'
							 | 
						||
| 
								 | 
							
								        };
							 | 
						||
| 
								 | 
							
								    </script>
							 | 
						||
| 
								 | 
							
								      <script type="text/javascript" src="_static/jquery.js"></script>
							 | 
						||
| 
								 | 
							
								      <script type="text/javascript" src="_static/underscore.js"></script>
							 | 
						||
| 
								 | 
							
								      <script type="text/javascript" src="_static/doctools.js"></script>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								    <script type="text/javascript" src="_static/js/theme.js"></script>
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								  <script type="text/javascript">
							 | 
						||
| 
								 | 
							
								      jQuery(function () {
							 | 
						||
| 
								 | 
							
								          SphinxRtdTheme.StickyNav.enable();
							 | 
						||
| 
								 | 
							
								      });
							 | 
						||
| 
								 | 
							
								  </script>
							 | 
						||
| 
								 | 
							
								   
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								</body>
							 | 
						||
| 
								 | 
							
								</html>
							 |