It's all about the answers!

Ask a question

HTTP Post to create assets - how does it work?


Ken Elston (1623) | asked Jan 25 '11, 6:00 p.m.
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?

2 answers



permanent link
Rich Kulp (3.6k38) | answered Jan 26 '11, 9:23 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi,

The HTTP Post for assets is not API. It's an internal form used by our
Rich Client code.

The formal API is the REST API.

--
Rich Kulp
Rational Asset Manager developer

permanent link
Gili Mendel (1.8k56) | answered Feb 21 '11, 10:15 a.m.
JAZZ DEVELOPER
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.

Your answer


Register or to post your answer.