Problem adding artifacts to Rational Asset Manager asset using REST
![]() Hi, I am having problem adding an artifact to an existing asset in RAM. I want to do this using REST/posting data. Sample request:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:oslc_asset="http://open-services.net/ns/artifact#">
This should add an url to an asset. |
Be the first one to answer this question!
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
What URL do you use for posting? And what Content-Type, OSLC-Core-Version, and Accept headers do you send in on the post?
Oh, they were added initiallly. Url: <server>/ram/oslc/assets/57C75409-0931-FA0C-64DC-0A717B313B6B/1.0/artifacts The guid being the asset id. Content-Type: Application/rdf, OSLC-Core-Version: 2.0, and Accept headers: Application/xml
Did you post exactly what you showed in the question? The reason I ask is because
<a href='http://help.example.com" '="">http://help.example.com
is not a valid rdf:resource. That would be an rdf:resource reference to an HTML Anchor statement, not a URL.
You should have just rdf:resource="http://help.example.com". That would be a valid rdf:resource reference to a URL.
Sorry I missed the remove links, this is the actual post.
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:oslc_asset="http://open-services.net/ns/artifact#">
<oslc_asset:Artifact>
<rdf:type rdf:resource="http://open-services.net/ns/asset#Artifact"/>
<dcterms:title>Build help documentation</dcterms:title>
<dcterms:label>documentation</dcterms:label>
<oslc_asset:content rdf:resource="http://help.example.com"/>
<dcterms:format>text/html</dcterms:format>
</oslc_asset:Artifact>
</rdf:RDF>
And without trailing semicolons.