Skip to content

Commit

Permalink
UK: add doc to document api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ukanga committed Jun 27, 2014
1 parent 3f43393 commit 1527b4e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
API changes
===========

## /users, /profiles

- list of users/profiles is public

## /forms

- username and form id_string are no longer part of the url format
- use only a form id (number) to access a form
- form publishing, to publish a form to a different account you have to pass the `owner` param, which is the username of that account.

## /data, /stats, /stats/submission
- username and form id_string are no longer part of the url format
- use only a form id (number) and optionally dataid (number) to access a data node
4 changes: 2 additions & 2 deletions onadata/apps/api/viewsets/xform_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class XFormViewSet(AnonymousUserPublicFormsMixin, ModelViewSet):
of the fields.
<pre class="prettyprint">
<b>PATCH</b> /api/v1/forms/<code>{formid}</code></pre>
<b>PATCH</b> /api/v1/forms/<code>{pk}</code></pre>
> Example
>
Expand Down Expand Up @@ -336,7 +336,7 @@ class XFormViewSet(AnonymousUserPublicFormsMixin, ModelViewSet):
## Delete Form
<pre class="prettyprint">
<b>DELETE</b> /api/v1/forms/<code>{formid}</code></pre>
<b>DELETE</b> /api/v1/forms/<code>{pk}</code></pre>
> Example
>
> curl -X DELETE https://ona.io/api/v1/forms/28058
Expand Down

0 comments on commit 1527b4e

Please sign in to comment.