Closed acka47 closed 5 years ago
I'm on a good way towards lobid v2. My plan is to remove the last dependency in June 2018. I'll let you know.
Shutdown is scheduled for 2018-10-31, see http://blog.lobid.org/2018/07/19/lobid-1-shutdown.html
To do:
/resource/{id}
, /organisation/{id}
, /subject/{id}
, /person/{id}
to lobid 2.0)
[edit @dr0i]:~note as subject
and person
had no direct ID access I did this for the parameter id=$ID
.~.../about
api.lobid.org
and lobid.org/api
to ~:question:~ https://lobid.org
[edit @dr0i]: lobid.org/api
is the api_1.0's page, you intended that?
Anything else, @dr0i , @fsteeg ?We also have to:
One option for redirecting the searches is to redirect them to the search endpoint of the respective new service:
/resource?{anything}
--> resources/search
/item?{anything}
--> resources/search
/organisation?{anything}
--> organisations/search
/subject?{anything}
--> /gnd/search
/person?{anything}
--> /gnd/search
Another option is to redirect them to the respective API documentation, e.g.:
/resource?{anything}
--> resources/api
Regarding the HTTP Status code I could not find a fitting code when redirecting multiple pages to one target page. My feeling is that 301 is probably the right code as well.
It probably would also make sense to somehow give developers some information during the redirect that the old API has shut down. But I don't know what is the best way to do this.
Did the rewriting. Note my two edits in the comment above. Re: redirect search URLs: went with the second's proposal
/resource?{anything} --> resources/api
Summary:
Some samples:
+1
This adds to the apache-conf, for 80 and 443:
# API 1.0 redirects
RewriteRule ^/resource/(.*)/about /resources/$1 [R=301,NE,L]
RewriteRule ^/resource/(.*) /resources/$1#! [R=301,NE,L]
RewriteCond %{QUERY_STRING} ^id=(.*)$
RewriteRule ^/resource$ /resources/%1#! [QSD,R=301,L,NE]
RewriteCond %{QUERY_STRING} ^.*$
RewriteRule ^/resource$ /resources/api [QSD,R=301,L]
RewriteRule ^/item/(.*)/about /items/$1 [R=301,NE,L]
RewriteRule ^/item/(.*) /items/$1#! [R=301,NE,L]
RewriteCond %{QUERY_STRING} ^id=(.*)$
RewriteRule ^/item$ /items/%1#! [QSD,R=301,L,NE]
RewriteCond %{QUERY_STRING} ^q=(.*)$
RewriteRule ^/item$ /resources/api [QSD,R=301,L,NE]
RewriteCond %{QUERY_STRING} ^.*$
RewriteRule ^/item$ /items/api [QSD,R=301,L]
RewriteRule ^/organisation/(.*)/about /organisations/$1 [R=301,NE,L]
RewriteRule ^/organisation/(.*) /organisations/$1#! [R=301,NE,L]
RewriteCond %{QUERY_STRING} ^id=(.*)$
RewriteRule ^/organisation$ /organisations/%1#! [QSD,R=301,L,NE]
RewriteCond %{QUERY_STRING} ^.*$
RewriteRule ^/organisation$ /organisations/api [QSD,R=301,L]
RewriteRule ^/(subject|person)/(.*)/about /gnd/$2 [R=301,NE,L]
RewriteRule ^/(subject|person)/(.*) /gnd/$2#! [R=301,NE,L]
RewriteCond %{QUERY_STRING} ^id=(.*)$
RewriteRule ^/(subject|person)$ /gnd/%1#! [QSD,R=301,L,NE]
RewriteCond %{QUERY_STRING} ^.*$
RewriteRule ^/(subject|person)$ /gnd/api [QSD,R=301,L]
RewriteCond %{QUERY_STRING} ^.*$
RewriteRule ^/search.* / [QSD,R=301,L]
RewriteRule ^/api / [R=301,L]
Note: ES-cluster at quaoar2/3 is stopped. Resolving https://github.com/hbz/lobid-resources/issues/947 the play instance is now also stopped.
Great to see that you shut down the old services. Can this issue now be closed or is something still missing?
With resolving https://github.com/hbz/lobid/issues/390 this issue can be closed.
The main user of the old service is @jschnasse. Here are some current statistics from emphytos:
As this almost exclusively traffic from inside the hbz, we can shut down access from outside hbz in May as discussed offline.