Skip to content

Sigest/springer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Watermark Service

WARNING I didn't cover the service jmeter tests, I have no JMeter installed, I am sorry. If it is important for the Test task, I will complete it

Runing the service

Use the following options to start the service locally:

  • VM Options: No vm options
  • Main class: com.springer.ExeciseApplication

Service address

http://localhost:8080

HTTP endpoints

API:/v1/watermark

  • Request Method: POST
  • Content-Type: application/json

Send document for watermark processing

Request

URI: http://localhost:8080/v1/watermark

Body

Body for book

{
    "title": "Simple title",
    "author": "German Sidorenko",
    "topic": "business"
}

Body for journal

{
    "title": "Simple title",
    "author": "German Sidorenko",
}

Response

Id for status checking:

81fefc27-28a5-4426-b1ea-73e14064a25c

API:/v1/status/{id}

  • Request Method: GET
  • Content-Type: application/json

Check status of processing document

Request

URI: http://localhost:8080/v1/status/81fefc27-28a5-4426-b1ea-73e14064a25c

Response

If document is in process:

{
  "message": "document is being processed by the service. please wait",
  "status": "in progress"
}

If id is not correct (not found):

{
  "message": "document id not found. please check your id",
  "status": "not found"
}

If BOOK is processed:

{
  "title": "Simple title",
  "author": "German Sidorenko",
  "watermark": {
    "content": "book",
    "title": "Simple title",
    "author": "German Sidorenko",
    "topic": "business"
  },
  "topic": "business"
}

If JOURNAL is processed:

{
  "title": "Simple title",
  "author": "German Sidorenko",
  "watermark": {
    "content": "journal",
    "title": "Simple title",
    "author": "German Sidorenko"
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors