Skip to content
Advertisement

Tag: rest

Magnolia REST Endpoint for Categories

I understanding now, how the Magnolia works. I writing REST Endpoint for Magnolia Content App in Java. My Content App is Categories – App and it looks like this: My task is, to define a REST endpoint for the Categories app in Java, which delivers the subcategories based on a passed category name and displays them in a component. For

proper curl command for delete with > one word as the parameter

I have a rest request like the following: the id is a String, and can have multiple words with spaces in between like I would like to construct a curl command that supports String with spaces, but I don’t know how. Below does not pick up second word. grateful for ideas. Thanks Answer The answer was provided by VGR. URLs

REST. Checking the type of incoming field

how can I check the field type of the incoming response to the REST request. For example, I receive an answer with the “pay” field:”1000″ I want to check that the incoming field, its value is of type int What verification methods are there? Answer You can use Rest Assured Say you have this endpoint: https://mocki.io/v1/0f2701f8-46ab-48b5-9584-7e58da29498d that returns: Then your

Get values by key from JSON Multi-dimensional Array

JSON: Code: Output: I’m only retrieving the first value How do I retrieve all name values from a nested JSON Array? Thanks in advance! Answer With your current implementation, you are getting JsonNode object and you are reading it’s name property, but you are not reading that property for it’s chlildren (inner objects). You have to query all nested objects

how to call class parameter inside the for loop?

Problem:Cannot call the class parameter inside the for loop statement Implementation:I need to call this class inorder my rest api list will function and will show all the data. Problem:Cannot call the class parameter inside the for loop statement Implementation:I need to call this class inorder my rest api list will function and will show all the data. Answer productEntity2

Advertisement