greptilian logo

IRC log for #rest, 2015-06-16

https://trygvis.io/rest-wiki/

| Channels | #rest index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
00:12 Coldblackice joined #rest
00:14 Coldblackice_ joined #rest
00:50 Fat-Zer_ left #rest
01:00 fuzzyhorns joined #rest
02:01 fuzzyhorns joined #rest
02:58 happyface joined #rest
03:00 baweaver joined #rest
03:19 fuzzyhorns joined #rest
03:50 fuzzy_horns joined #rest
04:51 fuzzyhorns joined #rest
05:39 fuzzy_horns joined #rest
06:41 _ollie joined #rest
06:43 Left_Turn joined #rest
07:28 fuzzy_horns joined #rest
07:38 Left_Turn joined #rest
09:16 fuzzy_horns joined #rest
09:18 quimrstorres joined #rest
09:25 xelhark_ joined #rest
09:26 xelhark_ left #rest
10:37 quimrstorres joined #rest
10:43 quimrsto_ joined #rest
10:43 _ollie joined #rest
11:05 interop_madness joined #rest
11:05 fuzzy_horns joined #rest
11:43 quimrstorres joined #rest
12:14 quimrstorres joined #rest
12:26 quimrstorres joined #rest
12:43 fuzzy_horns joined #rest
12:53 fumanchu joined #rest
13:29 fuzzy_horns joined #rest
13:34 kembrek joined #rest
13:38 kembrek I'm new to REST
13:38 kembrek Say I have a client that wants to create a User resource on the server
13:38 kembrek How might I explicate to the user the form that that User XML document would take in order for them to create a new one?
13:41 trygvis rest theory says that all that info is to be a part of an document that you fetch first
13:42 trygvis but often systems depend on link relations to figure out the URLs and use out-of-band descripts to explain the xml/json structures
13:42 trygvis it often depends on how generic you want your API to
13:43 kembrek thank you for your response, trygvis
13:43 kembrek how do you mean out-of-band descripts exactly?
13:44 trygvis a web page/pdf/word document somewhere
13:44 pdurbin kembrek: here it shows "body" is required for example: http://petstore.swagger.io/#!/pet/addPet ... out of band
13:47 nkoza joined #rest
13:47 kembrek pdurbin, I tried curl -X PUT http://petstore.swagger.io/pet/addPet and didn't receive anything back
13:48 pdurbin kembrek: try adding "-i"
13:48 _ollie swagger's ignoring hypermedia as much as it can. allows you to build http based services that have very little to do with rest.
13:48 quimrstorres joined #rest
13:51 kembrek is there a RESTful way of saying 'oh, so you wanted to add a pet but your BODY is empty. *This* is the format you should use to create a pet"
13:51 kembrek ?
13:53 pdurbin kembrek: you could return an error in English saying what to do... it sounds like you want something machine readable though.
13:54 kembrek pdurbin, I see! so you could return a hyperlink to something that points to the documentation for that resource type
13:54 kembrek it doesn't need to be machine readable, just comprehensible to a human
13:54 quimrsto_ joined #rest
13:55 trygvis kembrek: this is the response from our app when a user tried to create an invoice: http://pastie.org/private/ug7r77bvuls90vdthzpfsq
13:56 quimrst__ joined #rest
13:57 pdurbin trygvis: so you're going for human readable too. I don't know a better way.
13:57 _ollie you could expose a JSONSchema and link to that from the error
13:57 kembrek _ollie oh nice
13:58 trygvis pdurbin: definitely. there is hardly anything a machine can do with our error responses
13:59 kembrek this is only a postgrad project anyway so doubtless I will hack it together anyway
13:59 trygvis one thing we could do is to link to a HTML page describing the problem in more detail. and also create error codes, but that is mainly for searching/logging
13:59 fumanchu I try to include links in a standardized structure (like a JSON object) so clients that want to can code remediation in the form of following those links
14:00 kembrek neat! I feel less much better about the problem in hand now
14:00 kembrek thanks for all your input
14:11 warehouse13 joined #rest
15:15 quimrstorres joined #rest
15:20 quimrstorres joined #rest
15:54 quimrsto_ joined #rest
17:11 _ollie joined #rest
17:30 quimrstorres joined #rest
17:36 _ollie joined #rest
17:38 quimrsto_ joined #rest
18:06 quimrstorres joined #rest
20:01 quimrstorres joined #rest
21:06 fuzzy_horns joined #rest
21:18 Coldblackice_ joined #rest
21:55 fuzzyhorns joined #rest
23:04 fuzzyhorns joined #rest
23:07 fuzzy_horns joined #rest

| Channels | #rest index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

https://trygvis.io/rest-wiki/