This API provides an interface for cross-app searches.
The API doesn't define any service info.
{
"relevance": number
}
All messages are JSON objects that have a mandatory attribute "mt" that specifies the message type. Providers must echo the "src" attribute from requests in the corresponding responses.
{
"mt": string,
"src": string
}
This message is sent by the API consumer to start a search request. API providers must respond with 0..n SearchInfo messages followed by a SearchResult message.
{
"mt": "Search",
"src": string,
"search": string,
"type": string
}
Examples:
{
"mt": "Search",
"search": "John Doe",
"type": "contact"
}
{
"mt": "Search",
"search": "Devices",
"type": "app"
}
{
"mt": "Search",
"search": "Sales Meeting",
"type": "message"
}
{
"mt": "Search",
"search": "Marketing"
}
This message is sent by the API provider and contains a single search result result.
{
"mt": "SearchInfo",
"src": string,
"dn": string,
"type": string,
<type>: object,
"link": string,
"dontAttach": boolean,
"relevance": number,
"photourl": string,
"avatar": string
}
This type is used for contacts. The detail object contains the contact details. Note that some search providers add additional attributes to the top level of the message, if the contact corresponds to a PBX user.
{
"mt": "SearchInfo",
"dn": string,
"type": "contact",
"contact": {
"sn": string,
"givenname": string,
"displayname": string,
"title": string,
"position": string,
"department": string,
"company": string,
"telephonenumber": [ string ],
"mobile": [ string ],
"homephone": [ string ],
"extension": [ string ],
"facsimiletelephonenumber": [ string ],
"sip": [ string ],
"email": [ string ],
"url": string,
"description": string,
"info": string,
"roomnumber": string,
"city": string,
"street": string,
"postalcode": string,
"state": string,
"country": string,
"privatecity": string,
"privatestreet": string,
"privatepostalcode": string,
"privatestate": string,
"privatecountry": string
},
"guid": string,
"pbx": string,
"node": string,
"template": string,
"adjust": bool
}
This type is used for apps or pages inside apps. The corresponding detail object has no defined attributes at the moment, so it is empty.
Examples:
{
"mt": "SearchInfo",
"dn": "UsersAdmin",
"type": "app",
"app": {},
"link": "usersadmin",
"relevance": 2000,
"photourl": "http://localhost:10008/appproxy/ext/aps.example.com/example.com/usersapp/innovaphone-usersadmin.png"
}
{
"mt": "SearchInfo",
"dn": "Call diversions",
"type": "app",
"app": {},
"link": "profile?page=call-diversions#d=Call%20diversions",
"relevance": 1000
}
This type is used for messages. The detail object contains the message details.
{
"mt": "SearchInfo",
"dn": string,
"type": "message",
"link": "messages?discussion=2054900&message=2756759",
"message": {
"author": string,
"dn": string,
"text": string,
"timestamp": number
}
}
{
"mt": "SearchInfo",
"dn": "Connect ",
"link": "connect?discussion=4&message=5",
"dontAttach": true,
"relevance": 500,
"type": "message",
"message": {
"author": "alice",
"dn": "Alice",
"text": "@bob can you please call me back?",
"timestamp": 1719411290879
}
}
This type is used for devices. The detail object contains the device details.
{
"mt": "SearchInfo",
"dn": string,
"type": "device",
"link": "devices?header=devices&listItem=009033410fcb&contentId=adminUi",
"device": {
"hwId": string,
"product": string,
"ethIfs": [{
"if": string,
"ipv4": string,
"ipv6": string
}],
"online": bool,
"version": string
}
}
{
"mt": "SearchInfo",
"dn": "PBX Berlin ",
"link": "devices?header=devices&listItem=009033410fcb&contentId=adminUi",
"relevance": 500,
"type": "device",
"device": {
"hwId": "009033410fcb",
"product": "IP811",
"ethIfs": [{
"if": "ETH0",
"ipv4": "192.168.0.210",
"ipv6": "fec0:9033:0:230:290:33ff:fe41:ca"
}],
"online": true,
"version": "14r2 beta3 [1420276/1420276/600]"
}
}
This message is sent by the API provider when the search has been completed and no further SearchInfo messages will be sent.
{
"mt": "SearchResult",
"src": string
}