artifactory plugin over GET rather than POST

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

artifactory plugin over GET rather than POST

connaryscott
Hi,

I am trying to implement a groovy based plugin that will return custom JSON data about existing artifacts over a GET request as opposed to POST.  I am looking for custom JSON data as I plan to integrate a REST API point with another technology.  Looking at the user plugin examples on GitHub, I was lead to an "execution" type plugin.  Is there another way to satisfy a REST request over GET?



Example,  this POST request  works:

[chuck@sdp-centos-63-64-1 artifactory]$ curl    -X POST -u admin:password "http://localhost:8081/artifactory/api/plugins/execute/rundeck?params=repo=myrepo|groupId=com.bar|artifactId=foo"

{ "foo-1.0":"https://localhost/artifactory/myrepo/com/bar/foo/foo-1.0/foo-1.0.jar", "foo-2.0":"https://localhost/artifactory/myrepo/com/bar/foo/foo-2.0/foo-2.0.jar" }

 but a GET request would not.

Thanks,


Chuck Scott
Reply | Threaded
Open this post in threaded view
|

Re: artifactory plugin over GET rather than POST

testtest
Hi Chuck,

Execution plugin is the way to go, and it is only triggered by POST. Any reason you are limited to GET specifically (except of the semantic meaning, of course)?

Regards,
Baruch

Baruch.

--
Developer Advocate
JFrog Ltd
www.jfrog.com
+972544954353
@jbaruch


On Wed, Apr 3, 2013 at 11:03 PM, connaryscott <[hidden email]> wrote:
Hi,

I am trying to implement a groovy based plugin that will return custom JSON
data about existing artifacts over a GET request as opposed to POST.  I am
looking for custom JSON data as I plan to integrate a REST API point with
another technology.  Looking at the user plugin examples on GitHub, I was
lead to an "execution" type plugin.  Is there another way to satisfy a REST
request over GET?



Example,  this POST request  works:

[chuck@sdp-centos-63-64-1 artifactory]$ curl    -X POST -u admin:password
"<a href="http://localhost:8081/artifactory/api/plugins/execute/rundeck?params=repo=myrepo|groupId=com.bar|artifactId=foo" target="_blank">http://localhost:8081/artifactory/api/plugins/execute/rundeck?params=repo=myrepo|groupId=com.bar|artifactId=foo"

{
"foo-1.0":"https://localhost/artifactory/myrepo/com/bar/foo/foo-1.0/foo-1.0.jar",
"foo-2.0":"https://localhost/artifactory/myrepo/com/bar/foo/foo-2.0/foo-2.0.jar"
}

 but a GET request would not.

Thanks,


Chuck Scott



--
View this message in context: http://forums.jfrog.org/artifactory-plugin-over-GET-rather-than-POST-tp7578734.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users


------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users
Reply | Threaded
Open this post in threaded view
|

Re: artifactory plugin over GET rather than POST

connaryscott
Hi Baruch,

Thanks for responding...

I am attempting to integrate two technologies as part of a larger toolchain (Rundeck and Artifactory).  

Rundeck has an "options service", and is designed to render options to the Rundeck user.  E.g. user selects available package in a Rundeck job to deploy from a repository (E.g. Artifactory, Nexus, Yum, etc).    The options service is implemented with GET, not POST.  We already have a plugin for Nexus and was hoping to contribute one for Artifactory.     Just curious if there were other options.  I suppose it could be mitigated by a cgi adapter that converts the request from GET to POST but was hoping for a more direct approach.

Thanks,

Chuck
Reply | Threaded
Open this post in threaded view
|

Re: artifactory plugin over GET rather than POST

testtest
Hi Chuck,

I created a feature request for it, will implement ASAP. You're welcome to watch the progress :)

Regards,
Baruch

Baruch.

--
Developer Advocate
JFrog Ltd
www.jfrog.com
+972544954353
@jbaruch


On Thu, Apr 4, 2013 at 9:16 PM, connaryscott <[hidden email]> wrote:
Hi Baruch,

Thanks for responding...

I am attempting to integrate two technologies as part of a larger toolchain
( Rundeck <http://rundeck.org/>   and Artifactory).

Rundeck has an "options service", and is designed to render options to the
Rundeck user.  E.g. user selects available package in a Rundeck job to
deploy from a repository (E.g. Artifactory, Nexus, Yum, etc).    The options
service is implemented with GET, not POST.  We already have a  plugin for
Nexus <https://github.com/vbehar/nexus-rundeck-plugin>   and was hoping to
contribute one for Artifactory.     Just curious if there were other
options.  I suppose it could be mitigated by a cgi adapter that converts the
request from GET to POST but was hoping for a more direct approach.

Thanks,

Chuck



--
View this message in context: http://forums.jfrog.org/artifactory-plugin-over-GET-rather-than-POST-tp7578734p7578740.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users


------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users
Reply | Threaded
Open this post in threaded view
|

Re: artifactory plugin over GET rather than POST

connaryscott
thank you for doing this.  I shall track the progress!
Reply | Threaded
Open this post in threaded view
|

Re: artifactory plugin over GET rather than POST

jbaruch
Administrator
Done in 3.0.4 :)