inveniosoftware / invenio

Invenio digital library framework
https://invenio.readthedocs.io
MIT License
623 stars 291 forks source link

Allow for raw POST/PUTing of MARCXML via robotupload #976

Closed kaplun closed 10 years ago

kaplun commented 10 years ago

Originally on 2012-03-29

Currently robotupload API is optimize for request generated via a browser, i.e. using the multipart/form-data encoding.

It is not obvious to generate such requests with languages such as PL/SQL.

Moreover the API can be made more elegant.

So this is to propose an additional flavor where all the parameters are specified as part of the URL either in the path or on query argument, and the whole MARCXML becomes the body of the request.

E.g. to allow for this PATH

/batchuploader/robotupload/insert
/batchuploader/robotupload/correct
/batchuploader/robotupload/append
/batchuploader/robotupload/replace
/batchuploader/robotupload/insertorreplace

that would accept via PUT/POST (both allowed. PUT would be the best but maybe the client code does not allow to specify the HTTP method).

=callback_url= can be specified as query argument.

This is urgently needed at CERN to allow connection between EDMS (based on Oracle PL/SQL) to CDS.

kaplun commented 10 years ago

Originally on 2012-04-02

Bumping priority since this is currently blocking EDMS colleagues development.

kaplun commented 10 years ago

Originally on 2012-04-05

This is implemented in my public branch sam/robotupload-rest.

invenio-developers commented 10 years ago

Originally by Samuele Kaplun samuele.kaplun@cern.ch on 2012-08-20

In c83c3db1d03cffa47cabd6bea57da5800711b131:

#CommitTicketReference repository="" revision="c83c3db1d03cffa47cabd6bea57da5800711b131"
BatchUploader: more RESTful interface

- Introduce a more RESTful interface to batchuploader/robotupload
  allowing to PUT/POST MARCXML as the body of the HTTP request.
  (closes #976)

- Introduce a new nonce argument to the bibupload/robotupload
  stack, in order to allow clients to uniquely identify
  multiple feedbacks POSTed to the callback_url.
  (closes #977)

- Introduce new make_user_agent_string function to urlutils
  to use a uniform User-Agent string accross Invenio HTTP
  requests.
  (addresses #997)

- Drop the comma-separated list based CFG_BATCHUPLOADER_WEB_ROBOT_AGENT
  invenio.conf variable in favour of regexp-based
  CFG_BATCHUPLOADER_WEB_ROBOT_AGENTS variable.
invenio-developers commented 10 years ago

Originally by Samuele Kaplun samuele.kaplun@cern.ch on 2012-08-23

In c83c3db1d03cffa47cabd6bea57da5800711b131:

#CommitTicketReference repository="" revision="c83c3db1d03cffa47cabd6bea57da5800711b131"
BatchUploader: more RESTful interface

- Introduce a more RESTful interface to batchuploader/robotupload
  allowing to PUT/POST MARCXML as the body of the HTTP request.
  (closes #976)

- Introduce a new nonce argument to the bibupload/robotupload
  stack, in order to allow clients to uniquely identify
  multiple feedbacks POSTed to the callback_url.
  (closes #977)

- Introduce new make_user_agent_string function to urlutils
  to use a uniform User-Agent string accross Invenio HTTP
  requests.
  (addresses #997)

- Drop the comma-separated list based CFG_BATCHUPLOADER_WEB_ROBOT_AGENT
  invenio.conf variable in favour of regexp-based
  CFG_BATCHUPLOADER_WEB_ROBOT_AGENTS variable.
invenio-developers commented 10 years ago

Originally by Samuele Kaplun samuele.kaplun@cern.ch on 2012-08-23

In c83c3db1d03cffa47cabd6bea57da5800711b131:

#CommitTicketReference repository="" revision="c83c3db1d03cffa47cabd6bea57da5800711b131"
BatchUploader: more RESTful interface

- Introduce a more RESTful interface to batchuploader/robotupload
  allowing to PUT/POST MARCXML as the body of the HTTP request.
  (closes #976)

- Introduce a new nonce argument to the bibupload/robotupload
  stack, in order to allow clients to uniquely identify
  multiple feedbacks POSTed to the callback_url.
  (closes #977)

- Introduce new make_user_agent_string function to urlutils
  to use a uniform User-Agent string accross Invenio HTTP
  requests.
  (addresses #997)

- Drop the comma-separated list based CFG_BATCHUPLOADER_WEB_ROBOT_AGENT
  invenio.conf variable in favour of regexp-based
  CFG_BATCHUPLOADER_WEB_ROBOT_AGENTS variable.