Browse Source

Integrate HTTP interface description

Yentl Van Tendeloo 7 years ago
parent
commit
647c5db3a7
2 changed files with 75 additions and 73 deletions
  1. 1 0
      doc/developer.rst
  2. 74 73
      doc/http.rst

+ 1 - 0
doc/developer.rst

@@ -5,6 +5,7 @@ Using the Modelverse as a Developer
    :maxdepth: 2
    :maxdepth: 2
 
 
    Scripts <scripts>
    Scripts <scripts>
+   HTTP interface <http>
    Wrappers <wrappers>
    Wrappers <wrappers>
    Model representation <model>
    Model representation <model>
    Modelverse components <components>
    Modelverse components <components>

+ 74 - 73
doc/http.rst

@@ -5,6 +5,7 @@ If you want to use the Modelverse on an as of yet unsupported platform, you will
 While it is possible to directly send HTTP requests, it is recommended to create a wrapper, similar to the Python wrapper mentioned before.
 While it is possible to directly send HTTP requests, it is recommended to create a wrapper, similar to the Python wrapper mentioned before.
 Otherwise, many of the more complex operations (e.g., process enactment) will quickly result in problems.
 Otherwise, many of the more complex operations (e.g., process enactment) will quickly result in problems.
 Now follows a detailed description of how the HTTP interface works.
 Now follows a detailed description of how the HTTP interface works.
+An explanation of the semantics of these operations can be found in the Python wrapper.
 An example implementation can be found in the Python wrapper, which should prove a valuable starting point for creating a new interface.
 An example implementation can be found in the Python wrapper, which should prove a valuable starting point for creating a new interface.
 
 
 Request and Reply format
 Request and Reply format
@@ -127,54 +128,54 @@ For example::
 
 
 Some more complex operations are mentioned below these standard operations.
 Some more complex operations are mentioned below these standard operations.
 
 
-+-------------------------------+----------------------------------------+
-| operation                     | parameters                             |
-+-------------------------------+----------------------------------------+
-| model_move                    | model_name, new_location               |
-| process_signature             | process_name                           |
-| transformation_between        | source_name, target_name               |
-| model_render                  | model_name, mapper_name, rendered_name |
-| model_rendered                | model_name, mapper_name                |
-| verify                        | model_name, metamodel_name             |
-| model_delete                  | model_name                             |
-| model_list                    | location                               |
-| model_list_full               | location                               |
-| permission_modify             | model_name, permissions                |
-| permission_owner              | model_name, owner                      |
-| permission_group              | model_name, group                      |
-| group_create                  | group                                  |
-| group_delete                  | group                                  |
-| group_owner_add               | group, user                            |
-| group_owner_delete            | group, user                            |
-| group_join                    | group, user                            |
-| group_kick                    | group, user                            |
-| group_list                    |                                        |
-| admin_promote                 | user                                   |
-| admin_demote                  | user                                   |
-| user_password                 | user, password                         |
-| transformation_read_signature | transformation_name                    |
-| verbose                       |                                        |
-| quiet                         |                                        |
-| folder_create                 | location                               |
-| add_conformance               | model_name, metamodel_name             |
-| model_types                   | model_name                             |
-| AL_text                       | location                               |
-| model_add                     | metamodel_name, model_name, code       |
-+-------------------------------+----------------------------------------+
+============================= ======================================
+operation                     parameters                            
+============================= ======================================
+model_move                    model_name, new_location               
+process_signature             process_name                           
+transformation_between        source_name, target_name               
+model_render                  model_name, mapper_name, rendered_name 
+model_rendered                model_name, mapper_name                
+verify                        model_name, metamodel_name             
+model_delete                  model_name                             
+model_list                    location                               
+model_list_full               location                               
+permission_modify             model_name, permissions                
+permission_owner              model_name, owner                      
+permission_group              model_name, group                      
+group_create                  group                                  
+group_delete                  group                                  
+group_owner_add               group, user                            
+group_owner_delete            group, user                            
+group_join                    group, user                            
+group_kick                    group, user                            
+group_list                                                           
+admin_promote                 user                                   
+admin_demote                  user                                   
+user_password                 user, password                         
+transformation_read_signature transformation_name                    
+verbose                                                              
+quiet                                                                
+folder_create                 location                               
+add_conformance               model_name, metamodel_name             
+model_types                   model_name                             
+AL_text                       location                               
+model_add                     metamodel_name, model_name, code       
+============================= ======================================
 
 
 More complex operations have multiple phases, as there is a modification step involved, or a preliminary check before the next piece of data can be forwarded.
 More complex operations have multiple phases, as there is a modification step involved, or a preliminary check before the next piece of data can be forwarded.
 These operations are presented next.
 These operations are presented next.
 
 
-+---------------------------+---------------------------------------------------+
-| operation                 | parameters                                        |
-+---------------------------+---------------------------------------------------+
-| model_overwrite           | model_name, metamodel_name                        |
-| transformation_add_MANUAL | source_models\*, target_models\*, name            |
-| transformation_add_AL     | source_models\*, target_models\*, name            |
-| transformation_add_MT     | source_models\*, target_models\*, name            |
-| transformation_execute    | activity_name, source_models\*, target_models\*   |
-| process_execute           | process_name, model_bindings\*                    |
-+---------------------------+---------------------------------------------------+
+========================= ===============================================
+operation                 parameters                                        
+========================= ===============================================
+model_overwrite           model_name, metamodel_name                        
+transformation_add_MANUAL source_models\*, target_models\*, name            
+transformation_add_AL     source_models\*, target_models\*, name            
+transformation_add_MT     source_models\*, target_models\*, name            
+transformation_execute    activity_name, source_models\*, target_models\*   
+process_execute           process_name, model_bindings\*                    
+========================= ===============================================
 
 
 Parameters marked with a \* are actually dictionaries, and should be sent as such.
 Parameters marked with a \* are actually dictionaries, and should be sent as such.
 Since the Modelverse has no primitive notion of dictionaries, a dictionary is expanded as a sequence of key value pairs, terminated with an empty key.
 Since the Modelverse has no primitive notion of dictionaries, a dictionary is expanded as a sequence of key value pairs, terminated with an empty key.
@@ -207,35 +208,35 @@ In modelling mode, a single model is opened and ready to be modified.
 There are several supported operations, most of which are simple to use.
 There are several supported operations, most of which are simple to use.
 To switch back to megamodelling mode, send the *exit* input.
 To switch back to megamodelling mode, send the *exit* input.
 
 
-+-------------------------------+-------------------------------+
-| operation                     | parameters                    |
-+-------------------------------+-------------------------------+
-| help                          |                               |
-| instantiate_node              | type, element                 |
-| instantiate_edge              | type, element, source, target |
-| attr_add                      | element, attribute, value     |
-| attr_delete                   | element, attribute            |
-| attr_name                     | element, attribute, name      |
-| attr_type                     | element, attribute, type      |
-| attr_optional                 | element, attribute, optional  |
-| delete                        | element                       |
-| list                          |                               |
-| list_full                     |                               |
-| JSON                          |                               |
-| read_outgoing                 | element, type                 |
-| read_incoming                 | element, type                 |
-| read                          | element                       |
-| read_attrs                    | element                       |
-| read_defined_attrs            | element                       |
-| types                         |                               |
-| retype                        | element, type                 |
-| read_association_source       | element                       |
-| read_association_destination  | element                       |
-| connections_between           | element, element              |
-| all_instances                 | type                          |
-| define_attribute              | element, attribute, type      |
-| undefine_attribute            | element, attribute            |
-+-------------------------------+-------------------------------+
+============================  =============================
+operation                     parameters                    
+============================  =============================
+help                                                        
+instantiate_node              type, element                 
+instantiate_edge              type, element, source, target 
+attr_add                      element, attribute, value     
+attr_delete                   element, attribute            
+attr_name                     element, attribute, name      
+attr_type                     element, attribute, type      
+attr_optional                 element, attribute, optional  
+delete                        element                       
+list                                                        
+list_full                                                   
+JSON                                                        
+read_outgoing                 element, type                 
+read_incoming                 element, type                 
+read                          element                       
+read_attrs                    element                       
+read_defined_attrs            element                       
+types                                                       
+retype                        element, type                 
+read_association_source       element                       
+read_association_destination  element                       
+connections_between           element, element              
+all_instances                 type                          
+define_attribute              element, attribute, type      
+undefine_attribute            element, attribute            
+============================  =============================
 
 
 Some additional operations are again available that work in two phases.
 Some additional operations are again available that work in two phases.
 These operations are *attr_add_code* and *upload*, which first perform some checks and then wait for AL code or a model.
 These operations are *attr_add_code* and *upload*, which first perform some checks and then wait for AL code or a model.