Changeset 2417 in main for trunk/docs


Ignore:
Timestamp:
05/15/13 13:13:55 (6 years ago)
Author:
pcosquer
Message:

web api: add attached_documents, attached_parts and get methods

  • increase api version to 1.1

see #196

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/en/devel/http-api.rst

    r1075 r2417  
    2929 
    3030    api_version 
    31         the api version (current : **1.0**) 
     31        the api version (current : **1.1**) 
    3232 
    3333    result 
     
    3939.. code-block:: javascript 
    4040     
    41     {"result": "ok", "api_version": "1.0"} 
     41    {"result": "ok", "api_version": "1.1"} 
    4242 
    4343If an error occurred, an extra field is add: 
     
    5050.. code-block:: javascript 
    5151 
    52     {"result": "error", "api_version": "1.0", "error": "Oups an error occured"} 
     52    {"result": "error", "api_version": "1.1", "error": "Oups an error occured"} 
    5353 
    5454 
     
    8888============ 
    8989 
    90 Some queries returns a description of an object field, this description contains 
     90Some queries return a description of an object field, this description contains 
    9191the following fields: 
    9292 
     
    321321           :ref:`http-api-fields`. 
    322322 
     323.. py:function:: get 
     324 
     325    .. versionadded:: 1.1 
     326 
     327    Returns description of an object (part or document) identified by its id. 
     328 
     329    :url: :samp:`{server}/get/{object_id}/` 
     330    :type: GET 
     331    :login required: yes 
     332    :implemented by: :func:`plmapp.views.api.get_object` 
     333    :returned fields: 
     334        object 
     335           dictionary describing the object, see :ref:`http-api-object`. 
     336 
     337 
     338Part queries 
     339++++++++++++++++ 
     340 
     341In the following queries, *part_id* is a the id (an integer) of a 
     342:class:`.Part`  
     343 
     344.. py:function:: attached_documents 
     345 
     346    .. versionadded:: 1.1 
     347 
     348    Returns the list of attached parts.  
     349 
     350    :url: :samp:`{server}/api/object/{part_id}/attached_documents/`  
     351    :type: GET 
     352    :login required: yes 
     353    :implemented by: :func:`plmapp.views.api.get_attached_documents` 
     354    :returned fields: parts, a list of dictionaries describing attached documents 
     355 
    323356 
    324357Document queries 
     
    410443            the file that has been had, see :ref:`http-api-file`. 
    411444 
     445.. py:function:: attached_parts 
     446 
     447    .. versionadded:: 1.1 
     448 
     449    Returns the list of attached parts.  
     450 
     451    :url: :samp:`{server}/api/object/{doc_id}/attached_parts/`  
     452    :type: GET 
     453    :login required: yes 
     454    :implemented by: :func:`plmapp.views.api.get_attached_parts` 
     455    :returned fields: parts, a list of dictionaries describing attached parts 
    412456 
    413457Document file queries 
     
    476520    :post param: filename 
    477521    :returned fields: None 
     522     
     523 
Note: See TracChangeset for help on using the changeset viewer.