The Wayback Machine - https://web.archive.org/web/20160328110415/https://dev.havenondemand.com/docs/api-overview.html

Introduction

HPE Haven OnDemand is a platform for building cognitive computing solutions using text analysis, speech recognition, image analysis, indexing and search APIs.

Simply put, developers and businesses use APIs to add advanced capabilities such as natural language processing, machine learning, and predictive analytics to their applications.

APIs provide Developers with the means to rapidly integrate new functionality in their applications with a minimal amount of code.

For example, if you wanted to find out what people are saying about your company on social media, you could call the Haven OnDemand sentiment analysis API to analyze the customer messages. If you had to analyze the following message "The restaurant was amazing, but the guest services were terrible".

Calling the Haven OnDemand sentiment analysis API...

You would get the following contextual insights from the results. In this case, each topic is identified and the relating sentiment score determined, as well as an aggregate sentiment score for the entire string or document. The score is a numeric value between -1 and 1, with 0 being neutral. A value close to -1 is negative. A value close to 1 is positive.

Many of the APIs are powered by the HPE IDOL (Intelligent Data Operating Layer) engine, the same one that Gartner puts as a leader for Enterprise Search in their Magic Quadrant.

Early Access

We're providing early access to the APIs at no charge, so you can use the APIs, provide feedback, and help to shape our roadmap. More than 10,000 users are already taking advantage of this program already. Full terms of service including guidance on commercial use can be found here, and we will be sure to let all our users know when we are planning to move to full service and out of early access. Developers are encouraged to get support via our forums, read the documentation, and check out the community contributed tutorials.

Security Overview

Haven OnDemand takes the confidentiality, integrity, and availability of customer information as axiomatic. Customers retain ownership of all information that they upload.

The Haven OnDemand team have included multiple layers of security control throughout the Haven OnDemand platform to protect against a wide range of threats. Learn more about our security policy here.

Exclusive Preview APIs

We're passionate about providing you with the tools needed to expand your ability to tackle the toughest information challenges. That's why we've pledged our unyielding commitment to R&D; excellence. We're constantly advancing existing APIs and innovating new Preview APIs to provide you with a diverse set of tools needed to build a new class of apps.

Can't wait to get your hands on the next Haven OnDemand API? As a Haven OnDemand Innovator, you gain exclusive access to our Preview APIs. Be one of the first to experience the latest Haven OnDemand technology without having to wait for feature releases.

Sign up for a free account today for exclusive access.

*Please note that Preview APIs are being continually improved, updated, and enhanced.

Haven OnDemand has the following Preview API groups:

  • Connectors
  • Document Classification
  • Policy
  • Prediction
  • Unstructured Text Indexing
  • User Management
  • Vertica Service

The following additional Preview APIs are available:

  • Create Query Profile
  • Delete Query Profile
  • Update Query Profile
  • Document Categorization
  • OCR Document

For a full list of Preview APIs, go to the APIs page, and click View, then click Preview

Audio-Video Analytics

The first and only API in this group enables the speech-to-text transcription from audio and video files. The transcribed text can then be analyzed, indexed and searched using combinations of the other APIs.

Speech Recognition

The Speech Recognition API creates a transcript of the text in an audio or video file. You can then use this output with other Haven OnDemand APIs, such as Concept Extraction or Add to Text Index, to gain further insight and analysis.

The Speech Recognition API currently supports broadcast-quality content in several languages, as well as telephony grade audio for some of those languages. For a list of the available languages, see the Request tab. Check back soon for additional languages.

For a list of supported video and audio file formats, see Supported Media Formats.

Connectors

The connector APIs allow you to crawl, index and analyze data from local/distributed file systems and the web, including SharePoint and DropBox. Any file system supported by the HPE IDOL connector already includes support for HPE Haven OnDemand, making this an Enterprise ready platform!

Cancel Connector Schedule

Connectors allow you to retrieve information from external systems and update it through Haven OnDemand APIs. You can use it to create an index of the data in the external repository, automate workflows, for notifications, or to facilitate migration to other locations.

The Cancel Connector Schedule API allows you to stop a configured connector schedule. This API stops the specified schedule and removes it from the connector configuration.

Note: For onsite flavor connectors, after you cancel the schedule, you must restart the connector for it to detect your configuration changes.

Connector History

Connectors allow you to retrieve information from external systems and update it through Haven OnDemand APIs. You can use it to create an index of the data in the external repository, automate workflows, for notifications, or to facilitate migration to other locations.

The Connector History API allows you to check the history of your cloud flavor connectors and connector runs. It returns details of all connector runs, including scheduled runs and any runs that you started manually with the Start Connector API.

The optional parameters allow you to restrict the results to particular connectors, time ranges, or connector job statuses. You can also filter by one or more connector tokens, which identify a particular run of a connector. The Start Connector API returns this token when you start the connector.

Connector Status

Connectors allow you to retrieve information from external systems and update it through Haven OnDemand APIs. You can use it to create an index of the data in the external repository, automate workflows, for notifications, or to facilitate migration to other locations.

The Connector Status API allows you to check the status of the last run of your connector (either for a scheduled run, or a run that you started manually with the Start Connector API).

You can optionally add the schedule_information parameter to return the time of the next scheduled run for any created connector with a configured schedule.

This API is available only for cloud connector flavors, such as the Web Cloud Connector.

To get the status of an onsite flavor connector, you can send the following action to the ACI port of your connector (you set the ACI port when you create the connector configuration):

localhost:ACIPort/action=QueueInfo&QueueAction;=GetStatus&QueueName;=Fetch

This action returns the same information as the Connector Status API, in XML format. It returns the status of all previous connector runs, with the most recent status returned first.

Create Connector

Connectors allow you to retrieve information from external systems and update it through Haven OnDemand APIs. You can use it to create an index of the data in the external repository, automate workflows, for notifications, or to facilitate migration to other locations.

The Create Connector API allows you to create a connector configuration to connect to the external repository, and specifies what content to retrieve. You can create a schedule so that Haven OnDemand automatically runs the connector. For Cloud flavor connectors, you can manually run the connector by using the Start Connector API.

Delete Connector

Connectors allow you to retrieve information from external systems and update it through Haven OnDemand APIs. You can use it to create an index of the data in the external repository, automate workflows, for notifications, or to facilitate migration to other locations.

The Delete Connector API allows you to delete an existing connector configuration. You provide the name of a connector that you created with the Create Connector API. After you send the API request, the API asks for confirmation that you want to delete the connector.

After you delete the connector, you cannot use that configuration again.

Retrieve Config

Connectors allow you to retrieve information from external systems and update it through Haven OnDemand APIs. You can use them to create an index of the data in the external repository, automate workflows, for notifications, or to facilitate migration to other locations.

The Retrieve Config API retrieves information about the configuration of one of your connectors.

Start Connector

Connectors allow you to retrieve information from external systems and update it through Haven OnDemand APIs. You can use it to create an index of the data in the external repository, automate workflows, for notifications, or to facilitate migration to other locations.

The Start Connector API starts a run of a cloud flavor connector according to the configuration that you created with the Create Connector API.

By default, the connector runs with its normal configuration, and sends content to the configured destination. You can override the connector destination when you start the run. For example, if the connector is configured to index into one Haven OnDemand text index, you can trigger a run to output the data to a different index.

Stop Connector

Connectors allow you to retrieve information from external systems and update it through Haven OnDemand APIs. You can use it to create an index of the data in the external repository, automate workflows, for notifications, or to facilitate migration to other locations.

The Stop Connector API allows you to manually stop a connector from running that was started using the Start Connector API.

Note: This API is available only for cloud flavor connectors, such as the Web Cloud Connector.

Update Connector

Connectors allow you to retrieve information from external systems and update it through Haven OnDemand APIs. You can use them to create an index of the data in the external repository, automate workflows, for notifications, or to facilitate migration to other locations.

The Update Connector API updates the parameters for an existing connector. Using the Update Connector API (instead of deleting and recreating the connector) retains the existing status of the index, which prevents unnecessary reindexing.

Format Conversion

The format conversion group of APIs provide functions that allow you to process a wide range of files, and extract text content for further processing. Render document files as HTML with support for 500+ file formats

Expand Container

The Expand Container API extracts content from container files (that is, files that contain a set of other files, such as ZIP or TAR archives, and PST files). For a full list of supported container formats, see Supported Formats.

The API extracts the files from the container file and stores them for use in other APIs. It returns a list of the file names and object store references of the files that it extracts from the container. You can pass these references to other APIs to process the stored files (in the same way as you use references that you store by using the Store Object API).

OCR Document

The OCR Document API extracts text from an image that you provide.

Store Object

The Store Object API takes a file, reference, or an input URL and stores the contents of the document for use in other APIs. It returns the object store reference, which you can pass to other APIs to process the document that you store.

Text Extraction

The Text Extraction API uses HPE KeyView to extract metadata and text content from a file that you provide. The API can handle over 500 different file formats (for more information, see Supported Formats).

View Document

The View Document API renders documents into HTML, and highlights text in the document. It uses HPE KeyView to extract the contents of over 500 different file formats, and convert them to HTML (for more information, see Supported Formats).

Graph Analysis

The Graph APIs allow you to interrogate a knowledge graph structure. Currently the graph APIs can be used in conjunction with a graph structure derived from the links in Wikipedia.

Get Common Neighbors

The Get Common Neighbors API finds the common neighbors of the nodes that you specify.

Get Neighbors

The Get Neighbors API returns the neighbors of one or more specified nodes. By default, the API sorts neighbors by their similarity to the specified node.

Get Nodes

The Get Nodes API lists the nodes in the graph. By default, the API sorts nodes by their in-degree (that is, the number of edges that point to the specified node). This allows you to find the most important nodes in the graph. You can use the ids and name attributes of nodes as inputs to other graph actions.

Get Shortest Path

The Get Shortest Path API finds the shortest path in the graph between two specified nodes.

Get Subgraph

The Get Subgraph API returns a subgraph based on a set of nodes that you provide, including all the edges that occur between these nodes in the main graph.

Summarize Graph

The Summarize Graph API returns a summary of the number of nodes and edges in the graph, and details of the stored edge and node attributes.

HP Labs Sandbox

Various experimental APIs from HP Labs.

Anomaly Detection

The Anomaly Detection API detects anomalies in structured data. This API analyses structured data (in CSV format), and uses a novel anomaly scoring algorithm developed at Hewlett Packard Enterprise Labs to extract the most anomalous records (rows) in the data.

Trend Analysis

The Trend Analysis API discovers significant changes and trends between two groups of records. You provide a set of structured data that is split into two sets (for example, for two different time periods), and the API lists the changes between them. The API analyzes all combinations of the data that you provide to find the most significant differences. This API uses a novel analytics operation, developed at Hewlett Packard Enterprise Labs.

Image Analysis

The image analysis APIs provide functions that allow you to process image files and analyze the contents. It includes APIs for Optical Character Recognition (OCR), image detection, face detection, and barcode recognition.

Barcode Recognition

The Barcode Recognition API detects barcodes from an image. For each recognized barcode, it returns the type, the decoded barcode value, and the coordinates of the corners of a box that surrounds the barcode.

The Barcode Recognition API recognizes barcodes with the following formats:

  • EAN-13 (includes ISBN)
    Note: The EAN-13 barcode type is a superset of the UPC-A type, so the API returns the EAN type, rather than the UPC value. To find the UPC value, remove the leading 0 from the EAN value.
  • EAN-8
  • EAN-2 (includes ISBN-2)
  • EAN-5 (includes ISBN-5)
  • Codabar
  • Code-128
  • Code-39
  • Code-93
  • Datalogic 2/5
  • Data Matrix
  • IATA 2/5
  • Industrial 2/5
  • Matrix 2/5
  • Patch Code (or Patch)
  • PDF417
  • UCC/EAN-128 (or GS1-128)
  • UPC-A
  • UPC-E
  • QR Code

For more information about barcode formats, refer to www.gs1.org/barcodes/technical/bar_code_types.

For a list of file formats that you can use for images, see Supported Media Formats.

Barcode recognition is most reliable for approximately horizontally or vertically aligned barcodes (up to 20° rotation), although in some cases detection works for all alignments up to 45°. The image must also be high contrast, and preferably two-tone (black and white).

Face Detection

The Face Detection API analyzes an image to find faces. It returns the position of the left and top edges of a bounding box that contains the face, and the width and height of the bounding box.

For a list of file formats that you can use for images, see Supported Media Formats.

Image Recognition

The Image Recognition API matches logos in an image that you provide against a database of corporate logos.

The public data set contains a library of corporate logos, which you can match against. When you submit an image to the API, Haven OnDemand searches your image for sections that match the logos in the database.

The API returns the name of the logo in the database that was detected (based on the stock ticker for the company that owns the logo), and the location of the object in your image. The location is given as the coordinates of the corners of a box that surrounds the matching object.

For a list of file formats that you can use for image files, see Supported Media Formats.

For a list of corporate logos used in the training set for the API, see Corporate Logo Training Set.

The Image Recognition API can be expanded to match objects from other data sets. If you are interested in using this functionality with other data sets, please contact us

OCR Document

See section above. for information on this API

Policy

The Create Policy API allows policy objects to be created.

Create Classification

The Policy Management APIs provide an abstracted layer on top of entity extraction, categorization, and related functionality to allow the definition of policies for the management of information. Classifications can be created to group documents and other objects into collections. Policies enact actions upon documents associated with a collection such as indexing.

Classification involves sorting documents into Collections; all documents in a collection share some common criteria, identified using Conditions.

The collection or collections that a document matches can influence how it is indexed and determine policies that are executed against it.

A Collection Sequence is an ordered list of collections that documents are assessed against; each collection is considered in order until the document matches a collection with a stop on match instruction. Documents can match multiple collections in a collection sequence.

The Create Classification API allows collection sequences, collections, conditions, field sources, lexicons, and lexicon expressions to be created.

Create Policy

he Policy Management APIs provide an abstracted layer on top of entity extraction, categorization, and related functionality to allow the definition of policies for the management of information.Classifications can be created to group documents and other objects into collections. Policies enact actions upon documents associated with a collection such as indexing.

Classification involves sorting documents into Collections; all documents in a collection share some common criteria, identified using Conditions.

The collection or collections that a document matches can influence how it is indexed and determine policies that are executed against it.

The Create Policy API allows policy objects to be created.

Delete Classification

he Policy Management APIs provide an abstracted layer on top of entity extraction, categorization, and related functionality to allow the definition of policies for the management of information. Classifications can be created to group documents and other objects into collections. Policies enact actions upon documents associated with a collection such as indexing.

Classification involves sorting documents into Collections; all documents in a collection share some common criteria, identified using Conditions.

The collection or collections that a document matches can influence how it is indexed and determine policies that are executed against it.

A Collection Sequence is an ordered list of collections that documents are assessed against; each collection is considered in order until the document matches a collection with a stop on match instruction. Documents can match multiple collections in a collection sequence.

The Delete Classification API allows collection sequences, collections, conditions, field sources, lexicons, and lexicon expressions to be deleted.

Delete Policy

he Policy Management APIs provide an abstracted layer on top of entity extraction, categorization, and related functionality to allow the definition of policies for the management of information. Classifications can be created to group documents and other objects into collections. Policies enact actions upon documents associated with a collection such as indexing.

Classification involves sorting documents into Collections; all documents in a collection share some common criteria, identified using Conditions.

The collection or collections that a document matches can influence how it is indexed and determine policies that are executed against it.

The Delete Policy API allows policy objects to be deleted.

Retrieve Classification

he Policy Management APIs provide an abstracted layer on top of entity extraction, categorization, and related functionality to allow the definition of policies for the management of information. Classifications can be created to group documents and other objects into collections. Policies enact actions upon documents associated with a collection such as indexing.

Classification involves sorting documents into Collections; all documents in a collection share some common criteria, identified using Conditions.

The collection or collections that a document matches can influence how it is indexed and determine policies that are executed against it.

A Collection Sequence is an ordered list of collections that documents are assessed against; each collection is considered in order until the document matches a collection with a stop on match instruction. Documents can match multiple collections in a collection sequence.

The Retrieve Classification API allows collection sequences, collections, conditions, field sources, lexicons, and lexicon expressions to be retrieved.

Retrieve Policy

The Policy Management APIs provide an abstracted layer on top of entity extraction, categorization, and related functionality to allow the definition of policies for the management of information. Classifications can be created to group documents and other objects into collections. Policies enact actions upon documents associated with a collection such as indexing.

Classification involves sorting documents into Collections; all documents in a collection share some common criteria, identified using Conditions.

The collection or collections that a document matches can influence how it is indexed and determine policies that are executed against it.

The Retrieve Policy API allows policy objects to be retrieved.

Update Classification

The Policy Management APIs provided an abstracted layer on top of entity extraction, categorization and related functionality to allow the definition of policies for the management of information. Classifications can be created to group documents and other objects into collections. Policies enact actions upon documents associated with a collection such as indexing.

Classification involves sorting documents into Collections; all documents in a collection share some common criteria, identified using Conditions.

The collection or collections that a document matches can influence how it is indexed and determine policies that are executed against it.

A Collection Sequence is an ordered list of collections that documents are assessed against; each collection is considered in order until the document matches a collection with a stop on match instruction. Documents can match multiple collections in a collection sequence.

The Update Classification API allows collection sequences, collections, conditions, field sources, lexicons, and lexicon expressions to be updated.

Update Policy

The Policy Management APIs provided an abstracted layer on top of entity extraction, categorization and related functionality to allow the definition of policies for the management of information. Classifications can be created to group documents and other objects into collections. Policies enact actions upon documents associated with a collection such as indexing.

Classification involves sorting documents into Collections; all documents in a collection share some common criteria, identified using Conditions.

The collection or collections that a document matches can influence how it is indexed and determine policies that are executed against it.

The Update Policy API allows policy objects to be updated.

Prediction

The Prediction APIs allow you to create a prediction model automatically from structured data without Machine Learning knowledge. Once a model is created it can be used to predict the value of the target dimension.

Predict

Haven OnDemand contains Predictive Analytics APIs to classify, predict, and analyze data. For more information about Predictive Analytics, see Introduction to Predictive Analytics.

The Predict API classifies data by using a classification service created by the Train Prediction API.

The unclassified data set must have the same structure as the training data set. All columns must exist including the prediction field column. The prediction field column content must have the value specified as the emtpy_value parameter (-1 by default).

Recommend

Haven OnDemand contains Predictive Analytics APIs to classify, predict, and analyze data. For more information about Predictive Analytics, see Introduction to Predictive Analytics.

The Recommend API recommends changes to a data set to achieve a required result. After creating a prediction service using the Train Prediction API and classifying new data using the Predict API, you might want to achieve a result different from the prediction. You can use the Recommend API to try and change the outcome of the predicted data by specifying which features can be changed, and asking for a specific result. The service returns a changed dataset to comply with the required result.

For example: a salesperson who wanted to predict the outcome of sales pipeline could train a prediction service using past data and classify future data based on this service. Some of the sale opportunities might be predicted as 'fail', when ideally they shoudl be 'success'. The salesperson can use the Recommend API to receive further insight to the future data, as to which features should be changed (and to which values) to increase the chances of a successful sale.

The recommendation data set must have the same structure as the training data set with the addition of the modifiableFeatures object.

Train Prediction

Haven OnDemand contains Predictive Analytics APIs to classify, predict, and analyze data. For more information about Predictive Analytics, see Introduction to Predictive Analytics.

The Train Prediction API creates a prediction model according to a training data set that you provide.

The API runs the training data set with multiple prediction algorithms, and different sets of parameters for each algorithm. It tests and compares all the prediction models that it creates, and automatically selects the most accurate classification algorithm from the results. It publishes this model as a prediction service, with a name that you specify.

Query Profile and Manipulation

The Query Profile and Manipulation APIs allow developers to create powerful search experiences for end users. These APIs can be used to fine-tune your search solution by enabling promoted content, search synonyms and blacklist terms. Help your end users find what they are looking for by creating a curated search experience.

Create Query Profile

A query profile specifies the manipulation configuration to apply to the query criteria and corresponding results of a search against an unstructured text index. The Create Query Profile API allows you to create a query profile, which you can then use in the query_profile parameter of the Query Text Index API.

A query profile must typically reference a text index of query_manipulation flavor, which stores the actual manipulations. You can create a query_manipulation flavor text index by using the Create Text Index API.

For more information about creating and using query profiles, see Query Manipulation.

Delete Query Profile

A query profile specifies the manipulation configuration to apply to the query criteria and corresponding results of a search against an unstructured text index. The Delete Query Profile allows you to delete an existing query profile.

Retrieve Query Profile

A query profile specifies the manipulation configuration to apply to the query criteria and corresponding results of a search against an unstructured text index. The Retrieve Query Profile allows you to retrieve a query profile configuration.

Update Query Profile

A query profile specifies the manipulation configuration to apply to the query criteria and corresponding results of a search against an unstructured text index. The Update Query Profile API allows you to update an existing query profile, which you can then use in the query_profile parameter in the Query Text Index API.

Find Related Concepts

The Find Related Concepts API returns a list of the best terms and phrases in query result documents. You can use these terms and phrases to provide topic disambiguation, automatic query guidance, or dynamic thesaurus generation.

You provide query text, which defines the set of documents that you want to describe, and the response returns a list of terms and phrases that occur in these documents. You can use the same query syntax as the Query Text Index API, including Boolean and Proximity Operators and Field Text Operators.

Haven OnDemand provides a number of Public Text Indexes that you can query, including Wikipedia in English, French, Spanish, German, Italian, and Chinese, and English news sources. You can also create your own indexes.

You can use the results of the Find Related Concepts API as synonyms for your query string, suggestions for refining the search, or subgroupings for the query topics.

The response includes elements, each of which is a best term or phrase from the query results, along with details of the number of documents that the result occurs in, and the number of times the element occurs in the results set. The response also includes a cluster number, which groups the elements further. For example, in a search for Apollo, you might return results for the Apollo space program, and the Greek god Apollo. There might be a number of different query summary phrases for these two groups of results, but there are two clusters.

Note: Haven OnDemand uses a negative cluster number when the term is too common or too rare in the results to provide a better cluster identifier. If you are using the cluster numbers to cluster the query results, you should ignore elements that have a negative cluster number. Normal cluster numbering starts at zero (0).

The Find Related Concepts API has many of the same options as the Query Text Index API. The optional parameters allow you to create a more specific initial query that the API uses to form the query summary results.

The sample_size parameter allows you to choose how many documents to use to create the list of related concepts. For a public text index, the maximum sample size is 500. For your own text indexes, you can use a sample size of up to 10000.

For more information about query syntax, public datasets, and text indexes, see the Documentation page.

Find Similar

The Find Similar API returns documents in the Haven OnDemand databases that are similar to text or a document that you provide. You can either submit text, an index reference, a file, an object store reference, or a URL.

  • index_reference. You provide the reference for a document in the Haven OnDemand index, and the API returns details of similar documents. You can find document references in the result from the Query Text Index API.

  • text. You provide some plain text, and the API returns documents that are similar to the best terms in your text.

  • file. You provide a file, and the API extracts the text from the file, and then treats the content in the same way as text.

  • reference. You provide the reference to a document in the Haven OnDemand object store, and the API returns details of similar documents from the Haven OnDemand index.

  • url. You provide a publicly accessible HTTP URL. The API retrieves the document from the specified URL and returns details of similar documents.

Note: API input is subject to a maximum size quota. If you upload text or a file that is too large, the API returns an error. For more information, see Rate Limiting, Quotas, Data Expiry, and Maximums.

The Find Similar API has many of the same options as the Query Text Index API. The optional parameters allow you to return a more specific results set, or to organize your results.

Haven OnDemand provides a number of Public Text Indexes that you can query, including Wikipedia in English, French, Spanish, Italian, German, and Chinese, and English news sources. You can also create your own text indexes.

The print, print_fields, and sort parameters allow you to specify what data you want to return. The print and print_fields parameters determine which document fields you want to print in the response output. sort determines the order that the results return in.

You can use the highlight parameter to mark up the result document text with HTML tags that highlight the query terms or sentences that contain the query terms.

For more information about public datasets and text indexes, see the Documentation page.

Get Content

The Get Content API returns the content of documents in the text index, based on a list of references that you provide. You can find document references in the result from the Query Text Index API. For example, you might use the Query Text Index API to quickly return a list of references for documents that match a query, and then you can send subsequent Get Content requests to retrieve the content for the documents.

Get Parametric Values

The Get Parametric Values API retrieves the unique values that occur in a particular field, which you can use to provide faceted search. For example, if you have a color parametric field, you can use this API to retrieve all the color values that occur in your documents. A common use for this information is to provide filters to end users.

For example:

The API returns a list of the values of the field that you specify in the field_name parameter. The field that you specify must be a parametric or date field (see Index Field Types). For information about fields in the public datasets that are parametric or date type, see Public Text Indexes. You can also use parametric and date fields in your own text indexes. For information about the standard parametric and date type fields in different text index flavors, see Index Flavors.

Note: If you request parametric values for a date type field that contains the time as well as the date, Haven OnDemand returns the values in blocks of one hour.

You can use the API to find all values that occur for a specified field, or you can restrict the results to values that occur in documents that match a particular query. To add a query, you can add the text or field_text parameters, which use the same syntax as for the Query Text Index API. You can also specify the min_score parameter, which defines the minimum percentage relevance that a document must have for the field values to be included in the results.

You can use the max_values parameter to restrict the number of field values to return. You can also use the sort parameter to define the order in which the results return.

By default, the API returns each value along with the number of documents that the value occurs in. You can turn off the document counts by setting the document_count parameter to false.

Query Text Index

The Query Text Index API searches for content in the Haven OnDemand databases. Your query can include natural language text, keywords, and Boolean expressions. The API returns documents from a specified text index that matches your query expression.

Retrieve Index Fields

The Retrieve Index Fields API retrieves a list of the fields that have been ingested into a given text index. The Retrieve Index Fields API also returns the type of each field. For more information on field types, see see Index Field Types.

You can use this information to inspect a text index and suggest fields for inclusion in the query criteria of APIs such as Query Text Index and Find Related Concepts.

Note: the Retrieve Index Fields API returns only fields that exist in documents ingested into a text index; it does not return all fields configured in calls to the Create Text Index API.

Text Analysis

The Text Analysis APIs provide additional information about text that you provide. You can detect the language of text, highlight specified terms in text, and expand or tokenize terms to find out more about values that are used for querying.

Auto Complete

The Auto Complete API allows you to expand a prefix into a list of possible words that the prefix matches. You can use this API to provide search suggestions.

The API accepts a single parameter, text, which describes the text that you want to expand. It returns a list of matching words and phrases.

The API uses an internal dictionary of English words and phrases to expand the prefix text. The dictionary includes names and other common phrases that users might want to search for.

Classify Document

The Classify Document API returns the collections and satisfied conditions for a document.

You can use this API to classify documents into different collections and understand which conditions caused the classification.

Concept Extraction

The Concept Extraction API uses statistical methods to extract key concepts from text.

You provide some input text or a document, and the API returns the best terms and phrases. You can use the results as a quick summary of the contents of a document, to highlight key phrases, or to generate links between unstructured information.

Document Categorization

The Document Categorization API allows you to categorize documents according to a set of categories that you create.

To use the API, you must create a text index with the Categorization flavor, by using the Create Text Index. This type of index stores documents that describe categories. For more information about the Categorization flavor, see Categorization Flavor Index Configuration

Category descriptions act like a query that matches any document that belongs to the category. For example, a category document for the dogs category might contain a list of dog breeds. If you use this list as query text in the Query Text Index API, it returns documents about dogs.

You can also optionally define Boolean or field text restrictions in a category, by using the BOOLEANRESTRICTION and FIELDTEXTRESTRICTION fields. For example, the following field text restriction ensures that all documents that get assigned to the category have an ENRICHED_PERSON field:

EXISTS{}:ENRICHED_PERSON

For more information about Boolean and field text expressions, see Boolean and Proximity Operators and Field Text Operators.

The Document Categorization API allows you to find the categories that a document matches. You can think of this process as the inverse of a normal query. You provide a document to the API, and it returns a list of the categories in your category text index that match it. The API uses the text in the CONTENT field of the document as query text to match categories.

You must specify the name of the category index to use (a Haven OnDemand text index with the Categorization flavor). You can optionally specify additional field_text to restrict the categories from the categorization index that can return. For example, if you know the documents you want to categorize are mostly about animals, you can add a field_text restriction that matches only values of the CATEGORY field that are about animals.

Entity Extraction

The Entity Extraction API allows you to find useful snippets of information from a larger body of text. The snippets of information (known as entities) can be words, phrases, or other blocks of information, such as a phone number. You provide the text to analyze and choose the kind of information that you want to find. The API provides a set of entity types, which includes people names, place names, company names, phone numbers, dates, Web addresses, and credit card numbers.

The API returns a list of the extracted entities, along with information about the type of matches found, and the position in the text where the entity occurs.

Expand Terms

The Expand Terms API returns a list of terms that match a term that you provide, according to a specified expansion.

Highlight Text

The Highlight Text API finds specified terms in your input text and adds HTML tag around them. It returns your input text, with the added HTML tags.

Language Identification

The Language Identification API analyzes a piece of text that you provide and returns the language of the text.

You can use Language Identification to determine the correct language settings to use for other Haven OnDemand APIs, such as Sentiment Analysis or Entity Extraction.

Sentiment Analysis

The Sentiment Analysis API analyzes text to return the sentiment as positive, negative, or neutral. It contains a dictionary of positive and negative words of different types, and defines patterns that describe how to combine these words to form positive and negative phrases.

You can use sentiment analysis to gain valuable insights into what users, customers, friends, and colleagues are saying.

Automatically classifying text by sentiment allows you to easily find out the general opinions of people in your area of interest. For example, you might want to analyze reviews of a product to help you improve the customer experience, or to find the most or least popular product. For more information about the most effective ways to use sentiment analysis, see Effective Use of Sentiment Analysis.

Text Tokenization

The Text Tokenization API helps you find more information about the terms that you might want to use in the Query Text Index API or other APIs. You provide a list of terms, or some text, and the API returns information about the terms in the text.

Unstructured Text Indexing

The Unstructured Text Index APIs allow you to add unstructured and semi-structured content to Haven OnDemand's advanced text indexes for future use with the Search family of APIs. The data that you index is private, and only accessible by you and your users through the use of the API key associated with the specified text index. Most important, the data you index is yours and you have full ownership, control and responsibility.

Add to Text Index

The Add to Text Index API allows you to add content to a text index that you have set up. The API indexes your content and makes it available for use in other APIs, such as Query Text Index, Find Similar, and Find Related Concepts.

Note: Before you can add content, you must use the Create Text Index API to create an index. You can use the API to return a list of your available indexes.

Create Text Index

The Create Text Index API allows you to create a text index, which you can use to add your own content to Haven OnDemand. You specify a name for the text index, which you can use to add data, and modify the index in future operations.

Note: Each text index flavor has a static resource unit cost, determined by the maximum index size and specialization. For more information about the resource unit costs for each flavor, see API and Resource Unit Consumption.

Delete Text Index

The Delete Text Index API deletes a text index that you have previously created with the Create Text Index API.

Delete from Text Index

The Delete from Text Index API removes content from a text index that you have created and indexed content into. You specify the document reference of the document that you want to delete, and the API removes it from the text index. After you delete a document, it is not available for use in other APIs such as Query Text Index.

Index Status

The Index Status API returns the status of your text indexes.

You can use this API to understand your data set contents, and to check whether you are approaching the maximum values for a given flavor.

List Resources

The List Resources API returns a list of your dynamic resources. The response includes the name, flavor, and type of the indexes that you have created using the Create Text Index API. The response also includes the connectors that you have created using the Create Connector API.

You can optionally specify a type to return a list of your resources that have that type. You can also specify a flavor to return a list of your indexes or connectors that have that flavor.

Restore Text Index

The Restore Text Index API creates a new text index, using a previous state from an internal backup of one of your text indexes.

Set the index parameter to the name of the index that you want to restore, and date to the date and time that you want to restore to. You can use any ISO-8601 date format. Set new_index to the name of a new text index to create with the restored data.