Search Rest API

GET /navigation/search/workplace

This endpoint executes a search query

Request


curl 'http://server.tld/moovapps/navigation/search/workplace?query={{query}}&searchName={{searchName}}&searchField={{searchField}}&_AuthenticationKey={{token}}'

Parameters

Parameter Mandatory Description Example
query Yes the search query john
searchName Yes the search name workplace_searchUsers
searchField Yes the search field quickSearch
searchIndexBottom No the bottom search index WorkplaceIndexUsers¤0
searchIndexTop No the top search index WorkplaceIndexUsers¤19
_AuthenticationKey No an authentication key

Note :

On first call, you don’t need to indicate searchIndexBottom and searchIndexTop. 20 first records are returned and searchIndexBottom / searchIndexTop are returned with search results.
If you want to retrieve next 20 elements, just send previously returned searchIndexBottom / searchIndexTop values as search parameters.

Note :

By default search names are definded as follow :

  • For Users : workplace_searchUsers
  • For Documents : workplace_documents_search
  • For News : workplace_news_search
  • For Faqs : workplace_faq_search
  • For Customers : workplace_customers_search

Response

if an error occured

{
"type": "error",
"message": "user not logged in"
}

if no data found

{
"type": "success",
"data": [],
"template": ""
}

if data found

{
  "type": "success",
  "data": [
    {
      "lastName": "Collaborator1_75",
      "mobilePhoneNumber": "",
      "ORGANIZATION.LABEL": "Collaborateur 1",
      "CREATIONDATE": "Tue Mar 16 15:51:01 CET 2021",
      "hidePhone": "display:none",
      "nickName": "",
      "hideMobilePhone": "display:none",
      "userFunction": "",
      "login": "Collaborator1_75@mail.com",
      "URI": "uri://vdoc/user/78",
      "firstName": "Collaborator1_75",
      "phoneNumber": "",
      "LOCALE": "fr",
      "PARENTID": "",
      "DESCRIPTION": "",
      "quickSearch": "Collaborator1_75 Collaborator1_75 Collaborator1_75 Collaborator1_75@mail.com",
      "REFERENCE": "Collaborator1_75@mail.com",
      "HYPERLINK": "/moovapps/easysite/workplace/user?l=Collaborator1_75@mail.com",
      "TITLE": "Collaborator1_75 Collaborator1_75",
      "PHOTO": "/moovapps/easysite-resources/skins/workplace/img/default-avatar.svg",
      "ID": "78",
      "email": "Collaborator1_75@mail.com",
      "status": 1,
      "link": {
        "href": "/moovapps/easysite/workplace/user?l=Collaborator1_75@mail.com"
      }
    },
    {
      "lastName": "Collaborator1_74",
      "mobilePhoneNumber": "",
      "ORGANIZATION.LABEL": "Collaborateur 1",
      "CREATIONDATE": "Tue Mar 16 15:51:01 CET 2021",
      "hidePhone": "display:none",
      "nickName": "",
      "hideMobilePhone": "display:none",
      "userFunction": "",
      "login": "Collaborator1_74@mail.com",
      "URI": "uri://vdoc/user/77",
      "firstName": "Collaborator1_74",
      "phoneNumber": "",
      "LOCALE": "fr",
      "PARENTID": "",
      "DESCRIPTION": "",
      "quickSearch": "Collaborator1_74 Collaborator1_74 Collaborator1_74 Collaborator1_74@mail.com",
      "REFERENCE": "Collaborator1_74@mail.com",
      "HYPERLINK": "/moovapps/easysite/workplace/user?l=Collaborator1_74@mail.com",
      "TITLE": "Collaborator1_74 Collaborator1_74",
      "PHOTO": "/moovapps/easysite-resources/skins/workplace/img/default-avatar.svg",
      "ID": "77",
      "email": "Collaborator1_74@mail.com",
      "status": 1,
      "link": {
        "href": "/moovapps/easysite/workplace/user?l=Collaborator1_74@mail.com"
      }
    },
   ...
  ],
  "template": "",
  "searchIndexBottom": "WorkplaceIndexUsers¤0",
  "searchIndexTop": "WorkplaceIndexUsers¤19"
}