HTTP Post to create assets - how does it work?
I would like to create an asset and upload an attached file from within a Javascript application using the Web Services or REST API.
I found a HTTP Post example in the docs but there are little details how this works. For example:
One form field needs to contain a .RAS (Reusable Asset Specification) manifest file.
What is this file? I searched the docs and have not found anything.
Another form field must contain "a serialized form of artifact details of the asset." What is the structure of this serialized field?
Another field must contain the GroupId "Provides an integer representing the group you want to submit the asset to" Where does the Id come from?
In short, I have no idea how to get this HTTP Post to work and can't find any more information.
Is there another reference source?
I found a HTTP Post example in the docs but there are little details how this works. For example:
One form field needs to contain a .RAS (Reusable Asset Specification) manifest file.
What is this file? I searched the docs and have not found anything.
Another form field must contain "a serialized form of artifact details of the asset." What is the structure of this serialized field?
Another field must contain the GroupId "Provides an integer representing the group you want to submit the asset to" Where does the Id come from?
In short, I have no idea how to get this HTTP Post to work and can't find any more information.
Is there another reference source?
2 answers
See https://jazz.net/wiki/bin/view/Main/RamRestApiMain
Best things to work with Rest API is to first play with a tool like https://addons.mozilla.org/en-US/firefox/addon/poster/
First Get an asset similar to the one you want to create/update (to have one good XML representations):
GET http://<server>/ram/oslc/assets/<GUID>/<VERSION>
And use the example in the link above.
Best things to work with Rest API is to first play with a tool like https://addons.mozilla.org/en-US/firefox/addon/poster/
First Get an asset similar to the one you want to create/update (to have one good XML representations):
GET http://<server>/ram/oslc/assets/<GUID>/<VERSION>
And use the example in the link above.