matterial

Zurück zur Übersicht » REST - Category

REST - Category

REST-Interface

Get category by id

URL
GET <application-url>/api/category/<categoryId>

Path parameter

Query parameter

Produces

application/json
application/xml

com.matterial.mtr.api.object.Category

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/category/7?languageKey=de


Get categories by categorytypeid

URL
GET <application-url>/api/category/bytype/<categoryTypeId>

Path parameter

Query parameter

Produces

application/json
application/xml

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

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/category/bytype/1


Get categories

URL
GET <application-url>/api/category

Query parameter

Produces

application/json
application/xml

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

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/category?categoryTypeId=1


Create category

URL
POST <application-url>/api/category

Query parameter

Consumes

application/json
application/xml

com.matterial.mtr.api.object.Category

Produces

application/json
application/xml

com.matterial.mtr.api.object.Category (id only)

Permission
EDIT_CATEGORY

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


Update category

URL
PUT <application-url>/api/category/<categoryId>

Path parameter

Query parameter

Consumes

application/json
application/xml

com.matterial.mtr.api.object.Category

Produces

application/json
application/xml

com.matterial.mtr.api.object.Category (id only)

Permission
EDIT_CATEGORY

Sample
PUT http://localhost:8080/mtr-backend/api/category/8


Remove category

URL
DELETE <application-url>/api/category/<categoryId>

Path parameter

Produces

text/plain

Integer - count of removed

Permission
EDIT_CATEGORY

Sample
DELETE http://localhost:8080/mtr-backend/api/category/9


Remove categories by categorytypeid

URL
DELETE <application-url>/api/category/bytype/<categoryTypeId>

Path parameter

Produces

text/plain

Integer - count of removed

Permission
EDIT_CATEGORY

Sample
DELETE http://localhost:8080/mtr-backend/api/category/bytype/1


Is following (logged-in account follows a category)

URL
GET <application-url>/api/category/<categoryId>/follow

Path parameter

Query parameter

Produces

text/plain

Boolean - true, if following this category in language

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/category/2/follow?languageKey=de


Follow category (logged-in account)

URL
PUT <application-url>/api/category/<categoryId>/follow

Path parameter

Query parameter

Produces

text/plain

Integer - count of updates

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/category/2/follow?languageKey=de


Follow category (other account)

URL
PUT <application-url>/api/category/<categoryId>/follow/byaccount/<accountId>

Path parameter

Query parameter

Produces

text/plain

Integer - count of updates

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/category/2/follow/byaccount/3?languageKey=de


Unfollow category (logged-in account)

URL
PUT <application-url>/api/category/<categoryId>/unfollow

Path parameter

Query parameter

Produces

text/plain

Integer - count of updates

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/category/2/unfollow?languageKey=de


Unfollow category (other account)

URL
PUT <application-url>/api/category/<categoryId>/unfollow/byaccount/<accountId>

Path parameter

Query parameter

Produces

text/plain

Integer - count of updates

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/category/2/unfollow/byaccount/3?languageKey=de


Add category to document(s)

URL
PUT <application-url>/api/category/<categoryId>/assign

Path parameter

Query parameter

Produces

text/plain

Integer - count of updates

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/category/2/assign?documentId=1


Add quick-category to document(s)

URL
PUT <application-url>/api/category/quick/assign

Query parameter

Produces

text/plain

Integer - count of updates

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/category/quick/assign?documentId=1


Remove category from document(s)

URL
DELETE/PUT <application-url>/api/category/<categoryId>/unassign

Path parameter

Query parameter

Produces

text/plain

Integer - count of updates

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/category/2/unassign?documentId=1


Remove my quick-category from document(s)

URL
DELETE/PUT <application-url>/api/category/quick/unassign

Query parameter

Produces

text/plain

Integer - count of updates

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/category/quick/unassign?documentId=1