Search assets in a given site
get
                    /resources/v1/search/sites/{siteName}/assets
                The resource endpoint returns the list of all assets in a site. 
It is a Collection Resource.
                It is a Collection Resource.
The following tables summarize the client request.
Path Parameters
                                | Name | Description | Format | 
|---|---|---|
| siteName | Name of the site | string | 
Query Parameters
                                | Name | Description | Format | 
|---|---|---|
| countonly | Accepts a Boolean value. Setting it true displays only the count, and no results are returned. The default is false. | boolean | 
| field:[fieldname]:[operation] | Specify a query condition for a field of [fieldname] with the specified operation. [Operation] is optional and can be one of equals, range, startswith, phrase, wildcard, similar, or contains; the default is contains. For the range operation, the value's format is {lower bound}:{upper bound}; for example, 1:10. | string | 
| fields | Accepts a comma-separated list of attribute names for each search result. By default only name and description are given for each search result. | string | 
| limit | Specify the total number of items to be returned. | number | 
| links | Accepts a comma-separated list of link names. By default, this parameter gives all the links (next, prev, first, last, schema, self, and canonical resources). | string | 
| offset | Specify the starting index from where the results will be returned. | number | 
| orderBy | Specify the field on which the results should be sorted. Usage: orderBy=[fieldname]:[asc/des]. Note: For Lucene, sorting is possible only for fields that were indexed as "not tokenized". | string | 
| q | Specify a query string, the search engine-specific query that was specified during the configuration. (The default search engine is Lucene.) | string | 
| searchengine | Specify what search engine to use to find the results. the default search engine is Lucene. | string | 
| totalResults | Accepts a Boolean value. Setting it to true displays the total results field in the response. The default is false. | boolean | 
The following tables summarize the server response.
Supported Media Types
                                - application/json
- application/xml
200 Response
                                    List of all assets in a site.
                                
                                
                                
                            The following example shows how to get any 2 asset names of any asset type in the avisports sample site in WebCenter Sites, by submitting a GET request on the REST resource using cURL. The REST URL also specifies to give only the next link.
Query param details:
- "limit=2": Need only 2 results. Since 'offset' is not given, the default is 0. 
- "fields=name" : Need only the name of an asset. 
- "links=next": Show only the next link. 
curl -i -H "Accept: application/json" -X GET "http://<host>:<port>/<context>/REST/resources/v1/search/sites/avisports/assets?fields=name&limit=2&links=next"
Example of Response Header
The following example shows the response header.
<Response header>Cache-Control: max-age=0 ETag: "d605d7410eedbd743986bf087f03066ccfa977987b9ccfc5cced1f3564762b92" Content-Type: application/json;charset=utf-8
Example of Response Body
The following example shows the contents of the response body, in JSON format.
{
  "offset": 0,
  "limit": 100,
  "count": 2,
  "hasMore": true,
  "links": [
    {
      "href": "http://<host>:<port>/<context>/REST/resources/v1/search/sites/avisports/assets?limit=2&links=next&fields=name&offset=2",
      "rel": "next",
      "templated": false,
      "mediaType": "",
      "method": "",
      "profile": ""
    }
  ],
  "items": [
    {
      "name": "Veteran Skier Says Goodbye",
      "link": {
        "href": "http://<host>:<port>/<context>/REST/resources/v1/aggregates/avisports/AVIArticle/1328196047241",
        "rel": "assetReference",
        "templated": false,
        "mediaType": "",
        "method": "GET",
        "profile": ""
      },
      "id": "AVIArticle:1328196047241"
    },
    {
      "name": "Rookie Skier Makes Her Mark",
      "link": {
        "href": "http://<host>:<port>/<context>/REST/resources/v1/aggregates/avisports/AVIArticle/1328196047309",
        "rel": "assetReference",
        "templated": false,
        "mediaType": "",
        "method": "GET",
        "profile": ""
      },
      "id": "AVIArticle:1328196047309"
    }
  ]
}