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.
A GET request to the /search/facets
endpoint retrieves a list of defined search facets.
media type | data type | description |
---|---|---|
application/json | map of array of FacetSelection (JSON) | A list of FacetSelection objects, in JSON format. |
GET /v2/search/facets
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"..." : {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
}
} ]
A POST request to the /search/new
endpoint initiates a search, and collects the results in a
SearchResult object.
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. |
media type | data type | description |
---|---|---|
application/json | SearchResult (JSON) | A SearchResult object, containing the matching objects in JSON format. |
POST /v2/search/new
Content-Type: application/json
Accept: application/json
{
"searchType" : "BASIC",
"pagingCriteria" : {
"start" : 12345,
"size" : 12345
},
"lastSelectedFacetName" : "...",
"searchPhrase" : "...",
"facetSelections" : [ {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
}, {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
} ],
"entityScope" : [ "...", "..." ],
"sortBySpecs" : [ {
"propertyName" : "...",
"ascending" : true
}, {
"propertyName" : "...",
"ascending" : true
} ],
"applyFacets" : true,
"partialSearch" : true,
"preformedQuery" : true
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"facetResults" : [ {
"categoryCounts" : {
"property1" : 12345,
"property2" : 12345
},
"displayName" : "...",
"totalCount" : 12345,
"name" : "..."
}, {
"categoryCounts" : {
"property1" : 12345,
"property2" : 12345
},
"displayName" : "...",
"totalCount" : 12345,
"name" : "..."
} ],
"preFilters" : [ {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
}, {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
} ],
"entities" : [ { }, { } ],
"matchedEntityCount" : 12345,
"totalResultCount" : 12345,
"responseEntityCount" : 12345,
"matchedKeys" : [ "...", "..." ],
"facetGroups" : [ { }, { } ],
"refDataResources" : [ { }, { } ],
"facetSelections" : [ {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
}, {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
} ]
}
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.
media type | data type | description |
---|---|---|
application/json | SearchCriteria (JSON) | The start point and size of the search results. |
media type | data type | description |
---|---|---|
application/json | SearchResult (JSON) | A SearchResult object, containing the matching objects in JSON format. |
POST /v2/search/page
Content-Type: application/json
Accept: application/json
{
"searchType" : "ADVANCED",
"pagingCriteria" : {
"start" : 12345,
"size" : 12345
},
"lastSelectedFacetName" : "...",
"searchPhrase" : "...",
"facetSelections" : [ {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
}, {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
} ],
"entityScope" : [ "...", "..." ],
"sortBySpecs" : [ {
"propertyName" : "...",
"ascending" : true
}, {
"propertyName" : "...",
"ascending" : true
} ],
"applyFacets" : true,
"partialSearch" : true,
"preformedQuery" : true
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"facetResults" : [ {
"categoryCounts" : {
"property1" : 12345,
"property2" : 12345
},
"displayName" : "...",
"totalCount" : 12345,
"name" : "..."
}, {
"categoryCounts" : {
"property1" : 12345,
"property2" : 12345
},
"displayName" : "...",
"totalCount" : 12345,
"name" : "..."
} ],
"preFilters" : [ {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
}, {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
} ],
"entities" : [ { }, { } ],
"matchedEntityCount" : 12345,
"totalResultCount" : 12345,
"responseEntityCount" : 12345,
"matchedKeys" : [ "...", "..." ],
"facetGroups" : [ { }, { } ],
"refDataResources" : [ { }, { } ],
"facetSelections" : [ {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
}, {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
} ]
}
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.
media type | data type |
---|---|
application/json | SearchCriteria (JSON) |
media type | data type | description |
---|---|---|
application/json | SearchResult (JSON) | A SearchResult object, containing the matching objects in JSON format. |
POST /v2/search/runFacet
Content-Type: application/json
Accept: application/json
{
"searchType" : "BASIC",
"pagingCriteria" : {
"start" : 12345,
"size" : 12345
},
"lastSelectedFacetName" : "...",
"searchPhrase" : "...",
"facetSelections" : [ {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
}, {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
} ],
"entityScope" : [ "...", "..." ],
"sortBySpecs" : [ {
"propertyName" : "...",
"ascending" : true
}, {
"propertyName" : "...",
"ascending" : true
} ],
"applyFacets" : true,
"partialSearch" : true,
"preformedQuery" : true
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"facetResults" : [ {
"categoryCounts" : {
"property1" : 12345,
"property2" : 12345
},
"displayName" : "...",
"totalCount" : 12345,
"name" : "..."
}, {
"categoryCounts" : {
"property1" : 12345,
"property2" : 12345
},
"displayName" : "...",
"totalCount" : 12345,
"name" : "..."
} ],
"preFilters" : [ {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
}, {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
} ],
"entities" : [ { }, { } ],
"matchedEntityCount" : 12345,
"totalResultCount" : 12345,
"responseEntityCount" : 12345,
"matchedKeys" : [ "...", "..." ],
"facetGroups" : [ { }, { } ],
"refDataResources" : [ { }, { } ],
"facetSelections" : [ {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
}, {
"facetName" : "...",
"displayName" : "...",
"facetCategories" : [ "...", "..." ]
} ]
}
A GET request to the /search/user
endpoint retrieves a list of UserTO objects based on partial characters from there name.
name | type | description |
---|---|---|
limit | query | |
searchUsersBy | query |
media type | data type | description |
---|---|---|
application/json | array of UserTO (JSON) | A list of UserTO Objects |
GET /v2/search/user
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"attributes" : {
"property1" : { },
"property2" : { }
},
"name" : "...",
"key" : "..."
} ]