[ovirt-users] Some questions about Ovirt REST API

Shani Leviim sleviim at redhat.com
Wed Apr 11 07:10:39 UTC 2018


Hi Wenzt,

According to [1], maybe you should use a '-d' flag since it seems to send
the Content-Type.

Hope it helps.

[1]
https://stackoverflow.com/questions/7172784/how-to-post-json-data-with-curl-from-terminal-commandline-to-test-spring-rest


*Regards,*

*Shani Leviim*

On Wed, Apr 11, 2018 at 9:19 AM, gsswzt at pku.edu.cn <gsswzt at pku.edu.cn>
wrote:

> Hi,
>
> I wants to creating my own service under ../vms/{vmid}/myservice.Here is
> my methods:
>
> 1. create VmMytestService in *https://github.com/oVirt/ovirt-engine-api-model
> <https://github.com/oVirt/ovirt-engine-api-model> project.*
>
>     add *@Service VmMytestService mytests() in *VmService .java
>
> 2. mvn install it and change the root pom.xml *<model.version>4.3.9-SNAPSHOT</model.version>
> * in my Ovirt project.
> 3.create BackendVmMytestService implements VmMytestResource
> 4.override *get() and add() *methods.
>
> After that, I use *curl*  tool to send GET and POST request. GET is
> working and return.
> However, I get this return after POST request.
>
>
> Would you help me with that issue?
>
> Thanks,
> wenzt
>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180411/4c388997/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Catch.jpg
Type: image/jpeg
Size: 88643 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180411/4c388997/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CatchFF54.jpg
Type: image/jpeg
Size: 40899 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180411/4c388997/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Catch020D.jpg
Type: image/jpeg
Size: 73943 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180411/4c388997/attachment-0005.jpg>


More information about the Users mailing list