The standard IngestDocument and security model objects have been simplified to make this API easier to work with in a javascript only environment as opposed to porting over the full Java based object model. All index manipulation methods are based on a sessionId that is returned from the connect method. a few notes about sessions:
These features require that the rest module be included when you run createproject to create the project directories. |
The master list of QueryRequest REST parameters is on the HTTP REST APIs page. |
[ { "fields" : { "title" : [ "this is the first title" ], "date" : [ "1969-12-31T19:00:10.000-0500" ] }, "id" : "1", "zone" : "z1", "correlationId" : null, "mode" : "ADD", "permissions" : [ { "principal" : { "name" : "myGroup1", "realm" : "myRealm", "groupMemberships" : null, "type" : "group" }, "readable" : true } ] }, { "fields" : { "title" : [ "this is the second title" ], "date" : [ "1969-12-31T19:00:20.000-0500" ] }, "id" : "2", "zone" : null, "correlationId" : "c2", "mode" : "ADD", "permissions" : [ { "principal" : { "name" : "Anonymous", "realm" : "Anonymous", "type" : "user" }, "readable" : true } ] } ] |
Parameter | Required | Default | Description |
---|---|---|---|
id | Document ID | ||
zone | default | Zone for the document to be indexed in. | |
correlationId | CorrelationId used for matching up document results if the document ID changes | ||
mode | ADD | Mode to use for processing this document. One of: CREATE, ADD, DELETE, PARTIAL. ADD implies a create or replace where as CREATE requires the user to ensure that no document with the same ID already exists. | |
fields | Name to List of values for the field. Strings, Dates, and number types are supported. | ||
permissions | A list of permissions for the document if content security is enabled | ||
permissions.principal | The user or group who has permission to read the document | ||
permissions.principal.name | The id of the user who has access to the document | ||
permissions.principal.realm | The realm of the user | ||
permissions.principal.type | user | one of user or group | |
permissions.principal.readable | true | The document will be readable by the user if set to true. By default all documents without explicit read permissions are hidden from the user. Setting readble=false is only necessary to implement deny permissions. For example, a document might be readbale by everyone in Engineering except some specific user or sub group. |
{ "sessionTimeout" : -1, "documentBatchSize" : 1, "orderedCommits" : true, "commitInterval" : 1000, "commitOnDisconnect": true, "ingestWorkflowName" : "fileIngest", "messageResultListenerClass" : "com.acme.myListener", "messageResultListenerProperties" : { "foo" : "bar" } } |
Parameter | Required | Default | Description |
---|---|---|---|
sessionTimeout | 10 minutes | Number of milliseconds between any two posts that will cause the session to be automatically closed. A value of -1 will cause the session to never expire. Any call using a sessionId will cause the session timer to be reset. | |
documentBatchSize | 1 | The number of documents to send to AIE in a single batch. | |
orderedCommits | true | Ordered commits will cause the system to wait for all previously fed content to be indexed before processing the commit. | |
commitInterval | 0 | Issue a commit every x number of documents submitted. Se to 0 to disable autmatic commits. | |
commitOnDisconnect | true | (Added in Attivio Platform 5.6.2) Issue a commit when calling disconnect for this session | |
ingestWorkflowName | ingest | The workflow to use for all ingestion documents and messages | |
messageResultListenerClass | System default - LoggingResultListener | The class to use for processing message results. | |
messageResultListenerProperties | Key to Value map of properties for the custom message result listener class to use for configuration. |
{ "name" : "myUsername", "id" : "myId", "realm" : "myRealm", "type" : "user", "groupMemberships" : [ { "name" : "myGroup1", "realm" : "myRealm" }, { "name" : "myGroup2", "realm" : "myRealm" } ] } { "name" : "myOtherUsername", "realm" : "myOtherRealm", "type" : "user" } { "name" : "myAlias", "realm" : "aliases", "type" : "group", "principalAliases" : [ { "name" : "myUsername", "id" : "myId", "realm" : "myRealm" }, { "name" : "myOtherUsername", "realm" : "myOtherRealm" } ] } |
Parameter | Required | Default | Description |
---|---|---|---|
name | Name of the user/group | ||
realm | Realm of the user/group | ||
id | value of 'name' parameter | Id of user/group | |
type | user | One of user or group | |
groupMemberships | The groups that the user/group is a member of | ||
groupMemberships.name | The group name | ||
groupMemberships.realm | The group realm | ||
groupMemberships.id | value of 'groupMemberships.name' parameter | The group id | |
principalAliases | The principals to be included in the alias | ||
principalAliases.name | The principal name | ||
principalAliases.realm | The principal realm | ||
principalAliases.id | value of 'principalAliases.name' parameter | The principal id |
{ "id" : "doc1", "zone" : "zone1", "fieldName" : "field1", "values" : [ "val1", "val2" ] } |
Parameter | Required | Default | Required |
---|---|---|---|
id | The ID of the document to update | ||
zone | default | The zone the document is in | |
fieldName | The name of the real time field to update | ||
values | The new values for the field. Set to null to clear the real time field. |
{ "query" : "title:foo", "queryLanguage" : "advanced", "queryInitWorkflow" : "queryInit" } |
Parameter | Required | Default | Required |
---|---|---|---|
query | The query to use for matchign documents to delete. | ||
querylanguage | advanced | The query language to use for parsing the query. One of | |
queryInitWorkflow | queryInit | The name of the workflow to proces the query with before sending to the ingestion workflow. Genreally speaking this workflow is responsible for query parsing. |
{ "fields" : { "myRealTimeField" : [ "val1", "val2" ] }, "documentIds" : [ "doc1", "doc2" ] } |
Parameter | Required | Default | Required |
---|---|---|---|
fields | Name to List of values for the field. Strings, Dates, and number types are supported. | ||
documentIds | List of document ids to update with the new field values. |
{ "fields" : { "myRealTimeField" : [ "val1", "val2" ] }, "query" : "title:foo", "queryLanguage" : "advanced", "queryInitWorkflow" : "queryInit" } |
Parameter | Required | Default | Required |
---|---|---|---|
fields | Name to List of values for the field. Strings, Dates, and number types are supported. | ||
query | The query to use for matchign documents to delete. | ||
querylanguage | advanced | The query language to use for parsing the query. One of | |
queryInitWorkflow | queryInit | The name of the workflow to proces the query with before sending to the ingestion workflow. Genreally speaking this workflow is responsible for query parsing. |