Opened 3 months ago

Closed 4 weeks ago

#914 closed bug (worksforme)

Logical Doc API

Reported by: aravind Owned by:
Priority: trivial Milestone:
Component: Web Services Version: 8.1
Keywords: API, REST, Python framework Cc:

Description

I am using the logicaldoc api to update the tags and attributes of a file. It works most of the time however sometimes I get the following error.

Status Code: 500
Error: javax.ws.rs.core.Response$ResponseBuilder?.status(ILjava/lang/String;)Ljavax/ws/rs/core/Response$ResponseBuilder?;

I am using the python to call the api in the following way. I am running in a docker compose so I can reference the logicaldoc container with http://logicaldoc ...
I know that the attributes, tags, template id, file and folder id have the right format and are present, since the error description is different to when the attributes and tags are of the wrong form.

#import requests
#BASE_LOGICAL_API = http://logicaldoc:8080/services/rest
meta = {

"id": fileID,
"folderId": folderId,
"tags": tags,
"templateId": TEMPLATE_ID,
"attributes": attributes,

}

update_url = BASE_LOGICAL_API + "/document/update"
update_response = requests.put(update_url, data=json.dumps(meta), auth=('admin', 'admin'), headers={"Content-Type":"application/json","Accept":"application/json",})

Change History (2)

comment:1 Changed 3 months ago by aravind

It seems to be rather than the document/update endpoint failing (it should return 201 code since it has no response) it is the document/upload failing. Though the API request completes its function it doesn't return the fileID in it its response rather this error:

javax.ws.rs.core.Response$ResponseBuilder??.status(ILjava/lang/String;)Ljavax/ws/rs/core/Response$ResponseBuilder??;

comment:2 Changed 4 weeks ago by car031

  • Component changed from Core to Web Services
  • Priority changed from blocker to trivial
  • Resolution set to worksforme
  • Status changed from new to closed

Please upgrade your system to 8.2. Check if your issue is fixed in the 8.2

Note: See TracTickets for help on using tickets.