REST - Conversion

REST-Interface

Zurück zur Übersicht

Get queue-size

Get the current size of the conversion-queue.
URL
GET <application-url>/api/conversion/queue

Produces

text/plain

Integer - queue-size

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/conversion/queue


Markdown to Html

URL
POST <application-url>/api/conversion/markdown2html

Consumes

text/plain

String - markdown

# Header
 
* One
* Two

Produces

text/html

String - html

<h1>
    <a href="#header" name="header"></a>Header
</h1>
<ul>
    <li>One</li>
    <li>Two</li>
</ul>
  • 200 OK
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission
Login

Sample
POST http://localhost:8080/mtr-backend/api/conversion/markdown2html


Html to Markdown

URL
POST <application-url>/api/conversion/html2markdown

Query parameter

  • htmlCleanerLevel
    since 2.5.0
    possible: 0 ,1 , 2, 3
    default: 2
    Define how to clean the html before conversion:
    • 0 - HTML_CLEANER_OFF
    • 1 - HTML_CLEANER_RELAXED
    • 2 - HTML_CLEANER_BASIC_WITH_IMAGES
    • 3 - HTML_CLEANER_BASIC

Consumes

text/html

String - html

<h1>Header</h1>
<ul>
    <li>One</li>
    <li>Two</li>
</ul>

Produces

text/plain

String - markdown

# Header
 
* One
* Two
  • 200 OK
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission
Login

Sample
POST http://localhost:8080/mtr-backend/api/conversion/html2markdown

×