matterial

Zurück zur Übersicht » REST - TempFile

REST - TempFile

REST-Interface

Get temp file (stream)

Loads tempfiles.

URL
GET <application-url>/api/tempfile/<fileType>/<contextToken>/<fileToken>

Path parameter

Query parameter

Produces

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/tempfile/contactimage/a40d4d77-e006-4d0d-a3b2-e7d5c6e28e5c/d38185e3-22de-42d3-8467-7df06ebf44e0?languageKey=de


Upload temp file (multipart)

URL
POST <application-url>/api/tempfile

Query parameter

parameter mandatory possible values default description
contextToken no - - generated token
languageKey no de, en, fr, it, … language-key with lowest “prio” (mostly ‘de’) the language key

Consumes

multipart/form-data

multipart-form

<form action="http://localhost:8080/kmx-backend/api/tempfile?contextToken=&amp;languageKey=de"
      method="post"
      enctype="multipart/form-data">
    <input name="document" type="file" /><br><br>
    <input name="attachment" type="file" multiple="multiple"/><br><br>
    <input name="contactimage" type="file" multiple="multiple"/><br><br>
    <input name="logo" type="file" /><br><br>
    <button name="submit" type="submit">Upload</button>
</form>

Produces

application/json
application/xml

List<com.matterial.mtr.api.object.TempFileDescriptor>

Permission
Login

Sample
POST http://localhost:8080/mtr-backend/api/tempfile


Upload temp file (string)

URL
POST <application-url>/api/tempfile

Query parameter

parameter mandatory possible values default description
contextToken no - - generated token
languageKey no de, en, fr, it, … language-key with lowest “prio” (mostly ‘de’) the language key

Consumes

text/plain

String - main-content

Produces

application/json
application/xml

com.matterial.mtr.api.object.TempFileDescriptor

Permission
Login

Sample
POST http://localhost:8080/mtr-backend/api/tempfile


Remove temp files

Remove temp files by contextToken.
URL
DELETE <application-url>/api/tempfile/<contextToken>

Path parameter

Produces

Permission
Login

Sample
DELETE http://localhost:8080/mtr-backend/api/tempfile/d38185e3-22de-42d3-8467-7df06ebf44e0


Remove temp file

URL
DELETE <application-url>/api/tempfile/<fileType>/<contextToken>/<fileToken>

Path parameter

parameter mandatory possible values default description
fileType yes - - the file type
contextToken yes - - the context token
fileToken yes - - the file token

Query parameter

parameter mandatory possible values default description
languageKey no de, en, fr, it, … language-key with lowest “prio” (mostly ‘de’) the language key

Produces

Permission
Login

Sample
DELETE http://localhost:8080/mtr-backend/api/tempfile/contactimage/a40d4d77-e006-4d0d-a3b2-e7d5c6e28e5c/d38185e3-22de-42d3-8467-7df06ebf44e0?languageKey=de


Remove temp file

URL
DELETE <application-url>/api/tempfile

Consumes

application/json
application/xml

com.matterial.mtr.api.object.TempFileDescriptor

Produces

Permission
Login

Sample
DELETE http://localhost:8080/mtr-backend/api/tempfile