0 Replies Latest reply on Dec 5, 2014 4:22 AM by vladimirmoshkov

    How to lock a document for editing using REST API?

    vladimirmoshkov

      Hello!

       

      If to follow REST API documentation (https://developers.jivesoftware.com/api/v3/cloud/rest/ContentService.html#lockEditableContent(String, String)),

      client to lock content for editing should request something like this

      POST https://jive.lab.croc.ru/api/core/v3/contents/1412/editable

       

      And Jive should return to a client something from…

      Return Status:

      HTTP Status Code

      Description

      204 (No Content)

      Request was successful

      400 (Bad Request)

      An input field was malformed

      409 (Conflict)

      if content is already being edited by another user

      403 (Forbidden)

      You are not allowed to access this content object

      404 (Not Found)

      The specified content object does not exist

       

      But actually we get code 200 to a POST-request

      return_code.jpg

       

      And surprise! - Jive-response to POST-request is identical to response from Jive to GET-request.

      I.e. requests POST https://jive.lab.croc.ru/api/core/v3/contents/1412/editable/ and GET https://jive.lab.croc.ru/api/core/v3/contents/1412/editable/ result to identical Response with code 200 and without 'editingBy' field in returned entity.


      And surely that requests don't lead to lock a content for editing

       

      So is it possible to lock content for editing by another users with REST API (Jive 7.0.0)?