Open EdoardoBini opened 3 days ago
Do I understand right, that your intention is to create a new document's revision without uploading new content? What "metadata" you want to change?
I am not probably understanding well the create revision API. Anyway, i would be interested in doing both things:
My problem, so far, is that i do not understand from the guide how to do that. Moreover, when i try to copypaste the example in the guide from documentation, the response i receive is 500 and if i try to adapt the body (similar to easy redmine gui behaviour) i get 200 ok but no new revision appears (indeed it returns the last valid revision id and not the new one)
Thank you in advance for the help.
Take a look here: https://github.com/danmunn/redmine_dmsf/blob/master/extra/api/api_client.sh Focus on 3. Upload a new document and 4. Create a new revision. In the same folder are located corresponding XML files.
I have already tried but maybe i'm missing something... i put it easier. Let's say i have uploaded and committed successfully the first version of a document (section 3). Now i want to upload, as a revision, a newer version of the document with updated filename, title and metadata. How do i do it? If i use again point 3, i can upgrade the version of the file, but i cannot change the title and filename. If i use point 4 it seems not working, i received 200 ok, no changes are applied. The same operation is perfectly working if i use the easy redmine gui.
So, you have a document, let's say
#456 | My document | analysis.pdf | 0.1
And you want to update it to
#456 | Another document | itirenary.odt | 0.2
So at the end of the day we will have one document with two revisions each with a different name, file and other properties too?
Yes exactly. How should i use the apis in order to achieve the task?
Something like that is not possible at the moment. When creating a new revision, the document to be updated is identified by the file name. So you can upload a new content but the file name must be kept. Thank to your issue I found that also updating of custom field values don't work any more. I had to modify the specification and the code as well.
Hello all,
I'm trying to use the Revision API, as shown in the documentation, but i'm encountering some issues. Using the following endpoint: /dmsf/files//revision/create.json i created the following body:
As showed, i first created a token with my file to insert and then i tried to do the post. From the endpoint, i received the following response:
If i use a form-data, with the same endpoint and adapting the body, i received 200 OK from the endpoint, but the API seems not doing anything, in fact i received the id of the previous revision and not the new one. I have also tried the xml version but i have the same behaviour. If i remove the .json or .xml from the request, i receive a 422 status code. My question is:
How's the correct way to do this type of request, without using the create token and commit APIs?
Because i need to change the metadata of the file, and not using the same name as suggested from the documentation. Thanks in advance for the answer.