script to access data through query parameter resourceId