Time |
S |
Nick |
Message |
00:01 |
|
whartung |
"But Green says they'll also continue supporting Angular 1 for at least another year, until a majority of users have transitioned to the new syntax." |
00:01 |
|
whartung |
HAHAHAHA |
00:01 |
|
whartung |
1 year…lolz |
00:01 |
|
whartung |
those poor people. |
00:23 |
|
|
tbsf joined #rest |
00:40 |
|
* pdurbin |
looks at http://news.slashdot.org/story/16/03/02/2125257/google-says-angular-2-will-support-python-java |
00:43 |
|
|
fuzzyhorns joined #rest |
02:22 |
|
|
benaiah` joined #rest |
03:04 |
|
|
fuzzyhorns joined #rest |
03:24 |
|
|
anth0ny_ joined #rest |
03:26 |
|
|
zama_ joined #rest |
03:41 |
|
|
DrCode joined #rest |
04:08 |
|
|
crystal77 joined #rest |
05:20 |
|
|
fuzzyhorns joined #rest |
05:28 |
|
|
whartung_ joined #rest |
06:22 |
|
|
fuzzyhorns joined #rest |
06:51 |
|
|
_ollie joined #rest |
07:22 |
|
|
fuzzyhorns joined #rest |
08:06 |
|
|
_ollie joined #rest |
08:21 |
|
|
timg___ joined #rest |
08:23 |
|
|
fuzzyhorns joined #rest |
08:25 |
|
|
trygvis joined #rest |
08:45 |
|
|
graste joined #rest |
09:00 |
|
|
timg___ joined #rest |
09:24 |
|
|
fuzzyhorns joined #rest |
09:48 |
|
|
interop_madness joined #rest |
10:25 |
|
|
fuzzyhorns joined #rest |
11:26 |
|
|
fuzzyhorns joined #rest |
12:12 |
|
|
rosstuck joined #rest |
12:26 |
|
|
fuzzyhorns joined #rest |
12:33 |
|
|
timg___ joined #rest |
13:05 |
|
|
standardguy joined #rest |
13:15 |
|
|
fuzzyhorns joined #rest |
13:16 |
|
|
vanHoesel joined #rest |
13:48 |
|
|
mezod joined #rest |
14:40 |
|
|
fuzzyhorns joined #rest |
14:50 |
|
|
cordovafan8 joined #rest |
14:51 |
|
cordovafan8 |
Hello. I'm wondering when it is appropriate to include a uri in the response to a rest api request. From what I've seen, if you send an object of some type that can be retrieved by the rest api (say in a list of such objects) you should include the uri for accessing that object. |
14:51 |
|
cordovafan8 |
However do you need to include the requested uri in the root of the response? |
14:51 |
|
cordovafan8 |
"need" or is it good practice |
14:51 |
|
cordovafan8 |
what about the base url? |
14:58 |
|
|
mezod joined #rest |
15:00 |
|
pdurbin |
cordovafan8: look for "REST" at https://en.wikipedia.org/wiki/Link_relation |
15:01 |
|
cordovafan8 |
pdurbin: I'm not sure what you mean? |
15:02 |
|
cordovafan8 |
I'm trying to understand how to properly obey the HATEOS principle (or at least that's what I think I'm trying to do) |
15:03 |
|
fumanchu |
cordovafan8: it's good practice 1) because links in the response may be relative to the base, and 2) for client systems that store/transfer the responses for use by a later or remote system |
15:04 |
|
cordovafan8 |
fumanchu: ok, cool |
15:05 |
|
fumanchu |
that's why my own media-type, Shoji, has a "self" member: https://bitbucket.org/fumanchu/shoji/src/tip/spec.txt?fileviewer=file-view-default#spec.txt-476 |
15:05 |
|
|
quimrstorres joined #rest |
15:10 |
|
cordovafan8 |
fumanchu: what do you say to the arguments shown here: http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api (search for HATEOS) |
15:11 |
|
cordovafan8 |
I sort of agree that it's better to pass identifiers and let the clients build the links according to documentation. |
15:12 |
|
fumanchu |
lots of answers :) |
15:13 |
|
fumanchu |
1) what requests will be made is, to some extent, made at integration time. so give us poor integration developeers links we can click while we're integrating :) |
15:14 |
|
fumanchu |
that makes discoverability *so* much easier than switching back and forth to docs |
15:15 |
|
fumanchu |
2) length isn't the issue he makes it. if you do have a base/self in every response, and IMO use trailing slashes everywhere (like Shoji), then typically your URL is the identifier (possibly with a single trailing slash). "000000/" is relative to "https://www.mysite.com/api/things/24/bits/782374/frobs/" |
15:17 |
|
fumanchu |
3) and the actual intent of HATEOAS: evolvability. if I move frobs to mysite.com/frobs/ I don't have to rewrite any client code. The server emits the right URI and the client follows it. |
15:24 |
|
cordovafan8 |
that still requires stripping out the "/" as opposed to a straight up id field, which you're going to include anyway. |
15:24 |
|
cordovafan8 |
I'm going to include uris in my responses, but I'm not sure if I'll ever use them :P |
15:24 |
|
cordovafan8 |
we'll see how it goes |
15:32 |
|
|
timg___ joined #rest |
15:53 |
|
|
mezod joined #rest |
15:54 |
|
fumanchu |
if your goal is to obtain an id then yes, URL's are going to chafe. if your goal is to move to the next state, then the whole URL is "the id" |
15:57 |
|
|
gajus joined #rest |
15:57 |
|
|
gajus joined #rest |
16:03 |
|
|
tbsf joined #rest |
16:43 |
|
|
fuzzyhorns joined #rest |
17:00 |
|
|
fumanchu_ joined #rest |
17:11 |
|
|
quimrstorres joined #rest |
17:44 |
|
|
fuzzyhorns joined #rest |
18:12 |
|
cordovafan8 |
ok, dumb question time |
18:13 |
|
cordovafan8 |
is there any sense in using both an authentication token and an api key? |
18:13 |
|
cordovafan8 |
I think that there is, but the more I read up, the more I see that people are using api keys like authentication tokens |
18:15 |
|
cordovafan8 |
the way I understand it, an api key is something you use to grant access to the api _at_all_ and limits the api endpoints available etc |
18:16 |
|
cordovafan8 |
and authentication key is something that is sent by the client to the server, which is checked to see if the client is authenticated (logged in) |
18:16 |
|
cordovafan8 |
an* |
18:19 |
|
|
tbsf joined #rest |
18:21 |
|
|
tbsf joined #rest |
18:37 |
|
|
crystal77 joined #rest |
18:44 |
|
pdurbin |
don't ask me. I'm confused about the difference: https://github.com/IQSS/dataverse/issues/1293 :) |
18:45 |
|
|
fuzzyhorns joined #rest |
19:08 |
|
|
tbsf joined #rest |
19:46 |
|
|
fuzzyhorns joined #rest |
20:09 |
|
|
gigo1980 joined #rest |
20:16 |
|
cordovafan8 |
anyone here use jwt for authentication/authorization? |
20:16 |
|
cordovafan8 |
seems like a good compromise |
20:19 |
|
cordovafan8 |
also, what do people think of swagger/openapi 2.0? |
20:19 |
|
|
Coldblackice joined #rest |
20:28 |
|
|
mezod joined #rest |
20:35 |
|
|
tbsf joined #rest |
21:01 |
|
|
tbsf_ joined #rest |
22:11 |
|
pdurbin |
swagger seems nice |
22:11 |
|
whartung |
I thnk we have some guys using swagger |
22:12 |
|
pdurbin |
someone asked about jwt at http://irclog.greptilian.com/rest/2015-09-04#i_135810 |
22:12 |
|
whartung |
yea I saw that |
22:12 |
|
whartung |
but they left |
22:50 |
|
|
vanHoesel joined #rest |
23:09 |
|
|
gigo1980 joined #rest |
23:40 |
|
|
tbsf joined #rest |
23:49 |
|
|
fuzzyhorns joined #rest |
23:56 |
|
|
vanHoesel joined #rest |