November 2018
Intermediate to advanced
388 pages
9h 5m
English
Now let's retrieve the organization using the GET function. We will start by defining a resource to accept a path parameter, which is orgId in this example.
The retrieveOrganization() function in controller can be written to accept a path parameter, which happens to be an orgId that was returned when the identity was created. The retrieveOrganization() function returns the org object that is wrapped in a standard response in the JSON format, as seen in the following code:
@Path("/{orgId}")@GET@Produces(MediaType.APPLICATION_JSON)fun retrieveOrganization(@PathParam("orgId") orgId: String): Response { var organizationResponse: OrganizationResponse = organizationService.retrieveOrganization(orgId) ...
Read now
Unlock full access