REST - InstanceControl

REST-Interface

Signup

Creates and inits another instance. This also creates a credential and the corresponding person (account/contact) as instanceadmin with all initial functional roles assigned (including admin). At least this updates the licence for the newly created instance.
You can set a password optionally. Therfore set Signup.password AND Signup.updatePassword = true. If updatePassword is false a Credential without password will be created! Only in this case an E-Mail notification with link will be sent.
URL
POST <application-url>/api/instancecontrol/signup

Query parameter

parameter possible values default description
languageKey de, en en language-key for email-notification

Consumes

application/json
application/xml

com.matterial.mtr.api.object.Signup

Produces

application/json
application/xml

com.matterial.mtr.api.object.LoginData

  • 201 CREATED
  • 500 INTERNAL_SERVER_ERROR

Permission
systemAccountRequired

Sample
POST http://localhost:8080/mtr-backend/api/instancecontrol/signup


Create instance

URL
POST <application-url>/api/instancecontrol/instance

Consumes

application/json
application/xml

com.matterial.mtr.api.object.WildflyDataSource

Produces

application/json
application/xml

com.matterial.mtr.api.object.LoginData

  • 201 CREATED
  • 500 INTERNAL_SERVER_ERROR

Permission
systemAccountRequired

Sample
POST http://localhost:8080/mtr-backend/api/instancecontrol/instance


Change instance

Attention:
Won't work on multiserve-installation.
Use Logon.preChangeinstance-API!

URL
PUT <application-url>/api/instancecontrol/instance/<dataSourceName>

Path parameter

parameter mandatory possible values default description
dataSourceName yes - - datasource / instance

Produces

application/json
application/xml

com.matterial.mtr.api.object.LoginData

  • 202 ACCEPTED
  • 500 INTERNAL_SERVER_ERROR

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/instancecontrol/instance/MtrInst2DS


Change instance by id

Attention:
Won't work on multiserve-installation.
Use Logon.preChangeinstance-API!

URL
PUT <application-url>/api/instancecontrol/instance/byid/<dataSourceId>

Path parameter

parameter possible values default description
dataSourceId - - datasource-id

Produces

application/json
application/xml

com.matterial.mtr.api.object.LoginData

  • 202 ACCEPTED
  • 500 INTERNAL_SERVER_ERROR

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/instancecontrol/instance/byid/4


Get invitees with no account

Get all invitees, that do not exist in instance yet.
URL
GET <application-url>/api/instancecontrol/credential/invitee

Produces

application/json
application/xml

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

  • 200 OK
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission
Login, instanceOwnerRequired

Sample
GET http://localhost:8080/mtr-backend/api/instancecontrol/credential/invitee


Reinvite credential

This resends the invitation mail to the invitee and renews its LoginToken.
URL
PUT <application-url>/api/instancecontrol/credential/invitee/<credentialId>

Produces

  • 202 ACCEPTED
  • 500 INTERNAL_SERVER_ERROR

Permission
instanceOwnerRequired

Sample
PUT http://localhost:8080/mtr-backend/api/instancecontrol/credential/invitee/5


Remove invitee

Remove the credential from current instance. Additionally this removes the whole credential if no more related instances are left.
URL
DELETE <application-url>/api/instancecontrol/credential/invitee/<credentialId>

Produces

text/plain

[Integer] count of removed invitees

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

Permission
instanceOwnerRequired

Sample
DELETE http://localhost:8080/mtr-backend/api/instancecontrol/credential/invitee/5


Store credential with data-sources

This is only available for system-account. This sets the password and is the only possibility to store credentials for several data-sources.
URL
PUT <application-url>/api/instancecontrol/credential/withdatasources

Consumes

application/json
application/xml

com.matterial.mtr.api.object.Credential

Produces

text/plain

Long - credential-id

  • 202 ACCEPTED
  • 500 INTERNAL_SERVER_ERROR

Permission
Login, systemAccount

Sample
PUT http://localhost:8080/mtr-backend/api/instancecontrol/credential/withdatasources


Store credential

This is only available for instance-admins. Instance-Admins can only create credentials within the current instance (datasource). Credential.password and Credential.dataSources will be ignored. The current instance will be added to the existing. An E-Mail-notification-link will be created to login without password.
URL
PUT <application-url>/api/instancecontrol/credential

Consumes

application/json
application/xml

com.matterial.mtr.api.object.Credential

Produces

text/plain

Long - credential-id

  • 202 ACCEPTED
  • 500 INTERNAL_SERVER_ERROR

Permission
Login, instanceAdmin

Sample
PUT http://localhost:8080/mtr-backend/api/instancecontrol/credential


Store credentials

This is only available for instance-admins. Instance-Admins can only create credentials within the current instance (datasource). Credential.password and Credential.dataSources will be ignored. The current instance will be added to the existing. An E-Mail-notification-link will be created to login without password.
URL
PUT <application-url>/api/instancecontrol/credential/list

Consumes

application/json
application/xml

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

Produces

application/json
application/xml

List<Long> - credential-ids

  • 202 ACCEPTED
  • 500 INTERNAL_SERVER_ERROR

Permission
Login, instanceAdmin

Sample
PUT http://localhost:8080/mtr-backend/api/instancecontrol/credential/list


Update favourite data-source

URL
PUT <application-url>/api/instancecontrol/credential/favdatasource

Consumes

application/json
application/xml

com.matterial.mtr.api.object.DataSource

Produces

application/json
application/xml

com.matterial.mtr.api.object.LoginData

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/instancecontrol/credential/favdatasource


Get instance by id

URL
GET <application-url>/api/instancecontrol/instance/<dataSourceId>

Path parameter

parameter mandatory possible values default description
dataSourceId yes - - datasource-id

Produces

application/json
application/xml

com.matterial.mtr.api.object.DataSource

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

Permission
Login, systemAccountRequired

Sample
GET http://localhost:8080/mtr-backend/api/instancecontrol/instance/1


Get instances

URL
GET <application-url>/api/instancecontrol/instance

Query parameter

parameter mandatory possible values default description
dataSourceId no - - datasource-id
active no true, false - filter by active
accountLogin no - - filter by credential
dataSourceName no - - filter by name
dataSourceReference no - - filter by reference
count no true, false false get count
orderByStr no id
name
displayName
reference
active
active order by
orderByDir no asc, desc asc order by direction
offset no - 0 offset
limit no - 0 limit

Produces

application/json
application/xml

com.matterial.mtr.api.object.ListResult<DataSource>

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

Permission
Login, systemAccountRequired

Sample
GET http://localhost:8080/mtr-backend/api/instancecontrol/instance?count=true


Update displayname of current datasource.

URL
PUT <application-url>/api/instancecontrol/instance/displayname/<displayName>

Produces

application/json
application/xml

com.matterial.mtr.api.object.LoginData

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

Permission
instanceOwnerRequired

Sample
PUT http://localhost:8080/mtr-backend/api/instancecontrol/instance/displayname/MyCompany


Activate instance (unlimited)

Activates an instance (datasource) for unlimited days.
URL
PUT <application-url>/api/instancecontrol/instance/<dataSourceName>/activate/unlimited

Path parameter

parameter possible values default description
dataSourceName - - datasource-name

Produces

text/plain

[Integer] updated

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

Permission
Login, systemAccountRequired

Sample
PUT http://localhost:8080/mtr-backend/api/instancecontrol/instance/MtrDS/activate/unlimited


Activate instance

Activates an instance (datasource) for the next specified days.
URL
PUT <application-url>/api/instancecontrol/instance/<dataSourceName>/activate/days/<days>

Path parameter

parameter possible values default description
dataSourceName - - datasource-name
days - - days

Produces

text/plain

[Integer] updated

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

Permission
Login, systemAccountRequired

Sample
PUT http://localhost:8080/mtr-backend/api/instancecontrol/instance/MtrDS/activate/days/30


Deactivate instance

Deactivates an active instance (datasource).
URL
PUT <application-url>/api/instancecontrol/instance/<dataSourceName>/deactivate

Path parameter

parameter possible values default description
dataSourceName - - datasource-name

Produces

text/plain

[Integer] updated

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

Permission
Login, systemAccountRequired

Sample
PUT http://localhost:8080/mtr-backend/api/instancecontrol/instance/MtrDS/deactivate


Remove instance

Removes inactive instance (datasource). Instance / DataSource has to be deactivated before removing it.
URL
DELETE <application-url>/api/instancecontrol/instance/<dataSourceName>

Produces

text/plain

[Boolean] success

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

Permission
Login, systemAccountRequired

Sample
DELETE http://localhost:8080/mtr-backend/api/instancecontrol/instance/MtrDS


Remove Index

This removes the complete index from filesystem of the current instance!
URL
DELETE <application-url>/api/instancecontrol/search/index

Produces

text/plain

boolean - true on success

  • 202 ACCEPTED
  • 500 INTERNAL_SERVER_ERROR

Permission
systemAccountRequired

Sample
DELETE http://localhost:8080/mtr-backend/api/instancecontrol/search/index


Reindex all instances

This removes the complete index from filesystem and reindexes all persons and documents for each instance.
URL
PUT <application-url>/api/instancecontrol/search/reindexall

  • 202 ACCEPTED
  • 500 INTERNAL_SERVER_ERROR

Permission
systemAccountRequired

Sample
PUT http://localhost:8080/mtr-backend/api/instancecontrol/search/reindexall

×
Peter's Problem.