REST - Category - CategoryType

REST-Interface

Get categorytype by id

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

Path parameter

  • categoryTypeId

Query parameter

  • languageKey possible: de, en, fr, it, … default: de The requested language

Produces

application/json
application/xml

com.matterial.mtr.api.object.CategoryType

  • 200 OK
  • 400 BAD_REQUEST
  • 404 NOT_FOUND
  • 500 INTERNAL_SERVER_ERROR

Permission Login

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


Get categorytypes

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

Query parameter

  • languageKey possible: de, en, fr, it, … default: de The requested language
  • categoryTypeId default: 0
  • quick possible: true, false default: “all” true: only “quick” false: only “no quick”
  • tag possible: true, false default: “all” true: only “tag”-type false: all, but “tag”-type
  • personal possible: true, false default: “all” true: only my personal false: only “public”
  • orderBy possible: id name type default: type the order by
  • orderDir possible: asc, desc default: asc the ordering direction

Produces

application/json
application/xml

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

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

Permission Login

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


Create categorytype

URL POST <application-url>/api/category/type

Query parameter

  • languageKey possible: de, en, fr, it, … default: de The requested language

Consumes

application/json
application/xml

com.matterial.mtr.api.object.CategoryType

Produces

application/json
application/xml

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

  • 201 CREATED
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission EDIT_CATEGORY

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


Update categorytype

URL PUT <application-url>/api/category/type/<categoryTypeId>

Query parameter

  • languageKey possible: de, en, fr, it, … default: de The requested language

Path parameter

  • categoryTypeId

Consumes

application/json
application/xml

com.matterial.mtr.api.object.CategoryType

Produces

application/json
application/xml

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

  • 201 CREATED
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission EDIT_CATEGORY

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


Remove categorytype

You cannot remove CategoryTypes that have related Categories! This will return in StatusCode CATEGORY_TYPE_IN_USE = 200 and HTTP-Status BAD REQUEST. URL DELETE <application-url>/api/category/type/<categoryTypeId>

Path parameter

  • categoryTypeId

Produces

text/plain

Integer - count of removed

  • 200 OK
  • 400 BAD_REQUEST
  • 404 NOT_FOUND
  • 500 INTERNAL_SERVER_ERROR

Permission EDIT_CATEGORY

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

×