Enterprise Semantic Services REST API

Schemes: http, https

Summary

APIs to search the Entity Grid

Operation Description
GET /entitysets/search/prepare

Optimize subsequent search calls

GET /entitysets/search

Search for EntitySets

GET /entitysets/search/autocomplete

Autocomplete search keywords

Tag: profiling

APIs to get information on datasets through data profiling

Operation Description
GET /content-types/{schema}/{object}

Content-type identification

Tag: publish

APIs to manage publications to the Entity Grid

Operation Description
PUT /publications/{publicationArtifact}

Publish contents to the Entity Grid

DELETE /publications/{publicationArtifact}

Unpublish contents from the Entity Grid

Paths

Content-type identification

GET /content-types/{schema}/{object}

Tags: profiling

Identifies content-types of catalog object's attributes in SAP HANA through data profiling.

schema

schema of the catalog object

path string
object

name of the catalog object

path string
attributes

Attributes for which to identify the content-type. If unspecified all attributes will have their content-type identified.

query string[]
useCache

specify whether the previous values of content-types found can be used

query boolean
code

Type of content-type code to return. Possible values are 'ESS' and 'DQ'. ESS codes are business codes that can be reused in Enterprise Semantic Services Search (see ESS Search syntax). 'DQ' codes are technical codes that are commonly used in other SAP Data Quality (DQ) products. Default is 'ESS'.

query string , x ∈ { ESS (default) , DQ }
200 OK

Successful response

400 Bad Request

Invalid request

500 Internal Server Error

Server error

Search for EntitySets

GET /entitysets/search

Tags: search

Search the EntityGrid using a keywords-based query. This will return EntitySets the user is allowed to consume, along with matching information.

q

search query string (see Enterprise Semantic Services Search syntax)

query string
domain

Domain(s) to consider for term mappings in search. Supports comma-separated values and * wildcards. If unspecified, term mappings will be applied independently of domains. Valid domains are available in this column: "SAP_HANA_IM_ESS"."sap.hana.im.ess.services.search::Mapping"."LIST_ID"

query string
language

Language used for term mappings. If unspecified, term mappings will be applied independently of language. Supported values are language codes in this table: "SYS"."M_TEXT_ANALYSIS_LANGUAGES".

query string
fields

Fields of matched entitysets to return. If unspecified all fields will be returned. This should contain a comma-separated list of properties fields within the searchResults structure. For instance :"id, name" will only return the id and name of matched EntitySets in the Search Result. Structural properties will be return by default with all of their sub-properties, unless a list is specified within brackets. For instance: "id, name, matchDescription(annotations), attributes(matchDescription,name), representedObjects".

query string
limit

number of results to return per request

query integer 10
offset

Number of results to skip in the response. Use it with limit to paginate results. For instance: limit: 10, offset: 0 (get first 10 results) limit: 10, offset: 10 (get next 10 results).

query integer
200 OK

Successful response

response

offset: integer

pagination offset specified in request

count: integer

number of results returned in this response

totalCount: integer

total number of results for the search query (regardless of offset and limit)

searchResults: object[]
X-Total-Count

total number of search results

integer
400 Bad Request

Invalid request

500 Internal Server Error

Server error

Autocomplete search keywords

GET /entitysets/search/autocomplete

Tags: search

Autocomplete keywords used in EntitySets search query with keywords present in the Entity Grid.

q

partial search query

query string
highlightStart

Highlight characters for autocomplete response. If specified, the autocompletions will contain display texts highlighted with the start and end tags. If set to null, the suggestion response will not contain any display text. Both properties highlightStart and highlightEnd should be set together.

query string <b>
hightlightEnd

see highlightStart

query string </b>
200 OK

Successful responses

object
displayText: string
text: string
400 Bad Request

Invalid request

500 Internal Server Error

Server error

Optimize subsequent search calls

GET /entitysets/search/prepare

Tags: search

This method performs once per session preparation for an XS session. This offers an opportunity to perform costly operations in the background to improve application responsiveness. In the current implementation, it computes user credential mask that may take several seconds. The call to this method is optional. If this method is not called prior to suggestion or search, the calculation of the user credential mask is triggered by the first call to suggestion or search.

204 No Content

Success

Unpublish contents from the Entity Grid

DELETE /publications/{publicationArtifact}

Tags: publish

Deletes a publication from the Entity Grid. Enterprise Semantic Services Crawlers will asynchronously remove all associated contents from the Entity Grid.

publicationArtifact

A publicationArtifactIdentifier is the qualified name of an SAP HANA artifact to publish or unpublish in the Entity Grid.

  • SAP HANA views in the repository
    • Analytic Views, Attribute Views and Calculation Views
    • Format: Content.p1.p2...pN.viewName where p1.p2...pN is the package name of the view, and viewName the name of the view (without quotes)
  • SAP HANA catalog objects
    • Tables, Virtual Tables, Column Views, SQL Views
    • Format: Catalog."schemaName"."objectName". Quotes are mandatory for Catalog objects schemaName and objectName. If schemaName and objectName themselves have quotes, they must be escaped by double quoting (as in SQL).
path string #/parameters/PublicationArtifactIdentifier
publisherGroup

Defines the ownership of the specified publication within the EntityGrid. When a publication is added under a specific publisherGroup, the corresponding entitysets can only be unpublished by the same publisherGroup. A single publication artifact can belong to different publisherGroups. In that case, the corresponding entitysets will be unpublished when all publisherGroups decide to delete those publications.

The publisherGroup is a string that should be unique to the application doing the publications. It is strongly recommended to use a namespace for the publisherGroup name, such as my.application.publisherGroupName, to avoid any collision with publisherGroups of other applications publishing artifact in the same EntityGrid.

If unspecified, a specific default publisherGroup will be used for on-demand publications. Note that in that case, any other application will be able to delete the publications done with that default value.

query string #/parameters/PublisherGroup
artifactType

The publicationArtifactType identifies the type of artifact to publish. It must be a string in one of the following enumerations, based on the type of artifact:

  • SAP HANA views in the repository: attributeview, analyticview, calculationview
  • SAP HANA catalog objects: table, view, columnview, virtualtable
If unspecified, the publication request will apply to all types.

query string #/parameters/PublicationArtifactType
204 No Content

Successful deletion

400 Bad Request

Invalid request

500 Internal Server Error

Server error

Publish contents to the Entity Grid

PUT /publications/{publicationArtifact}

Tags: publish

Adds a publication to the Entity Grid. Enterprise Semantic Services Crawlers will asynchronously extract all referenced contents and store it inside the Entity Grid.

publicationArtifact

A publicationArtifactIdentifier is the qualified name of an SAP HANA artifact to publish or unpublish in the Entity Grid.

  • SAP HANA views in the repository
    • Analytic Views, Attribute Views and Calculation Views
    • Format: Content.p1.p2...pN.viewName where p1.p2...pN is the package name of the view, and viewName the name of the view (without quotes)
  • SAP HANA catalog objects
    • Tables, Virtual Tables, Column Views, SQL Views
    • Format: Catalog."schemaName"."objectName". Quotes are mandatory for Catalog objects schemaName and objectName. If schemaName and objectName themselves have quotes, they must be escaped by double quoting (as in SQL).
path string #/parameters/PublicationArtifactIdentifier
publisherGroup

Defines the ownership of the specified publication within the EntityGrid. When a publication is added under a specific publisherGroup, the corresponding entitysets can only be unpublished by the same publisherGroup. A single publication artifact can belong to different publisherGroups. In that case, the corresponding entitysets will be unpublished when all publisherGroups decide to delete those publications.

The publisherGroup is a string that should be unique to the application doing the publications. It is strongly recommended to use a namespace for the publisherGroup name, such as my.application.publisherGroupName, to avoid any collision with publisherGroups of other applications publishing artifact in the same EntityGrid.

If unspecified, a specific default publisherGroup will be used for on-demand publications. Note that in that case, any other application will be able to delete the publications done with that default value.

query string #/parameters/PublisherGroup
artifactType

The publicationArtifactType identifies the type of artifact to publish. It must be a string in one of the following enumerations, based on the type of artifact:

  • SAP HANA views in the repository: attributeview, analyticview, calculationview
  • SAP HANA catalog objects: table, view, columnview, virtualtable
If unspecified, the publication request will apply to all types.

query string #/parameters/PublicationArtifactType
computeContentTypes

whether to compute content-types after publication (by data profiling)

query boolean
computeEnumeratedValues

Whether to compute enumerated values after publication (by data profiling). This value can only be true if computeContentTypes is true.

query boolean
204 No Content

Successful creation

400 Bad Request

Invalid request

500 Internal Server Error

Server error

Parameter definitions

PublicationArtifactIdentifier publicationArtifact

A publicationArtifactIdentifier is the qualified name of an SAP HANA artifact to publish or unpublish in the Entity Grid.

  • SAP HANA views in the repository
    • Analytic Views, Attribute Views and Calculation Views
    • Format: Content.p1.p2...pN.viewName where p1.p2...pN is the package name of the view, and viewName the name of the view (without quotes)
  • SAP HANA catalog objects
    • Tables, Virtual Tables, Column Views, SQL Views
    • Format: Catalog."schemaName"."objectName". Quotes are mandatory for Catalog objects schemaName and objectName. If schemaName and objectName themselves have quotes, they must be escaped by double quoting (as in SQL).
path string
PublisherGroup publisherGroup

Defines the ownership of the specified publication within the EntityGrid. When a publication is added under a specific publisherGroup, the corresponding entitysets can only be unpublished by the same publisherGroup. A single publication artifact can belong to different publisherGroups. In that case, the corresponding entitysets will be unpublished when all publisherGroups decide to delete those publications.

The publisherGroup is a string that should be unique to the application doing the publications. It is strongly recommended to use a namespace for the publisherGroup name, such as my.application.publisherGroupName, to avoid any collision with publisherGroups of other applications publishing artifact in the same EntityGrid.

If unspecified, a specific default publisherGroup will be used for on-demand publications. Note that in that case, any other application will be able to delete the publications done with that default value.

query string
PublicationArtifactType artifactType

The publicationArtifactType identifies the type of artifact to publish. It must be a string in one of the following enumerations, based on the type of artifact:

  • SAP HANA views in the repository: attributeview, analyticview, calculationview
  • SAP HANA catalog objects: table, view, columnview, virtualtable
If unspecified, the publication request will apply to all types.

query string

Schema definitions

AnalyticDecoration: object

groupId: string

The identifier of the measure or dimension that can be common to a group of attributes (in the case the measure or dimension is implemented by one or more attributes).

role: string , x ∈ { MEASURE_VALUE , MEASURE_DETAIL , DIMENSION , DIMENSION_DETAIL }

role the attribute plays in the given measure or dimension.

Attribute: object

name: string
id: string
matchDescription: MatchDescription
analyticDecoration: AnalyticDecoration

AttributeContentType: object

attributeName: string
contentTypeResults: ContentTypeResult

ContentTypeResult: object[]

object
confidenceRating: string , x ∈ { EXCELLENT , VERY GOOD , GOOD , POOR }

indication of the confidence for this content-type

contentType: string
format: string

if the content-type has an associated format (for instance date), it is shown here. Currently supported formats are 'DATE_MDY','DATE_YMD','DATE_YDM','DATE_DMY'

score: number

score given to the content-type (between 0 and 100).

winner: boolean

if this content-type is identified without ambiguity and good confidence, it is declared as a winner. There can be 0 or 1 winner in the list of content-types for a given attribute

DataSourceDescriptor: object

only applies to external represented objects. This provides all necessary information about an external data source for identifying it.

dataSourceType: string

type of the DataSource

id: string

id of the DataSource within the EntityGrid

properties: object[]

list of key/value properties that identify the DataSource and are necessary to connect to it.

object
name: string
value: string

Error: object

code: string

Enterprise Semantic Services error code

message: string

localized error message

stack: string

stack trace (for SAP support only)

MatchDescription: object

Describes what was matched in the object during the search

annotations: string[]

Matching annotations (textual description of metadata objects)

string
terms: string[]

Matching terms in the search query. See search syntax for the definition of a search term.

string
values: string[]

Matching values. This is only applicable to attributes that have been profiled.

string

MatchedEntitySet: object

id: string

Id of the matched EntitySet in the EntityGrid.

name: string
rank: integer

Ranking of this result. Note that some results can have the same rank.

matchDescription: MatchDescription
attributes: object[]

List of matching attributes

representedObjects: object[]

RemoteLocationDescriptor: object

RepresentedObjects with location=REMOTE have a RemoteLocationDescriptor that defines the properties to specify in the remoteLocation clause for creating a virtual table using the CREATE VIRTUAL TABLE statement.

sourceName: string
dbName: string
owner: string

RepresentedObject: object

Each EntitySet represents one or more representedObjects, which can be local SAP HANA catalog objects, SAP HANA remote objects (associated with a remote source), and external objects (for objects outside SAP HANA)

id: string
location: string , x ∈ { LOCAL , EXTERNAL , REMOTE }

local: represents a local SAP HANA object in the same SAP HANA instance as Enterprise Semantic Services
remote: represents a remote object of a specific remote source defined in the SAP HANA instance
external: represents an external objects in an external datasource

type: string
externalDataSource: DataSourceDescriptor
remoteSource: RemoteLocationDescriptor