Difference between revisions of "stoney core: Search Resource - REST API"

From stoney cloud
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Overview)
Line 2: Line 2:
  
 
= Overview =
 
= Overview =
The search resource provides a full text search over all the available resources.
+
The search resource provides a full text search over all the available resources. The available resources are:
 +
* The main framework called [[:Category:stoney core|stoney core]] is responsible for shared functionality.
 +
* The [[:Category:Self-Service Modules|Self-Service Modules]] expand the initial stoney cloud functionality.
  
 +
A search could look as follows:
 
* <code>https://api.example.com/v1/search?q=fluffy+dragon&entries=15</code>.
 
* <code>https://api.example.com/v1/search?q=fluffy+dragon&entries=15</code>.
  
* Minimum number of characters for the query are 3.
+
The following rules apply:
* number of entries returned '''per''' object type:
+
* The minimum number of characters for the query are 3.
** default: 5
+
* Number of entries returned '''per''' object type:
** max (can be raised by '''entries''' get parameter): 15
+
** Default: 5
* the attributes returned for each individual resource are presently the same as when querying the corresponding resource collection
+
** Maximum: 15 (can be raised by '''entries''' get parameter)
 +
* The attributes returned for each individual resource are presently the same as when querying the corresponding resource collection.
 +
 
 +
= stoney core: search resource methods =
 +
As described above, each resource has its own search methods. The current stoney core resources are:
 +
* [[stoney core: Resellers Resource - REST API]]
 +
* [[stoney core: Customers Resource - REST API]]
 +
* [[stoney core: People Resource - REST API]]
 +
 
 +
The following special resources don't have additional search methods:
 +
* [[stoney core: Authentication Resource - REST API]]
 +
* [[stoney core: Search Resource - REST API]]
 +
 
 +
== Resellers Search (GET) ==
 +
 
 +
== Customers Search (GET) ==
 +
 
 +
== People Search (GET) ==
 +
 
  
Visit [[stoney core: Global Searches]] for the return values per resource.
 
  
TBD
 
* clarify number of entries (possibly rename?)
 
  
 
<source lang='javascript'>
 
<source lang='javascript'>

Revision as of 15:11, 14 May 2014

Also visit stoney core: Search Resource Mapping (REST - LDAP) and stoney core: Global Searches.

Overview

The search resource provides a full text search over all the available resources. The available resources are:

A search could look as follows:

The following rules apply:

  • The minimum number of characters for the query are 3.
  • Number of entries returned per object type:
    • Default: 5
    • Maximum: 15 (can be raised by entries get parameter)
  • The attributes returned for each individual resource are presently the same as when querying the corresponding resource collection.

stoney core: search resource methods

As described above, each resource has its own search methods. The current stoney core resources are:

The following special resources don't have additional search methods:

Resellers Search (GET)

Customers Search (GET)

People Search (GET)

{
  "resellers":
  {
    "resources":
    [
      { "id": 4000000,
        "location": "https://api.example.com/v1/resellers/4000000",
        "isCompany": true,
        "isActive": true,
        "resellerName": "Example Reseller Ltd"
      },
      { "id": 4000001,
        "location": "https://api.example.com/v1/resellers/4000001",
        "isCompany": true,
        "isActive": true,
        "resellerName": "Example Reseller No 2 Ltd"
      }
    ],
    "location": "https://api.example.com/v1/resellers/?q=example"
  },
  "customers":
  {
    "resources":
    [
      { "id": 5000000,
        "location": "https://api.example.com/v1/customers/5000000",
        "isCompany": true,
        "isActive": true,
        "customerName": "Example Customer Ltd"        
       },
      { "id": 5000001, ... }
    ],
    "location": "https://api.example.com/v1/customers/?q=example"
  },
  ...
}