Search Resource

Endpoints under /search allow you to collect data resources that share some metadata characteristics. Compare the browse functionality, that returns a set of data resources based on the resource's location. Searchable characteristics include facets and keywords.
The results of a search are collected in a SearchResult object, which is assigned a unique key value on creation. Access control restrictions apply to the search API. Search results are restricted to data resources included in the data sources included in the active users' role.

GET /v2/search/facets

A GET request to the /search/facets endpoint retrieves a list of defined search facets.

Response Body
media type data type description
application/json map of array of FacetSelection (JSON) A list of FacetSelection objects, in JSON format.

Example

Request
GET /v2/search/facets
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "..." : {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  }
} ]
                
              

POST /v2/search/new

A POST request to the /search/new endpoint initiates a search, and collects the results in a SearchResult object.

Request Body
media type data type description
application/json SearchCriteria (JSON) The search criteria including the start point and size of the result set, in JSON format.
Response Body
media type data type description
application/json SearchResult (JSON) A SearchResult object, containing the matching objects in JSON format.

Example

Request
POST /v2/search/new
Content-Type: application/json
Accept: application/json

                
{
  "pagingCriteria" : {
    "start" : 12345,
    "size" : 12345
  },
  "searchPhrase" : "...",
  "facetSelections" : [ {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  }, {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  } ],
  "entityScope" : [ "...", "..." ],
  "searchType" : "BASIC",
  "partialSearch" : true
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "refDataResources" : [ { }, { } ],
  "facetSelections" : [ {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  }, {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  } ],
  "preFilters" : [ {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  }, {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  } ],
  "entities" : [ { }, { } ],
  "facetResults" : [ {
    "name" : "...",
    "totalCount" : 12345,
    "categoryCounts" : {
      "property1" : 12345,
      "property2" : 12345
    },
    "displayName" : "..."
  }, {
    "name" : "...",
    "totalCount" : 12345,
    "categoryCounts" : {
      "property1" : 12345,
      "property2" : 12345
    },
    "displayName" : "..."
  } ],
  "matchedEntityCount" : 12345,
  "matchedKeys" : [ "...", "..." ],
  "responseEntityCount" : 12345,
  "facetGroups" : [ { }, { } ]
}
                
              

POST /v2/search/page

A POST request to the /search/page endpoint returns a new set of results for the previous search/new or search/runFacet call. Each subsequent call allows you to increment the page index and return the next page of results.

Request Body
media type data type description
application/json SearchCriteria (JSON) The start point and size of the search results.
Response Body
media type data type description
application/json SearchResult (JSON) A SearchResult object, containing the matching objects in JSON format.

Example

Request
POST /v2/search/page
Content-Type: application/json
Accept: application/json

                
{
  "pagingCriteria" : {
    "start" : 12345,
    "size" : 12345
  },
  "searchPhrase" : "...",
  "facetSelections" : [ {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  }, {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  } ],
  "entityScope" : [ "...", "..." ],
  "searchType" : "BASIC",
  "partialSearch" : true
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "refDataResources" : [ { }, { } ],
  "facetSelections" : [ {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  }, {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  } ],
  "preFilters" : [ {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  }, {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  } ],
  "entities" : [ { }, { } ],
  "facetResults" : [ {
    "name" : "...",
    "totalCount" : 12345,
    "categoryCounts" : {
      "property1" : 12345,
      "property2" : 12345
    },
    "displayName" : "..."
  }, {
    "name" : "...",
    "totalCount" : 12345,
    "categoryCounts" : {
      "property1" : 12345,
      "property2" : 12345
    },
    "displayName" : "..."
  } ],
  "matchedEntityCount" : 12345,
  "matchedKeys" : [ "...", "..." ],
  "responseEntityCount" : 12345,
  "facetGroups" : [ { }, { } ]
}
                
              

POST /v2/search/runFacet

A POST request to the /search/runFacet endpoint initiates a search for entities that match one or more facet values. If you want to include keywords with the search criteria, use search/new instead.

Request Body
media type data type
application/json SearchCriteria (JSON)
Response Body
media type data type description
application/json SearchResult (JSON) A SearchResult object, containing the matching objects in JSON format.

Example

Request
POST /v2/search/runFacet
Content-Type: application/json
Accept: application/json

                
{
  "pagingCriteria" : {
    "start" : 12345,
    "size" : 12345
  },
  "searchPhrase" : "...",
  "facetSelections" : [ {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  }, {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  } ],
  "entityScope" : [ "...", "..." ],
  "searchType" : "ADVANCED",
  "partialSearch" : true
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "refDataResources" : [ { }, { } ],
  "facetSelections" : [ {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  }, {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  } ],
  "preFilters" : [ {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  }, {
    "facetCategories" : [ "...", "..." ],
    "facetName" : "...",
    "displayName" : "..."
  } ],
  "entities" : [ { }, { } ],
  "facetResults" : [ {
    "name" : "...",
    "totalCount" : 12345,
    "categoryCounts" : {
      "property1" : 12345,
      "property2" : 12345
    },
    "displayName" : "..."
  }, {
    "name" : "...",
    "totalCount" : 12345,
    "categoryCounts" : {
      "property1" : 12345,
      "property2" : 12345
    },
    "displayName" : "..."
  } ],
  "matchedEntityCount" : 12345,
  "matchedKeys" : [ "...", "..." ],
  "responseEntityCount" : 12345,
  "facetGroups" : [ { }, { } ]
}