eDocs - Rest API - Checkout doubts

Options
Laubstein
edited November 23, 2021 in eDOCS #1

Hi,

Checking the /documents/{id}/versions endpoint I noticed that it returns a list of versions with a STATUS key, I known that we can LOCK the document not necessarily a specific version, so I wonder what is the meaning of STATUS for each version returned?

How can I discover to which user is the document checked out when the STATUS is 3? Can i rely on the LAST_EDITED_BY property or there is a better way?


Thanks.

Tagged:

Comments

  • Individual versions also have a STATUS: (0) Available, (19) Read only, (20) Published

  • Thank you for replying Slapsys, what about identifying which user the document is being checked out for?

  • The checkout data is returned for each individual list item when retrieving lists of items (folders, workspaces and searches) and can be found under "checkout"


    To retrieve the checkout data for a specific document you can use:

    GET .../documents/<id>/checkout?library=<library>

  • I am making a PATCH to documents/{id} and changing the STATUS to 3 to lock the document but I suspect that it is not how it is supposed to be done.

    Is there an endpoint to checkout or checkin documents, like a PATCH to documets/{id}/checkout and what are the required body parameters?

    When will these missing endpoits be in the Rest documentation?

  • Errata*

    I am doing a PUT to "documents/{0}/profile?library={1}" to change the STATUS to 3, but i guess is is not sufficient cause when I try to request GET .../documents/<id>/checkout?library=<library> it returns the error below:

    {

      "ERROR": {

        "message": "Requested data is not available until after a successful Execute",

        "rapi_code": "0x80040446"

      }

    }

  • When changing the status use %STATUS and the values %LOCK and %UNLOCK

  • Thanks, It worked, when the document is not checkedout the response is 400 with the above json and when it is checkedout it returns 200 with

    {

      "data": {

        "lib": "JURIDICO",

        "COMMENTS": "",

        "TYPIST_ID": "ALEXANDREPTA",

        "LOCATION": "",

        "VERSION_LABEL": "",

        "CHECKIN_DATE": "2013-10-02 00:00:00 UTC",

        "CHECKOUT_DATE": "2013-10-01 10:40:53 UTC",

        "id": "262812",

        "TYPIST": "576806"

      }

    }