| Time |
S |
Nick |
Message |
| 00:09 |
|
|
ironChicken joined #rest |
| 01:23 |
|
|
tr3onlin_ joined #rest |
| 02:15 |
|
|
systmkor1 joined #rest |
| 03:30 |
|
|
talios joined #rest |
| 05:39 |
|
|
ekroon_ joined #rest |
| 05:39 |
|
|
rickharrison joined #rest |
| 05:44 |
|
|
tr3online joined #rest |
| 05:47 |
|
|
systmkor1 joined #rest |
| 06:06 |
|
|
_ollie joined #rest |
| 06:47 |
|
|
whartung_ joined #rest |
| 06:53 |
|
|
rosstuck joined #rest |
| 07:17 |
|
|
talios joined #rest |
| 07:36 |
|
|
Left_Turn joined #rest |
| 07:55 |
|
|
martinfilliau joined #rest |
| 08:15 |
|
|
graste joined #rest |
| 08:26 |
|
|
rosstuck joined #rest |
| 09:47 |
|
|
igitoor joined #rest |
| 10:00 |
|
|
igitoor joined #rest |
| 10:14 |
|
|
shrink0r joined #rest |
| 10:25 |
|
|
danfinch joined #rest |
| 11:31 |
|
|
ph88 joined #rest |
| 12:41 |
|
|
charlie_ joined #rest |
| 13:11 |
|
|
a_c_m joined #rest |
| 13:12 |
|
a_c_m |
so i have a general rest type questions, around authorization and restrictions. |
| 13:13 |
|
a_c_m |
where you have a resource /widget which has server fields (name, type, price), and want to restrict the creation/update of the price field to a subset of users - how should this be done? |
| 13:16 |
|
pdurbin |
with an API key, I would think |
| 13:17 |
|
a_c_m |
no i get that part - i guess i’m more agonizing over the documentation and expected interaction witht the end point |
| 13:17 |
|
trygvis |
a_c_m: if you used HTML as your media type, you could just not include the forms to create/update the price |
| 13:17 |
|
a_c_m |
trygvis: true |
| 13:18 |
|
a_c_m |
if we show the endpoint to have the 3 fields, but then error if you try to set price, its going to be confusing / bad dx |
| 13:19 |
|
trygvis |
I guess it comes down to the capabilities of your hypermedia |
| 13:48 |
|
|
pezra joined #rest |
| 14:08 |
|
saml |
trygvis, how do you do PUT or DELETE with html <form> ? use custom field like _method ? |
| 14:09 |
|
saml |
a_c_m, so all users can PUT /widget but only certain users can PUT with modified price? |
| 14:09 |
|
a_c_m |
yeah |
| 14:10 |
|
a_c_m |
exactly |
| 14:10 |
|
saml |
can't you just send 401 if I did PUT /widget with {"price": 2 //it was 1 before |
| 14:10 |
|
saml |
that probably means you can't cache response to PUT |
| 14:11 |
|
a_c_m |
i can - so i’m slowly worknig out what i have is a documentation issue not a rest issue :) |
| 14:11 |
|
saml |
doesn't make much sense to cache PUT requests |
| 14:11 |
|
a_c_m |
:) |
| 14:11 |
|
saml |
ah i see |
| 14:11 |
|
saml |
what do you use for documentation? |
| 14:11 |
|
saml |
swagger? |
| 14:13 |
|
a_c_m |
yes currently |
| 14:13 |
|
a_c_m |
reading http://zacstewart.com/2012/04/14/http-options-method.html right now - which is an intersting take on the issue |
| 14:24 |
|
a_c_m |
we are currently thinking about have a /schemas/ endpoint group |
| 14:24 |
|
a_c_m |
that would have /schemas/widget |
| 14:24 |
|
a_c_m |
and which would return a json objects showing what the user who made that request could do |
| 14:45 |
|
saml |
https://gist.github.com/saml/750f80796a6ac508de29 does this make sense? |
| 14:46 |
|
saml |
not sure if i should be putting "image" under "_embedded" |
| 14:46 |
|
saml |
or what should html representation should be |
| 14:46 |
|
_ollie |
usually, you find stuff in _embedded that is pointed to in the _links block on the root level… |
| 14:47 |
|
_ollie |
consider it to be some kind of "preview" of a linked-to resource… |
| 14:53 |
|
saml |
so an article has possible one or more images. how should i represent it? |
| 14:53 |
|
saml |
one of the images is primary image |
| 14:53 |
|
saml |
so an article has zero or one primary image |
| 14:53 |
|
saml |
oh i see |
| 14:56 |
|
|
danizord joined #rest |
| 14:57 |
|
saml |
so if article has a link to /images/a.jpg and client wants to change the main image of the article, should it PUT {"_links": {"image": {"href": "/images/b.jpg" ? |
| 15:05 |
|
|
cigarshark joined #rest |
| 15:11 |
|
|
cigarshark joined #rest |
| 15:37 |
|
|
tr3online joined #rest |
| 15:41 |
|
trygvis |
saml: you can't, the spec only allows GET and POST |
| 15:45 |
|
saml |
yah |
| 15:54 |
|
|
tr3online joined #rest |
| 16:03 |
|
|
pezra joined #rest |
| 16:38 |
|
|
systmkor joined #rest |
| 17:04 |
|
|
charlex joined #rest |
| 17:08 |
|
|
systmkor joined #rest |
| 17:28 |
|
|
_ollie joined #rest |
| 17:31 |
|
|
charlex joined #rest |
| 17:49 |
|
|
htowngangsta joined #rest |
| 17:56 |
|
|
tr3online joined #rest |
| 18:46 |
|
|
systmkor joined #rest |
| 18:58 |
|
|
_ollie joined #rest |
| 19:52 |
|
|
danizord joined #rest |
| 20:09 |
|
|
pezra joined #rest |
| 20:32 |
|
|
pezra1 joined #rest |
| 20:41 |
|
|
tr3online joined #rest |
| 21:26 |
|
|
systmkor joined #rest |
| 21:43 |
|
|
talios joined #rest |
| 21:58 |
|
|
pezra joined #rest |
| 22:02 |
|
|
systmkor joined #rest |
| 22:59 |
|
|
systmkor joined #rest |