-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f30fe15
commit a867740
Showing
10 changed files
with
600 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
Activities | ||
========== | ||
|
||
``(implementation of Activity entity)`` | ||
|
||
Provides following method for `API <index.html>`_ calls: | ||
|
||
* `Get activity`_ | ||
* `Get activities`_ | ||
* `Save activity`_ | ||
* `Attach file to activity`_ | ||
* `Download attached file`_ | ||
|
||
.. _`Get activity`: | ||
|
||
Get activity | ||
------------ | ||
|
||
URL: | ||
~~~~ | ||
*/activities/{id}* | ||
|
||
Method: | ||
~~~~~~~ | ||
*GET* | ||
|
||
Parameters request: | ||
~~~~~~~~~~~~~~~~~~~ | ||
*null* | ||
|
||
Parameters response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
*Object* | ||
|
||
*With properties:* | ||
#. id (Number) | ||
#. description (String) | ||
#. reported_date (Number) | ||
#. reported_by (Object) | ||
#. file_name (String) | ||
#. issue (Object) | ||
|
||
.. note:: | ||
|
||
reported_by links with Person entity | ||
|
||
reported_date represent as number of seconds since 1 Jan 1970 00:00:00 (UTC) | ||
|
||
Example of response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code-block:: json | ||
{ | ||
"id":1, | ||
"description":"Test", | ||
"reported_date":1465828993000, | ||
"reported_by":{}, | ||
"issue":{}, | ||
"file_name":"file.pdf", | ||
} | ||
.. _`Get activities`: | ||
|
||
Get activities | ||
-------------- | ||
|
||
URL: | ||
~~~~ | ||
*/activities* | ||
|
||
Method: | ||
~~~~~~~ | ||
*GET* | ||
|
||
Parameters request: | ||
~~~~~~~~~~~~~~~~~~~ | ||
*null* | ||
|
||
Parameters response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
*Array* | ||
|
||
.. seealso:: | ||
Array consists of objects from `Get activities`_ method | ||
|
||
Example of response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code-block:: json | ||
[ | ||
{}, | ||
{}, | ||
... | ||
{} | ||
] | ||
.. _`Save activity`: | ||
|
||
Save activity | ||
------------- | ||
|
||
URL: | ||
~~~~ | ||
*/activities* | ||
|
||
Method: | ||
~~~~~~~ | ||
*POST* | ||
|
||
Parameters request: | ||
~~~~~~~~~~~~~~~~~~~ | ||
*Object* | ||
|
||
*With properties:* | ||
#. description (String) | ||
#. issue (Object) | ||
|
||
Parameters response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
*Object* | ||
|
||
*On server fill properties* | ||
#. id (Number) | ||
#. reported_date (Number) | ||
#. reported_by (Object) | ||
|
||
.. note:: | ||
You retrieve whole object just like in `Get activity`_ | ||
|
||
Example of request: | ||
~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code-block:: json | ||
{ | ||
"description" : "Test", | ||
"issue" : { id : 1 } | ||
} | ||
.. _`Attach file to activity`: | ||
|
||
Attach file to activity | ||
----------------------- | ||
|
||
URL: | ||
~~~~ | ||
*/activities/attach/{id}* | ||
|
||
Method: | ||
~~~~~~~ | ||
*POST* | ||
|
||
Parameters request: | ||
~~~~~~~~~~~~~~~~~~~ | ||
*One file* | ||
|
||
*With property* **name = "file"** | ||
|
||
.. note:: | ||
Max file size can not be more than 20 Mb | ||
|
||
When you upload file -> on server fill file_name property with appropriate activity | ||
|
||
Parameters response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
*String* | ||
|
||
*Description:* file name of attached file | ||
|
||
.. _`Download attached file`: | ||
|
||
URL: | ||
~~~~ | ||
*/activities/attach/{id}* | ||
|
||
Method: | ||
~~~~~~~ | ||
*GET* | ||
|
||
Parameters request: | ||
~~~~~~~~~~~~~~~~~~~ | ||
*null* | ||
|
||
Parameters response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
*File* | ||
|
||
*Description:* starting download a file | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Categories | ||
========== | ||
|
||
``(implementation of Category entity)`` | ||
|
||
Provides following method for `API <index.html>`_ calls: | ||
|
||
* `Get categories`_ | ||
|
||
.. _`Get categories`: | ||
|
||
Get categories | ||
-------------- | ||
|
||
URL: | ||
~~~~ | ||
*/categories/{id}* | ||
|
||
Method: | ||
~~~~~~~ | ||
*GET* | ||
|
||
Parameters request: | ||
~~~~~~~~~~~~~~~~~~~ | ||
*null* | ||
|
||
Parameters response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
*Object* | ||
|
||
*With properties:* | ||
|
||
#. id (Number) | ||
#. name (String) | ||
|
||
Example of response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code-block:: json | ||
{ | ||
"id":1, | ||
"name" : "category" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,7 @@ Example of response: | |
{}, | ||
... | ||
{} | ||
} | ||
] | ||
.. _`Get incidents list`: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,7 @@ Example of response: | |
{}, | ||
... | ||
{} | ||
} | ||
] | ||
.. _`Get issues list`: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
Persons | ||
======= | ||
|
||
``(implementation of Person entity)`` | ||
|
||
Provides following method for `API <index.html>`_ calls: | ||
|
||
* `Get person`_ | ||
* `Get persons`_ | ||
* `Get persons list`_ (by some criteria) | ||
|
||
.. _`Get person`: | ||
|
||
Get issue | ||
--------- | ||
|
||
URL: | ||
~~~~ | ||
*/persons/{id}* | ||
|
||
Method: | ||
~~~~~~~ | ||
*GET* | ||
|
||
Parameters request: | ||
~~~~~~~~~~~~~~~~~~~ | ||
*null* | ||
|
||
Parameters response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
*Object* | ||
|
||
*With properties:* | ||
#. id (Number) | ||
#. first_name (String) | ||
#. last_name (String) | ||
#. personal_id (String) | ||
#. addresses (Object) | ||
#. emails (Object) | ||
#. phones (Object) | ||
|
||
Example of response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code-block:: json | ||
{ | ||
"id": 1, | ||
"addresses": {}, | ||
"emails": {}, | ||
"phones": {}, | ||
"personal_id": "number-1111", | ||
"first_name": "Test", | ||
"last_name": "Test" | ||
} | ||
.. _`Get persons`: | ||
|
||
Get persons | ||
----------- | ||
|
||
URL: | ||
~~~~ | ||
*/persons* | ||
|
||
Method: | ||
~~~~~~~ | ||
*GET* | ||
|
||
Parameters request: | ||
~~~~~~~~~~~~~~~~~~~ | ||
*null* | ||
|
||
Parameters response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
*Array* | ||
|
||
.. seealso:: | ||
Array consists of objects from `Get person`_ method | ||
|
||
Example of response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code-block:: json | ||
[ | ||
{}, | ||
{}, | ||
... | ||
{} | ||
] | ||
.. _`Get persons list`: | ||
|
||
Get persons list | ||
---------------- | ||
|
||
URL: | ||
~~~~ | ||
*/persons* | ||
|
||
Method: | ||
~~~~~~~ | ||
*GET* | ||
|
||
Parameters request: | ||
~~~~~~~~~~~~~~~~~~~ | ||
* *search_text* | ||
* *order_by* | ||
|
||
.. note:: | ||
Search in last name, or first name | ||
|
||
order_by can be: "last_name", "first_name" | ||
|
||
Parameters response: | ||
~~~~~~~~~~~~~~~~~~~~ | ||
*Array* | ||
|
||
.. note:: | ||
Array structure the same as `Get persons`_ |
Oops, something went wrong.