| Time |
S |
Nick |
Message |
| 00:52 |
|
|
fuzzyhorns joined #rest |
| 01:35 |
|
|
impl joined #rest |
| 01:37 |
|
|
rickharrison joined #rest |
| 01:38 |
|
|
jgornick joined #rest |
| 01:38 |
|
|
fuzzyhorns joined #rest |
| 01:38 |
|
|
dkm joined #rest |
| 01:40 |
|
|
ekroon joined #rest |
| 04:37 |
|
|
baweaver joined #rest |
| 05:38 |
|
|
baweaver joined #rest |
| 06:39 |
|
|
baweaver joined #rest |
| 07:11 |
|
|
standardguy joined #rest |
| 07:11 |
|
|
impl_ joined #rest |
| 07:17 |
|
|
Coldblackice_ joined #rest |
| 07:17 |
|
|
riddle joined #rest |
| 07:40 |
|
|
baweaver joined #rest |
| 07:50 |
|
|
trygvis joined #rest |
| 07:54 |
|
|
fuzzyhorns joined #rest |
| 08:41 |
|
|
baweaver joined #rest |
| 08:55 |
|
|
fuzzyhorns joined #rest |
| 09:25 |
|
|
_ollie joined #rest |
| 09:42 |
|
|
baweaver joined #rest |
| 09:42 |
|
|
jackeroo_marc joined #rest |
| 09:57 |
|
|
fuzzyhorns joined #rest |
| 10:43 |
|
|
baweaver joined #rest |
| 10:58 |
|
|
fuzzyhorns joined #rest |
| 11:17 |
|
|
mezod joined #rest |
| 11:44 |
|
|
baweaver joined #rest |
| 11:59 |
|
|
fuzzyhorns joined #rest |
| 12:45 |
|
|
baweaver joined #rest |
| 12:47 |
|
|
jeffery joined #rest |
| 12:52 |
|
jeffery |
I am builing a REST api and confused on how a collection can be represented in a URI. e.g. I have emails as a collection, but I also have new emails, hidden emails and visible emails. Do I represent them as /new-emails /hidden-emails /visible-emails or /emails/new /emails/hidden/ /emails/visible ? |
| 12:55 |
|
ironChicken |
/emails?visibility=hidden&status=new, /emails?visibility=visible&status=new ? |
| 12:55 |
|
ironChicken |
maybe? |
| 12:59 |
|
|
fuzzyhorns joined #rest |
| 13:23 |
|
jeffery |
ironChicken: and if I have to combine that with a single entity is it appropriate to do /email?id=a8098c1a-f86e-11da-bd1a-00112444be1e ? |
| 13:28 |
|
pith |
jeffery: if it's the email id, it would be better to use a path param: /email/id |
| 13:31 |
|
jeffery |
so /emails?state=new /emails?state=hidden /emails?state=visible /emails/id/a8098c1a-f86e-11da-bd1a-00112444be1e would be my final URI’s |
| 13:33 |
|
pith |
sounds good |
| 13:34 |
|
pith |
arf no sorry just /emails/a8098c1a-f86e-11da-bd1a-00112444be1e |
| 13:35 |
|
pith |
I meant /email/{id} |
| 13:37 |
|
jeffery |
ah ok |
| 13:37 |
|
pith |
with "s" or not, regarding your convention. It doesn't really matter |
| 13:37 |
|
jeffery |
how does everyone manage pagination? Through headers or query string? |
| 13:38 |
|
jeffery |
and order by |
| 13:42 |
|
pith |
I might be wrong, but I think that it would be better to use query params, like this it would be easy to create an hypermedia API and link the next/prev pages |
| 13:45 |
|
pith |
Your email collection could embed links like: {prev: "/emails?page-index=1&page-size=10, next: "...", ...} |
| 13:46 |
|
|
baweaver joined #rest |
| 13:53 |
|
jeffery |
oh ok |
| 13:55 |
|
|
ramsey joined #rest |
| 13:57 |
|
trygvis |
headers are usually used when you slap something on as an afterthough |
| 13:57 |
|
trygvis |
it complicates thing as then you can't rely on the response entity only, you always need the headers too |
| 14:00 |
|
|
fuzzyhorns joined #rest |
| 14:23 |
|
|
interop_madness joined #rest |
| 14:47 |
|
|
baweaver joined #rest |
| 14:48 |
|
|
jeffery joined #rest |
| 15:01 |
|
|
fuzzyhorns joined #rest |
| 15:42 |
|
|
saml joined #rest |
| 15:47 |
|
|
baweaver joined #rest |
| 16:48 |
|
|
baweaver joined #rest |
| 16:52 |
|
|
vlakarados joined #rest |
| 17:03 |
|
|
fuzzyhorns joined #rest |
| 17:05 |
|
|
anth0ny joined #rest |
| 17:06 |
|
|
wsiqueir joined #rest |
| 17:34 |
|
|
sfisque joined #rest |
| 17:43 |
|
|
mezod joined #rest |
| 17:49 |
|
|
baweaver joined #rest |
| 18:03 |
|
|
fuzzyhorns joined #rest |
| 18:44 |
|
|
Coldblackice_ joined #rest |
| 18:50 |
|
|
lemur joined #rest |
| 19:04 |
|
|
fuzzyhorns joined #rest |
| 19:39 |
|
|
talios joined #rest |
| 19:50 |
|
|
baweaver joined #rest |
| 19:58 |
|
|
asdf_ joined #rest |
| 19:58 |
|
|
vlakarados_ joined #rest |
| 19:58 |
|
|
anth0ny_ joined #rest |
| 20:00 |
|
|
Coldblackice joined #rest |
| 20:05 |
|
|
fuzzyhorns joined #rest |
| 20:51 |
|
|
lemur joined #rest |
| 21:06 |
|
|
fuzzyhorns joined #rest |
| 21:35 |
|
|
jeffery joined #rest |
| 21:42 |
|
|
Coldblackice joined #rest |
| 21:58 |
|
|
fumanchu joined #rest |
| 22:07 |
|
|
fuzzyhorns joined #rest |
| 22:53 |
|
|
mgomezch_ joined #rest |
| 22:54 |
|
|
mezod_ joined #rest |
| 22:55 |
|
|
zama joined #rest |
| 22:56 |
|
|
sulky joined #rest |
| 23:01 |
|
|
pith_ joined #rest |
| 23:01 |
|
|
fuzzyhorns joined #rest |
| 23:02 |
|
|
ah joined #rest |
| 23:02 |
|
|
sulky joined #rest |
| 23:08 |
|
|
asm89 joined #rest |
| 23:09 |
|
|
sulky joined #rest |