From 85872b263e1552d3b33969cc92a76b85c3d46480 Mon Sep 17 00:00:00 2001 From: Florian M Date: Fri, 26 Oct 2018 10:29:22 +0200 Subject: [PATCH 1/7] Revert "Add debugging methods to visualize wireframe of buckets (#3402)" This reverts commit 8238820f2e1b5272cc80e37b8073ce1b2c5de60e. From f76571e67ca07f043c8db855134e64d586326c3c Mon Sep 17 00:00:00 2001 From: Florian M Date: Fri, 26 Oct 2018 10:29:22 +0200 Subject: [PATCH 2/7] Revert "fixed bug that selects a just removed layout (#3379)" This reverts commit 8b16ef337cfe6412e82f881ec046e060d2fe7e0e. From d7ff71681dd48fbbc7fffb53b31c3516a875bb20 Mon Sep 17 00:00:00 2001 From: Florian M Date: Fri, 26 Oct 2018 10:29:22 +0200 Subject: [PATCH 3/7] Revert "Added button to revoke admin rights in frontend (#3378)" This reverts commit 2fc489c3b3e37081bfeef41c38fa757183485cbf. From 0683c0c546580524caea8b4231917fa95b9a6101 Mon Sep 17 00:00:00 2001 From: Florian M Date: Fri, 26 Oct 2018 10:29:22 +0200 Subject: [PATCH 4/7] Revert "Revert "Add REST API versioning support (#3385)" (#3404)" This reverts commit 49819b2100931f8093bb1e9e04f943ba3861f7a6. --- app/controllers/LegacyApiController.scala | 12 ++ conf/routes | 4 +- conf/webknossos.routes | 245 +++++++++++----------- conf/webknossosApi.routes | 13 ++ 4 files changed, 150 insertions(+), 124 deletions(-) create mode 100644 app/controllers/LegacyApiController.scala create mode 100644 conf/webknossosApi.routes diff --git a/app/controllers/LegacyApiController.scala b/app/controllers/LegacyApiController.scala new file mode 100644 index 00000000000..78839a35f46 --- /dev/null +++ b/app/controllers/LegacyApiController.scala @@ -0,0 +1,12 @@ +package controllers + +import com.mohiva.play.silhouette.api.Silhouette +import javax.inject.Inject +import oxalis.security.WkEnv +import utils.WkConf + +class LegacyApiController @Inject()(conf: WkConf, + sil: Silhouette[WkEnv]) extends Controller { + + +} diff --git a/conf/routes b/conf/routes index 28683ebc3ac..c890c9bd433 100644 --- a/conf/routes +++ b/conf/routes @@ -1,3 +1,5 @@ --> / webknossos.Routes +GET /assets/*file controllers.Assets.at(path="/public", file) + +-> /api/ webknossosApi.Routes -> /data/ com.scalableminds.webknossos.datastore.Routes -> /tracings/ com.scalableminds.webknossos.tracingstore.Routes diff --git a/conf/webknossos.routes b/conf/webknossos.routes index b9015252096..74bab731066 100644 --- a/conf/webknossos.routes +++ b/conf/webknossos.routes @@ -2,161 +2,160 @@ # This file defines all application routes (Higher priority routes first) # ~~~~ -GET /api/buildinfo controllers.Application.buildInfo -GET /api/features controllers.Application.features -POST /api/analytics/:namespace controllers.Application.analytics(namespace) -POST /api/triggers/initialData controllers.InitialDataController.triggerInsert -GET /api/maintenance controllers.MaintenanceController.info -POST /api/maintenance controllers.MaintenanceController.initMaintenance -DELETE /api/maintenance controllers.MaintenanceController.closeMaintenance +GET /assets/*file controllers.Assets.at(path="/public", file) + +GET /buildinfo controllers.Application.buildInfo +GET /features controllers.Application.features +POST /analytics/:namespace controllers.Application.analytics(namespace) +POST /triggers/initialData controllers.InitialDataController.triggerInsert +GET /maintenance controllers.MaintenanceController.info +POST /maintenance controllers.MaintenanceController.initMaintenance +DELETE /maintenance controllers.MaintenanceController.closeMaintenance # Authentication -GET /api/auth/autoLogin controllers.Authentication.autoLogin -POST /api/auth/register controllers.Authentication.handleRegistration -POST /api/auth/login controllers.Authentication.authenticate -GET /api/auth/token controllers.Authentication.getToken -DELETE /api/auth/token controllers.Authentication.deleteToken -GET /api/auth/switch controllers.Authentication.switchTo(to: String) -POST /api/auth/startResetPassword controllers.Authentication.handleStartResetPassword -POST /api/auth/changePassword controllers.Authentication.changePassword -POST /api/auth/resetPassword controllers.Authentication.handleResetPassword -GET /api/auth/logout controllers.Authentication.logout -GET /api/auth/sso controllers.Authentication.singleSignOn(sso: String, sig: String) -POST /api/auth/createOrganizationWithAdmin controllers.Authentication.createOrganizationWithAdmin +GET /auth/autoLogin controllers.Authentication.autoLogin +POST /auth/register controllers.Authentication.handleRegistration +POST /auth/login controllers.Authentication.authenticate +GET /auth/token controllers.Authentication.getToken +DELETE /auth/token controllers.Authentication.deleteToken +GET /auth/switch controllers.Authentication.switchTo(to: String) +POST /auth/startResetPassword controllers.Authentication.handleStartResetPassword +POST /auth/changePassword controllers.Authentication.changePassword +POST /auth/resetPassword controllers.Authentication.handleResetPassword +GET /auth/logout controllers.Authentication.logout +GET /auth/sso controllers.Authentication.singleSignOn(sso: String, sig: String) +POST /auth/createOrganizationWithAdmin controllers.Authentication.createOrganizationWithAdmin # Configurations -GET /api/user/userConfiguration controllers.ConfigurationController.read -PUT /api/user/userConfiguration controllers.ConfigurationController.update -GET /api/dataSetConfigurations/:organizationName/:dataSetName controllers.ConfigurationController.readDataSet(organizationName: String, dataSetName: String) -PUT /api/dataSetConfigurations/:organizationName/:dataSetName controllers.ConfigurationController.updateDataSet(organizationName: String, dataSetName: String) -GET /api/dataSetConfigurations/default/:organizationName/:dataSetName controllers.ConfigurationController.readDataSetDefault(organizationName: String, dataSetName: String) -PUT /api/dataSetConfigurations/default/:organizationName/:dataSetName controllers.ConfigurationController.updateDataSetDefault(organizationName: String, dataSetName: String) +GET /user/userConfiguration controllers.ConfigurationController.read +PUT /user/userConfiguration controllers.ConfigurationController.update +GET /dataSetConfigurations/:organizationName/:dataSetName controllers.ConfigurationController.readDataSet(organizationName: String, dataSetName: String) +PUT /dataSetConfigurations/:organizationName/:dataSetName controllers.ConfigurationController.updateDataSet(organizationName: String, dataSetName: String) +GET /dataSetConfigurations/default/:organizationName/:dataSetName controllers.ConfigurationController.readDataSetDefault(organizationName: String, dataSetName: String) +PUT /dataSetConfigurations/default/:organizationName/:dataSetName controllers.ConfigurationController.updateDataSetDefault(organizationName: String, dataSetName: String) # Users -POST /api/user/tasks/request controllers.TaskController.request -GET /api/user/tasks/peek controllers.TaskController.peekNext - -GET /api/users controllers.UserController.list -GET /api/user controllers.UserController.current -GET /api/user/tasks controllers.UserController.tasks(isFinished: Option[Boolean], limit: Option[Int]) -GET /api/user/annotations controllers.UserController.annotations(isFinished: Option[Boolean], limit: Option[Int]) -GET /api/user/loggedTime controllers.UserController.loggedTime -GET /api/users/:id controllers.UserController.user(id: String) -PUT /api/users/:id controllers.UserController.update(id: String) -GET /api/users/:id/tasks controllers.UserController.userTasks(id: String, isFinished: Option[Boolean], limit: Option[Int]) -GET /api/users/:id/loggedTime controllers.UserController.userLoggedTime(id: String) -POST /api/users/loggedTime controllers.UserController.usersLoggedTime -GET /api/users/:id/annotations controllers.UserController.userAnnotations(id: String, isFinished: Option[Boolean], limit: Option[Int]) +POST /user/tasks/request controllers.TaskController.request +GET /user/tasks/peek controllers.TaskController.peekNext + +GET /users controllers.UserController.list +GET /user controllers.UserController.current +GET /user/tasks controllers.UserController.tasks(isFinished: Option[Boolean], limit: Option[Int]) +GET /user/annotations controllers.UserController.annotations(isFinished: Option[Boolean], limit: Option[Int]) +GET /user/loggedTime controllers.UserController.loggedTime +GET /users/:id controllers.UserController.user(id: String) +PUT /users/:id controllers.UserController.update(id: String) +GET /users/:id/tasks controllers.UserController.userTasks(id: String, isFinished: Option[Boolean], limit: Option[Int]) +GET /users/:id/loggedTime controllers.UserController.userLoggedTime(id: String) +POST /users/loggedTime controllers.UserController.usersLoggedTime +GET /users/:id/annotations controllers.UserController.userAnnotations(id: String, isFinished: Option[Boolean], limit: Option[Int]) # Team -GET /api/teams controllers.TeamController.list -POST /api/teams controllers.TeamController.create -DELETE /api/teams/:id controllers.TeamController.delete(id: String) -GET /api/teams/:id/openTasksOverview controllers.ReportController.openTasksOverview(id: String) -GET /api/teams/:id/progressOverview controllers.ReportController.projectProgressOverview(id: String) +GET /teams controllers.TeamController.list +POST /teams controllers.TeamController.create +DELETE /teams/:id controllers.TeamController.delete(id: String) +GET /teams/:id/openTasksOverview controllers.ReportController.openTasksOverview(id: String) +GET /teams/:id/progressOverview controllers.ReportController.projectProgressOverview(id: String) # DataSets -POST /api/datasets/:organizationName/:dataSetName/createExplorational controllers.AnnotationController.createExplorational(organizationName: String, dataSetName: String) -GET /api/datasets controllers.DataSetController.list -POST /api/datasets controllers.DataSetController.create(typ: String) -POST /api/datasets/addForeign controllers.DataSetController.addForeignDataStoreAndDataSet -GET /api/datasets/disambiguate/:dataSetName/toNew controllers.DataSetController.getOrganizationForDataSet(dataSetName: String) -GET /api/datasets/:organizationName/:dataSetName/health controllers.DataSetController.health(organizationName: String, dataSetName: String, sharingToken: Option[String]) -PATCH /api/datasets/:organizationName/:dataSetName controllers.DataSetController.update(organizationName: String, dataSetName: String) -GET /api/datasets/:organizationName/:dataSetName/accessList controllers.DataSetController.accessList(organizationName: String, dataSetName: String) -GET /api/datasets/:organizationName/:dataSetName/sharingToken controllers.DataSetController.getSharingToken(organizationName: String, dataSetName: String) -DELETE /api/datasets/:organizationName/:dataSetName/sharingToken controllers.DataSetController.deleteSharingToken(organizationName: String, dataSetName: String) -PATCH /api/datasets/:organizationName/:dataSetName/teams controllers.DataSetController.updateTeams(organizationName: String, dataSetName: String) -GET /api/datasets/:organizationName/:dataSetName/layers/:layer/thumbnail controllers.DataSetController.thumbnail(organizationName: String, dataSetName: String, layer: String, w: Option[Int], h: Option[Int]) -GET /api/datasets/:organizationName/:dataSetName/isValidNewName controllers.DataSetController.isValidNewName(organizationName: String, dataSetName: String) -GET /api/datasets/:organizationName/:dataSetName controllers.DataSetController.read(organizationName: String, dataSetName: String, sharingToken: Option[String]) +POST /datasets/:organizationName/:dataSetName/createExplorational controllers.AnnotationController.createExplorational(organizationName: String, dataSetName: String) +GET /datasets controllers.DataSetController.list +POST /datasets controllers.DataSetController.create(typ: String) +POST /datasets/addForeign controllers.DataSetController.addForeignDataStoreAndDataSet +GET /datasets/disambiguate/:dataSetName/toNew controllers.DataSetController.getOrganizationForDataSet(dataSetName: String) +GET /datasets/:organizationName/:dataSetName/health controllers.DataSetController.health(organizationName: String, dataSetName: String, sharingToken: Option[String]) +PATCH /datasets/:organizationName/:dataSetName controllers.DataSetController.update(organizationName: String, dataSetName: String) +GET /datasets/:organizationName/:dataSetName/accessList controllers.DataSetController.accessList(organizationName: String, dataSetName: String) +GET /datasets/:organizationName/:dataSetName/sharingToken controllers.DataSetController.getSharingToken(organizationName: String, dataSetName: String) +DELETE /datasets/:organizationName/:dataSetName/sharingToken controllers.DataSetController.deleteSharingToken(organizationName: String, dataSetName: String) +PATCH /datasets/:organizationName/:dataSetName/teams controllers.DataSetController.updateTeams(organizationName: String, dataSetName: String) +GET /datasets/:organizationName/:dataSetName/layers/:layer/thumbnail controllers.DataSetController.thumbnail(organizationName: String, dataSetName: String, layer: String, w: Option[Int], h: Option[Int]) +GET /datasets/:organizationName/:dataSetName/isValidNewName controllers.DataSetController.isValidNewName(organizationName: String, dataSetName: String) +GET /datasets/:organizationName/:dataSetName controllers.DataSetController.read(organizationName: String, dataSetName: String, sharingToken: Option[String]) # Datastores -GET /api/datastores controllers.DataStoreController.list -PUT /api/datastores/:name/datasource controllers.WKDataStoreController.updateOne(name: String) -PUT /api/datastores/:name/datasources controllers.WKDataStoreController.updateAll(name: String) -PATCH /api/datastores/:name/status controllers.WKDataStoreController.statusUpdate(name: String) -POST /api/datastores/:name/verifyUpload controllers.WKDataStoreController.validateDataSetUpload(name: String) -POST /api/datastores/:name/validateUserAccess controllers.UserTokenController.validateAccessViaDatastore(name: String, token: String) +GET /datastores controllers.DataStoreController.list +PUT /datastores/:name/datasource controllers.WKDataStoreController.updateOne(name: String) +PUT /datastores/:name/datasources controllers.WKDataStoreController.updateAll(name: String) +PATCH /datastores/:name/status controllers.WKDataStoreController.statusUpdate(name: String) +POST /datastores/:name/verifyUpload controllers.WKDataStoreController.validateDataSetUpload(name: String) +POST /datastores/:name/validateUserAccess controllers.UserTokenController.validateAccessViaDatastore(name: String, token: String) # Tracingstores -GET /api/tracingstore controllers.WKTracingStoreController.listOne -POST /api/tracingstores/:name/handleTracingUpdateReport controllers.WKTracingStoreController.handleTracingUpdateReport(name: String) -POST /api/tracingstores/:name/validateUserAccess controllers.UserTokenController.validateAccessViaTracingstore(name: String, token: String) +GET /tracingstore controllers.WKTracingStoreController.listOne +POST /tracingstores/:name/handleTracingUpdateReport controllers.WKTracingStoreController.handleTracingUpdateReport(name: String) +POST /tracingstores/:name/validateUserAccess controllers.UserTokenController.validateAccessViaTracingstore(name: String, token: String) # User access tokens for datastore authentification -POST /api/userToken/generate controllers.UserTokenController.generateTokenForDataStore +POST /userToken/generate controllers.UserTokenController.generateTokenForDataStore # Annotations -POST /api/annotations/upload controllers.AnnotationIOController.upload -POST /api/annotations/:typ/:id/duplicate controllers.AnnotationController.duplicate(typ: String, id: String) -PATCH /api/annotations/:typ/:id/edit controllers.AnnotationController.editAnnotation(typ: String, id: String) +POST /annotations/upload controllers.AnnotationIOController.upload +POST /annotations/:typ/:id/duplicate controllers.AnnotationController.duplicate(typ: String, id: String) +PATCH /annotations/:typ/:id/edit controllers.AnnotationController.editAnnotation(typ: String, id: String) -PATCH /api/annotations/:typ/:id/finish controllers.AnnotationController.finish(typ: String, id: String) -PATCH /api/annotations/:typ/finish controllers.AnnotationController.finishAll(typ: String) -PATCH /api/annotations/:typ/:id/reopen controllers.AnnotationController.reopen(typ: String, id: String) -PUT /api/annotations/:typ/:id/reset controllers.AnnotationController.reset(typ: String, id: String) -PATCH /api/annotations/:typ/:id/transfer controllers.AnnotationController.transfer(typ: String, id: String) +PATCH /annotations/:typ/:id/finish controllers.AnnotationController.finish(typ: String, id: String) +PATCH /annotations/:typ/finish controllers.AnnotationController.finishAll(typ: String) +PATCH /annotations/:typ/:id/reopen controllers.AnnotationController.reopen(typ: String, id: String) +PUT /annotations/:typ/:id/reset controllers.AnnotationController.reset(typ: String, id: String) +PATCH /annotations/:typ/:id/transfer controllers.AnnotationController.transfer(typ: String, id: String) -GET /api/annotations/:typ/:id/info controllers.AnnotationController.info(typ: String, id: String) -PATCH /api/annotations/:typ/:id/makeHybrid controllers.AnnotationController.makeHybrid(typ: String, id: String) -DELETE /api/annotations/:typ/:id controllers.AnnotationController.cancel(typ: String, id: String) -POST /api/annotations/:typ/:id/merge/:mergedTyp/:mergedId controllers.AnnotationController.merge(typ: String, id: String, mergedTyp: String, mergedId: String) -GET /api/annotations/:typ/:id/download controllers.AnnotationIOController.download(typ: String, id: String) +GET /annotations/:typ/:id/info controllers.AnnotationController.info(typ: String, id: String) +PATCH /annotations/:typ/:id/makeHybrid controllers.AnnotationController.makeHybrid(typ: String, id: String) +DELETE /annotations/:typ/:id controllers.AnnotationController.cancel(typ: String, id: String) +POST /annotations/:typ/:id/merge/:mergedTyp/:mergedId controllers.AnnotationController.merge(typ: String, id: String, mergedTyp: String, mergedId: String) +GET /annotations/:typ/:id/download controllers.AnnotationIOController.download(typ: String, id: String) -GET /api/annotations/:typ/:id/loggedTime controllers.AnnotationController.loggedTime(typ: String, id: String) +GET /annotations/:typ/:id/loggedTime controllers.AnnotationController.loggedTime(typ: String, id: String) # Tasks -POST /api/tasks controllers.TaskController.create -POST /api/tasks/createFromFiles controllers.TaskController.createFromFiles -POST /api/tasks/list controllers.TaskController.listTasks -GET /api/tasks/experienceDomains controllers.TaskController.listExperienceDomains -GET /api/tasks/:id controllers.TaskController.read(id: String) -DELETE /api/tasks/:id controllers.TaskController.delete(id: String) -PUT /api/tasks/:id controllers.TaskController.update(id: String) -GET /api/tasks/:id/annotations controllers.AnnotationController.annotationsForTask(id: String) +POST /tasks controllers.TaskController.create +POST /tasks/createFromFiles controllers.TaskController.createFromFiles +POST /tasks/list controllers.TaskController.listTasks +GET /tasks/experienceDomains controllers.TaskController.listExperienceDomains +GET /tasks/:id controllers.TaskController.read(id: String) +DELETE /tasks/:id controllers.TaskController.delete(id: String) +PUT /tasks/:id controllers.TaskController.update(id: String) +GET /tasks/:id/annotations controllers.AnnotationController.annotationsForTask(id: String) # TaskTypes -GET /api/taskTypes controllers.TaskTypeController.list -POST /api/taskTypes controllers.TaskTypeController.create -DELETE /api/taskTypes/:id controllers.TaskTypeController.delete(id: String) -GET /api/taskTypes/:id/tasks controllers.TaskController.listTasksForType(id: String) -GET /api/taskTypes/:id controllers.TaskTypeController.get(id: String) -PUT /api/taskTypes/:id controllers.TaskTypeController.update(id: String) +GET /taskTypes controllers.TaskTypeController.list +POST /taskTypes controllers.TaskTypeController.create +DELETE /taskTypes/:id controllers.TaskTypeController.delete(id: String) +GET /taskTypes/:id/tasks controllers.TaskController.listTasksForType(id: String) +GET /taskTypes/:id controllers.TaskTypeController.get(id: String) +PUT /taskTypes/:id controllers.TaskTypeController.update(id: String) # Scripts -GET /api/scripts controllers.ScriptController.list -POST /api/scripts controllers.ScriptController.create -GET /api/scripts/:id controllers.ScriptController.get(id: String) -PUT /api/scripts/:id controllers.ScriptController.update(id: String) -DELETE /api/scripts/:id controllers.ScriptController.delete(id: String) +GET /scripts controllers.ScriptController.list +POST /scripts controllers.ScriptController.create +GET /scripts/:id controllers.ScriptController.get(id: String) +PUT /scripts/:id controllers.ScriptController.update(id: String) +DELETE /scripts/:id controllers.ScriptController.delete(id: String) # Projects -GET /api/projects controllers.ProjectController.list -GET /api/projects/assignments controllers.ProjectController.listWithStatus -POST /api/projects controllers.ProjectController.create -GET /api/projects/:name controllers.ProjectController.read(name: String) -DELETE /api/projects/:name controllers.ProjectController.delete(name: String) -PUT /api/projects/:name controllers.ProjectController.update(name: String) -GET /api/projects/:name/tasks controllers.ProjectController.tasksForProject(name: String) -PATCH /api/projects/:name/incrementEachTasksInstances controllers.ProjectController.incrementEachTasksInstances(name: String, delta: Option[Long]) -PATCH /api/projects/:name/pause controllers.ProjectController.pause(name: String) -PATCH /api/projects/:name/resume controllers.ProjectController.resume(name: String) -GET /api/projects/:name/usersWithActiveTasks controllers.ProjectController.usersWithActiveTasks(name:String) -POST /api/projects/:name/transferActiveTasks controllers.ProjectController.transferActiveTasks(name:String) +GET /projects controllers.ProjectController.list +GET /projects/assignments controllers.ProjectController.listWithStatus +POST /projects controllers.ProjectController.create +GET /projects/:name controllers.ProjectController.read(name: String) +DELETE /projects/:name controllers.ProjectController.delete(name: String) +PUT /projects/:name controllers.ProjectController.update(name: String) +GET /projects/:name/tasks controllers.ProjectController.tasksForProject(name: String) +PATCH /projects/:name/incrementEachTasksInstances controllers.ProjectController.incrementEachTasksInstances(name: String, delta: Option[Long]) +PATCH /projects/:name/pause controllers.ProjectController.pause(name: String) +PATCH /projects/:name/resume controllers.ProjectController.resume(name: String) +GET /projects/:name/usersWithActiveTasks controllers.ProjectController.usersWithActiveTasks(name:String) +POST /projects/:name/transferActiveTasks controllers.ProjectController.transferActiveTasks(name:String) # Statistics -GET /api/statistics/webknossos controllers.StatisticsController.webKnossos(interval: String, start: Option[Long], end: Option[Long]) -GET /api/statistics/users controllers.StatisticsController.users(interval: String, start: Option[Long], end: Option[Long], limit: Int) - -# Map static resources from the /public folder to the /public path -GET /assets/*file controllers.Assets.at(path="/public", file) +GET /statistics/webknossos controllers.StatisticsController.webKnossos(interval: String, start: Option[Long], end: Option[Long]) +GET /statistics/users controllers.StatisticsController.users(interval: String, start: Option[Long], end: Option[Long], limit: Int) #Organizations -GET /api/organizations controllers.OrganizationController.listAllOrganizations -GET /api/operatorData controllers.OrganizationController.getOperatorData +GET /organizations controllers.OrganizationController.listAllOrganizations +GET /operatorData controllers.OrganizationController.getOperatorData #Timelogging -GET /api/time/allusers/:year/:month controllers.TimeController.getWorkingHoursOfAllUsers(year: Int, month: Int, startDay: Option[Int], endDay: Option[Int]) -GET /api/time/userlist/:year/:month controllers.TimeController.getWorkingHoursOfUsers(email: String, year: Int, month: Int, startDay: Option[Int], endDay: Option[Int]) -GET /api/time/user/:userId controllers.TimeController.getWorkingHoursOfUser(userId: String, startDate: Long, endDate: Long) +GET /time/allusers/:year/:month controllers.TimeController.getWorkingHoursOfAllUsers(year: Int, month: Int, startDay: Option[Int], endDay: Option[Int]) +GET /time/userlist/:year/:month controllers.TimeController.getWorkingHoursOfUsers(email: String, year: Int, month: Int, startDay: Option[Int], endDay: Option[Int]) +GET /time/user/:userId controllers.TimeController.getWorkingHoursOfUser(userId: String, startDate: Long, endDate: Long) diff --git a/conf/webknossosApi.routes b/conf/webknossosApi.routes new file mode 100644 index 00000000000..1575a36b175 --- /dev/null +++ b/conf/webknossosApi.routes @@ -0,0 +1,13 @@ +# API versioning is handled here. Higher-Priority routes first + +GET /assets/*file controllers.Assets.at(path="/public", file) + +# example: assume, the features route has changed, introducing v2. The older v1 needs to be provided in the legacyApiController +#-> /v2/ webknossos.Routes + + +# GET /v1/features controllers.LegacyApiController.v1features +-> /v1/ webknossos.Routes + + +-> / webknossos.Routes From 3da729a9e1a0c8338696991bbbb2e120c7973f06 Mon Sep 17 00:00:00 2001 From: Florian M Date: Fri, 26 Oct 2018 10:31:25 +0200 Subject: [PATCH 5/7] move /api routes prefix to webknossosApi.routes --- conf/routes | 2 +- conf/webknossosApi.routes | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/routes b/conf/routes index c890c9bd433..b92b3bbfced 100644 --- a/conf/routes +++ b/conf/routes @@ -1,5 +1,5 @@ GET /assets/*file controllers.Assets.at(path="/public", file) --> /api/ webknossosApi.Routes -> /data/ com.scalableminds.webknossos.datastore.Routes -> /tracings/ com.scalableminds.webknossos.tracingstore.Routes +-> / webknossosApi.Routes diff --git a/conf/webknossosApi.routes b/conf/webknossosApi.routes index 1575a36b175..346b890fd3f 100644 --- a/conf/webknossosApi.routes +++ b/conf/webknossosApi.routes @@ -1,13 +1,13 @@ # API versioning is handled here. Higher-Priority routes first -GET /assets/*file controllers.Assets.at(path="/public", file) +GET /assets/*file controllers.Assets.at(path="/public", file) # example: assume, the features route has changed, introducing v2. The older v1 needs to be provided in the legacyApiController -#-> /v2/ webknossos.Routes +#-> /api/v2/ webknossos.Routes # GET /v1/features controllers.LegacyApiController.v1features --> /v1/ webknossos.Routes +-> /api/v1/ webknossos.Routes --> / webknossos.Routes +-> /api webknossos.Routes From add7a10d491ba130e981553a971840ef061a6e78 Mon Sep 17 00:00:00 2001 From: Florian M Date: Fri, 26 Oct 2018 11:26:16 +0200 Subject: [PATCH 6/7] reorganize routing to handle all combinations of local datastore/tracingstore etc --- conf/noDS.noTS.routes | 3 +++ conf/noDS.routes | 4 ++++ conf/noTS.routes | 4 ++++ conf/routes | 2 +- conf/{webknossos.routes => webknossos.latest.routes} | 0 conf/{webknossosApi.routes => webknossos.versioned.routes} | 6 +++--- 6 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 conf/noDS.noTS.routes create mode 100644 conf/noDS.routes create mode 100644 conf/noTS.routes rename conf/{webknossos.routes => webknossos.latest.routes} (100%) rename conf/{webknossosApi.routes => webknossos.versioned.routes} (77%) diff --git a/conf/noDS.noTS.routes b/conf/noDS.noTS.routes new file mode 100644 index 00000000000..7f145d6f370 --- /dev/null +++ b/conf/noDS.noTS.routes @@ -0,0 +1,3 @@ +GET /assets/*file controllers.Assets.at(path="/public", file) + +-> /api/ webknossos.versioned.Routes diff --git a/conf/noDS.routes b/conf/noDS.routes new file mode 100644 index 00000000000..a542660d6f7 --- /dev/null +++ b/conf/noDS.routes @@ -0,0 +1,4 @@ +GET /assets/*file controllers.Assets.at(path="/public", file) + +-> /api/ webknossos.versioned.Routes +-> /tracings/ com.scalableminds.webknossos.tracingstore.Routes diff --git a/conf/noTS.routes b/conf/noTS.routes new file mode 100644 index 00000000000..ee0be5b5ad5 --- /dev/null +++ b/conf/noTS.routes @@ -0,0 +1,4 @@ +GET /assets/*file controllers.Assets.at(path="/public", file) + +-> /api/ webknossos.versioned.Routes +-> /data/ com.scalableminds.webknossos.datastore.Routes diff --git a/conf/routes b/conf/routes index b92b3bbfced..44e1a87c27a 100644 --- a/conf/routes +++ b/conf/routes @@ -1,5 +1,5 @@ GET /assets/*file controllers.Assets.at(path="/public", file) +-> /api/ webknossos.versioned.Routes -> /data/ com.scalableminds.webknossos.datastore.Routes -> /tracings/ com.scalableminds.webknossos.tracingstore.Routes --> / webknossosApi.Routes diff --git a/conf/webknossos.routes b/conf/webknossos.latest.routes similarity index 100% rename from conf/webknossos.routes rename to conf/webknossos.latest.routes diff --git a/conf/webknossosApi.routes b/conf/webknossos.versioned.routes similarity index 77% rename from conf/webknossosApi.routes rename to conf/webknossos.versioned.routes index 346b890fd3f..acb0d80ff63 100644 --- a/conf/webknossosApi.routes +++ b/conf/webknossos.versioned.routes @@ -3,11 +3,11 @@ GET /assets/*file controllers.Assets.at(path="/public", file) # example: assume, the features route has changed, introducing v2. The older v1 needs to be provided in the legacyApiController -#-> /api/v2/ webknossos.Routes +#-> /v2/ webknossos.Routes # GET /v1/features controllers.LegacyApiController.v1features --> /api/v1/ webknossos.Routes +-> /v1/ webknossos.latest.Routes --> /api webknossos.Routes +-> / webknossos.latest.Routes From e71014f34a1ae3f3fc6561be5b56c70f77fcefc5 Mon Sep 17 00:00:00 2001 From: Florian M Date: Fri, 26 Oct 2018 11:29:55 +0200 Subject: [PATCH 7/7] update migrations --- MIGRATIONS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/MIGRATIONS.md b/MIGRATIONS.md index 06d52bea3ea..1e0e3b3c208 100644 --- a/MIGRATIONS.md +++ b/MIGRATIONS.md @@ -9,6 +9,7 @@ User-facing changes are documented in the [changelog](CHANGELOG.md). - There is now a separate module for the tracingstore, the datastore is no longer responsible for saving tracings. This module can run as a standalone application, or as a module of webKnossos locally. It is recommended that you choose the option that was previously also in place for datastores. In case of a standalone datastore, the local one needs to be disabled in application.conf: `tracingstore.enabled = false` and `play.modules.disabled += "com.scalableminds.braingames.datastore.TracingStoreModule` – and in either case, the adress of the tracingstore (localhost or remote) needs to be inserted in the db in `webknossos.tracingStores`. - The FossilDB version has changed from `0.1.10` to `0.1.14`. - The FossilDB needs to be run with an additional column family `volumeUpdates`. +- If your setup overwrites the config key `play.http.router` to disable the local datastore, change it to `"noDS.Routes"` (or `"noDS.noTS.Routes"` to also disable the local tracingstore). #### Postgres Evolutions: - [027-drop-dataset-name-unique-constraint.sql](conf/evolutions/027-drop-dataset-name-unique-constraint.sql)