REST - Client

REST-Interface

Zurück zur Übersicht

Get client by id

URL
GET <application-url>/api/client/<clientId>

Path parameter

  • clientId

Query parameter

  • loadClientPreferences
    default: false
    load client-preferences optionally

Produces

application/json
application/xml

com.matterial.mtr.api.object.Client

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

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/client/1?loadClientPreferences=true


Get clients

URL
GET <application-url>/api/client

Query parameter

  • accountId
    id of an account
  • loadClientPreferences
    load client-preferences optionally
  • orderBy
    possible:
    id
    name
    default: name
    the order by
  • orderDir
    possible: asc, desc
    default: asc
    the ordering direction
  • offset
  • limit

Produces

application/json
application/xml

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

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/client?accountId=1


Create client

Attention:
This API only supported by on-premises installations (private cloud).

URL
POST <application-url>/api/client

Consumes

application/json
application/xml

com.matterial.mtr.api.object.client

Produces

application/json
application/xml

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

  • 201 CREATED
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission
systemAccountRequired

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


Update client

Attention:
This API only supported by on-premises installations (private cloud).

URL
PUT <application-url>/api/client/<clientId>

Path parameter

  • roleId

Consumes

application/json
application/xml

com.matterial.mtr.api.object.Client

Produces

application/json
application/xml

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

  • 201 CREATED
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission
systemAccountRequired

Sample
PUT http://localhost:8080/mtr-backend/api/client/2


Remove client

Attention:
This API only supported by on-premises installations (private cloud).

URL
DELETE <application-url>/api/client/<clientId>

Path parameter

  • clientId

Produces

text/plain

Integer - count of removed

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

Permission
systemAccountRequired

Sample
DELETE http://localhost:8080/mtr-backend/api/client/2

×