[GH-ISSUE #58] ways to create new routes #37

Closed
opened 2026-02-26 01:32:58 +03:00 by kerem · 1 comment
Owner

Originally created by @ahujamoh on GitHub (Mar 6, 2017).
Original GitHub issue: https://github.com/jeffknupp/sandman2/issues/58

Dear Developers/Moderators,

I want to create multiple routes(which will filter information from a table or will join two tables). Is there a way specified for such requirement.

For example: I have a table score(id is primary key)

id,name,marks
1,Ajay,100
2,Jay,99
3,Ram,90
4,Jay,55

currently
the route is /score/1 or /score/2 to get each of the marks

I want to run something like

/my-score?name=Jay to respond with both rows matching the result or
my-score?marks=100 to respond row where marks=100

Is there a specified way by which this can be achieved?

Originally created by @ahujamoh on GitHub (Mar 6, 2017). Original GitHub issue: https://github.com/jeffknupp/sandman2/issues/58 Dear Developers/Moderators, I want to create multiple routes(which will filter information from a table or will join two tables). Is there a way specified for such requirement. For example: I have a table score(id is primary key) id,name,marks 1,Ajay,100 2,Jay,99 3,Ram,90 4,Jay,55 currently the route is `/score/1` or `/score/2` to get each of the marks I want to run something like `/my-score?name=Jay` to respond with both rows matching the result or `my-score?marks=100` to respond row where marks=100 Is there a specified way by which this can be achieved?
kerem closed this issue 2026-02-26 01:32:58 +03:00
Author
Owner

@jeffknupp commented on GitHub (Mar 7, 2017):

The syntax you specified works, just make sure you include a trailing / after /score/, so your request would be /score/?marks=100

<!-- gh-comment-id:284773479 --> @jeffknupp commented on GitHub (Mar 7, 2017): The syntax you specified works, just make sure you include a trailing `/` after `/score/`, so your request would be `/score/?marks=100`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/sandman2-jeffknupp#37
No description provided.