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

From stoney cloud
Jump to: navigation, search
[unchecked revision][unchecked revision]
Line 1: Line 1:
 
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.
  
* <code>https://api.example.com/v1/search?q=fluffy+dragon</code>.
+
* <code>https://api.example.com/v1/search?q=fluffy+dragon&entries=15</code>.
  
 
* Minimum number of characters are 3.
 
* Minimum number of characters are 3.
 
* number of entries returned '''per''' object type:
 
* number of entries returned '''per''' object type:
 
** default: 5
 
** default: 5
** max (can be raised by appropriate get parameters): 15
+
** max (can be raised by '''entries''' get parameter): 15
  
 
Vist [[stoney_core:_Global_Searches]] for the return values per resource.
 
Vist [[stoney_core:_Global_Searches]] for the return values per resource.
  
 
TBD: Update collection resource. Both resources should return the same values.
 
TBD: Update collection resource. Both resources should return the same values.
 +
 +
TBD: We need to define a
  
 
<source lang='javascript'>
 
<source lang='javascript'>
Line 19: Line 21:
 
     [
 
     [
 
       { "id": 4000000,
 
       { "id": 4000000,
         "organization": gugug. ltd.,  
+
         "organization": "Reseller ltd.",  
 
         ... ,   
 
         ... ,   
 
         "location": "https://api.selfcare.com/v1/resellers/4000000"
 
         "location": "https://api.selfcare.com/v1/resellers/4000000"

Revision as of 17:51, 9 January 2014

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

  • Minimum number of characters are 3.
  • number of entries returned per object type:
    • default: 5
    • max (can be raised by entries get parameter): 15

Vist stoney_core:_Global_Searches for the return values per resource.

TBD: Update collection resource. Both resources should return the same values.

TBD: We need to define a

{
  "resellers":
  {
    "resources":
    [
      { "id": 4000000,
        "organization": "Reseller ltd.", 
        ... ,  
        "location": "https://api.selfcare.com/v1/resellers/4000000"
      },
      { "id": 4000001, ... }
    ],
    "location": "https://api.selfcare.com/v1/resellers/?q=fluffy+dragon"
  },
  "customers":
  {
    "resources":
    [
      { "id": 5000000, ... },
      { "id": 5000001, ... }
    ],
    "location": "https://api.selfcare.com/v1/customers/?q=fluffy+dragon"
  },
  ...
}