REST - Document - SavedSearch

REST-Interface

Get saved search by id

URL GET <application-url>/api/document/savedsearch/<savedSearchId>

Path parameter

  • savedSearchId The id of a specific Saved Search

Query parameter

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

Produces

application/json
application/xml

com.matterial.mtr.api.object.SavedSearch

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

Permission Login

Sample GET http://localhost:8080/mtr-backend/api/document/savedsearch/1


Get saved searches

URL GET <application-url>/api/document/savedsearch

Query parameter

  • onDashboard possible: true, false dashboard-only (true) not on dashboard (false) all (not set)
  • global possible: true, false global only (true) private (false) global and private (not set)
  • languageKey possible: de, en, fr, it, … default: de language key
  • orderBy possible: id, name, prio default: name the order by
  • orderDir possible: asc, desc default: asc the ordering direction

Produces

application/json
application/xml

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

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

Permission Login

Sample GET http://localhost:8080/mtr-backend/api/document/savedsearch?orderBy=prio


Create saved search

URL POST <application-url>/api/document/savedsearch

Consumes

application/json
application/xml

com.matterial.mtr.api.object.SavedSearch

Produces

application/json
application/xml

com.matterial.mtr.api.object.SavedSearch

  • 201 CREATED
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission Login

Sample POST http://localhost:8080/mtr-backend/api/document/savedsearch


Update saved search

URL PUT <application-url>/api/document/savedsearch/<savedSearchId>

Path parameter

  • savedSearchId The id of a specific Saved Search

Consumes

application/json
application/xml

com.matterial.mtr.api.object.SavedSearch

Produces

application/json
application/xml

com.matterial.mtr.api.object.SavedSearch

  • 200 OK
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission Login

Sample PUT http://localhost:8080/mtr-backend/api/document/savedsearch/4


Remove saved search

URL DELETE <application-url>/api/document/savedsearch/<savedSearchId>

Path parameter

  • savedSearchId The id of a specific Saved Search

Consumes

application/json
application/xml

com.matterial.mtr.api.object.SavedSearch

Produces

text/plain

Integer - count of removed

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

Permission Login

Sample DELETE http://localhost:8080/mtr-backend/api/document/savedsearch/4


Get documents by saved search

Depending on the param “query”, this redirects to db-query or search-query. URL GET <application-url>/api/document/savedsearch/<savedSearchId>/execute

Path parameter

  • savedSearchId The id of a specific Saved Search

Query parameter

  • languageKey possible: de, en, fr, it, … default: de language key
  • loadRoleRights possible: true, false default: false db-only
  • loadCategoryIds possible: true, false default: false db-only
  • loadResponsibles possible: true, false default: false db-only
  • loadAuthors possible: true, false default: false db-only
  • loadLastAuthorOnly possible: true, false default: false db-only
  • loadFollowers possible: true, false default: false db-only
  • loadMarkedAsHelpfulBy possible: true, false default: false db-only
  • loadAttachments possible: true, false default: false db-only
  • loadLanguageAttachments possible: true, false default: false db-only
  • loadDocumentAttachments possible: true, false default: false db-only
  • loadRelatedDocumentIds possible: true, false default: false db-only
  • loadAdditionalProperties possible: true, false default: false db-only
  • loadExtensionValues possible: true, false default: false db-only
  • categoryAggregations search-only
  • languageAggregations search-only
  • lastChangeAggregations search-only
  • highlightFields search-only
  • count possible: true, false default: false additionally loading count of documents db-only
  • offset
  • limit

Produces

application/json
application/xml

com.matterial.mtr.api.object.ListResult<Document> / com.matterial.mtr.api.object.SearchResult<Document>

  • 200 OK
  • 404 NOT_FOUND
  • 500 INTERNAL_SERVER_ERROR

Permission Login

Sample GET http://localhost:8080/mtr-backend/api/document/savedsearch/5/execute?count=true

×
Peter's Problem.