class DeviceKeyWebResource extends AbstractWebResource {

    @GET
    @Path("{id}")
    @Produces(MediaType.APPLICATION_JSON)
    public Response getDeviceKey(@PathParam("id") String id) {
        DeviceKey deviceKey = nullIsNotFound(get(DeviceKeyService.class).getDeviceKey(DeviceKeyId.deviceKeyId(id)),
                                             DEVICE_KEY_NOT_FOUND);
        return ok(codec(DeviceKey.class).encode(deviceKey, this)).build();
    }

}