RAM OSLC API: How can I update without changing the version?
I can update an asset using OSLC API following the steps as mentioned in http://open-services.net/bin/view/Main/AssetMgRestApiV1
However, if I wish to keep the version same, it give Error 500 saying something like: "Error POSTing asset Modified without version change[internal/assets/3F9330E1-1D5A-40D6-9A47-726370269C36/1.0] : The asset stest11[1.0] already exists. External ID is 3F9330E1-1D5A-40D6-9A47-726370269C36 and database id is 1,498."
Am I missing something?
UPDATE:
I tried sending a PUT in place of POST and get the following error:
<oslc:statusCode>
500
<oslc:message>
Error PUTing asset Modified without version change[internal/assets/3F9330E1-1D5A-40D6-9A47-726370269C36/1.0] : Null pointer exception
|
4 answers
Updates are done through Put. Post is only for create.
Comments
Kangkan Goswami
commented Aug 30 '12, 10:38 a.m.
@RichardKulp: I get a similar error when I send PUT in place of POST. Can you help? |
Which version of OSLC are you using v1 or 2?
On a PUT, you need to make sure that the <ram_asset:revisionCount> value is proper. This is how RAM determine if your PUT is stale or not. ... so for a test, do a GET, and then do a PUT with the content from the GET. If this works, than you have a good baseline to work from. Note the on the PUT you will get the asset again, with a newer revision count. Comments
Kangkan Goswami
commented Sep 11 '12, 1:20 a.m.
@GiliMendel: We are doing what you are saying. I do a GET, change the title or description without changing the version and use a PUT. Which version or RAM / OSLC? Try to also increment the revisioncount. |
RAM (the web interface) allows updating an asset without changing the version. I am trying to do the same using the OSLC API for RAM version 7.5.1
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
Is there a larger stacktrace attached to this OSLC return? You are getting an NPE on the host but we don't know where on the host it is happening?
You may need to get the host ramdebug logs at this point so we can see where the NPE is happening.