From f97ec233d6224b495f44e1ba474712a9be680fcf Mon Sep 17 00:00:00 2001 From: Masuzu Date: Thu, 5 Apr 2018 11:59:07 +0200 Subject: [PATCH 1/2] Add GET /version endpoint to rest API --- core/src/main/scala/com/criteo/cuttle/App.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/scala/com/criteo/cuttle/App.scala b/core/src/main/scala/com/criteo/cuttle/App.scala index 1c76ed59c..326fb78a9 100644 --- a/core/src/main/scala/com/criteo/cuttle/App.scala +++ b/core/src/main/scala/com/criteo/cuttle/App.scala @@ -402,6 +402,8 @@ private[cuttle] case class App[S <: Scheduling](project: CuttleProject[S], execu } } } + + case GET at url"/version" => Ok(project.version) } val api = publicApi orElse project.authenticator(privateApi) From 4beaa6ecb0101f8eaf94c96bb3ebeaaae795230f Mon Sep 17 00:00:00 2001 From: Vincent Guerci Date: Thu, 5 Apr 2018 13:51:01 +0200 Subject: [PATCH 2/2] Update App.scala --- core/src/main/scala/com/criteo/cuttle/App.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/scala/com/criteo/cuttle/App.scala b/core/src/main/scala/com/criteo/cuttle/App.scala index 326fb78a9..9b38db81d 100644 --- a/core/src/main/scala/com/criteo/cuttle/App.scala +++ b/core/src/main/scala/com/criteo/cuttle/App.scala @@ -223,6 +223,8 @@ private[cuttle] case class App[S <: Scheduling](project: CuttleProject[S], execu .jobStatsForLastThirtyDays(jobName) .map(stats => Ok(stats.asJson)) + case GET at url"/version" => Ok(project.version) + case GET at "/metrics" => val metrics = executor.getMetrics(allIds, workflow) ++ @@ -402,8 +404,6 @@ private[cuttle] case class App[S <: Scheduling](project: CuttleProject[S], execu } } } - - case GET at url"/version" => Ok(project.version) } val api = publicApi orElse project.authenticator(privateApi)