|
From: shayb <sh...@jf...> - 2013-09-01 07:31:19
|
Hi, Generally, in order to add properties on deployment your should add ';propertyKey=propertyValue' to your URL. For example: curl -X PUT -uadmin:password --data-binary @file.zip " http://host:8081/artifactory/libs-release-local/file.zip;propertyKey=value;propertyKey2=value2 " If the file is already deployed, you can use the REST-API 'Set Item Properties' query: http://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-SetItemProperties In your case, you can write a script that will pull the properties from your file and add these properties to the request URL. Hope this helps, Shay. On Wed, Aug 28, 2013 at 6:28 PM, pscheir [via Artifactory] < ml-...@n2...> wrote: > Hi, > > I want to populate a property of type „Any Value“ via the REST API. > Minute 2:00 if this video shows a property of this type: > http://www.jfrog.com/confluence/display/RTF/Properties > > As value for the property I want to put contents that I have in a text > file. The file contains some loosely structured information about the build > process (compiler, build time, etc.). Mostly stuff we want to import from a > legacy build process. This information should only be readable by humans > but will not be used for automation. > > I am trying to achieve this via curl. However I am struggling with the > realization. > > My command looks like this: > curl --user username:password -X PUT > http://server:8081/artifactory/api/storage/TestRepository/file.zip?properties=test_prop= --data-urlencode > @test-metadata.txt > > Do you have any idea how / if I can achieve this? > > Thank you, Peter > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://forums.jfrog.org/REST-API-curl-properties-and-file-contents-tp7579028.html > To start a new topic under Artifactory - Users, email > ml-...@n2... > To unsubscribe from Artifactory, click here<http://forums.jfrog.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2380776&code=c2hheWJAamZyb2cuY29tfDIzODA3NzZ8MTU0NDg2MTQ3OA==> > . > NAML<http://forums.jfrog.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://forums.jfrog.org/REST-API-curl-properties-and-file-contents-tp7579028p7579049.html Sent from the Artifactory - Users mailing list archive at Nabble.com. |