I am fairly new to REST services. I am trying to write a REST API method, which will take a List of objects and return some other list of objects.
something like :
**@POST
@Path("/nodeinfo/{users}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public List<NodeLabels> getLocalizedLabels(
@PathParam("users") Users users)
throws WebApplicationException {**
return new ArrayList(nodeLabelsIDMap.values());
}
Users is just a list of another object user with attributes like name
, id
, contact
, country
.