REST - Language
REST-Interface
Get language by id
URL
GET <application-url>/api/language/<languageId>
Path parameter
parameter | mandatory | possible values | default | description |
---|---|---|---|---|
languageId | yes | - | - | language-id |
Produces
application/json
application/xml
com.matterial.mtr.api.object.Language
- 200 OK
- 400 BAD_REQUEST
- 404 NOT_FOUND
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/language/1
Get languages
URL
GET <application-url>/api/language
Query parameter
parameter | mandatory | possible values | default | description |
---|---|---|---|---|
active | no | true, false | - | filter by active |
orderBy | no |
id name prio |
prio | order by |
orderDir | no | asc, desc | asc | order by direction |
Produces
application/json
application/xml
List<com.matterial.mtr.api.object.Language>
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/language
Activate language
URL
PUT <application-url>/api/language/<languageId>/activate
Path parameter
parameter | possible values | default | description |
---|---|---|---|
languageId | 1,2,3,4,… | - | language-id |
Produces
text/plain
[Integer] updated
- 202 ACCEPTED
- 500 INTERNAL_SERVER_ERROR
Permission
instanceOwnerRequired
Sample
PUT http://localhost:8080/mtr-backend/api/language/5/activate
Deactivate language
URL
PUT <application-url>/api/language/<languageId>/deactivate
Path parameter
parameter | possible values | default | description |
---|---|---|---|
languageId | 1,2,3,4,… | - | language-id |
Produces
text/plain
[Integer] updated
- 202 ACCEPTED
- 500 INTERNAL_SERVER_ERROR
Permission
instanceOwnerRequired
Sample
PUT http://localhost:8080/mtr-backend/api/language/5/deactivate