[Hawkular-dev] Post a metricType under a resourceType, 400 bad request
Thomas Segismont
tsegismo at redhat.com
Wed Jul 13 05:14:46 EDT 2016
That looks like a malformed request entity: the server is expecting a
list and you are providing an object?
Please check the inventory REST API.
Le 13/07/2016 à 11:07, Austin Kuo a écrit :
> The 400 response body.
> {
> "errorMsg": "Can not deserialize instance of java.util.ArrayList out
> of START_OBJECT token\n at [Source:
> io.undertow.servlet.spec.ServletInputStreamImpl at 3251f36a; line: 1,
> column: 1]"
> }
>
> On Wed, Jul 13, 2016 at 4:18 PM Thomas Segismont <tsegismo at redhat.com
> <mailto:tsegismo at redhat.com>> wrote:
>
> Austin,
>
> Can you paste the 400 response body? Anything in the logs?
>
> Thanks
>
> Le 12/07/2016 à 08:26, Austin Kuo a écrit :
> > Hi all,
> > I was trying to create a metric type under my resource type called
> “MYRT”,
> > Here’s body look like:
> > {“collectionInterval”: 30, “id”: “metricTypeId123”, "type": "COUNTER",
> > "unit": "NONE"}
> > I posted this to
> > url:
> http://localhost:8080/hawkular/inventory/deprecated/feeds/vertx-localhost/resourceTypes/MYRT/metricTypes
> > It gave me 400 bad request.
> > But I posed
> > to
> http://localhost:8080/hawkular/inventory/deprecated/feeds/vertx-localhost/metricTypes.
> > And it worked.
> > Wondering why is that?
> >
> > Thanks
> >
> >
> > _______________________________________________
> > hawkular-dev mailing list
> > hawkular-dev at lists.jboss.org <mailto:hawkular-dev at lists.jboss.org>
> > https://lists.jboss.org/mailman/listinfo/hawkular-dev
> >
>
> --
> Thomas Segismont
> JBoss ON Engineering Team
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org <mailto:hawkular-dev at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>
>
>
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>
--
Thomas Segismont
JBoss ON Engineering Team
More information about the hawkular-dev
mailing list