eDocs - Rest API - Get the DOCNUM of a created document

Options
Laubstein
edited November 23, 2021 in eDOCS #1

Hi,

I am uploading a document using the endpoint: POST ​/documents

It is working as follows:



But the response does not give me the new document`s DOCNUM. I need it to reference the document to a folder. Is there a way to indicate the properties that I want it to return?


Thanks.

Tagged:

Comments

  • Laubstein
    edited July 8, 2021 #2
    Options

    I was able to to upload a document and in the same time reference it to a folder with:

    Here I am using the ref key inside the _restapi object, the documentation does not make it clear that it is possible, I looked at the urls endpoints and figured it out, it would be really nice if these informations were there.

    In this way the response returns the DOCNUM of the new uploaded document:

    Thanks.

  • Is there a way to upload a document without the ref key and retrieve the DOCNUM?


    Thanks.

  • Have you tried this with a more recent version of the REST API?

  • My client is on version 16.4 of eDocs, the integration via Rest was made available to me and I identified that they have the following version:

    Is it possible to upgrade to a newer version at no cost to the customer? What would be the newest version compatible with eDOCS 16.4?


    Thank you.

  • Al Slapsys
    edited July 16, 2021 #6
    Options

    I'm assuming that you require the DOCNUM (id) to take further actions on the document, like setting security.

    _restapi is used to include more options to the original request. As you noted earlier, it is possible to add references during the create but it is also possible to include security too.

    Example:

  • i need DOCNUM to reference it to a record in a customer application table.

  • Venugangad
    edited July 22, 2021 #8
    Options

    I added references in the _restAPi section and I was able to create a document or folder with references. During deleting I attempted to delete the folder using the REST Request as below. And I got a 400 status code as mentioned below. Can you please let me know why the delete fails?

    DELTE Request : "http://hostname:8000/edocsapi/v1.0/documents/298?library=edocsppdev3"
    
    Response : 400 Status code
    {
      "ERROR": {
        "message": "",
        "rapi_code": 1
      }
    }
    
    Add Folder Request :
    {
       "data":{
          "PATH":"/EDOCSPPDEV3/Matter/79",
          "TYPIST_ID":"arul",
          "APP_ID":"folder",     
          "AUTHOR_ID":"arul",     
          "DOCNAME":"checkref",   ,
          "AUTHOR":"arul",    
          "TYPE_ID":"PPFOLDER",    
          "_restapi":{
             "form_name":"DEF_PROF",
             "ref":{
                "id":"121",
                "lib":"EDOCSPPDEV3",
                "type":"workspaces",
                "TYPIST_ID":"arul"
             }
          }      
       }
    }
    
  • Laubstein
    edited July 22, 2021 #10
    Options

    Is there a way to upload a document without the ref key and retrieve the DOCNUM? In my app the user will be able to upload a file to a library without choosing a reference to a folder/workspace so in the time of the upload I do not have those ids to reference the document to it. I am having to use the COM API to do all the upload stuff, I would be very happy to not have to use it.

    Thanks.