From: Bill Erickson Date: Wed, 6 May 2015 21:49:31 +0000 (-0400) Subject: web api preso cont. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d300791e0aeaf008f5ae6baf1479e74aa987860b;p=working%2Frandom.git web api preso cont. Signed-off-by: Bill Erickson --- diff --git a/api_presentation/web_apis.asciidoc b/api_presentation/web_apis.asciidoc index c5a890a85..54ba21f1c 100644 --- a/api_presentation/web_apis.asciidoc +++ b/api_presentation/web_apis.asciidoc @@ -206,6 +206,20 @@ Received Data: { } --------------------------------------------------------------------------- +== ANONYMOUS PCRUD + + * Access to public data for unauthenticated clients + * Slight speed bump by avoiding open-ils.auth call and perm checks + +[source,xml] +--------------------------------------------------------------------------- + +--------------------------------------------------------------------------- + +[source,sh] +--------------------------------------------------------------------------- +srfsh# request open-ils.pcrud open-ils.pcrud.retrieve.aou "ANONYMOUS", 1 +--------------------------------------------------------------------------- == When Not To Use PCRUD @@ -216,7 +230,48 @@ Received Data: { * With web development in particular, sufficiently complex logic will be faster as an API call, since less data has to traverse the network. -== API Call Structure +== Flat Fielder + +[source,js] +--------------------------------------------------------------------------- +open-ils.fielder +open-ils.fielder.flattened_search +, "mbt", { + "summary.balance_owed":"summary.balance_owed", + "summary.last_billing_type":"summary.last_billing_type", + "xact_start":"xact_start", + "record_id":"circulation.target_copy.call_number.record.id", + "copy_id":"circulation.target_copy.id", + "title":"circulation.target_copy.call_number.record.simple_record.title", + ... +}, { + "usr":"201", + "xact_finish":null, + "summary.balance_owed":{"<>":0} +}, { + "sort":["xact_start"], + "limit":25, + "offset":0 +} +--------------------------------------------------------------------------- + +== Flat Fielder Response + +[source,js] +--------------------------------------------------------------------------- +{ + "summary.last_billing_type":"Overdue materials", + "record_id":58, + "copy_barcode":"CONC70000393", + "summary.total_owed":"1.40", + "summary.balance_owed":"1.40", + "copy_id":358, + "id":348, + "summary.total_paid":"0.0", + "title":"concerto for violin and orchestra no 2 in d major, k 211", + "xact_start":"2015-04-10T11:26:11-0400" +} +--------------------------------------------------------------------------- == Questions / Comments