• Resolved mcdouchedy

    (@mcdouchedy)


    What I miss in the API: when I do a lookup of whatever information I search for via a GET, i get a response where I cannot do much with. I give an example: I search for a ‘name’. I will get back the number of names that exist in the PDB. When I want to check more information on one or more records, I am stuck, because I don’t have the recordID that I need to do a lookup of all the info of ‘name’ (or a delete, etc…).

    Or, I have missed an option, that’s also possible 🙂

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    There are two types of request that you can make using a filter to select which records are returned. The first (and it sounds like that one you’re using) is a simple query to tell you now many records are included. The response is simply a numeric count. This is for the purpose of quickly determining the number of records that match the filter. This query request takes the form of:

    https://xnau.com/wp-json/participants-database/v1/query/list/first_name=roland

    The second type is a list request that includes a filter. This one will return all the record data for the records that match the filter, which sounds like the one you want to use, it takes the form of:

    https://xnau.com/wp-json/participants-database/v1/list?filter=first_name=roland

    Check the REST API documentation under “Working with Groups of Records” for details.

    Thread Starter mcdouchedy

    (@mcdouchedy)

    Thanks Roland, indeed it’s working and there is everything I need. (I’d tried your example, but with the wrong route…) Thanks (and sorry) for your time,

    -marc-

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘API feature request? Return respons with recordID?’ is closed to new replies.