Skip to content
This repository has been archived by the owner on Nov 30, 2019. It is now read-only.
/ db-service Public archive

DEPRECATED see oculus-core-service Facade over the database storing jobs and rules.

Notifications You must be signed in to change notification settings

OCULUS-project/db-service

Repository files navigation

db-service

Facade over the database storing jobs and rules. Allows basic CRUD operations. Should be used always, when accessing jobs database.

Data types used here are stored in db-entries repository.

build and run

./gradlew build run or /.gradlew build and java -jar build\libs\jobs-db-service-0.0.1-SNAPSHOT.jar

usage

This sections demonstrates endpoints and requests.

Data types used here are stored in db-entries repository.

jobs

get job by id

url: ../db/jobs/get?id=ID_OF_JOB, method: GET

case response code
success json of Job 200 OK
fail empty 204 No Content

get all jobs

url: ../db/jobs/all, method: GET

case response code
found rules json array of Job 200 OK
no rules in db [] 204 No Content

get first new job

url: ../db/jobs/new/first, method: GET

case response code
found rules json Job 200 OK
no rules in db empty 204 No Content

get all new jobs

url: ../db/jobs/new/all, method: GET

case response code
found rules json array of Job 200 OK
no rules in db [] 204 No Content

add new job

url: ../db/jobs/add, method: POST, body: json of Job (without id, created and updated)

case response code
success location header with added job id 200 OK
fail error json 400 Bad request

update conclusions of job

url: ../db/jobs/update/conclusions, method: PUT, body:

{
  "id": "idOfJobToUpdate",
  "conclusions": [/*array of conclusions*/]
}
case response code
success empty 200 OK
fail error json 500 Internal Server Error

update job status

url: ../db/jobs/update/status, method: PUT, body:

{
  "id": "idOfJobToUpdate",
  "status": "new JobStatus"
}
case response code
success empty 200 OK
fail error json 500 Internal Server Error

rules

get rule by id

url: ../db/rules/get?id=ID_OF_RULE, method: GET

case response code
success json of Rule 200 OK
fail empty 204 No Content

get all rules

url: ../db/rules/all, method: GET

case response code
found rules json array of Rule 200 OK
no rules in db [] 204 No Content

add new rule

url: ../db/rules/add, method: POST, body: json of Rule

case response code
success location header with added rule id 200 OK
fail error json 400 Bad request

About

DEPRECATED see oculus-core-service Facade over the database storing jobs and rules.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published