REST API Accessing a Specific Record using ID
If you know the record's ID number, you can retrieve it simply by adding
/xxx
after the
endpoint
. This retrieves data using the
output format
you've selected (the default is html).
Some examples of accessing a specific record are:
https://127.0.0.1/api/v1/patrons/51
- will show you data for patron
51
from the
patrons
table (see example to the right)
https://127.0.0.1/api/v1/patrons/51.json
- will show you data for patron
51
from the
patrons
table (in json format)
https://127.0.0.1/api/v1/events/85
- will show you data for event
85
from the
events
table.
Diataxis:
How To