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

(-)a/api/v1/swagger/swagger.yaml (-1 / +15 lines)
Lines 71-76 info: Link Here
71
    'OR' query: `{ "field1": 'value2', "field2": "value2" }` will filter the response to only those
71
    'OR' query: `{ "field1": 'value2', "field2": "value2" }` will filter the response to only those
72
    results with both field1 containing value2 AND field2 containing value2 for example.
72
    results with both field1 containing value2 AND field2 containing value2 for example.
73
73
74
    Additionally, if you are requesting related data be embedded into the response one can query
75
    on the related data using dot notation in the field names.
76
74
    ### Examples
77
    ### Examples
75
78
76
    The following request would return any patron with firstname "Henry" and lastname "Acevedo";
79
    The following request would return any patron with firstname "Henry" and lastname "Acevedo";
Lines 85-92 info: Link Here
85
88
86
    `curl -u koha:koha --request GET 'http://127.0.0.1:8081/api/v1/patrons/' --data-raw '{ "surname": [ "Acevedo", "Bernardo" ] }'`
89
    `curl -u koha:koha --request GET 'http://127.0.0.1:8081/api/v1/patrons/' --data-raw '{ "surname": [ "Acevedo", "Bernardo" ] }'`
87
90
91
    The following request embeds the related patron extended attributes data and filters on it.
92
93
    `curl -u koha:koha =--request GET 'http://127.0.0.1:8081/api/v1/patrons/' --header 'x-koha-embed: extended_attributes' --data-raw '{ "extended_attributes.code": "internet", "extended_attributes.attribute": "1" }'`
94
88
    ## Special headers
95
    ## Special headers
89
96
97
    ### x-koha-embed
98
99
    This optional header allows the api consumer to request additional related data 
100
    to be returned in the api response.  It also allows for cross referencing in the
101
    queries as described above. It accepts a comma delimited list of relation names.
102
103
    Relations may on occasion also support dot delimited nesting to allow traversal.
104
90
    ### x-koha-library
105
    ### x-koha-library
91
106
92
    This optional header should be passed to give your api request a library
107
    This optional header should be passed to give your api request a library
93
- 

Return to bug 29810