You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by co...@apache.org on 2010/09/10 11:53:00 UTC

[CONF] Apache Connectors Framework > REST API proposal

Space: Apache Connectors Framework (https://cwiki.apache.org/confluence/display/CONNECTORS)
Page: REST API proposal (https://cwiki.apache.org/confluence/display/CONNECTORS/REST+API+proposal)

Added by Karl Wright:
---------------------------------------------------------------------
h1.  Proposal for making ACF API fully RESTful

Making the API fully RESTful involves three changes:

* Using HTTP verbs in an appropriate manner
* Defining a URL for every object
* Not passing arguments other than a path to GET methods

This is the proposal for mapping the current functionality to RESTful functionality.

The actual current commands are as follows.  Note that NO changes are proposed for the output objects of the commands.



|| Current command || Current argument format || Proposed verb || Proposed command ||
| outputconnector/list | N/A | GET | outputconnectors |
| authorityconnector/list | N/A | GET | authorityconnectors |
| repositoryconnector/list | N/A | GET | repositoryconnectors |
| outputconnection/list | N/A | GET | outputconnections |
| outputconnection/get | \{"connection_name":_<connection_name>_\} | GET | outputconnection/_<output_connection_name>_ |
| outputconnection/save | \{"outputconnection":_<output_connection_object>_\} | PUT | outputconnection/_<output_connection_name>_ \[note: the connection name is optional, since the object contains the name as well\] |
| outputconnection/delete | \{"connection_name":_<connection_name>_\} | DELETE | outputconnection/_<output_connection_name>_ |
| outputconnection/checkstatus | \{"connection_name":_<connection_name>_\} | GET | status/outputconnection/_<output_connection_name>_ |
| outputconnection/execute/_<command>_ | \{"connection_name":_<connection_name>_, _<argument_data>_\} | GET | info/_<command>_/outputconnection/_<output_connection_name>_ |
| authorityconnection/list | N/A | GET | authorityconnections |
| authorityconnection/get | \{"connection_name":_<connection_name>_\} | GET | authorityconnection/_<authority_connection_name>_ |
| authorityconnection/save | \{"authorityconnection":_<authority_connection_object>_\} | PUT | authorityconnection/_<authority_connection_name>_ \[note: the connection name is optional, since the object contains the name as well\] |
| authorityconnection/delete | \{"connection_name":_<connection_name>_\} | DELETE | authorityconnection/_<authority_connection_name>_ |
| authorityconnection/checkstatus | \{"connection_name":_<connection_name>_\} | GET | status/authorityconnection/_<authority_connection_name>_ |
| repositoryconnection/list | N/A | GET | repositoryconnections |
| repositoryconnection/get | \{"connection_name":_<connection_name>_\} | GET | repositoryconnection/_<repository_connection_name>_ |
| repositoryconnection/save | \{"repositoryconnection":_<repository_connection_object>_\} | PUT | repositoryconnection/_<repository_connection_name>_ \[note: the connection name is optional, since the object contains the name as well\] |
| repositoryconnection/delete | \{"connection_name":_<connection_name>_\} | DELETE | repositoryconnection/_<repository_connection_name>_ |
| repositoryconnection/checkstatus | \{"connection_name":_<connection_name>_\} | GET | status/repositoryconnection/_<repository_connection_name>_ |
| repositoryconnection/execute/_<command>_ | \{"connection_name":_<connection_name>_, _<argument_data>_\} | GET | info/_<command>_/repositoryconnection/_<repository_connection_name>_ |
| job/list | N/A | GET | jobs |
| job/get | \{"job_id":_<job_identifier>_\} | GET | job/_<job_identifier>_ |
| job/save | \{"job":_<job_object>_\} | PUT | job/_<job_identifier>_ \[note: the job identifier is optional, since the object contains the job id as well\] |
| job/delete | \{"job_id":_<job_identifier>_\} | DELETE | job/_<job_identifier>_ |
| jobstatus/list | N/A | GET | jobstatuses |
| jobstatus/get | \{"job_id":_<job_identifier>_\} | GET | jobstatus/_<job_identifier>_ |
| jobstatus/start | \{"job_id":_<job_identifier>_\} | PUT | start/_<job_identifier>_ |
| jobstatus/abort | \{"job_id":_<job_identifier>_\} | PUT | abort/_<job_identifier>_ |
| jobstatus/restart | \{"job_id":_<job_identifier>_\} | PUT | restart/_<job_identifier>_ |
| jobstatus/pause | \{"job_id":_<job_identifier>_\} | PUT | pause/_<job_identifier>_ |
| jobstatus/resume | \{"job_id":_<job_identifier>_\} | PUT | resume/_<job_identifier>_ |




Change your notification preferences: https://cwiki.apache.org/confluence/users/viewnotifications.action