Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] Can't make "DELETE /provisional_classes/:provisional_class_id" work

Thomas Rodenhausen thomas.rodenhausen at gmail.com
Mon Mar 24 09:10:34 PDT 2014


Hi Paul,
it doesn't work for me. Here's what I send and the response I get, can you
see a problem? I use jersey-client 2.7

Mar 24, 2014 8:56:43 AM org.glassfish.jersey.filter.LoggingFilter log
INFO: 3 * Sending client request on thread jersey-client-async-executor-0
3 > POST
http://data.bioontology.org/provisional_classes/b44a7a00-6751-0131-e6d9-005056010074
3 > Accept: application/json
3 > Authorization: apikey token={your key}
3 > Content-Type: application/json
3 > X-HTTP-Method-Override: PATCH
{"label":"test333","synonym":[],"definition":[],"subclassOf":null,"creator":"
http://data.bioontology.org/users/thomas.rodenhausen
","created":"2014-01-24T10:17:27-08:00","permanentId":null,"noteId":null,"ontology":[],"@id":"
http://data.bioontology.org/provisional_classes/b44a7a00-6751-0131-e6d9-005056010074
","@type":"http://data.bioontology.org/metadata/ProvisionalClass"}

Mar 24, 2014 8:56:43 AM org.glassfish.jersey.filter.LoggingFilter log
INFO: 4 * Client response received on thread jersey-client-async-executor-0
4 < 500
4 < Connection: keep-alive
4 < Content-Length: 30
4 < Content-Type: text/html;charset=utf-8
4 < Date: Mon, 24 Mar 2014 15:55:27 GMT
4 < Server: nginx/1.4.6
4 < Status: 500 Internal Server Error
4 < X-Content-Type-Options: nosniff
4 < X-Frame-Options: SAMEORIGIN
4 < X-Rack-Cache: invalidate, pass
4 < X-XSS-Protection: 1; mode=block
<h1>Internal Server Error</h1>


On Thu, Mar 20, 2014 at 6:31 PM, Paul R Alexander
<palexander at stanford.edu>wrote:

> Thomas,
>
> I just confirmed that this is working. In fact, if I send your exact
> request I get a valid response (204) and can verify that the label gets
> updated when I change it. Can you try again and send the response you're
> getting if it fails?
>
> Paul
>
>
> ----- Original Message -----
> From: "Thomas Rodenhausen" <thomas.rodenhausen at gmail.com>
> To: "Paul R Alexander" <palexander at stanford.edu>
> Cc: "Darren L Weber PhD" <darren.weber at stanford.edu>,
> support at bioontology.org
> Sent: Monday, March 17, 2014 9:35:33 AM
> Subject: Re: [bioontology-support] Can't make "DELETE
> /provisional_classes/:provisional_class_id" work
>
> Paul,,
>
> I'm still having difficulties doing the PATCH using X-HTTP-Method-Override.
> Is this supported by now and I'm doing something wrong, or is it still
> pending to be deployed?
>
> Thanks
>
>
> On Tue, Mar 4, 2014 at 11:43 AM, Paul R Alexander
> <palexander at stanford.edu>wrote:
>
> > Thomas,
> >
> > We don't currently support the use of X-HTTP-Method-Override. You may not
> > even know you are using it, some libraries like jQuery add this header
> > automatically to get around web browser's lack of support for HTTP verbs
> > besides GET and POST.
> >
> > I've implemented support for X-HTTP-Method-Override, though, and it
> should
> > be released this week. Doing the request via a direct HTTP PATCH (outside
> > of a browser using curl or via code) should currently work.
> >
> > Paul
> >
> >
> > On Mar 4, 2014, at 8:28 AM, Thomas Rodenhausen <
> > thomas.rodenhausen at gmail.com> wrote:
> >
> > Hi Darren,
> > since the fix has been pushed to production:
> >
> >  Thanks for asking, the PATCH fix has been pushed to production.
> >>
> >
> > Should it work already? Because it currently doesn't for me, maybe I'm
> > still doing something wrong?
> > Or if it shouldn't, is it reasonable to assume it will work until March
> > 14th?
> >
> >
> >> Can you provide more details on what your doing?
> >>
> >
> > Here's are the API call details:
> >
> > > POST
> >
> http://data.bioontology.org/provisional_classes/b44a7a00-6751-0131-e6d9-005056010074
> > > Accept: application/json
> > > Authorization: apikey token={your_token}
> > > Content-Type: application/json
> > > X-HTTP-Method-Override: PATCH
> >
> >
> {"label":"test123","synonym":[],"definition":[],"subclassOf":null,"creator":"
> > http://data.bioontology.org/users/thomas.rodenhausen
> >
> ","created":"2014-01-24T10:17:27-08:00","permanentId":null,"noteId":null,"ontology":[],"@id":"
> >
> http://data.bioontology.org/provisional_classes/b44a7a00-6751-0131-e6d9-005056010074
> > ","@type":"http://data.bioontology.org/metadata/ProvisionalClass"}
> >
> > < 500
> > < Connection: close
> > < Content-Length: 30
> > < Content-Type: text/html;charset=utf-8
> > < Date: Tue, 04 Mar 2014 16:19:13 GMT
> > < Status: 500 Internal Server Error
> > < X-Content-Type-Options: nosniff
> > < X-Frame-Options: SAMEORIGIN
> > < X-Rack-Cache: invalidate, pass
> > < X-XSS-Protection: 1; mode=block
> > <h1>Internal Server Error</h1>
> >
> >
> > Thanks,
> > Thomas
> >
> >
> >
> >
> >
> >
> >>
> >>
> >>
> >> On 2/26/14, 9:05 AM, Thomas Rodenhausen wrote:
> >>
> >> Hi Darren,
> >>
> >> I noticed that DELETE now works fine.
> >> For PATCH I still have the originally reported problem. Is this a known
> >> problem or am I maybe missing out on something?
> >>
> >>
> >> On Mon, Jan 27, 2014 at 9:10 AM, Thomas Rodenhausen <
> >> thomas.rodenhausen at gmail.com> wrote:
> >>
> >>> Thanks.
> >>>
> >>>  Just want to add the issue with PATCH below, which seems to be
> similar.
> >>>
> >>>  3 > GET
> >>>
> http://data.bioontology.org/provisional_classes/737af2a0-6751-0131-e6d9-005056010074
> >>>  3 > Accept: application/json
> >>> 3 > Authorization: apikey token=...
> >>>
> >>>  4 < 200
> >>> 4 < Age: 60
> >>> 4 < Cache-Control: public, max-age=60
> >>> 4 < Connection: close
> >>> 4 < Content-Length: 590
> >>> 4 < Content-Type: application/json;charset=utf-8
> >>> 4 < Date: Mon, 27 Jan 2014 16:04:24 GMT
> >>> 4 < Last-Modified: Fri, 24 Jan 2014 18:17:27 GMT
> >>> 4 < Status: 200 OK
> >>>  4 < Vary: User-Agent, Accept, Accept-Language, Accept-Encoding,
> >>> Authorization, NCBO-Slice
> >>>  4 < X-Content-Digest: 44212eef4fe92be0bcc402c637645f5e801d14a8
> >>>  4 < X-Content-Type-Options: nosniff
> >>> 4 < X-Rack-Cache: stale, valid, store
> >>>
> >>>
> {"label":"test2","synonym":[],"definition":[],"subclassOf":null,"creator":"
> >>> http://data.bioontology.org/users/thomas.rodenhausen
> >>>
> ","created":"2014-01-24T10:15:38-08:00","permanentId":null,"noteId":null,"ontology":[],"@id":"
> >>>
> http://data.bioontology.org/provisional_classes/737af2a0-6751-0131-e6d9-005056010074
> >>> ","@type":"http://data.bioontology.org/metadata/ProvisionalClass
> >>> ","@context":{"@vocab":"http://data.bioontology.org/metadata/
> >>> ","creator":{"@id":"http://data.bioontology.org/metadata/User
> >>> ","@type":"@id"},"ontology":{"@id":"
> >>> http://data.bioontology.org/metadata/Ontology","@type":"@id"}}}
> >>>
> >>>  5 > POST
> >>>
> http://data.bioontology.org/provisional_classes/737af2a0-6751-0131-e6d9-005056010074
> >>> 5 > Accept: application/json
> >>> 5 > Authorization: apikey token=...
> >>> 5 > Content-Type: application/json
> >>> 5 > X-HTTP-Method-Override: PATCH
> >>>
> >>>
> {"label":"test3","synonym":[],"definition":[],"subclassOf":null,"creator":"
> >>> http://data.bioontology.org/users/thomas.rodenhausen
> >>>
> ","created":"2014-01-24T10:15:38-08:00","permanentId":null,"noteId":null,"ontology":[],"@id":"
> >>>
> http://data.bioontology.org/provisional_classes/737af2a0-6751-0131-e6d9-005056010074
> >>> ","@type":"http://data.bioontology.org/metadata/ProvisionalClass"}
> >>>
> >>>  6 < 500
> >>> 6 < Connection: close
> >>> 6 < Content-Length: 30
> >>> 6 < Content-Type: text/html;charset=utf-8
> >>> 6 < Date: Mon, 27 Jan 2014 16:04:24 GMT
> >>>  6 < Status: 500 Internal Server Error
> >>> 6 < X-Content-Type-Options: nosniff
> >>> 6 < X-Frame-Options: SAMEORIGIN
> >>> 6 < X-Rack-Cache: invalidate, pass
> >>> 6 < X-XSS-Protection: 1; mode=block
> >>> <h1>Internal Server Error</h1>
> >>>
> >>>
> >>> On Thu, Jan 23, 2014 at 1:47 PM, Darren Weber <dlweber at stanford.edu
> >wrote:
> >>>
> >>>>
> >>>> Hi Thomas,
> >>>>
> >>>> A fix for this should be available in the next release.  Thanks for
> >>>> reporting the bug.
> >>>>
> >>>> Take care,
> >>>> Darren
> >>>>
> >>>> PS, details of the fix are at
> >>>>
> https://github.com/ncbo/ontologies_api/commit/0a0dddbfe7aec2db3d8c291bac5a1508351bea1c
> >>>>
> >>>>
> >>>>
> >>>> On 1/23/14, 11:07 AM, Thomas Rodenhausen wrote:
> >>>>
> >>>>  I had tried this before, it results in the same HTTP 500, see below.
> >>>> Also note that a GET for the URI returns a 404, that's why I had tried
> >>>> only the last part of the URI, which works at least for GET.
> >>>>
> >>>>  3 > DELETE
> >>>>
> http://data.bioontology.org/provisional_classes/http%3A%2F%2Fdata.bioontology.org%2Fprovisional_classes%2F4e3b6790-65eb-0131-7e69-005056010073
> >>>> 3 > Accept: application/json
> >>>> 3 > Authorization: apikey token=...
> >>>>
> >>>>  4 < 500
> >>>> 4 < Connection: close
> >>>> 4 < Content-Length: 30
> >>>> 4 < Content-Type: text/html;charset=utf-8
> >>>> 4 < Date: Thu, 23 Jan 2014 19:03:36 GMT
> >>>> 4 < Status: 500 Internal Server Error
> >>>> 4 < X-Content-Type-Options: nosniff
> >>>> 4 < X-Frame-Options: SAMEORIGIN
> >>>> 4 < X-Rack-Cache: invalidate, pass
> >>>> 4 < X-XSS-Protection: 1; mode=block
> >>>> <h1>Internal Server Error</h1>
> >>>>
> >>>>  1 > GET
> >>>>
> http://data.bioontology.org/provisional_classes/http%3A%2F%2Fdata.bioontology.org%2Fprovisional_classes%2F4e3b6790-65eb-0131-7e69-005056010073
> >>>> 1 > Accept: application/json
> >>>> 1 > Authorization: apikey token=...
> >>>>
> >>>>  2 < 404
> >>>> 2 < Age: 0
> >>>> 2 < Cache-Control: public, max-age=60
> >>>> 2 < Connection: close
> >>>> 2 < Content-Length: 140
> >>>> 2 < Content-Type: application/json;charset=utf-8
> >>>> 2 < Date: Thu, 23 Jan 2014 19:05:27 GMT
> >>>> 2 < Last-Modified: Wed, 22 Jan 2014 23:38:27 GMT
> >>>> 2 < Status: 404 Not Found
> >>>> 2 < Vary: User-Agent, Accept, Accept-Language, Accept-Encoding,
> >>>> Authorization, NCBO-Slice
> >>>> 2 < X-Content-Digest: 2d9b8c551b17ead68f6a51e042464baab321c87a
> >>>> 2 < X-Content-Type-Options: nosniff
> >>>> 2 < X-Rack-Cache: miss, store
> >>>> {"errors":["Provisional class
> >>>>
> http://data.bioontology.org/provisional_classes/4e3b6790-65eb-0131-7e69-005056010073notfound"],"status":404}
> >>>>
> >>>>
> >>>>
> >>>> On Thu, Jan 23, 2014 at 11:58 AM, Darren Weber <dlweber at stanford.edu
> >wrote:
> >>>>
> >>>>>
> >>>>> Hi Thomas,
> >>>>>
> >>>>> Looking at the documentation at
> >>>>> http://data.bioontology.org/documentation#ProvisionalClass
> >>>>>
> >>>>> There is a DELETE method available.  The URI takes the form:
> >>>>>
> >>>>> {service_endpoint}/{resource_id}
> >>>>>
> >>>>> where {resource_id} is a full URI; translating for this example we
> get:
> >>>>>
> >>>>> service_endpoint = http://data.bioontology.org/provisional_classes/
> >>>>> resource_id =
> >>>>>
> http://data.bioontology.org/provisional_classes/4e3b6790-65eb-0131-7e69-005056010073
> >>>>> resource_id_encoded = http%3A%2F%2Fdata.bioontology.org<
> http://2fdata.bioontology.org/>
> >>>>> %2Fprovisional_classes%2F4e3b6790-65eb-0131-7e69-005056010073
> >>>>>
> >>>>> (Encoding the resource_id can be done with various tools; for this
> >>>>> example, I've used http://meyerweb.com/eric/tools/dencoder/.)
> >>>>>
> >>>>> So, the full URI for the DELETE looks like this:
> >>>>>
> >>>>>
> >>>>>
> http://data.bioontology.org/provisional_classes/http%3A%2F%2Fdata.bioontology.org%2Fprovisional_classes%2F4e3b6790-65eb-0131-7e69-005056010073
> >>>>>
> >>>>> Hope that helps,
> >>>>>
> >>>>> Darren
> >>>>>
> >>>>>
> >>>>>
> >>>>> On 1/23/14, 8:49 AM, Thomas Rodenhausen wrote:
> >>>>>
> >>>>>   Hi,
> >>>>>
> >>>>>  see below I can't make this work, although a GET on the same URI
> >>>>> does. Can you tell me what I am doing wrong?
> >>>>>
> >>>>>  Also tried
> >>>>> - paths including the colon
> >>>>> - the full blown id string e.g.
> >>>>>
> http://data.bioontology.org/provisional_classes/4e3b6790-65eb-0131-7e69-005056010073
> >>>>> - apikey as query string instead of authorization header
> >>>>>
> >>>>>  Thank you
> >>>>>
> >>>>>
> >>>>>  1 > GET
> >>>>>
> http://data.bioontology.org/provisional_classes/4e3b6790-65eb-0131-7e69-005056010073
> >>>>> 1 > Accept: application/json
> >>>>> 1 > Authorization: apikey token=...
> >>>>>
> >>>>>  2 < 200
> >>>>> 2 < Age: 60
> >>>>> 2 < Cache-Control: public, max-age=60
> >>>>> 2 < Connection: close
> >>>>> 2 < Content-Length: 589
> >>>>> 2 < Content-Type: application/json;charset=utf-8
> >>>>> 2 < Date: Thu, 23 Jan 2014 16:18:58 GMT
> >>>>> 2 < Last-Modified: Wed, 22 Jan 2014 23:38:27 GMT
> >>>>> 2 < Status: 200 OK
> >>>>> 2 < Vary: User-Agent, Accept, Accept-Language, Accept-Encoding,
> >>>>> Authorization, NCBO-Slice
> >>>>> 2 < X-Content-Digest: 07c5d1cec4fc52329ff7371eebe8e07cfa25931b
> >>>>> 2 < X-Content-Type-Options: nosniff
> >>>>> 2 < X-Rack-Cache: stale, valid, store
> >>>>>
> >>>>>
> {"label":"test","synonym":[],"definition":[],"subclassOf":null,"creator":"
> >>>>> http://data.bioontology.org/users/thomas.rodenhausen
> >>>>>
> ","created":"2014-01-22T15:31:56-08:00","permanentId":null,"noteId":null,"ontology":[],"@id":"
> >>>>>
> http://data.bioontology.org/provisional_classes/4e3b6790-65eb-0131-7e69-005056010073
> >>>>> ","@type":"http://data.bioontology.org/metadata/ProvisionalClass
> >>>>> ","@context":{"@vocab":"http://data.bioontology.org/metadata/
> >>>>> ","creator":{"@id":"http://data.bioontology.org/metadata/User
> >>>>> ","@type":"@id"},"ontology":{"@id":"
> >>>>> http://data.bioontology.org/metadata/Ontology","@type":"@id"}}}
> >>>>>
> >>>>>  3 > DELETE
> >>>>>
> http://data.bioontology.org/provisional_classes/4e3b6790-65eb-0131-7e69-005056010073
> >>>>> 3 > Accept: application/json
> >>>>> 3 > Authorization: apikey token=...
> >>>>>
> >>>>>  4 < 500
> >>>>> 4 < Connection: close
> >>>>> 4 < Content-Length: 30
> >>>>> 4 < Content-Type: text/html;charset=utf-8
> >>>>> 4 < Date: Thu, 23 Jan 2014 16:20:35 GMT
> >>>>> 4 < Status: 500 Internal Server Error
> >>>>> 4 < X-Content-Type-Options: nosniff
> >>>>> 4 < X-Frame-Options: SAMEORIGIN
> >>>>> 4 < X-Rack-Cache: invalidate, pass
> >>>>> 4 < X-XSS-Protection: 1; mode=block
> >>>>> <h1>Internal Server Error</h1>
> >>>>>
> >>>>>
> >>>>>   _______________________________________________
> >>>>> bioontology-support mailing listbioontology-support
> @lists.stanford.eduhttps://
> mailman.stanford.edu/mailman/listinfo/bioontology-support
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>
> >>
> > _______________________________________________
> > bioontology-support mailing list
> > bioontology-support at lists.stanford.edu
> > https://mailman.stanford.edu/mailman/listinfo/bioontology-support
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20140324/f2fb2c65/attachment-0001.html>


More information about the bioontology-support mailing list