Overview
AIE supports two REST API interfaces.
- JSON REST API: The newer API was designed for simplicity, and returns JSON documents as search results. It can be used from a Javascript environment.
- XML REST API: The older, or "legacy", API returns XML documents as query results.
The JSON API is the wave of the future here. The XML API is not officially deprecated, but it should be used only in situations where the JSON API does not fully support your application.
View incoming links.
HTTP GET/POST Parameters
The HTTP/REST API GET/POST Parameters are implemented through the com.attivio.sdk.search.QueryRequest . Note that the q and workflows HTTP GET/POST parameters are required.
Parameter | Type(1) | Default | Multi(2) | Description | Example |
---|---|---|---|---|---|
abc.enabled | boolean | false | no | Whether or not the query should be annotated as an Attivio Business Center query. | abc.enabled=true |
cacheable | boolean | true | no | Is the result cacheable? | cacheable=false |
clientid | String | optional | no | Client ID. | clientid=1234 |
collapse | String | optional | no | Field collapsing specification. | Example: collapse=cat(mode=2D, rows=10) |
debug | boolean | false | no | Enable debugging information. true or false | debug=true |
facet | String | optional | yes | Comma separated list of discrete facet definitions. | Example: facet=title(mincutoff=3,sortby=count),category(maxnumbuckets= 100) |
facet.ff | enum | OFF | no | Facet finder mode. [ OFF | CORPUS | RESULTS ] | facet.ff=CORPUS |
facet.ffcount | unsigned | 3 | no | Limit the number of facets returned by Facet Finder service | facet.ffcount=4 |
facet.filter | String | optional | no | Facet bucket to use for filtering results. | Example: facet.filter=department:"Sales Engineering" |
fields | String | optional | yes | Comma separated list of field expressions to return with response documents. | fields=*,geodistance(position, 72.3, 71.5, miles) AS distance |
filter | String | optional | yes | Advanced Query Language filter. Preferred for programmatic/developer created filters | filter=POLYGON(position, (5.0, 9.0), (5.0, 11.0), (6.0, 11.0), (6.0, 9.0), units=radians) |
geo.distanceFilter | String | optional | yes | A distance geo search filter | geo.distanceFilter=5.5 or geo.distanceFilter=fieldName(minDistance=0.0, maxDistance=5.5, latitude=0.0, longitude=0.0, distanceUnits=MILES) |
geo.distanceUnits | enum | KILOMETERS | no | The units distances are specified. [ KILOMETERS | METERS | MILES | YARDS | NAUTICAL_MILES ] | geo.distanceUnits=MILES |
geo.field | String | optional | no | The default field to use for geo search. | geo.field=position |
geo.latitude | double | optional | no | The default latitude of center point for geo search. | geo.latitude=0 |
geo.longitude | double | optional | no | The default longitude of center point for geo search. | geo.longitude=0 |
geo.polygonFilter | String | optional | yes | A polygon geo search filter | geo.polygonFilter=[fieldName](0, 0) (1, 0) (1, 1) (0, 1) |
highlight | boolean | false | no | highlight results based on schema configuration | highlight=true |
highlight.mode | enum | HTML | no | Mode for annotating matches and scopes in highlighted text. [ HTML, XML, TEXT, RAW ] | highlight.mode=XML |
highlight.scope | String | highlight | no | Name of the scope used to annotate matching phrases in highlighted text. | highlight.scope=highlight |
hits | unsigned | 10L | no | Number of records to return. | hits=100 |
includeMetadataInResponse | boolean | false | no | Include non essential/data (from the index) information in the response. true or false | debug=true |
join.rollup | enum | AGGREGATE | no | Join children aggregation mode. [ AGGREGATE | TREE ] | join.rollup=TREE |
join.facet | enum | DISTINCT | no | Join children facet aggregation mode. [ DISTINCT | FULL ] | join.facet=FULL |
l.acronym.dictionary | String | optional | no | Name of the acronym dictionary to use. | l.acronym.dictionary=myAcronymDictionary |
l.acronyms.boost | int | 100 | no | Set boost for expanded acronyms. | l.acronyms.boost=25 |
l.acronyms.mode | enum | OFF | no | Enable acronym expansion. [ OFF | ON | AUTO ] | l.acronyms.mode=off |
l.clustering.clustercount | unsigned | 50 | no | Number of result clusters to generate | l.clustering.clustercount=100 |
l.clustering.doccount | unsigned | 50 | no | Number of documents to consider for clustering | l.clustering.doccount=100 |
l.clustering.fields | String | optional | no | Comma separated list of clustering fields. | l.clustering.fields=title,body |
l.clustering.mode | enum | OFF | no | Clustering mode. [ OFF | QUERY | DOCUMENT ] | l.clustering.mode=query |
l.spellexpandsize | unsigned | 2 | no | Sets the number of expanded suggestions that will be added for misspelled terms. | l.spellexpandsize=2 |
l.spell.mode | enum | OFF | no | Spelling Correction Mode. [ OFF | SUGGEST | AUTOCORRECT | AUTOEXPAND ] | l.spell.mode=SUGGEST |
l.stopwords.mode | enum | OFF | no | Enable stop word removal. [ OFF | REMOVE | BLOCK ] | l.stopwords.mode=off |
l.synonym.dictionary | String | optional | no | Name of the synonym dictionary to use. | l.synonym.dictionary=mySynonymDictionary |
l.synonymBoost | int | 100 | no | set synonym boost or down weight. | l.synoynmBoost=25 |
l.synonyms.mode | enum | OFF | no | Enable synonyms. [ OFF | ON | AUTO ] | l.synoynms.mode=off |
locale | String | en | no | 2 letter iso code for locale. | locale=en |
offset | unsigned | 0L | no | Retrieve number of records starting from offset. | offset=20 |
partialResults | boolean | false | no | Enable/Disable partial results from distributed indexes | partialResults=false |
q | String | required | no | Query String | q=cat |
q.boost | String | optional | yes | Query Boost Expression | q.boost=foo |
q.boost.type | String | advanced | no | Query Language used by query boosts. [ simple | advanced ] | q.boost.type=advanced |
q.filter | String | optional | yes | Simple Query Language filter. Usually populated from a user-entered text box. | q.filter=color:black |
q.filter.type | String | simple | no | Deprecated. Query Language used by filter. [ simple | advanced ] | q.filter.type=advanced |
q.maxResubmits | unsigned | 0 | no | Maximum number of times query can be resubmitted. | q.maxResubmits=5 |
q.type | String | advanced | no | Query Language used. [ simple | advanced ] | q.type=simple |
rangeFacet.filter | String | optional | no | Range Facet bucket to use for filtering results. | Example: rangeFacet.filter=size:[0 TO 50] |
relevancymodel | String | optional | no | Relevancy model or model name configured in AIE to use for the query | relevancyModel=name(myTestModel),defaultSearchField(100, term(title,200,true,tfidf),term(anchortext,200,true,tfidf),phrase(title, 300,true,tfidf),phrase(anchortext,300,true,tfidf),completeness(title, 1000,true,tfidf),completeness(anchortext,1000,true,tfidf)), freshness(date,0.0850),static(linkfactor,1.0) relevancyModel=default |
relevancyModelName | String | optional | no | Relevancy model name configured in AIE to use for the query, such that it is not wrapped in "name()". See also, "relevancymodel", above. | relevancyModelName=myTestModel |
schema | String | optional | no | Name of the schema to use for query processing | schema=default |
score.function | String | optional | yes | Score function to boost matching documents with | score.function=product(sum(5.5, boostfield), boostfactorfield) |
scoringModel | String | optional | no | Name of the scoring model to use | scoringModel=default |
searchProfile | String | optional | no | Name of the search profile to use. | searchProfile=mySearchProfile |
searchDepth | unsigned | 0 | no | Number of rows deep to search. | searchDepth=100 |
seed | long | 0L | no | Seed to use for random number generation (random sorting, etc) | seed=38293843928 |
sort | String | optional | no | Comma separated list of fields to sort by [ ASC | DESC ] | sort=title:asc,body:desc |
centertime | Date | optional | no | Date to use for current/center time for any date operations in YYYY-MM-ddTHH:mm:ss.SSS format | centertime=2018-01-01T12:00:00.000 |
timezone | String | UTC | no | Time Zone for date interpretation. | timezone=EST |
workflows | String | required | no | Comma separated list of workflows to send the query through. | workflows=defaultQuery,searcher,defaultResponse |
any unknown parameter | String | optional | optional | All unknown cgi parameters are set as message properties via setProperty(String, Object) . These properties can then be used by custom transformers or accessed in cgi query logs for reporting purposes. | myProp=myValue |
(1) The Type column indicates the data type expected for values of the query parameter. If values are specified that are not of this type, the default value will be used instead, unless the parameter is optional, in which case the parameter will be ignored.
(2) The Multi column indicates whether or not the HTTP query parameter can be specified multiple times. For example, since the q.filter parameter is Multi=yes, you can specify it mulitiple times like so q.filter=filter1&q.filter=filter2
.
Extended Syntax Documentation
Some HTTP GET/POST parameters have more complex syntax. See the links below for full syntax and examples.
Parameter | Documentation |
---|---|
facet | |
rangeFacet | |
schemaFacet | |
fields | |
score.function |