View | Details | Raw Unified | Return to bug 34387
Collapse All | Expand All

(-)a/api/v1/swagger/swagger.yaml (-6 / +5 lines)
Lines 735-744 info: Link Here
735
    We can refine that with more complex matching clauses by nesting a the clause into the
735
    We can refine that with more complex matching clauses by nesting a the clause into the
736
    object; `{ "fieldname": { "clause": "value" } }`.
736
    object; `{ "fieldname": { "clause": "value" } }`.
737
737
738
    Available matching clauses include ">", "<", ">=", "<=", "-like", and "-not_like".
738
    Available matching clauses include `>`, `<`, `>=`, `<=`, `-like`, and `-not_like`.
739
739
740
    We can filter on multiple fields by adding them to the JSON respresentation. Adding at `HASH`
740
    We can filter on multiple fields by adding them to the JSON respresentation. Adding at `HASH`
741
    level will result in an "AND" query, whilst combinding them in an `ARRAY` wilth result in an
741
    level will result in an "AND" query, whilst combinding them in an `ARRAY` will result in an
742
    "OR" query: `{ "field1": "value2", "field2": "value2" }` will filter the response to only those
742
    "OR" query: `{ "field1": "value2", "field2": "value2" }` will filter the response to only those
743
    results with both field1 containing value2 AND field2 containing value2 for example.
743
    results with both field1 containing value2 AND field2 containing value2 for example.
744
744
Lines 749-763 info: Link Here
749
749
750
    The following request would return any patron with firstname "Henry" and lastname "Acevedo";
750
    The following request would return any patron with firstname "Henry" and lastname "Acevedo";
751
751
752
    `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": "Acevedo", "firstname": "Henry" }"`
752
    `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw '{ "surname": "Acevedo", "firstname": "Henry" }'`
753
753
754
    The following request would return any patron whose lastname begins with "Ace";
754
    The following request would return any patron whose lastname begins with "Ace";
755
755
756
    `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": { "-like": "Ace%" }"`
756
    `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw '{ "surname": { "-like": "Ace%" }'`
757
757
758
    The following request would return any patron whose lastname is "Acevedo" OR "Bernardo"
758
    The following request would return any patron whose lastname is "Acevedo" OR "Bernardo"
759
759
760
    `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": [ "Acevedo", "Bernardo" ] }"`
760
    `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw '{ "surname": [ "Acevedo", "Bernardo" ] }'`
761
761
762
    The following request embeds the related patron extended attributes data and filters on it.
762
    The following request embeds the related patron extended attributes data and filters on it.
763
763
764
- 

Return to bug 34387