The webservice API of Pazpar2 is described in detail in Pazpar2 protocol(7).
In brief, you use the 'init' command to create a session, a temporary workspace which carries information about the current search. You start a new search using the 'search' command. Once the search has been started, you can follow its progress using the 'stat', 'bytarget', 'termlist', or 'show' commands. Detailed records can be fetched using the 'record' command.