eDocs Rest API for delete reference is not working

Options
Venugangad
edited November 23, 2021 in eDOCS #1

I am trying to delete the reference by using below url,

http://10.234.81.245:8000/edocsapi/v1.0/documents/8/references?library=ARDEMO

but not working getting below things in the logs,

2021-07-21 10:22:27,145 [ 10.141.40.206][SYSTEM][12080]->[HTTP] OPTIONS /edocsapi/v1.0/documents/8/references?library=ARDEMO
2021-07-21 10:22:27,160 [ 10.141.40.206][SYSTEM][12080]<-[HTTP] 200 OK
2021-07-21 10:22:27,523 [ 10.141.40.206][SYSTEM][1180]->[HTTP] DELETE /edocsapi/v1.0/documents/8/references?library=ARDEMO
2021-07-21 10:22:27,523 [ 10.141.40.206][DMUSER][1180]DEBUG: REQUEST ERROR
  DELETE /edocsapi/v1.0/documents/8/references?library=ARDEMO
  Invalid data
2021-07-21 10:22:27,523 [   127.0.0.1][SYSTEM][1180]WARNING: BAD REQUEST [DELETE]
2021-07-21 10:22:27,523 [ 10.141.40.206][SYSTEM][1180]<-[HTTP] 400 Bad Request

could you please share some thought on this.

Tagged:

Comments

  • The request requires three parameters

    refsysid = system id** of the reference to remove

    refid = id of the container to remove reference from

    reflib = library of the container to remove reference from


    ** SYSTEM_ID or REMOTE_SYSTEM_ID if not the same library as the container

  • The DELETE request url takes only two parameters,

    /edocsapi/v1.0/documents/8/references?library=ARDEMO
    

    8 here refers to the DOC NUM of document for which the reference to be deleted. ARDEMO is the library name. Where do we need to pass the System Id ? Please provide the sample working request.

  • To delete an individual reference:

    /edocsapi/v1.0/documents/8/references?library=ARDEMO&refsysid=<systemid>&refid=<id>&reflib=<lib>
    


  • This may save you a couple of steps...

    Delete all the references at the time of delete can be done by including the "delrefs" parameter

    /edocsapi/v1.0/documents/8?library=ARDEMO&delrefs
    


  • Thanks it works..