Changeset - 3378805b80ee
[Not reviewed]
doc/build/html/README.html
Show inline comments
...
 
@@ -24,7 +24,7 @@
 
    <script type="text/javascript" src="_static/underscore.js"></script>
 
    <script type="text/javascript" src="_static/doctools.js"></script>
 
    <link rel="top" title="Accounting API 0.1-beta documentation" href="index.html" />
 
    <link rel="next" title="accounting package" href="api/accounting.html" />
 
    <link rel="next" title="REST API" href="restapi.html" />
 
    <link rel="prev" title="Welcome to Accounting API’s documentation!" href="index.html" /> 
 
  </head>
 
  <body>
...
 
@@ -38,7 +38,10 @@
 
          <a href="py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li class="right" >
 
          <a href="api/accounting.html" title="accounting package"
 
          <a href="http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="restapi.html" title="REST API"
 
             accesskey="N">next</a> |</li>
 
        <li class="right" >
 
          <a href="index.html" title="Welcome to Accounting API’s documentation!"
...
 
@@ -154,8 +157,8 @@ sudo apt-get install ledger
 
  <p class="topless"><a href="index.html"
 
                        title="previous chapter">Welcome to Accounting API&#8217;s documentation!</a></p>
 
  <h4>Next topic</h4>
 
  <p class="topless"><a href="api/accounting.html"
 
                        title="next chapter">accounting package</a></p>
 
  <p class="topless"><a href="restapi.html"
 
                        title="next chapter">REST API</a></p>
 
  <h3>This Page</h3>
 
  <ul class="this-page-menu">
 
    <li><a href="_sources/README.txt"
...
 
@@ -188,7 +191,10 @@ sudo apt-get install ledger
 
          <a href="py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li class="right" >
 
          <a href="api/accounting.html" title="accounting package"
 
          <a href="http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="restapi.html" title="REST API"
 
             >next</a> |</li>
 
        <li class="right" >
 
          <a href="index.html" title="Welcome to Accounting API’s documentation!"
doc/build/html/_modules/accounting.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -397,6 +400,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_modules/accounting/client.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -209,6 +212,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_modules/accounting/decorators.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -98,6 +101,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_modules/accounting/exceptions.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -84,6 +87,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_modules/accounting/gtkclient.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -225,6 +228,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_modules/accounting/models.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -133,6 +136,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_modules/accounting/storage.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -96,6 +99,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_modules/accounting/storage/ledgercli.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -412,6 +415,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_modules/accounting/storage/sql.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -163,6 +166,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_modules/accounting/storage/sql/models.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../../../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../../../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -133,6 +136,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../../../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../../../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_modules/accounting/transport.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -139,6 +142,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_modules/accounting/web.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -276,6 +279,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_modules/index.html
Show inline comments
...
 
@@ -32,6 +32,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -87,6 +90,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="../genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/_sources/index.txt
Show inline comments
...
 
@@ -12,6 +12,7 @@ Contents:
 
   :maxdepth: 2
 

	
 
   README
 
   restapi
 
   api/accounting.rst
 

	
 

	
doc/build/html/_sources/restapi.txt
Show inline comments
 
new file 100644
 
==========
 
 REST API
 
==========
 

	
 
Get transactions
 
----------------
 

	
 
.. http:get:: /transaction
 

	
 
    Get all transactions
 

	
 
    **Example request**
 

	
 
    .. code-block:: http
 

	
 
        GET /transaction HTTP/1.1
 
        Host: accounting.example
 
        Accept: application/json
 

	
 

	
 
    **Example response**
 

	
 
    .. code-block:: http
 

	
 
        HTTP/1.1 200 OK
 
        Content-Type: application/json
 

	
 
        {
 
          "transactions": [
 
            {
 
              "__type__": "Transaction", 
 
              "date": "2010-01-01", 
 
              "id": "Ids can be anything", 
 
              "metadata": {}, 
 
              "payee": "Kindly T. Donor", 
 
              "postings": [
 
                {
 
                  "__type__": "Posting", 
 
                  "account": "Income:Foo:Donation", 
 
                  "amount": {
 
                    "__type__": "Amount", 
 
                    "amount": "-100", 
 
                    "symbol": "$"
 
                  }, 
 
                  "metadata": {
 
                    "Invoice": "Projects/Foo/Invoices/Invoice20100101.pdf"
 
                  }
 
                }, 
 
                {
 
                  "__type__": "Posting", 
 
                  "account": "Assets:Checking", 
 
                  "amount": {
 
                    "__type__": "Amount", 
 
                    "amount": "100", 
 
                    "symbol": "$"
 
                  }, 
 
                  "metadata": {}
 
                }
 
              ]
 
            }, 
 
            {
 
              "__type__": "Transaction", 
 
              "date": "2011-03-15", 
 
              "id": "but mind you if they collide.", 
 
              "metadata": {}, 
 
              "payee": "Another J. Donor", 
 
              "postings": [
 
                {
 
                  "__type__": "Posting", 
 
                  "account": "Income:Foo:Donation", 
 
                  "amount": {
 
                    "__type__": "Amount", 
 
                    "amount": "-400", 
 
                    "symbol": "$"
 
                  }, 
 
                  "metadata": {
 
                    "Approval": "Projects/Foo/earmark-record.txt"
 
                  }
 
                }, 
 
                {
 
                  "__type__": "Posting", 
 
                  "account": "Assets:Checking", 
 
                  "amount": {
 
                    "__type__": "Amount", 
 
                    "amount": "400", 
 
                    "symbol": "$"
 
                  }, 
 
                  "metadata": {}
 
                }
 
              ]
 
            },
 
          ]
 
        }
 

	
 
Add transactions
 
----------------
 

	
 
.. http:post:: /transaction
 

	
 
    :jsonparam array transactions: A list of Transaction objects to add.
 

	
 
    **Example request**
 

	
 
    .. code-block:: http
 

	
 
        POST /transaction HTTP/1.1
 
        Host: accounting.example
 
        Content-Type: application/json
 
        Accept: application/json
 

	
 
        {
 
          "transactions": [
 
            {
 
              "__type__": "Transaction", 
 
              "date": "2010-01-01", 
 
              "id": "Ids can be anything", 
 
              "metadata": {}, 
 
              "payee": "Kindly T. Donor", 
 
              "postings": [
 
                {
 
                  "__type__": "Posting", 
 
                  "account": "Income:Foo:Donation", 
 
                  "amount": {
 
                    "__type__": "Amount", 
 
                    "amount": "-100", 
 
                    "symbol": "$"
 
                  }, 
 
                  "metadata": {
 
                    "Invoice": "Projects/Foo/Invoices/Invoice20100101.pdf"
 
                  }
 
                }, 
 
                {
 
                  "__type__": "Posting", 
 
                  "account": "Assets:Checking", 
 
                  "amount": {
 
                    "__type__": "Amount", 
 
                    "amount": "100", 
 
                    "symbol": "$"
 
                  }, 
 
                  "metadata": {}
 
                }
 
              ]
 
            }, 
 
          ]
 
        }
 

	
 
    **Example response**
 

	
 
    .. code-block:: http
 

	
 
        HTTP/1.1 200 OK
 
        Content-Type: application/json
 

	
 
        {
 
          "status": "OK",
 
          "transaction_ids": [
 
            "Ids can be anything"
 
          ]
 
        }
 

	
 

	
 
Delete a transaction
 
--------------------
 

	
 
.. http:delete:: /transaction/<string:transaction_id>
 

	
 
    Delete the transaction with ID :data:`transaction_id`.
 

	
 
    **Example request**
 

	
 
    .. code-block:: http
 

	
 
        DELETE /transaction/123456 HTTP/1.1
 
        Host: accounting.example
 
        Accept: application/json
 

	
 
    **Example response**
 

	
 
    .. code-block:: http
 

	
 
        HTTP/1.1 200 OK
 
        Content-Type: application/json
 

	
 
        {
 
          "status": "OK"
 
        }
doc/build/html/api/accounting.html
Show inline comments
...
 
@@ -25,7 +25,7 @@
 
    <script type="text/javascript" src="../_static/doctools.js"></script>
 
    <link rel="top" title="Accounting API 0.1-beta documentation" href="../index.html" />
 
    <link rel="next" title="accounting.storage package" href="accounting.storage.html" />
 
    <link rel="prev" title="The Accounting API" href="../README.html" /> 
 
    <link rel="prev" title="REST API" href="../restapi.html" /> 
 
  </head>
 
  <body>
 
    <div class="related">
...
 
@@ -37,11 +37,14 @@
 
        <li class="right" >
 
          <a href="../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li class="right" >
 
          <a href="../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="accounting.storage.html" title="accounting.storage package"
 
             accesskey="N">next</a> |</li>
 
        <li class="right" >
 
          <a href="../README.html" title="The Accounting API"
 
          <a href="../restapi.html" title="REST API"
 
             accesskey="P">previous</a> |</li>
 
        <li><a href="../index.html">Accounting API 0.1-beta documentation</a> &raquo;</li> 
 
      </ul>
...
 
@@ -378,8 +381,8 @@ the ledger file.</p>
 
</ul>
 

	
 
  <h4>Previous topic</h4>
 
  <p class="topless"><a href="../README.html"
 
                        title="previous chapter">The Accounting API</a></p>
 
  <p class="topless"><a href="../restapi.html"
 
                        title="previous chapter">REST API</a></p>
 
  <h4>Next topic</h4>
 
  <p class="topless"><a href="accounting.storage.html"
 
                        title="next chapter">accounting.storage package</a></p>
...
 
@@ -414,11 +417,14 @@ the ledger file.</p>
 
        <li class="right" >
 
          <a href="../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li class="right" >
 
          <a href="../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="accounting.storage.html" title="accounting.storage package"
 
             >next</a> |</li>
 
        <li class="right" >
 
          <a href="../README.html" title="The Accounting API"
 
          <a href="../restapi.html" title="REST API"
 
             >previous</a> |</li>
 
        <li><a href="../index.html">Accounting API 0.1-beta documentation</a> &raquo;</li> 
 
      </ul>
doc/build/html/api/accounting.storage.html
Show inline comments
...
 
@@ -38,6 +38,9 @@
 
        <li class="right" >
 
          <a href="../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li class="right" >
 
          <a href="../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="accounting.storage.sql.html" title="accounting.storage.sql package"
 
             accesskey="N">next</a> |</li>
...
 
@@ -309,6 +312,9 @@ the old transaction using <tt class="xref py py-data docutils literal"><span cla
 
        <li class="right" >
 
          <a href="../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li class="right" >
 
          <a href="../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="accounting.storage.sql.html" title="accounting.storage.sql package"
 
             >next</a> |</li>
doc/build/html/api/accounting.storage.sql.html
Show inline comments
...
 
@@ -37,6 +37,9 @@
 
        <li class="right" >
 
          <a href="../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li class="right" >
 
          <a href="../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="accounting.storage.html" title="accounting.storage package"
 
             accesskey="P">previous</a> |</li>
...
 
@@ -243,6 +246,9 @@
 
        <li class="right" >
 
          <a href="../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li class="right" >
 
          <a href="../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="accounting.storage.html" title="accounting.storage package"
 
             >previous</a> |</li>
doc/build/html/api/modules.html
Show inline comments
...
 
@@ -35,6 +35,9 @@
 
        <li class="right" >
 
          <a href="../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li class="right" >
 
          <a href="../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li><a href="../index.html">Accounting API 0.1-beta documentation</a> &raquo;</li> 
 
      </ul>
 
    </div>  
...
 
@@ -112,6 +115,9 @@
 
        <li class="right" >
 
          <a href="../py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li class="right" >
 
          <a href="../http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li><a href="../index.html">Accounting API 0.1-beta documentation</a> &raquo;</li> 
 
      </ul>
 
    </div>
doc/build/html/genindex.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="#" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -639,6 +642,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="#" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/http-routingtable.html
Show inline comments
 
new file 100644
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 

	
 

	
 
<html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
    
 
    <title>HTTP Routing Table &mdash; Accounting API 0.1-beta documentation</title>
 
    
 
    <link rel="stylesheet" href="_static/pydoctheme.css" type="text/css" />
 
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
 
    
 
    <script type="text/javascript">
 
      var DOCUMENTATION_OPTIONS = {
 
        URL_ROOT:    './',
 
        VERSION:     '0.1-beta',
 
        COLLAPSE_INDEX: false,
 
        FILE_SUFFIX: '.html',
 
        HAS_SOURCE:  true
 
      };
 
    </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>
 
    <link rel="top" title="Accounting API 0.1-beta documentation" href="index.html" />
 
 
 

	
 
    <script type="text/javascript">
 
      DOCUMENTATION_OPTIONS.COLLAPSE_INDEX = true;
 
    </script>
 

	
 

	
 
  </head>
 
  <body>
 
    <div class="related">
 
      <h3>Navigation</h3>
 
      <ul>
 
        <li class="right" style="margin-right: 10px">
 
          <a href="genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="#" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li><a href="index.html">Accounting API 0.1-beta documentation</a> &raquo;</li> 
 
      </ul>
 
    </div>  
 

	
 
    <div class="document">
 
      <div class="documentwrapper">
 
        <div class="bodywrapper">
 
          <div class="body">
 
            
 

	
 
   <h1>HTTP Routing Table</h1>
 

	
 
   <div class="modindex-jumpbox">
 
   <a href="#cap-/transaction"><strong>/transaction</strong></a>
 
   </div>
 

	
 
   <table class="indextable modindextable" cellspacing="0" cellpadding="2">
 
     <tr class="pcap"><td></td><td>&nbsp;</td><td></td></tr>
 
     <tr class="cap" id="cap-/transaction"><td></td><td>
 
       <strong>/transaction</strong></td><td></td></tr>
 
     <tr>
 
       <td></td>
 
       <td>
 
       <a href="restapi.html#get--transaction"><tt class="xref">GET /transaction</tt></a></td><td>
 
       <em></em></td></tr>
 
     <tr>
 
       <td></td>
 
       <td>
 
       <a href="restapi.html#post--transaction"><tt class="xref">POST /transaction</tt></a></td><td>
 
       <em></em></td></tr>
 
     <tr>
 
       <td></td>
 
       <td>
 
       <a href="restapi.html#delete--transaction--string-transaction_id-"><tt class="xref">DELETE /transaction/&lt;string:transaction_id&gt;</tt></a></td><td>
 
       <em></em></td></tr>
 
   </table>
 

	
 

	
 
          </div>
 
        </div>
 
      </div>
 
      <div class="sphinxsidebar">
 
        <div class="sphinxsidebarwrapper">
 
<div id="searchbox" style="display: none">
 
  <h3>Quick search</h3>
 
    <form class="search" action="search.html" method="get">
 
      <input type="text" name="q" />
 
      <input type="submit" value="Go" />
 
      <input type="hidden" name="check_keywords" value="yes" />
 
      <input type="hidden" name="area" value="default" />
 
    </form>
 
    <p class="searchtip" style="font-size: 90%">
 
    Enter search terms or a module, class or function name.
 
    </p>
 
</div>
 
<script type="text/javascript">$('#searchbox').show(0);</script>
 
        </div>
 
      </div>
 
      <div class="clearer"></div>
 
    </div>
 
    <div class="related">
 
      <h3>Navigation</h3>
 
      <ul>
 
        <li class="right" style="margin-right: 10px">
 
          <a href="genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="#" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li><a href="index.html">Accounting API 0.1-beta documentation</a> &raquo;</li> 
 
      </ul>
 
    </div>
 
    <div class="footer">
 
        &copy; Copyright 2013, Joar Wandborg.
 
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.
 
    </div>
 
  </body>
 
</html>
...
 
\ No newline at end of file
doc/build/html/index.html
Show inline comments
...
 
@@ -33,6 +33,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -59,6 +62,12 @@
 
<li class="toctree-l2"><a class="reference internal" href="README.html#usage">Usage</a></li>
 
</ul>
 
</li>
 
<li class="toctree-l1"><a class="reference internal" href="restapi.html">REST API</a><ul>
 
<li class="toctree-l2"><a class="reference internal" href="restapi.html#get-transactions">Get transactions</a></li>
 
<li class="toctree-l2"><a class="reference internal" href="restapi.html#add-transactions">Add transactions</a></li>
 
<li class="toctree-l2"><a class="reference internal" href="restapi.html#delete-a-transaction">Delete a transaction</a></li>
 
</ul>
 
</li>
 
<li class="toctree-l1"><a class="reference internal" href="api/accounting.html">accounting package</a><ul>
 
<li class="toctree-l2"><a class="reference internal" href="api/accounting.html#subpackages">Subpackages</a></li>
 
<li class="toctree-l2"><a class="reference internal" href="api/accounting.html#submodules">Submodules</a></li>
...
 
@@ -130,6 +139,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/objects.inv
Show inline comments
 
binary diff not shown
doc/build/html/py-modindex.html
Show inline comments
...
 
@@ -35,6 +35,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="#" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -155,6 +158,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="#" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/restapi.html
Show inline comments
 
new file 100644
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 

	
 

	
 
<html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
    
 
    <title>REST API &mdash; Accounting API 0.1-beta documentation</title>
 
    
 
    <link rel="stylesheet" href="_static/pydoctheme.css" type="text/css" />
 
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
 
    
 
    <script type="text/javascript">
 
      var DOCUMENTATION_OPTIONS = {
 
        URL_ROOT:    './',
 
        VERSION:     '0.1-beta',
 
        COLLAPSE_INDEX: false,
 
        FILE_SUFFIX: '.html',
 
        HAS_SOURCE:  true
 
      };
 
    </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>
 
    <link rel="top" title="Accounting API 0.1-beta documentation" href="index.html" />
 
    <link rel="next" title="accounting package" href="api/accounting.html" />
 
    <link rel="prev" title="The Accounting API" href="README.html" /> 
 
  </head>
 
  <body>
 
    <div class="related">
 
      <h3>Navigation</h3>
 
      <ul>
 
        <li class="right" style="margin-right: 10px">
 
          <a href="genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li class="right" >
 
          <a href="api/accounting.html" title="accounting package"
 
             accesskey="N">next</a> |</li>
 
        <li class="right" >
 
          <a href="README.html" title="The Accounting API"
 
             accesskey="P">previous</a> |</li>
 
        <li><a href="index.html">Accounting API 0.1-beta documentation</a> &raquo;</li> 
 
      </ul>
 
    </div>  
 

	
 
    <div class="document">
 
      <div class="documentwrapper">
 
        <div class="bodywrapper">
 
          <div class="body">
 
            
 
  <div class="section" id="rest-api">
 
<h1>REST API<a class="headerlink" href="#rest-api" title="Permalink to this headline">¶</a></h1>
 
<div class="section" id="get-transactions">
 
<h2>Get transactions<a class="headerlink" href="#get-transactions" title="Permalink to this headline">¶</a></h2>
 
<dl class="get">
 
<dt id="get--transaction">
 
<tt class="descname">GET </tt><tt class="descname">/transaction</tt><a class="headerlink" href="#get--transaction" title="Permalink to this definition">¶</a></dt>
 
<dd><p>Get all transactions</p>
 
<p><strong>Example request</strong></p>
 
<div class="highlight-http"><div class="highlight"><pre><span class="nf">GET</span> <span class="nn">/transaction</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
 
<span class="na">Host</span><span class="o">:</span> <span class="l">accounting.example</span>
 
<span class="na">Accept</span><span class="o">:</span> <span class="l">application/json</span>
 
</pre></div>
 
</div>
 
<p><strong>Example response</strong></p>
 
<div class="highlight-http"><div class="highlight"><pre><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">200</span> <span class="ne">OK</span>
 
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
 

	
 
<span class="p">{</span>
 
  <span class="nt">&quot;transactions&quot;</span><span class="p">:</span> <span class="p">[</span>
 
    <span class="p">{</span>
 
      <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Transaction&quot;</span><span class="p">,</span>
 
      <span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="s2">&quot;2010-01-01&quot;</span><span class="p">,</span>
 
      <span class="nt">&quot;id&quot;</span><span class="p">:</span> <span class="s2">&quot;Ids can be anything&quot;</span><span class="p">,</span>
 
      <span class="nt">&quot;metadata&quot;</span><span class="p">:</span> <span class="p">{},</span>
 
      <span class="nt">&quot;payee&quot;</span><span class="p">:</span> <span class="s2">&quot;Kindly T. Donor&quot;</span><span class="p">,</span>
 
      <span class="nt">&quot;postings&quot;</span><span class="p">:</span> <span class="p">[</span>
 
        <span class="p">{</span>
 
          <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Posting&quot;</span><span class="p">,</span>
 
          <span class="nt">&quot;account&quot;</span><span class="p">:</span> <span class="s2">&quot;Income:Foo:Donation&quot;</span><span class="p">,</span>
 
          <span class="nt">&quot;amount&quot;</span><span class="p">:</span> <span class="p">{</span>
 
            <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Amount&quot;</span><span class="p">,</span>
 
            <span class="nt">&quot;amount&quot;</span><span class="p">:</span> <span class="s2">&quot;-100&quot;</span><span class="p">,</span>
 
            <span class="nt">&quot;symbol&quot;</span><span class="p">:</span> <span class="s2">&quot;$&quot;</span>
 
          <span class="p">},</span>
 
          <span class="nt">&quot;metadata&quot;</span><span class="p">:</span> <span class="p">{</span>
 
            <span class="nt">&quot;Invoice&quot;</span><span class="p">:</span> <span class="s2">&quot;Projects/Foo/Invoices/Invoice20100101.pdf&quot;</span>
 
          <span class="p">}</span>
 
        <span class="p">},</span>
 
        <span class="p">{</span>
 
          <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Posting&quot;</span><span class="p">,</span>
 
          <span class="nt">&quot;account&quot;</span><span class="p">:</span> <span class="s2">&quot;Assets:Checking&quot;</span><span class="p">,</span>
 
          <span class="nt">&quot;amount&quot;</span><span class="p">:</span> <span class="p">{</span>
 
            <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Amount&quot;</span><span class="p">,</span>
 
            <span class="nt">&quot;amount&quot;</span><span class="p">:</span> <span class="s2">&quot;100&quot;</span><span class="p">,</span>
 
            <span class="nt">&quot;symbol&quot;</span><span class="p">:</span> <span class="s2">&quot;$&quot;</span>
 
          <span class="p">},</span>
 
          <span class="nt">&quot;metadata&quot;</span><span class="p">:</span> <span class="p">{}</span>
 
        <span class="p">}</span>
 
      <span class="p">]</span>
 
    <span class="p">},</span>
 
    <span class="p">{</span>
 
      <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Transaction&quot;</span><span class="p">,</span>
 
      <span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="s2">&quot;2011-03-15&quot;</span><span class="p">,</span>
 
      <span class="nt">&quot;id&quot;</span><span class="p">:</span> <span class="s2">&quot;but mind you if they collide.&quot;</span><span class="p">,</span>
 
      <span class="nt">&quot;metadata&quot;</span><span class="p">:</span> <span class="p">{},</span>
 
      <span class="nt">&quot;payee&quot;</span><span class="p">:</span> <span class="s2">&quot;Another J. Donor&quot;</span><span class="p">,</span>
 
      <span class="nt">&quot;postings&quot;</span><span class="p">:</span> <span class="p">[</span>
 
        <span class="p">{</span>
 
          <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Posting&quot;</span><span class="p">,</span>
 
          <span class="nt">&quot;account&quot;</span><span class="p">:</span> <span class="s2">&quot;Income:Foo:Donation&quot;</span><span class="p">,</span>
 
          <span class="nt">&quot;amount&quot;</span><span class="p">:</span> <span class="p">{</span>
 
            <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Amount&quot;</span><span class="p">,</span>
 
            <span class="nt">&quot;amount&quot;</span><span class="p">:</span> <span class="s2">&quot;-400&quot;</span><span class="p">,</span>
 
            <span class="nt">&quot;symbol&quot;</span><span class="p">:</span> <span class="s2">&quot;$&quot;</span>
 
          <span class="p">},</span>
 
          <span class="nt">&quot;metadata&quot;</span><span class="p">:</span> <span class="p">{</span>
 
            <span class="nt">&quot;Approval&quot;</span><span class="p">:</span> <span class="s2">&quot;Projects/Foo/earmark-record.txt&quot;</span>
 
          <span class="p">}</span>
 
        <span class="p">},</span>
 
        <span class="p">{</span>
 
          <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Posting&quot;</span><span class="p">,</span>
 
          <span class="nt">&quot;account&quot;</span><span class="p">:</span> <span class="s2">&quot;Assets:Checking&quot;</span><span class="p">,</span>
 
          <span class="nt">&quot;amount&quot;</span><span class="p">:</span> <span class="p">{</span>
 
            <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Amount&quot;</span><span class="p">,</span>
 
            <span class="nt">&quot;amount&quot;</span><span class="p">:</span> <span class="s2">&quot;400&quot;</span><span class="p">,</span>
 
            <span class="nt">&quot;symbol&quot;</span><span class="p">:</span> <span class="s2">&quot;$&quot;</span>
 
          <span class="p">},</span>
 
          <span class="nt">&quot;metadata&quot;</span><span class="p">:</span> <span class="p">{}</span>
 
        <span class="p">}</span>
 
      <span class="p">]</span>
 
    <span class="p">},</span>
 
  <span class="p">]</span>
 
<span class="p">}</span>
 
</pre></div>
 
</div>
 
</dd></dl>
 

	
 
</div>
 
<div class="section" id="add-transactions">
 
<h2>Add transactions<a class="headerlink" href="#add-transactions" title="Permalink to this headline">¶</a></h2>
 
<dl class="post">
 
<dt id="post--transaction">
 
<tt class="descname">POST </tt><tt class="descname">/transaction</tt><a class="headerlink" href="#post--transaction" title="Permalink to this definition">¶</a></dt>
 
<dd><table class="docutils field-list" frame="void" rules="none">
 
<col class="field-name" />
 
<col class="field-body" />
 
<tbody valign="top">
 
<tr class="field-odd field"><th class="field-name" colspan="2">Json Parameters:</th></tr>
 
<tr class="field-odd field"><td>&nbsp;</td><td class="field-body"><ul class="first last simple">
 
<li><strong>transactions</strong> (<em>array</em>) &#8211; A list of Transaction objects to add.</li>
 
</ul>
 
</td>
 
</tr>
 
</tbody>
 
</table>
 
<p><strong>Example request</strong></p>
 
<div class="highlight-http"><div class="highlight"><pre><span class="nf">POST</span> <span class="nn">/transaction</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
 
<span class="na">Host</span><span class="o">:</span> <span class="l">accounting.example</span>
 
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
 
<span class="na">Accept</span><span class="o">:</span> <span class="l">application/json</span>
 

	
 
<span class="p">{</span>
 
  <span class="nt">&quot;transactions&quot;</span><span class="p">:</span> <span class="p">[</span>
 
    <span class="p">{</span>
 
      <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Transaction&quot;</span><span class="p">,</span>
 
      <span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="s2">&quot;2010-01-01&quot;</span><span class="p">,</span>
 
      <span class="nt">&quot;id&quot;</span><span class="p">:</span> <span class="s2">&quot;Ids can be anything&quot;</span><span class="p">,</span>
 
      <span class="nt">&quot;metadata&quot;</span><span class="p">:</span> <span class="p">{},</span>
 
      <span class="nt">&quot;payee&quot;</span><span class="p">:</span> <span class="s2">&quot;Kindly T. Donor&quot;</span><span class="p">,</span>
 
      <span class="nt">&quot;postings&quot;</span><span class="p">:</span> <span class="p">[</span>
 
        <span class="p">{</span>
 
          <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Posting&quot;</span><span class="p">,</span>
 
          <span class="nt">&quot;account&quot;</span><span class="p">:</span> <span class="s2">&quot;Income:Foo:Donation&quot;</span><span class="p">,</span>
 
          <span class="nt">&quot;amount&quot;</span><span class="p">:</span> <span class="p">{</span>
 
            <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Amount&quot;</span><span class="p">,</span>
 
            <span class="nt">&quot;amount&quot;</span><span class="p">:</span> <span class="s2">&quot;-100&quot;</span><span class="p">,</span>
 
            <span class="nt">&quot;symbol&quot;</span><span class="p">:</span> <span class="s2">&quot;$&quot;</span>
 
          <span class="p">},</span>
 
          <span class="nt">&quot;metadata&quot;</span><span class="p">:</span> <span class="p">{</span>
 
            <span class="nt">&quot;Invoice&quot;</span><span class="p">:</span> <span class="s2">&quot;Projects/Foo/Invoices/Invoice20100101.pdf&quot;</span>
 
          <span class="p">}</span>
 
        <span class="p">},</span>
 
        <span class="p">{</span>
 
          <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Posting&quot;</span><span class="p">,</span>
 
          <span class="nt">&quot;account&quot;</span><span class="p">:</span> <span class="s2">&quot;Assets:Checking&quot;</span><span class="p">,</span>
 
          <span class="nt">&quot;amount&quot;</span><span class="p">:</span> <span class="p">{</span>
 
            <span class="nt">&quot;__type__&quot;</span><span class="p">:</span> <span class="s2">&quot;Amount&quot;</span><span class="p">,</span>
 
            <span class="nt">&quot;amount&quot;</span><span class="p">:</span> <span class="s2">&quot;100&quot;</span><span class="p">,</span>
 
            <span class="nt">&quot;symbol&quot;</span><span class="p">:</span> <span class="s2">&quot;$&quot;</span>
 
          <span class="p">},</span>
 
          <span class="nt">&quot;metadata&quot;</span><span class="p">:</span> <span class="p">{}</span>
 
        <span class="p">}</span>
 
      <span class="p">]</span>
 
    <span class="p">},</span>
 
  <span class="p">]</span>
 
<span class="p">}</span>
 
</pre></div>
 
</div>
 
<p><strong>Example response</strong></p>
 
<div class="highlight-http"><div class="highlight"><pre><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">200</span> <span class="ne">OK</span>
 
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
 

	
 
<span class="p">{</span>
 
  <span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;OK&quot;</span><span class="p">,</span>
 
  <span class="nt">&quot;transaction_ids&quot;</span><span class="p">:</span> <span class="p">[</span>
 
    <span class="s2">&quot;Ids can be anything&quot;</span>
 
  <span class="p">]</span>
 
<span class="p">}</span>
 
</pre></div>
 
</div>
 
</dd></dl>
 

	
 
</div>
 
<div class="section" id="delete-a-transaction">
 
<h2>Delete a transaction<a class="headerlink" href="#delete-a-transaction" title="Permalink to this headline">¶</a></h2>
 
<dl class="delete">
 
<dt id="delete--transaction--string-transaction_id-">
 
<tt class="descname">DELETE </tt><tt class="descname">/transaction/&lt;string:transaction_id&gt;</tt><a class="headerlink" href="#delete--transaction--string-transaction_id-" title="Permalink to this definition">¶</a></dt>
 
<dd><p>Delete the transaction with ID <tt class="xref py py-data docutils literal"><span class="pre">transaction_id</span></tt>.</p>
 
<p><strong>Example request</strong></p>
 
<div class="highlight-http"><div class="highlight"><pre><span class="nf">DELETE</span> <span class="nn">/transaction/123456</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
 
<span class="na">Host</span><span class="o">:</span> <span class="l">accounting.example</span>
 
<span class="na">Accept</span><span class="o">:</span> <span class="l">application/json</span>
 
</pre></div>
 
</div>
 
<p><strong>Example response</strong></p>
 
<div class="highlight-http"><div class="highlight"><pre><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">200</span> <span class="ne">OK</span>
 
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
 

	
 
<span class="p">{</span>
 
  <span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;OK&quot;</span>
 
<span class="p">}</span>
 
</pre></div>
 
</div>
 
</dd></dl>
 

	
 
</div>
 
</div>
 

	
 

	
 
          </div>
 
        </div>
 
      </div>
 
      <div class="sphinxsidebar">
 
        <div class="sphinxsidebarwrapper">
 
  <h3><a href="index.html">Table Of Contents</a></h3>
 
  <ul>
 
<li><a class="reference internal" href="#">REST API</a><ul>
 
<li><a class="reference internal" href="#get-transactions">Get transactions</a></li>
 
<li><a class="reference internal" href="#add-transactions">Add transactions</a></li>
 
<li><a class="reference internal" href="#delete-a-transaction">Delete a transaction</a></li>
 
</ul>
 
</li>
 
</ul>
 

	
 
  <h4>Previous topic</h4>
 
  <p class="topless"><a href="README.html"
 
                        title="previous chapter">The Accounting API</a></p>
 
  <h4>Next topic</h4>
 
  <p class="topless"><a href="api/accounting.html"
 
                        title="next chapter">accounting package</a></p>
 
  <h3>This Page</h3>
 
  <ul class="this-page-menu">
 
    <li><a href="_sources/restapi.txt"
 
           rel="nofollow">Show Source</a></li>
 
  </ul>
 
<div id="searchbox" style="display: none">
 
  <h3>Quick search</h3>
 
    <form class="search" action="search.html" method="get">
 
      <input type="text" name="q" />
 
      <input type="submit" value="Go" />
 
      <input type="hidden" name="check_keywords" value="yes" />
 
      <input type="hidden" name="area" value="default" />
 
    </form>
 
    <p class="searchtip" style="font-size: 90%">
 
    Enter search terms or a module, class or function name.
 
    </p>
 
</div>
 
<script type="text/javascript">$('#searchbox').show(0);</script>
 
        </div>
 
      </div>
 
      <div class="clearer"></div>
 
    </div>
 
    <div class="related">
 
      <h3>Navigation</h3>
 
      <ul>
 
        <li class="right" style="margin-right: 10px">
 
          <a href="genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
 
        <li class="right" >
 
          <a href="api/accounting.html" title="accounting package"
 
             >next</a> |</li>
 
        <li class="right" >
 
          <a href="README.html" title="The Accounting API"
 
             >previous</a> |</li>
 
        <li><a href="index.html">Accounting API 0.1-beta documentation</a> &raquo;</li> 
 
      </ul>
 
    </div>
 
    <div class="footer">
 
        &copy; Copyright 2013, Joar Wandborg.
 
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.
 
    </div>
 
  </body>
 
</html>
...
 
\ No newline at end of file
doc/build/html/search.html
Show inline comments
...
 
@@ -40,6 +40,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="genindex.html" title="General Index"
 
             accesskey="I">index</a></li>
 
        <li class="right" >
 
          <a href="http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
...
 
@@ -91,6 +94,9 @@
 
        <li class="right" style="margin-right: 10px">
 
          <a href="genindex.html" title="General Index"
 
             >index</a></li>
 
        <li class="right" >
 
          <a href="http-routingtable.html" title="HTTP Routing Table"
 
             >routing table</a> |</li>
 
        <li class="right" >
 
          <a href="py-modindex.html" title="Python Module Index"
 
             >modules</a> |</li>
doc/build/html/searchindex.js
Show inline comments
 
Search.setIndex({objects:{"":{accounting:[4,0,0,"-"]},"accounting.decorators":{jsonify_exceptions:[4,5,1,""]},"accounting.gtkclient.AccountingApplication":{on_transactions_loaded:[4,1,1,""],on_transaction_refresh_activate:[4,1,1,""],on_transaction_view_cursor_changed:[4,1,1,""],load_ui:[4,1,1,""],on_show_about_activate:[4,1,1,""],on_about_dialog_response:[4,1,1,""]},"accounting.models.Transaction":{generate_id:[4,1,1,""]},"accounting.storage.ledgercli.Ledger":{get_transaction:[2,1,1,""],add_transaction:[2,1,1,""],reg:[2,1,1,""],assemble_arguments:[2,1,1,""],get_process:[2,1,1,""],send_command:[2,1,1,""],bal:[2,1,1,""],delete_transaction:[2,1,1,""],update_transaction:[2,1,1,""],read_until_prompt:[2,1,1,""],init_process:[2,1,1,""],get_transactions:[2,1,1,""],locked_process:[2,1,1,""]},"accounting.storage":{TransactionNotFound:[2,4,1,""],Storage:[2,3,1,""],ledgercli:[2,0,0,"-"],sql:[0,0,0,"-"]},accounting:{models:[4,0,0,"-"],web:[4,0,0,"-"],client:[4,0,0,"-"],decorators:[4,0,0,"-"],transport:[4,0,0,"-"],exceptions:[4,0,0,"-"],config:[4,0,0,"-"],storage:[2,0,0,"-"],gtkclient:[4,0,0,"-"]},"accounting.storage.sql":{models:[0,0,0,"-"],SQLStorage:[0,3,1,""]},"accounting.transport.AccountingEncoder":{"default":[4,1,1,""]},"accounting.storage.sql.SQLStorage":{update_transaction:[0,1,1,""],add_transaction:[0,1,1,""],get_transactions:[0,1,1,""]},"accounting.storage.sql.models.Transaction":{date:[0,2,1,""],as_dict:[0,1,1,""],id:[0,2,1,""],payee:[0,2,1,""],meta:[0,2,1,""],uuid:[0,2,1,""]},"accounting.gtkclient":{indicate_activity_done:[4,5,1,""],indicate_activity:[4,5,1,""],main:[4,5,1,""],AccountingApplication:[4,3,1,""]},"accounting.client.Client":{get_register:[4,1,1,""],simple_transaction:[4,1,1,""],post:[4,1,1,""],get_balance:[4,1,1,""],get:[4,1,1,""]},"accounting.storage.sql.models.Amount":{amount:[0,2,1,""],symbol:[0,2,1,""],as_dict:[0,1,1,""],id:[0,2,1,""]},"accounting.client":{print_transactions:[4,5,1,""],Client:[4,3,1,""],print_balance_accounts:[4,5,1,""],main:[4,5,1,""]},"accounting.web":{index:[4,5,1,""],transaction_get:[4,5,1,""],init_ledger:[4,5,1,""],main:[4,5,1,""],transaction_delete:[4,5,1,""],transaction_post:[4,5,1,""],transaction_update:[4,5,1,""]},"accounting.storage.sql.models.Posting":{meta:[0,2,1,""],as_dict:[0,1,1,""],id:[0,2,1,""],account:[0,2,1,""],transaction:[0,2,1,""],amount:[0,2,1,""],amount_id:[0,2,1,""],transaction_uuid:[0,2,1,""]},"accounting.models":{Amount:[4,3,1,""],Transaction:[4,3,1,""],Account:[4,3,1,""],Posting:[4,3,1,""]},"accounting.transport":{AccountingEncoder:[4,3,1,""],AccountingDecoder:[4,3,1,""]},"accounting.storage.sql.models":{Amount:[0,3,1,""],Transaction:[0,3,1,""],Posting:[0,3,1,""]},"accounting.storage.Storage":{get_transaction:[2,1,1,""],get_account:[2,1,1,""],reverse_transaction:[2,1,1,""],update_transaction:[2,1,1,""],get_transactions:[2,1,1,""],add_transaction:[2,1,1,""],delete_transaction:[2,1,1,""],get_accounts:[2,1,1,""]},"accounting.storage.ledgercli":{main:[2,5,1,""],Ledger:[2,3,1,""]},"accounting.exceptions":{AccountingException:[4,4,1,""]},"accounting.transport.AccountingDecoder":{dict_to_object:[4,1,1,""]}},titleterms:{titl:[],decor:4,api:[3,1],depend:3,sql:0,content:[0,4,2],gtk:3,storag:[0,2],instal:3,usag:3,welcom:1,setup:3,model:[0,4],submodul:[0,4,2],test:[],web:4,config:4,ledgercli:2,ubuntu:3,modul:[0,4,2],gtkclient:4,indic:1,tabl:1,subpackag:[4,2],client:[3,4],develop:3,transport:4,packag:[0,4,2],account:[0,1,2,3,4,5],document:1,except:4,asyncio:[]},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","attribute","Python attribute"],"3":["py","class","Python class"],"4":["py","exception","Python exception"],"5":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:method","2":"py:attribute","3":"py:class","4":"py:exception","5":"py:function"},envversion:43,titles:["accounting.storage.sql package","Welcome to Accounting API&#8217;s documentation!","accounting.storage package","The Accounting API","accounting package","accounting"],filenames:["api/accounting.storage.sql","index","api/accounting.storage","README","api/accounting","api/modules"],terms:{core:3,code:3,contextlib:2,name:4,would:3,sql:[],need:3,incom:4,send_command:2,json:4,within:2,func:4,load:2,found:2,app:[0,2],stdin:2,run:[3,2],argument:2,apt:3,virtualenv:3,jsonify_except:4,yield:2,path:[3,4],parse_json:[],search:1,index:[1,4],method:[3,4,2],amount_id:0,separ:4,handl:2,"_generate_id":4,accountingdecod:4,your:3,should:2,accountingexcept:[4,2],take:[4,2],initi:4,describ:3,section:3,git:3,indicate_activity_don:4,page:1,evalu:2,databas:2,fals:4,"return":[4,2],exampl:[],regist:3,update_transact:[0,2],sort_kei:4,well:3,high:4,make:3,net:3,karma:[],process:2,ensure_ascii:4,ledgercli:[],add_transact:[0,2],version:3,remov:2,npoacct:3,linebreak:[],skipkei:4,statement:2,contextmanag:2,termin:3,simple_transact:4,get_transact:[0,2],context:2,manag:2,debug:[],mkvirtualenv:3,"class":[0,4,2],arg:[0,2],anoth:3,serial:4,balanc:3,mbudd:3,prog:4,unlock:2,instanc:2,payload:4,accountingencod:4,print_transact:4,ledger:[3,4,2],uuid:0,transaction_upd:4,usr:3,get_bal:4,etc:3,blah:[],builtin:[4,2],work:3,request:4,date:[0,4],head:3,ledger_process:2,data:[],x20:2,argv:[4,2],init_process:2,until:2,gitori:3,on_about_dialog_respons:4,logic:4,symbol:[3,0,4],get_account:2,from:[3,2],kindli:4,output:[4,2],get_process:2,jsondecod:4,sourc:[3,0,4,2],transaction_id:[4,2],webservic:4,decod:[],self:2,sudo:3,check_circular:4,current:4,onc:2,currenc:3,"default":4,mean:3,func_or_str:4,python:3,state:4,site:3,donat:4,contain:4,"try":3,environ:3,file:[4,2],usd:3,type:[],simpl:3,balance_report:[],tri:3,post:[0,4],how:3,you:3,januari:3,doe:3,flask_sqlalchemi:0,on_transaction_refresh_activ:4,base:[0,4,2],local:3,creat:2,locked_process:2,metadata:4,"function":3,amount:[0,4],irc:3,banner:2,bound:2,transaction_uuid:0,sinc:2,transaction_delet:4,ppa:3,caller:4,asset:[3,4],conserv:3,pip:3,follow:3,txt:3,annot:4,which:[3,4,2],assemble_argu:2,delet:2,shell:3,check:[3,4,2],requir:[3,4],text:2,"catch":4,insert:3,becom:4,pars:[],sai:3,from_acc:4,ledger_bin:2,discard:2,add:[3,2],on_aboutdialog_clos:[],expens:3,rest:4,recommend:2,wget:[],load_ui:4,out:3,open:2,curl:[],purpos:3,set:[3,2],response_typ:4,combin:2,abc:2,init_ledg:4,before_request:4,subprocess:2,storag:[],main:[4,2],boundari:2,without:2,old:2,avaiabl:3,thi:[3,4,2],ledger_fil:[3,2],transactionnotfound:2,meta:0,json_encod:4,suitabl:2,popen:2,flag:3,get:[3,4],via:[3,4],accountingappl:4,bal:2,generate_id:4,presum:2,pass:2,allow_nan:4,bin:3,servic:3,back:2,want:3,on_transactions_load:4,delete_transact:2,when:2,system:3,freenod:3,json_decod:4,autodetect:3,alreadi:2,list:2,print_balance_account:4,content:[],on_show_about_activ:4,on_transaction_select:[],line:2,channel:3,flask:[3,4],clone:3,to_acc:4,virtualenvwrapp:3,sqlstorag:0,on_refresh_transactions_activ:[],below:3,"__type__":4,transaction_post:4,execut:2,memori:2,applic:[],can:[3,2],serv:3,repositori:3,register_report:[],lock:2,see:3,user:3,ani:4,report:3,also:3,host:4,object:[4,2],end:3,yet:3,accountin:[],transact:[3,0,4,2],paye:[0,4],mode:2,all:[3,2],jsonencod:4,wrap:4,runtimeerror:2,clariti:[],org:3,reg:[4,2],python3:3,none:[0,4,2],command:2,went:3,read_until_prompt:2,http:[],reverse_transact:2,write:[4,2],donor:4,as_dict:0,rent:3,endpoint:4,get_regist:4,"true":[4,2],widget:4,level:4,hello:4,setup:[],have:3,look:2,world:4,foo:4,prompt:[3,2],workon:3,read:2,indicate_act:4,kwarg:0,result:2,dict_to_object:4,on_transaction_view_cursor_chang:4,"new":2,transaction_get:4,updat:[3,2],indent:4,them:2,find:2,log:3}})
...
 
\ No newline at end of file
 
Search.setIndex({envversion:43,titles:["accounting","accounting.storage package","accounting.storage.sql package","The Accounting API","accounting package","Welcome to Accounting API&#8217;s documentation!","REST API"],objtypes:{"0":"http:get","1":"http:delete","2":"http:post","3":"py:module","4":"py:function","5":"py:class","6":"py:method","7":"py:exception","8":"py:attribute"},filenames:["api/modules","api/accounting.storage","api/accounting.storage.sql","README","api/accounting","index","restapi"],terms:{you:[3,6],manag:1,requir:[3,4],http:6,string:6,print_transact:4,app:[2,1],transaction_upd:4,"class":[2,4,1],parse_json:[],pass:1,alreadi:1,ani:4,site:3,remov:1,contextmanag:1,unlock:1,register_report:[],channel:3,databas:1,setup:[],object:[4,6,1],indicate_act:4,json_decod:4,serial:4,clariti:[],load:1,symbol:[2,3,4,6],on_show_about_activ:4,invoice20100101:6,user:3,base:[2,4,1],them:1,state:4,jsonencod:4,wget:[],mind:6,caller:4,file:[4,1],on_transaction_view_cursor_chang:4,mean:3,before_request:4,apt:3,environ:3,json:[4,6],bal:1,delet:1,handl:1,your:3,should:1,kwarg:2,main:[4,1],result:1,runtimeerror:1,sinc:1,transaction_id:[4,6,1],high:4,response_typ:4,current:4,rent:3,describ:3,how:3,repositori:3,on_transactions_load:4,delete_transact:1,have:3,currenc:3,run:[3,1],payload:4,search:5,record:6,amount_id:2,bin:3,applic:6,januari:3,argument:1,dict_to_object:4,exampl:6,regist:3,fals:4,karma:[],gitori:3,sai:3,donat:[4,6],jsonify_except:4,prompt:[3,1],from:[3,1],autodetect:3,"function":3,hello:4,on_refresh_transactions_activ:[],statement:1,execut:1,well:3,onc:1,content:[],anyth:6,update_transact:[2,1],jsondecod:4,virtualenvwrapp:3,indicate_activity_don:4,method:[3,4,1],log:3,add_transact:[2,1],sqlstorag:2,npoacct:3,on_transaction_refresh_activ:4,lock:1,report:3,name:4,arrai:6,ensure_ascii:4,read_until_prompt:1,read:1,paye:[2,4,6],find:1,list:[6,1],on_aboutdialog_clos:[],check:[3,4,6,1],prog:4,need:3,meta:2,boundari:1,command:1,accept:6,separ:4,linebreak:[],generate_id:4,accountingexcept:[4,1],expens:3,freenod:3,on_transaction_select:[],can:[3,6,1],balance_report:[],servic:3,out:3,respons:6,arg:[2,1],world:4,code:3,statu:6,blah:[],back:1,flask:[3,4],balanc:3,wrap:4,sourc:[2,3,4,1],transaction_uuid:2,via:[3,4],system:3,send_command:1,irc:3,indent:4,func:4,evalu:1,decod:[],git:3,from_acc:4,mode:1,want:3,level:4,shell:3,on_about_dialog_respons:4,abc:1,data:[],anoth:[3,6],request:[4,6],date:[2,4,6],discard:1,follow:3,old:1,ledger:[3,4,1],when:1,host:[4,6],webservic:4,avaiabl:3,context:1,banner:1,usd:3,"try":3,asset:[3,4,6],workon:3,page:5,contain:4,bound:1,"catch":4,until:1,subprocess:1,found:1,transaction_get:4,clone:3,tri:3,stdin:1,net:3,usr:3,transaction_post:4,accountingencod:4,ledger_process:1,logic:4,foo:[4,6],func_or_str:4,head:3,wxampl:[],"new":1,skipkei:4,look:1,locked_process:1,builtin:[4,1],sudo:3,python3:3,local:3,process:1,ppa:3,"return":[4,1],becom:4,curl:[],pdf:6,metadata:[4,6],line:1,serv:3,simpl:3,insert:3,transactionnotfound:1,suitabl:1,core:3,conserv:3,donor:[4,6],accountingappl:4,sort_kei:4,thi:[3,4,1],check_circular:4,transact:[2,3,4,1],accountin:[],python:3,to_acc:4,combin:1,also:3,section:3,mkvirtualenv:3,creat:1,"default":4,org:3,get_account:1,see:3,end:3,init_process:1,collid:6,make:3,type:6,all:[3,6,1],endpoint:4,ledger_fil:[3,1],json_encod:4,rest:4,set:[3,1],load_ui:4,uuid:2,get_transact:[2,1],none:[2,4,1],mbudd:3,annot:4,get_regist:4,pip:3,sql:[],earmark:6,"true":[4,1],storag:[],below:3,accountingdecod:4,"__type__":[4,6],purpos:3,contextlib:1,instanc:1,index:[5,4],debug:[],write:[4,1],init_ledg:4,initi:4,thei:6,went:3,txt:[3,6],add:[3,1],kindli:[4,6],which:[3,4,1],take:[4,1],as_dict:2,pars:[],virtualenv:3,flask_sqlalchemi:2,work:3,version:3,memori:1,argv:[4,1],recommend:1,yield:1,within:1,project:6,ledger_bin:1,etc:3,reg:[4,1],transaction_delet:4,get_bal:4,without:1,text:1,path:[3,4],incom:[4,6],termin:3,flag:3,popen:1,invoic:6,approv:6,x20:1,allow_nan:4,open:1,doe:3,presum:1,get:[3,4],get_process:1,post:[2,4,6],output:[4,1],paramet:6,yet:3,"_generate_id":4,widget:4,self:1,updat:[3,1],ledgercli:[],print_balance_account:4,amount:[2,4,6],assemble_argu:1,simple_transact:4,reverse_transact:1,would:3},objnames:{"0":["http","get","HTTP get"],"1":["http","delete","HTTP delete"],"2":["http","post","HTTP post"],"3":["py","module","Python module"],"4":["py","function","Python function"],"5":["py","class","Python class"],"6":["py","method","Python method"],"7":["py","exception","Python exception"],"8":["py","attribute","Python attribute"]},objects:{"":{accounting:[4,3,0,"-"],"/transaction":[6,2,1,"post--transaction"],"/transaction/<string:transaction_id>":[6,1,1,"delete--transaction--string-transaction_id-"]},"accounting.gtkclient":{indicate_activity_done:[4,4,1,""],indicate_activity:[4,4,1,""],main:[4,4,1,""],AccountingApplication:[4,5,1,""]},"accounting.storage.sql.SQLStorage":{add_transaction:[2,6,1,""],update_transaction:[2,6,1,""],get_transactions:[2,6,1,""]},"accounting.web":{index:[4,4,1,""],transaction_update:[4,4,1,""],transaction_post:[4,4,1,""],transaction_delete:[4,4,1,""],init_ledger:[4,4,1,""],transaction_get:[4,4,1,""],main:[4,4,1,""]},"accounting.storage.ledgercli":{Ledger:[1,5,1,""],main:[1,4,1,""]},"accounting.client":{print_balance_accounts:[4,4,1,""],print_transactions:[4,4,1,""],main:[4,4,1,""],Client:[4,5,1,""]},"accounting.transport":{AccountingDecoder:[4,5,1,""],AccountingEncoder:[4,5,1,""]},"accounting.transport.AccountingEncoder":{"default":[4,6,1,""]},"accounting.storage.Storage":{get_accounts:[1,6,1,""],add_transaction:[1,6,1,""],get_transaction:[1,6,1,""],update_transaction:[1,6,1,""],get_account:[1,6,1,""],delete_transaction:[1,6,1,""],get_transactions:[1,6,1,""],reverse_transaction:[1,6,1,""]},"accounting.gtkclient.AccountingApplication":{on_show_about_activate:[4,6,1,""],on_transaction_refresh_activate:[4,6,1,""],on_transaction_view_cursor_changed:[4,6,1,""],on_transactions_loaded:[4,6,1,""],load_ui:[4,6,1,""],on_about_dialog_response:[4,6,1,""]},"accounting.decorators":{jsonify_exceptions:[4,4,1,""]},"accounting.storage.sql.models.Posting":{transaction:[2,8,1,""],amount_id:[2,8,1,""],as_dict:[2,6,1,""],id:[2,8,1,""],transaction_uuid:[2,8,1,""],account:[2,8,1,""],meta:[2,8,1,""],amount:[2,8,1,""]},"accounting.exceptions":{AccountingException:[4,7,1,""]},accounting:{exceptions:[4,3,0,"-"],storage:[1,3,0,"-"],client:[4,3,0,"-"],web:[4,3,0,"-"],config:[4,3,0,"-"],models:[4,3,0,"-"],gtkclient:[4,3,0,"-"],transport:[4,3,0,"-"],decorators:[4,3,0,"-"]},"accounting.models":{Transaction:[4,5,1,""],Account:[4,5,1,""],Posting:[4,5,1,""],Amount:[4,5,1,""]},"accounting.storage.ledgercli.Ledger":{reg:[1,6,1,""],add_transaction:[1,6,1,""],assemble_arguments:[1,6,1,""],init_process:[1,6,1,""],locked_process:[1,6,1,""],bal:[1,6,1,""],get_process:[1,6,1,""],get_transactions:[1,6,1,""],read_until_prompt:[1,6,1,""],get_transaction:[1,6,1,""],delete_transaction:[1,6,1,""],send_command:[1,6,1,""],update_transaction:[1,6,1,""]},"accounting.storage.sql.models.Amount":{symbol:[2,8,1,""],id:[2,8,1,""],as_dict:[2,6,1,""],amount:[2,8,1,""]},"accounting.client.Client":{get:[4,6,1,""],get_balance:[4,6,1,""],simple_transaction:[4,6,1,""],get_register:[4,6,1,""],post:[4,6,1,""]},"accounting.storage.sql.models":{Transaction:[2,5,1,""],Posting:[2,5,1,""],Amount:[2,5,1,""]},"accounting.storage":{sql:[2,3,0,"-"],ledgercli:[1,3,0,"-"],Storage:[1,5,1,""],TransactionNotFound:[1,7,1,""]},"accounting.storage.sql":{models:[2,3,0,"-"],SQLStorage:[2,5,1,""]},"accounting.transport.AccountingDecoder":{dict_to_object:[4,6,1,""]},"accounting.storage.sql.models.Transaction":{meta:[2,8,1,""],as_dict:[2,6,1,""],id:[2,8,1,""],payee:[2,8,1,""],uuid:[2,8,1,""],date:[2,8,1,""]},"accounting.models.Transaction":{generate_id:[4,6,1,""]}},titleterms:{welcom:5,asyncio:[],sql:2,setup:3,modul:[2,4,1],config:4,ubuntu:3,titl:[],test:[],delet:6,transport:4,packag:[2,4,1],usag:3,except:4,tabl:5,document:5,ledgercli:1,gtkclient:4,instal:3,indic:5,depend:3,decor:4,subpackag:[4,1],storag:[2,1],client:[3,4],model:[2,4],submodul:[2,4,1],gtk:3,content:[2,4,1],rest:6,get:6,web:4,transact:6,account:[1,2,5,0,3,4],api:[3,5,6],develop:3,add:6}})
...
 
\ No newline at end of file
doc/source/conf.py
Show inline comments
...
 
@@ -25,7 +25,14 @@ sys.path.insert(0, os.path.abspath('../../'))
 

	
 
# Add any Sphinx extension module names here, as strings. They can be extensions
 
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode']
 
extensions = [
 
    'sphinx.ext.autodoc',
 
    'sphinx.ext.intersphinx',
 
    'sphinx.ext.todo',
 
    'sphinx.ext.coverage',
 
    'sphinx.ext.viewcode',
 
    'sphinxcontrib.httpdomain'
 
]
 

	
 
# Add any paths that contain templates here, relative to this directory.
 
templates_path = ['_templates']
doc/source/index.rst
Show inline comments
...
 
@@ -12,6 +12,7 @@ Contents:
 
   :maxdepth: 2
 

	
 
   README
 
   restapi
 
   api/accounting.rst
 

	
 

	
doc/source/restapi.rst
Show inline comments
 
new file 100644
 
==========
 
 REST API
 
==========
 

	
 
Get transactions
 
----------------
 

	
 
.. http:get:: /transaction
 

	
 
    Get all transactions
 

	
 
    **Example request**
 

	
 
    .. code-block:: http
 

	
 
        GET /transaction HTTP/1.1
 
        Host: accounting.example
 
        Accept: application/json
 

	
 

	
 
    **Example response**
 

	
 
    .. code-block:: http
 

	
 
        HTTP/1.1 200 OK
 
        Content-Type: application/json
 

	
 
        {
 
          "transactions": [
 
            {
 
              "__type__": "Transaction", 
 
              "date": "2010-01-01", 
 
              "id": "Ids can be anything", 
 
              "metadata": {}, 
 
              "payee": "Kindly T. Donor", 
 
              "postings": [
 
                {
 
                  "__type__": "Posting", 
 
                  "account": "Income:Foo:Donation", 
 
                  "amount": {
 
                    "__type__": "Amount", 
 
                    "amount": "-100", 
 
                    "symbol": "$"
 
                  }, 
 
                  "metadata": {
 
                    "Invoice": "Projects/Foo/Invoices/Invoice20100101.pdf"
 
                  }
 
                }, 
 
                {
 
                  "__type__": "Posting", 
 
                  "account": "Assets:Checking", 
 
                  "amount": {
 
                    "__type__": "Amount", 
 
                    "amount": "100", 
 
                    "symbol": "$"
 
                  }, 
 
                  "metadata": {}
 
                }
 
              ]
 
            }, 
 
            {
 
              "__type__": "Transaction", 
 
              "date": "2011-03-15", 
 
              "id": "but mind you if they collide.", 
 
              "metadata": {}, 
 
              "payee": "Another J. Donor", 
 
              "postings": [
 
                {
 
                  "__type__": "Posting", 
 
                  "account": "Income:Foo:Donation", 
 
                  "amount": {
 
                    "__type__": "Amount", 
 
                    "amount": "-400", 
 
                    "symbol": "$"
 
                  }, 
 
                  "metadata": {
 
                    "Approval": "Projects/Foo/earmark-record.txt"
 
                  }
 
                }, 
 
                {
 
                  "__type__": "Posting", 
 
                  "account": "Assets:Checking", 
 
                  "amount": {
 
                    "__type__": "Amount", 
 
                    "amount": "400", 
 
                    "symbol": "$"
 
                  }, 
 
                  "metadata": {}
 
                }
 
              ]
 
            },
 
          ]
 
        }
 

	
 
Add transactions
 
----------------
 

	
 
.. http:post:: /transaction
 

	
 
    :jsonparam array transactions: A list of Transaction objects to add.
 

	
 
    **Example request**
 

	
 
    .. code-block:: http
 

	
 
        POST /transaction HTTP/1.1
 
        Host: accounting.example
 
        Content-Type: application/json
 
        Accept: application/json
 

	
 
        {
 
          "transactions": [
 
            {
 
              "__type__": "Transaction", 
 
              "date": "2010-01-01", 
 
              "id": "Ids can be anything", 
 
              "metadata": {}, 
 
              "payee": "Kindly T. Donor", 
 
              "postings": [
 
                {
 
                  "__type__": "Posting", 
 
                  "account": "Income:Foo:Donation", 
 
                  "amount": {
 
                    "__type__": "Amount", 
 
                    "amount": "-100", 
 
                    "symbol": "$"
 
                  }, 
 
                  "metadata": {
 
                    "Invoice": "Projects/Foo/Invoices/Invoice20100101.pdf"
 
                  }
 
                }, 
 
                {
 
                  "__type__": "Posting", 
 
                  "account": "Assets:Checking", 
 
                  "amount": {
 
                    "__type__": "Amount", 
 
                    "amount": "100", 
 
                    "symbol": "$"
 
                  }, 
 
                  "metadata": {}
 
                }
 
              ]
 
            }, 
 
          ]
 
        }
 

	
 
    **Example response**
 

	
 
    .. code-block:: http
 

	
 
        HTTP/1.1 200 OK
 
        Content-Type: application/json
 

	
 
        {
 
          "status": "OK",
 
          "transaction_ids": [
 
            "Ids can be anything"
 
          ]
 
        }
 

	
 

	
 
Delete a transaction
 
--------------------
 

	
 
.. http:delete:: /transaction/<string:transaction_id>
 

	
 
    Delete the transaction with ID :data:`transaction_id`.
 

	
 
    **Example request**
 

	
 
    .. code-block:: http
 

	
 
        DELETE /transaction/123456 HTTP/1.1
 
        Host: accounting.example
 
        Accept: application/json
 

	
 
    **Example response**
 

	
 
    .. code-block:: http
 

	
 
        HTTP/1.1 200 OK
 
        Content-Type: application/json
 

	
 
        {
 
          "status": "OK"
 
        }
0 comments (0 inline, 0 general)