[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opennms-discuss
Subject:    Re: [opennms-discuss] REST API - Does OpenNMS support POST/PUT JSON objects?
From:       Seth Leger <seth () opennms ! org>
Date:       2015-07-24 1:45:21
Message-ID: 55B198B1.2050302 () opennms ! org
[Download RAW message or body]

Hi,

I think that most of the existing REST services expect PUTs to be form
submissions where the bean properties are specified as form parameters
in the body of the request.

Can you give us the exact URL you are trying to POST to so that I can
look up which service you are trying to interact with? Thanks,

Seth Leger
The OpenNMS Group


On 7/14/15 2:20 PM, rpanthangi wrote:
> Hello,
> 
> I am trying to create a Requisition via REST API. Below is the sample JSON
> data, which I'm trying to POST.
> 
> Response returned is - Unsupported Media Type. 
> 
> Question - Does OpenNMS support POST/PUT Json objects? 
> 
> I'm able to perform GET and retrieve the data as JSON by adding header -
> "Accept:appliciation/json"
> 
> {
> "node": {
> "-node-label": "snooplion",
> "-foreign-id": "snooplion",
> "-building": "renamed-hiphop-artists",
> "interface": {
> "-snmp-primary": "N",
> "-status": "1",
> "-ip-addr": "8.8.4.4",
> "monitored-service": { "-service-name": "DNS" }
> }
> }
> }
> 
> 
> 
> --
> View this message in context: \
> http://opennms.530661.n2.nabble.com/REST-API-Does-OpenNMS-support-POST-PUT-JSON-objects-tp7592487.html
>  Sent from the OpenNMS - discuss mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Please read the OpenNMS Mailing List FAQ:
> http://www.opennms.org/index.php/Mailing_List_FAQ
> 
> opennms-discuss mailing list
> 
> To *unsubscribe* or change your subscription options, see the bottom of this page:
> https://lists.sourceforge.net/lists/listinfo/opennms-discuss


------------------------------------------------------------------------------
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic