ropensci / patentsview

An R client to the PatentsView API
https://docs.ropensci.org/patentsview
Other
32 stars 9 forks source link

Upcoming api endpoint url changes #21

Closed mustberuss closed 4 years ago

mustberuss commented 4 years ago

Hi, In July the patentsview team announced that they will be moving the API to AWS Beanstalk, effective September 1, 2020. I participated in pilot, where they removed /api from the endpoint urls. I thought it was only for the pilot but I just found out the change will be permanent. I asked if there will be redirects or if the old urls will return 404s but I haven't heard back yet. I thought I would mention it here, sorry for the short notice!

mustberuss commented 4 years ago

I heard back that the existing urls will send back 308 permanent redirects.

crew102 commented 4 years ago

Hi @mustberuss , thanks for the heads up. I guess this should be a pretty easy fix when the time comes. I'll try to remember to update the package in a few weeks.

mustberuss commented 4 years ago

@crew102 the api change was made this morning. It's returning 301s on the old urls and R seems to deal with it fine. In addition to the /api being removed, the www was changed to api. The patent endpoint is now https://api.patentsview.org/patents/query though the documentation seems to be lagging.

crew102 commented 4 years ago

OK, so it sounds like no changes need to be made to the package then?

mustberuss commented 4 years ago

Hi @crew102, I ran one of the examples and it worked but I think it's because it's doing a GET by default. If I try to explicitly do a post it didn't work: search_pv(query = qry_funs$gt(patent_num_cited_by_us_patents = 500), method = "POST") Guessing the body might get lost on the redirect or maybe something else is going on.

mustberuss commented 4 years ago

@crew102 I just ran into another problem. The redirects sent back from the uspc, cpc and nber endpoints are wrong and result in 404s. I'll report it to the api team but thought you'd want to know too.

mustberuss commented 4 years ago

I opened https://github.com/CSSIP-AIR/PatentsView-API/issues/48 for this

crew102 commented 4 years ago

K thanks. I opened https://github.com/CSSIP-AIR/PatentsView-API/issues/49 related to the problem with POST method.

crew102 commented 4 years ago

Closed by #22. Thanks @mustberuss