ace-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Willem Janssen <>
Subject Re: Uploading artifact through REST
Date Wed, 21 Oct 2015 11:00:59 GMT
Hi Daan,

> On 15 Oct 2015, at 13:43, Daan Veldhof <> wrote:
> I'm trying to setup ACE so I don't have to interact with the Web UI, but I
> can't find a clear REST call for uploading an artifact. I know there is the
> way with the URL to the local file, but I want to be able to upload the
> artifacts from another PC, so that's not really an option. I also know
> there is this call below, but I don't know exactly how to add the file to
> the request
> - - POST /*obr*/${ID}, submits a resource to the *OBR*. The ${ID} is used
> as the resource name and the content as its value. Returns a 409 if there
> is a conflict with another resource;
> I tried adding the file to the request with python using httplib
> --------------------------------------------------------------------------
> conn.request("POST", "/obr/bla.jar", open("bla.jar", "r"))
> response = conn.getresponse()
> print response.status, response.reason
> data =
> print data
> —————————————————————————————————————

IIRC: you should issue a POST request to /obr?filename=bla.jar with a
proper ContentType header. The ContentType header is used to determine
what kind of data you’re posting to the OBR. For bundles this value
should be "application/vnd.osgi.bundle".

Mind that bundles with the same bundle symbolic name and bundle version
can only uploaded once! Each bundle needs to have a unique version in
order to make it upload successfully to the OBR.


Met vriendelijke groeten | Kind regards

Jan Willem Janssen | Software Architect
+31 631 765 814

My world is revolving around INAETICS and Amdatu

Luminis Technologies B.V.
Churchillplein 1
7314 BZ   Apeldoorn
+31 88 586 46 00

KvK (CoC) 09 16 28 93
BTW (VAT) NL8169.78.566.B.01

View raw message