0% found this document useful (0 votes)
187 views

Rest API Developers Guide

This document provides a summary of changes to the InfoArchive REST API across different versions. It outlines new features, removed features, and changes in behavior. The document also provides an overview of the API architecture and describes how to authenticate and make requests to access resources. It covers topics like permissions, creating and updating resources, responses, and error handling.

Uploaded by

doha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
187 views

Rest API Developers Guide

This document provides a summary of changes to the InfoArchive REST API across different versions. It outlines new features, removed features, and changes in behavior. The document also provides an overview of the API architecture and describes how to authenticate and make requests to access resources. It covers topics like permissions, creating and updating resources, responses, and error handling.

Uploaded by

doha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 331

InfoArchive REST API

Developer’s Guide
Release 21.2
Contents

1.0 INTRODUCTION........................................................................................ 8
1.1 Prerequisites ..................................................................................................................... 8

2.0 CHANGES FROM PREVIOUS VERSIONS ............................................... 9


2.1 Changes for version 21.2 ................................................................................................. 9
2.1.1 Changed APIs .............................................................................................................. 10

2.2 Changes for version 20.4 ............................................................................................... 11


2.2.1 Added APIs .................................................................................................................. 11

2.3 Changes for version 20.2 ............................................................................................... 11


2.3.1 Added APIs .................................................................................................................. 11
2.3.2 Removed APIs ............................................................................................................. 11

2.4 Changes for version 16EP7 ........................................................................................... 11


2.4.1 Removed/Changed APIs .............................................................................................. 11
2.4.2 Added APIs .................................................................................................................. 12
2.4.3 Clarification of behavior ................................................................................................ 12

2.5 Changes for version 16EP5.1 ........................................................................................ 12


2.5.1 Removed/Changed APIs .............................................................................................. 12

2.6 Changes for version 16EP5 ........................................................................................... 13


2.6.1 HTML for deprecated link relations .............................................................................. 13
2.6.2 Removed/Changed APIs .............................................................................................. 13

3.0 ARCHITECTURE ..................................................................................... 14


3.1 Negotiation to Obtain JWT ............................................................................................ 15

4.0 REST API................................................................................................. 16


4.1 REST and CRUD Operations ......................................................................................... 18

5.0 AUTHENTICATION AND AUTHORIZATION .......................................... 23


5.1 Obtaining JWT for the First Time .................................................................................. 24

5.2 Refreshing JWT .............................................................................................................. 26

5.3 Putting it all Together ..................................................................................................... 26

6.0 PERMISSIONS ........................................................................................ 29

7.0 RESOURCES AND COLLECTIONS ....................................................... 30

OpenText InfoArchive 21.2 Page 2 of 331


7.1 Creating Items in a Collection ....................................................................................... 31

7.2 SpEL Expressions .......................................................................................................... 32


7.2.1 Common SpEL Expressions ........................................................................................ 32
7.2.2 Improving Performance from SpEL Expressions ......................................................... 33

7.3 Updating resources ........................................................................................................ 33

8.0 RESPONSES ........................................................................................... 34

9.0 API CHANGES ........................................................................................ 36


9.1 New link relations ........................................................................................................... 38

9.2 Changed behavior .......................................................................................................... 38

10.0 ERRORS .................................................................................................. 39


10.1 Error Response Body ..................................................................................................... 40

11.0 RESOURCE HIERARCHY....................................................................... 41

12.0 TENANT................................................................................................... 41
12.1 Retrieve Tenant Resources ........................................................................................... 42

12.2 Create a new Tenant Resource ..................................................................................... 42


12.2.1 Role Permissions ..................................................................................................... 42
12.2.2 Issuing POST ........................................................................................................... 42

13.0 APPLICATION ......................................................................................... 45


13.1 Retrieving Application Resource .................................................................................. 45

13.2 Creating an Application Resource ................................................................................ 46


13.2.1 Role Permissions ..................................................................................................... 46
13.2.2 Creating an application ............................................................................................ 47

13.3 Configuring Applications ............................................................................................... 49


13.3.1 SIP Application Configuration .................................................................................. 49
13.3.2 Table Application Configuration ............................................................................... 70
13.3.3 Declarative Configuration ........................................................................................ 77
13.3.4 Deleting a table or its content .................................................................................. 78

13.4 Background application process .................................................................................. 79


13.4.1 Sip background application process ........................................................................ 79

13.5 Caching-in and caching-out table applications........................................................... 82


13.5.1 Cache-out application .............................................................................................. 82
13.5.2 Cache-in application: ............................................................................................... 84
13.5.3 Errors ....................................................................................................................... 86

OpenText InfoArchive 21.2 Page 3 of 331


14.0 INGESTION ............................................................................................. 87
14.1 SIP Ingestion ................................................................................................................... 87
14.1.1 Batch Ingestion ........................................................................................................ 88
14.1.2 Direct Ingestion ........................................................................................................ 96

14.2 Asynchronous ingestion: .............................................................................................. 98

14.3 Table Ingestion ............................................................................................................... 99


14.3.1 XML ingest ............................................................................................................... 99
14.3.2 Attachment ingest .................................................................................................... 99

15.0 SEARCH ................................................................................................ 101


15.1 Overview ........................................................................................................................ 101

15.2 Determining available searches .................................................................................. 103


15.2.1 Roles/permission for search execution .................................................................. 103
15.2.2 Determine what searches are available................................................................. 103

15.3 Search creation ............................................................................................................. 106


15.3.1 Role Permission ..................................................................................................... 106
15.3.2 Find reference to collection of searches ................................................................ 106
15.3.3 Table Searches ...................................................................................................... 107
15.3.4 SIP Searches ......................................................................................................... 111
15.3.5 Cross-application Searches ................................................................................... 115

15.4 Search Components ..................................................................................................... 116


15.4.1 Role/Permission to create search components ..................................................... 116
15.4.2 Creating a search composition resource ............................................................... 116
15.4.3 Creating an xform resource ................................................................................... 118
15.4.4 Creating the result-master resource ...................................................................... 119
15.4.5 Creating the search mapping resource.................................................................. 121
15.4.6 Table search specific resources ............................................................................ 121
15.4.7 SIP Search-Specific resources .............................................................................. 122
15.4.8 Exporting/Deleting/Importing Searches ................................................................. 128

15.5 Executing a Synchronous Search .............................................................................. 131


15.5.1 Roles/Permission for Search Execution ................................................................ 131
15.5.2 Search Execution ................................................................................................... 132
15.5.3 Getting to Know PUT ............................................................................................. 133
15.5.4 Getting Back to Search Execution ......................................................................... 136

15.6 Search Results .............................................................................................................. 138

15.7 SIP Search and AIU ID .................................................................................................. 139

15.8 Asynchronous Search ................................................................................................. 142


15.8.1 Roles/Permission ................................................................................................... 142
15.8.2 Asynchronous Search Execution ........................................................................... 142
15.8.3 Executing an Asynchronous Search ...................................................................... 143
15.8.4 Enquiring about Asynchronous Search Progress .................................................. 145
15.8.5 Retrieving Results of Asynchronous Search ......................................................... 147

OpenText InfoArchive 21.2 Page 4 of 331


15.9 Search Results Export ................................................................................................. 149
15.9.1 Roles/Permission ................................................................................................... 149

15.10 Value lists ...................................................................................................................... 153


15.10.1 Roles/Permission ................................................................................................... 153
15.10.2 Viewing value lists for an application ..................................................................... 154

15.11 Executing a Cross-application Search ....................................................................... 155


15.11.1 Executing a synchronous cross-application search ............................................... 155
15.11.2 Executing an asynchronous cross-application search........................................... 159

16.0 AUDITS .................................................................................................. 165


16.1 Role Permission ........................................................................................................... 166

16.2 Determining the List of all System Audit-Event-Types ............................................ 167

16.3 Determining the List of all System Audit-Event-Types grouped by type property 170

16.4 Determining What Types are Available at the System Level ................................... 172

16.5 Determining What Categorized Types are Available at the System Level ............. 174

16.6 Enabling a Specific Audit for an Application............................................................. 176

16.7 Getting the Audits that Have Not Been Archived Yet ............................................... 180

16.8 Viewing the Audits that Have Been Archived ............................................................ 180

16.9 Configuring Custom Audits......................................................................................... 180


16.9.1 Registering an Event Type .................................................................................... 181
16.9.2 [Optionally] Enabling the Audit Event Type ........................................................... 182
16.9.3 Creating an Audit ................................................................................................... 182
16.9.4 Viewing Audits Not Ingested Yet ........................................................................... 183

17.0 RETENTION .......................................................................................... 185


17.1 Role Permission ........................................................................................................... 186

17.2 Creating a Retention Policy ......................................................................................... 187

17.3 Modifying a Retention Policy ...................................................................................... 193

17.4 Applying Retention to an Application Manually ........................................................ 194


17.4.1 Apply retention to records matching a query ......................................................... 200
17.4.2 Apply retention to a collection of AIPs ................................................................... 210

17.5 Ensuring Retention has been Applied Correctly....................................................... 212

17.6 Creating Purge Lists Using the Generate Purge List Job ........................................ 218

17.7 Approving a Purge List ................................................................................................ 228


17.7.1 Approving a Purge List........................................................................................... 229
17.7.2 Approving a Purge List with Content ..................................................................... 230

OpenText InfoArchive 21.2 Page 5 of 331


17.8 Running the DisposePurgeCandidateList Job .......................................................... 231

17.9 Completing Disposition for Packages ........................................................................ 238

17.10 Event Based Retention ................................................................................................ 248


17.10.1 Fulfilling the Event.................................................................................................. 249

18.0 HOLDS................................................................................................... 250


18.1 Role Permission ........................................................................................................... 250

18.2 Creating a Hold ............................................................................................................. 250

18.3 Applying a Hold to an Application .............................................................................. 252

18.4 Viewing Hold Sets ........................................................................................................ 256

18.5 Removing One or More Items from a Hold Set .......................................................... 260

19.0 METRICS ............................................................................................... 263


19.1 Role Permission ........................................................................................................... 264

19.2 Viewing the Compliance and Storage Metrics........................................................... 264

20.0 CRYPTO RESOURCES......................................................................... 279


20.1 Role Permission ........................................................................................................... 279

20.2 Retrieving Crypto-objects............................................................................................ 279

20.3 Creating a New Crypto-object ..................................................................................... 282

20.4 Updating CryptoObject ................................................................................................ 283

20.5 Deleting a New Crypto-object...................................................................................... 284

20.6 SIP Application crypto-objects ................................................................................... 284


20.6.1 Creating a Pdi-crypto ............................................................................................. 284
20.6.2 Creating a Holding-crypto ...................................................................................... 286

20.7 Table Application crypto-object .................................................................................. 289


20.7.1 Creating a Database-crypto ................................................................................... 289

21.0 BACKGROUND TASKS (ORDER ITEMS)............................................ 292


21.1 Overview ........................................................................................................................ 292

21.2 Getting Information about Order Items ...................................................................... 293


21.2.1 Roles/Permission Getting Order Items .................................................................. 293
21.2.2 Getting My Order Items.......................................................................................... 293

OpenText InfoArchive 21.2 Page 6 of 331


22.0 PROXY BETWEEN CLIENT AND SERVER ......................................... 297
22.1.1 HTTP Access control and browsers (CORS)......................................................... 297
22.1.2 Our setup ............................................................................................................... 298
22.1.3 Testing it out .......................................................................................................... 301

23.0 JOBS ..................................................................................................... 302


23.1 Role Permission ........................................................................................................... 302

23.2 Viewing job definitions ................................................................................................ 302

23.3 View job instances ....................................................................................................... 304

23.4 Running or scheduling a job ....................................................................................... 306

23.5 Viewing job instance information for jobs that use batch ....................................... 307

24.0 RULES ................................................................................................... 314


24.1 Role Permission ........................................................................................................... 314

24.2 Listing rules .................................................................................................................. 314

24.3 Creating new rules ....................................................................................................... 316

25.0 BACKGROUND TASKS ........................................................................ 319


25.1 Background tasks permissions .................................................................................. 320

25.2 Viewing your own background tasks ......................................................................... 320

25.3 Viewing batches associated with order items ........................................................... 322

26.0 APPENDIX - EXAMPLES ...................................................................... 327


26.1 xQuery Example ........................................................................................................... 327

26.2 xForm Example ............................................................................................................. 328

26.3 Result-master Example ................................................................................................ 329

26.4 Example of a Customized application-CLIENTS.yml file .......................................... 330

About OpenText ......................................................................................................................... 331

OpenText InfoArchive 21.2 Page 7 of 331


1.0 Introduction
This guide is intended to provide an overview of various aspects of the
InfoArchive (IA) platform, focusing on REST API. It touches on several other
topics that should help you understand the overall architecture, dependencies
and how the system works in general. This guide is also complementary to
InfoArchive REST Reference API documentation that covers every aspect of the
REST API.
InfoArchive Reference REST API Documentation covers broad aspects of REST
API resources. While this guide focuses on a subset of those resources, it also
explains how the resources work and provides examples that should help you get
started.
REST is a uniform interface and any REST client can be used to access
InfoArchive REST API. You are free to use your browser’s plugins, command line
tools and standalone applications or write your own REST clients in any of the
preferred languages (Java, #Net, JavaScript, Objective-C, etc.). This guide also
uses the curl tool, which can be downloaded here: https://curl.haxx.se. It is a
generic command line tool used for data transfer that can be used successfully
as a REST client. It is a very simple and powerful tool. Depending on the
operating system you use, you may already have it installed or you may need to
install it as an add-on to your existing operating system. If you do so, you should
be able to run all of the examples included in this guide.
1.1 Prerequisites
The bare minimum is to have a running InfoArchive version 16EP5 environment.
If you do not have access to the running InfoArchive environment, you will need
to download the distribution and install it. An InfoArchive production environment
does not require a lot of system resources so a test InfoArchive environment can
be easily deployed on most desktops/laptops with minimum configuration
(InfoArchive can even run on a Raspberry Pi).

Note about running the examples:You may copy/paste all the provided examples, but the JSON
Web Token cannot be copied/pasted for two reasons:
1. JSON Web Tokens do expire. JSON Web token are explained later in this guide. So you
will need to get a fresh token if you intend to run provided examples in your own
environment.
2. JSON Web Tokens included in most examples have been shortened from their original
length to keep examples shorter and clearer.

OpenText InfoArchive 21.2 Page 8 of 331


2.0 Changes from previous versions
2.1 Changes for version 21.2
Here is a summary of the changes for this version. Please check the section for
more details:
• Changed APIs

New APIs for cross application searches.

New Api to include/select new columns for search composition corresponding


to metadata declared at the holding level and attributes present at AIP level using
the new package-fields-helper resource present at AIC level.
The available list of fields can be queried using the below rest API.

Rest-api:
GET Error! Hyperlink reference not valid.

headers:

Authorization: <xxxxxxx>
Accept:application/hal+json

curl -X GET -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6…-H 'Accept:


application/hal+json' localhost:8765/systemdata/aics/ac66619f-2c63-40e6-86fd-
ffeab754126f/package-fields-helper

OpenText InfoArchive 21.2 Page 9 of 331


sample response:

2.1.1 Changed APIs


CID access link templates (http://identifiers.emc.com/ci) returned from Search,
SearchComposition and ResultMaster resources are now only returned for roles
associated with VIEW_CONTENT_BY_CID authorization constants. They have
been deprecated and will be removed in a future release.
QueryQuota object is deprecated and will be removed in future release.
SearchResult resource now contains a field results.partial that indicate if the
search result is partial. (Which happens if dipQuota is exceeded for SIP search).

OpenText InfoArchive 21.2 Page 10 of 331


2.2 Changes for version 20.4
Here is a summary of the changes for this version. Please check the section for
more details:
• Added APIs

2.2.1 Added APIs


A new REST API was added to the convert holdings into the new format. The Pdi
and Confirmation objects require some minor changes
This API is described in the holding section: 13.3.1.7 and in the Config Admin
Guide.
Also, new REST APIs were added, specific for table-based application, allowing
users to cache-out or cache-in application. This API is described in application
section.

2.3 Changes for version 20.2


Here is a summary of the changes for this version. Please check the section for
more details:
• Added APIs

2.3.1 Added APIs


A new REST API was added to the AIP resource to rollback an Invalidation or
Reject.
This API is described in 14.1.1.5

Several jobs now support the ability to be canceled.


2.3.2 Removed APIs
The matter and collection REST APIs have been removed. See Error! Reference source not
found. for more information.

2.4 Changes for version 16EP7


Here is a summary of the changes for this version. Please check the section for
more details:
• Removed/Changed APIs
• Added APIs
• Clarification of behavior
2.4.1 Removed/Changed APIs
The following REST APIs were changed in this release.

OpenText InfoArchive 21.2 Page 11 of 331


The REST API to delete a table and to delete table content has been changed
from synchronous to asynchronous, it returns information about the order item
handling the request.
See 13.3.4 for more information.

2.4.2 Added APIs


A new REST API was added to apply retention asynchronously. Further
information about this API will be in the next version of this guide.

A new REST API was added to the AIP collection resource to apply-retention.
This API is described in 17.4.2.

2.4.3 Clarification of behavior


When removing the last retention policy and hold from an object, the managed
item will be removed from the system. This means that after removing a hold,
when trying to get the list of hold-applications or policy-applications a 404 may be
returned (since the managed item no longer exists).

2.5 Changes for version 16EP5.1


Here is a summary of the changes for this version. Please check the section for
more details:
• Removed/Changed APIs
2.5.1 Removed/Changed APIs
The following REST APIs were changed in this release:
- The federations link relation has been changed to the xdb-data-nodes to
reflect the new terminology for XDB data nodes.

The rest API for managed-items (from the application link has been changed its
behavior)
• If no parameters are passed, the list only returns a managed item (if it
exists) for the application. Previously, it would return all the managed
items in the application
• If the type parameters are passed, the external Id must also be passed,
otherwise a Bad Request will be returned. Previously, it would return all
the managed items in the application (which was incorrect).

OpenText InfoArchive 21.2 Page 12 of 331


The following REST API was removed in this release
- The refresh link relation from the metrics resource has been removed. If
you post to the refresh link relation, it will return a Gone (410) status
response. Instead, it is possible via rest to run the Refresh Metrics job.

The authorization constant associated with direct CID access link


(http://identifiers.emc.com/ci) has been renamed from VIEW_CONTENT to
VIEW_CONTENT_BY_CID. Roles associated by default with this constant stay
the same but, as of this release, the association with End User, IT Owner and
Retention Manager have been deprecated and will be removed in a future
release.

2.6 Changes for version 16EP5


Here is a summary of the changes for 16.5 version. Please check the section for
more details:
• HTML page with details on deprecated link relations
• Removed APIs
• Example to apply retention to search results
2.6.1 HTML for deprecated link relations
Obsolete, or deprecated, link relations are marked with “deprecation” Json
property. It’s value now resolves to HTML page which have more details on
deprecation. Read more on this topic in Api deprecation section.
2.6.2 Removed/Changed APIs
The following REST APIs were changed in this release:
- The apply retention REST API no longer allows the ability to specify only a
search criterion
Customers that fulfill an event using the REST API must ensure that “Process
Retention Events” job is run as this REST API no longer does requalification for
records associated with the event.

OpenText InfoArchive 21.2 Page 13 of 331


3.0 Architecture
The following diagram illustrates the high-level architecture of InfoArchive (IA)
from the REST perspective, including the major players involved:

• REST Client (for example, the InfoArchive web application)


o The InfoArchive web application is an example of the (REST) client
o The InfoArchive web application can be deployed on its own server
• Authentication/Authorization Service
o Nearly all calls to the IA Rest layer need to be authenticated.
Clients will have to obtain a JSON Web Token and set it in the
request’s header.
• IdP (Identity Provider)
o Depending on deployment (for example, AD or LDAP)
• REST API – InfoArchive REST Layer
o This is the REST Layer that client applications are interacting with.
All IA features can be accessed via the REST Layer.
• IA Core, SDX and Persistence layers
o These are important layer components of the IA platform.
Nevertheless, the REST Client does not directly interact with these
components, so these layers are not covered in detail in this guide.

As shown on the diagram above, clients only interact directly with the REST
(API) Layer. Since the majority of the resources in REST API require
authorization, the REST Client first needs to obtain an

OpenText InfoArchive 21.2 Page 14 of 331


authentication/authorization token (JSON Web Token or JWT in short – see
section 0) by performing authentication request to the Authorization Service.
Once the client has obtained a JWT, it then can proceed to perform subsequent
requests to the REST API layer.
3.1 Negotiation to Obtain JWT
The following diagram illustrates the process:

Step 1 shows the client issuing an unauthorized request (for example,


Authorization header not set). Since this request does not includes the JWT, the
REST Layer will respond with a 401 Error (Step 2), forcing the client to obtain
authentication/authorization token (JWT).
Currently, IA does not provide redirection capabilities, so the client needs to be
aware of where the Authorization Service resides and how to negotiate for a
JSON Web Token, which is illustrated in Step 3 and discussed in detail in section
01.
NOTE: The Gateway component (part of InfoArchive Web Application aka IAWA)
of InfoArchive provides the Authentication and Authorization services. The
Gateway component can also dispatch REST API calls to InfoArchive Server
(aka IAS). It is encouraged to route the REST API calls through the Gateway so
that the IA Servers do not need to be exposed
In this guide, most of the curl examples will not route through the gateway.

OpenText InfoArchive 21.2 Page 15 of 331


Step 4 shows internal verification of credentials within the IDP layer.
In Step 5, the client receives a valid JWT and then proceeds to include the token
on a request (Step 6).
Once the internal calls are completed (on IA Server Layers), a successful
response is returned to the client (Step 7). Subsequent calls’ flows are much
simpler, if the JWT is still valid and included with each request. For the duration
of the JWT validity, no further interactions with the Authorization Service are
necessary. The client can issue as many requests as will fit into the JWT time-to-
live window. Since each window (JWT time-to-live) will eventually expire, it is a
good idea to have a strategy on dealing with expired or potentially expired
access JWT. The different strategies as well as intricacies involved in obtaining
and refreshing JWT are discussed in more detail in section 0.

4.0 REST API


REST stands for REpresentation State Transfer. The InfoArchive API is built
using the REST architecture. It is a collection of resources that delivers a
stateless, scalable and modifiable model allowing the decoupling of client context
from the server. It is created around the concept of HATEOAS (Hypermedia as
the Engine of Application State) – which places IA REST API on Level 3,
according to the Richardson Maturity Model. Essentially, it provides a platform in
which, resources or services are discovered through the concept of Link
Relations, as opposed to hardcoding/bookmarking URIs.
According to the Discoverability paradigm, the client always starts at the Home
Resource, which is the entry point to the system and the only reference end point
(or URI) that clients need to be aware of. Each resource, including the Home
Resource, has a collection of Links. Links provide number of reference points
that the client can use to navigate further through the system. Conceptually, you
can envision this as a tree-like diagram where the Home Resource is at the root
(top) of the tree hierarchy and, by following links, you can traverse from the top,
through any available path, down to the leaves of the tree.
The IA REST API contains around 300 resources, and many are documented in
this guide.
Included below is a partial, high level view of the IA resources hierarchy from top
level to the second level of nesting. This guide describes the most relevant
resources, including specific use cases and recommended best practices.

OpenText InfoArchive 21.2 Page 16 of 331


Each resource is identified by the Link Relation and represented by its Media
Type. Most resources are described using HAL Media Type
(application/hal+json) which is a simplistic JSON model for the client to interact
with.
As an example, a Home Resource is deployed and accessible via the
http://localhost:8765/services URI. When a GET (HTTP GET method) request is
issued against that URI, the response will include the following JSON
representing the Home Resource:

{
"name": "InfoArchive Home Resource",
"_links": {
"self": {
"href": "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info": {
"href": "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants": {
"href": "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant": {
"href": "http://localhost:8765/systemdata/tenants/41ceb11f-2943-4a4d-9fb4-
bb198509942e"
}
….. (some links removed for clarity of this example)
}
}

As displayed above, the response consists of two parts: _links node (containing
an array of link elements) and the main part of the resource. In this example, the
main part is very simple and contains a single attribute name but, in other cases,
resources will have a more extensive set of metadata/attributes.
Each link (element contained in the _links node) element consists of the
following structure:
• Link relation name (for example, self, http://identifiers.emc.com/tenants,
etc.)
• href key and its value
When traversing the InfoArchive REST API, clients typically interacting with a
given resource will be able to navigate the system further by selecting one of the
link’s elements from an available array of links and then using the value of that
link relation contained in the href key to make another call.

OpenText InfoArchive 21.2 Page 17 of 331


Consumers of the REST API (clients) should not be concerned with the actual
value of the href key (a URI), but instead always look at the link relations. This
way, we can achieve a proper decoupling between the client and server. The
server may modify any URI at any given point without breaking the client.

In some cases, a client may choose to append the URI query parameters to the
value of the href key but should never attempt to modify the path element of the
URI.

It is also worth noting that actual links that are available (and returned to the
client) are based on the client’s role, which translates directly into authorization.
To simplify client’s interaction and to remove potential ambiguity, only links that
the client is authorized to interact with, are returned. If the client is not authorized
for a given resource, it will not see its link relation. Each resource is also
checking authorization upon execution so, even if the client was able to “guess”
or “figure out” a URI to a resource, it will still not be able to interact with it if it
does not have the proper authorization level. See section 6.0 for more details on
roles and permissions.
4.1 REST and CRUD Operations
REST interactions happen over HTTP and REST leverages that protocol to
create a uniform API. The interactions with resources use more than just a
simple GET HTTP verb. In fact, the IA REST API utilizes GET, PUT, POST and
DELETE verbs.
What is safe and what is idempotent?

In REST, some methods are safe and some are idempotent. A method that is safe does not modify
the resource. This is a property that is very important for caching, for example.
If a method is idempotent, it means that the outcome on the server side will be exactly the same,
regardless of whether the method was called once or many times. This property is very important
to understand, as it will help you in situations where the connection is interrupted, for example.
Knowing that the method is idempotent will allow you to resend the request again without fear of
additional consequences.
The interaction with IA REST API over HTTP is as follows:
NOTE: The Gateway (server side part of InfoArchive Web Application aka IAWA)
component can also dispatch REST API calls to InfoArchive Server. It is
encouraged to route the REST API calls through the Gateway. To do this all the
REST API calls need to use the URL of Gateway (or a load balancer in-front of
Gateways) and prefix the REST API paths with /restapi/. For example:

http(s)://gateway-host:gateway-port/[context-path/]/restapi/services

• GET represents a read action. This operation is safe and idempotent. So


anytime you want to see a resource representation you can issue a GET
on that resource. Usually, a successful GET operation should return a
“200 OK” response with the payload representing the resource.

OpenText InfoArchive 21.2 Page 18 of 331


• DELETE represents a delete action and, if successful, will return a “204
No Content “response with no payload. It will delete the resource,
assuming both permissions and the state of the resource allow for the
deletion to happen. This method is not safe, but it is idempotent.

• PUT represents an update action and requires a payload. Full resource


representation needs to be provided as part of the payload that includes
all attributes. It is necessary to have access to the latest version of the
resource for the update to be successful (the version attribute will
determine if the version is up to date). Typically, a GET must be executed

OpenText InfoArchive 21.2 Page 19 of 331


on the resource first, and then it will update any necessary attributes and
use all attributes, including the updated ones, as a payload for the PUT.
This method is idempotent, but it is not safe and will modify the resource if
successful. It will return a “200 OK response”, including the updated
resource representation. System attributes are read-only and cannot be
updated. If an attempt is done to modify a system attribute, it will be
ignored by the server.

• POST represents all other actions. This method is the most versatile. It is
also neither safe nor idempotent. Depending on the action, it may require
a payload. The Response will depend on the type of action. There is a
paradigm of creating new objects by sending a POST request to the
collection that the resource will be a member of. In such case, the payload
would be a new resource representation and the response would be 201
Created. For example, to create a new search resource, we would send a
POST request to the searches collection, passing new search
representation in the payload to the POST.

OpenText InfoArchive 21.2 Page 20 of 331


Most resources do not support additional HTTP methods, so OPTIONS and
HEAD are not supported. PATCH is not currently supported.
REST API access through Gateway

As mentioned above, the Gateway (server side part of InfoArchive Web


Application aka IAWA) component can also dispatch REST API calls to
InfoArchive Server. It is encouraged to route the REST API calls through the
Gateway. To do this all the REST API calls need to use the URL of Gateway (or
a load balancer in-front of Gateways) and prefix the REST API paths with
/restapi/. For example:

http(s)://gateway-host:gateway-port/[context-path/]/restapi/services

The Gateway uses Zuul proxy to dispatch/route the REST API calls to
InfoArchive Server. There is a 60 second timeout on the REST API calls routed
through Gateway. The timeout is configurable via the Gateway’s application.yml
file:
infoarchive/config/iawebapp/application.yml

OpenText InfoArchive 21.2 Page 21 of 331



zuul:

host:
maxPerRouteConnections: 20
maxTotalConnections: 200
socket-timeout-millis: 60000

It is strongly discouraged to override this timeout value as it affects the


configuration of all other REST clients as well. However sometimes there is a need
to override this timeout value on a per request basis. This can be achieved by
setting the X-SOCKET-TIMEOUT-MILLIS request header. For example:

X-SOCKET-TIMEOUT-MILLIS: 120000

where the 120000 is in milliseconds i.e. 120 seconds.

There is a limitation while uploading/downloading large files going via the Gateway.
To workaround this limitation, prefix the REST API call with /zuul/ like so:

http(s)://gateway-host:gateway-port/[context-
path]/zuul/restapi/services

OpenText InfoArchive 21.2 Page 22 of 331


5.0 Authentication and Authorization

For an overview of the negotiation process to obtain JWT, refer to section 3.1.
Each REST call needs to be authenticated. The IA Server supports different
authentication profiles, but this guide will focus on the most popular and highly
recommended JSON Web Token (JWT). If the IA Server is configured with a
JWT profile, which is specified in server’s application.yml file, each REST
request needs to have a JWT token provided in the Authorization request
header. The format is as follows:
Request Header: Authorization
Header value: Bearer [token here]
For example, using your favorite REST client, (you should be able to use any
REST client), set the Authorization request header so that value of the
Authentication header looks like the one below:

OpenText InfoArchive 21.2 Page 23 of 331


Bearer
eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjM2MDU4MjIxMzQsInVzZXJfbmFtZSI6InN1ZUBpYWN1c3R
vbWVyLmNvbSIsImF1dGhvcml0aWVzIjpbIkdST1VQX0FETUlOSVNUUkFUT1IiLCJHUk9VUF
9SRVRFTlRJT05fTUFOQUdFUiIsIkdST1VQX0JVU0lORVNTX09XTkVSIiwiR1JPVVBfRU5EX1
VTRVIiLCJHUk9VUF9ERVZFTE9QRVIiLCJHUk9VUF9JVF9PV05FUiIsIlJPTEVfQURNSU5J
U1RSQVRPUiIsIlJPTEVfUkVURU5USU9OX01BTkFHRVIiLCJST0xFX0JVU0lORVNTX09XTk
VSIiwiUk9MRV9FTkRfVVNFUiIsIlJPTEVfREVWRUxPUEVSIiwiUk9MRV9JVF9PV05FUiJdLZ
JqdGkiOiJiNmNiODI0NS1iNTI1LTRjYmQtOGM3Yy1kNTI0OWNlN2RiYjgiLCJjbGllbnRfaWQi
OiJpbmZvYXJjaGl2ZS5pYXdhIiwic2NvcGUiOlsiYWRtaW5pc3RyYXRpb24iLCJjb21wbGlhbmNlI
iwic2VhcmNoIl19.WJXBExaxsxwEtQdXTbzQRJslhHuGwqhqYtix4wsabcd

If the Authorization header is not set, or the token is not valid, you will receive a
401-error code response from the server instead of a successful code.

5.1 Obtaining JWT for the First Time


In order to obtain a JSON Web Token, the client needs to obtain it from the
Authorization Service. By default, there is an Authorization Service deployed
within the InfoArchive Web Application. It can be accessed, as follows:
Issue a POST request to Authorization Service. For example:
http://localhost:8080/oauth/token

Set the “Authorization” request header to the Base64 encoded value of


clientId + : + clientSecret. Those values are configured in the corresponding
client section of the application-CLIENTS.yml file located in the folder [IA
distribution root]/infoarchive/config/webapp (see example of customized yml
file in section: 26.4). For example, if the clientId value is infoarchive.custom,
and its value is mysecret, you would have to Base64 encode following string:
infoarchive.custom:mysecret

Note: If you are using OTDS SSO, in this mode OTDS is acting as a OAuth2
server. The OTDS is responsible for OAuth2 clients. To define new OTDS
Clients, you have to use OTDS Admin Web Application.

Set the Content-Type header value to application/x-www-form-urlencoded


For the Body of this POST request, set the following values (it is a form):
i. username=[name of end user] (for example,
[email protected])
ii. password=[user’s password]
iii. client_id=[The value of this field should be the value of clientId
from relevant section of yml file]
iv. scope=[one or more supported scopes from the client’s section
in the yml file]. If providing more than one scope, they should be
separated by white space

OpenText InfoArchive 21.2 Page 24 of 331


v. grant_type=[one of the supported authorizedGrantType from
the corresponding client’s section of the application.yml file]
If the POST method is successful, the server will return a 200 (OK) Response
code, and the body will contain several values: access_token, token_type,
refresh_token, expires_in, scope, jti – all in JSON format. The following is an
example:
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cC…",
"token_type": "bearer",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5…",
"expires_in": 2147483646,
"scope": "administration compliance search",
"jti": "82e6a274-d8fd-4067-99f0-dcd8231b35c1"
}
The following is a practical example performing a POST request using popular
the curl tool:

curl -X POST -H 'Authorization: Basic


aW5mb2FyY2hpdmUuY3VzdG9tOnNlY3JldA==' -d
'grant_type=password&[email protected]&password=passwor
d&scope=search&client_id=infoarchive.custom' localhost:8080/oauth/token
The response should appear like the following:
{
"access_token":
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjM2MzUyODE5NTMsInVzZXJfbmFtZSI6
ImNvbm5pZUBpYWN1c3RvbWVyLmNvbSIsImF1dGhvcml0aWVzIjpbIkdST1VQX0RFVkVMT1B
FUiIsIlJPTEVfREVWRUxPUEVSIl0sImp0aSI6IjRiNTcyZjk3LTc2MmMtNDIwNC05ZjZjLWMw
MzRjYzMwOGUzNCIsImNsaWVudF9pZCI6ImluZm9hcmNoaXZlLmN1c3RvbSIsInNjb3BlIjpbIm
FkbWluaXN0cmF0aW9uIiwiY29tcGxpYW5jZSIsInNlYXJjaCJdfQ.YhnezAzS1nLznNh2iCSdyRXk
V94Ah3k51yIsZYTLFQ0",
"token_type": "bearer",
"refresh_token":
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJjb25uaWVAaWFjdXN0b21l
ci5jb20iLCJzY29wZSI6WyJhZG1pbmlzdHJhdGlvbiIsImNvbXBsaWFuY2UiLCJzZWFyY2giXSwi
YXRpIjoiNGI1NzJmOTctNzYyYy00MjA0LTlmNmMtYzAzNGNjMzA4ZTM0IiwiZXhwIjozNjM1Mj
gxOTUzLCJhdXRob3JpdGllcyI6WyJHUk9VUF9ERVZFTE9QRVIiLCJST0xFX0RFVkVMT1BF
UiJdLCJqdGkiOiJmYzhjNGFmOS1kYTU2LTRmMjMtODA5NC00NmQwNzcwMTdjMTEiLCJjb
GllbnRfaWQiOiJpbmZvYXJjaGl2ZS5jdXN0b20ifQ.ipQb8qcgzEGD7uT9dnOlXXzv5-
1wY3idN3kQzmUqsfU",
"expires_in": 2147483646,
"scope": "administration compliance search",
"jti": "4b572f97-762c-4204-9f6c-c034cc308e34"
}
The value of the access_token and the token_type is that it can be used to
construct a JSON Web Token. In our case, it would be: Bearer
eyJhbGciOiJIUzI1NiIsInR5c…. This can now be used as the JWT valid until it
expires. Token expiry is given, in seconds, in the value of expires_in attribute.
Once a token expires, a refresh_token can be used to obtain a new token, or a

OpenText InfoArchive 21.2 Page 25 of 331


new POST request can be made to the Authorization Service to re-do the entire
negotiation process.
The jti attribute of the response is currently not used.
5.2 Refreshing JWT
There are several different strategies that can be used to deal with
access_token expiry. One of the most common ones would be to wait until the
server returns a 401 error, indicating the token has expired, and then obtain a
new access_token by using a refresh_token. The handshake to obtain a new
access_token using a refresh_token is somewhat like asking for a brand-new
access_token, but more simplistic, as the client only need to pass two
parameters in the payload (refresh_token and grant_type). The following is an
example using curl:
curl -X POST -H 'Authorization: Basic
aW5mb2FyY2hpdmUuY3VzdG9tOnNlY3JldA==' -d
'refresh_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOi
Jjb25uaWVAaWFjdXN0b21lci5jb20iLCJzY29wZSI6WyJhZG1pbmlzdHJhdGlvbiIsI
mNvbXBsaWFuY2UiLCJzZWFyY2giXSwiYXRpIjoiNTAzMGQxYjMtNjdhZS00YTY
2LWFjNWYtZDU3OTlkYjhiNzFlIiwiZXhwIjozNjM1MjgxMjgzLCJhdXRob3JpdGll
cyI6WyJHUk9VUF9ERVZFTE9QRVIiLCJST0xFX0RFVkVMT1BFUiJdLCJqdGki
OiI5MDZlNjViYS00NTQ5LTRlMmMtYmRhZi05ODBlYTBlYzQxY2UiLCJjbGllbnR
faWQiOiJpbmZvYXJjaGl2ZS5jdXN0b20ifQ.t4ZEhNns90Uv60_zbytZo1Bo8oev7O6
V0gmUwJrbqmg&grant_type=refresh_token' localhost:8080/oauth/token

Compared to obtaining a JWT for the first time, in this instance, the payload is
longer since it includes the refresh_token and the grant_type value
(refresh_token). However, the username, password client_id or scope are
not required.
The refresh_token must be properly protected and stored securely.
5.3 Putting it all Together
Now that we have basics of REST and authentication behind us, this section
documents a simple interaction example, from the client’s perspective, on how to
get to Product-Info resource. Product-info resource is an informatory resource
about the IA Server, and it is accessible directly from the Home Resource.
Once a JSON Web Token (JWT) has been obtained, the client can make a GET
request to the Home Resource. The IA Home Resource supports HAL Media
Type so we can do the following:
• Prepare a GET request to http://localhost:8765/services, setting the
Accept header to application/hal+json and Authorization header set to
JWT we just obtained.
The following is an example using curl:

OpenText InfoArchive 21.2 Page 26 of 331


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:
application/hal+json' localhost:8765/services

NOTE: In the example above, the value of the Authorization header was shortened. Most of the
examples throughout this guide will have similar, shorter versions of the Authorization header.

• The server then returns a 200 OK Response with HAL body. The following
is an example of the response:
{
"name": "InfoArchive Home Resource",
"_links": {
"self": {
"href": "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info": {
"href": "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants": {
"href": "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant": {
"href": "http://localhost:8765/systemdata/tenants/41ceb11f-2943-4a4d-9fb4-
bb198509942e"
},
"http://identifiers.emc.com/federations": {
"href": "http://localhost:8765/systemdata/federations"
},
"http://identifiers.emc.com/xdb-databases": {
"href": "http://localhost:8765/systemdata/xdb-databases"
},
"http://identifiers.emc.com/file-system-roots": {
"href": "http://localhost:8765/systemdata/file-system-roots"
},
"http://identifiers.emc.com/crypto-objects": {
"href": "http://localhost:8765/systemdata/crypto-objects"
},
"http://identifiers.emc.com/groups": {
"href": "http://localhost:8765/systemdata/groups"
}
}
}

The next step is to parse the returned JSON data looking for a specific link
relation, such as product-info (http://identifiers.emc.com/product-info).
Then refer to the value of the href attribute of that element (for example,
http://localhost:8765/product-info).
• The following step is to issue a GET request to that URI, setting the
Accept header to application/hal+json and setting Authorization header
to the latest JWT value. The server should return a 200 OK Response with
the body describing vital server resources, including buildProperties,
systemProperties and runtimeProperties.
The following is an example of the request using curl:

OpenText InfoArchive 21.2 Page 27 of 331


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…’ -H 'Accept:
application/hal+json' localhost:8765/product-info

The response should be like the following:


{
"buildProperties": {
"build.date": "2017.02.10 14.32.39 MSK",
"build.number": "5920",
"ia.server.perforce.changelist": "3932992",
"records.service.version": "1.5.0",
"spring.data.xdb.version": "1.1.13-SNAPSHOT",
"xdb.version": "11.1.0"
},
"systemProperties": {
"java.version": "1.8.0_74",
"processor.level": "6",
"processors.count": "8"
},
"runtimeProperties": {
"file.system.roots": [{
"C:\\": {
"total.space": "223.6 GB",
}
}
}],
"memory.info": {
"memory.jvm.total": "1.1 GB",
},
"runtime.data.collected.on": "2017.02.23 09:49:39 EST"
},
"_links": {
"http://identifiers.emc.com/services": {
"href": "http://localhost:8765/services"
}
}
}

• Finally, examine the _links node for potential paths that we can be
pursuing from this point on. In this example, we reached the leaf so the
only path available to us is to turn back to Home Resource.

OpenText InfoArchive 21.2 Page 28 of 331


6.0 Permissions

The permissions model is based on the concept of roles and actions. There is
predefined number of roles in the system, which can be found in the server’s
application.yml file, and are displayed in the illustration above as a subset of
these. Each role is assigned several actions it supports. Again, both roles and
actions are defined in the aforementioned application.yml file.
Each individual user should be assigned a role (one or more) and these roles will
be encoded in the JSON Web Token, which happens during
Authentication/Authorization request. The system will allow/disallow the user’s
request based on her or his role membership(s). Specifically, for each request,
the server will check whether any of the roles assigned to the current user allows
for a given action. If none of the roles support the given action, the request is
denied. In most cases, the server will indicate this by responding to the request
with a HTTP error 403 – forbidden (access).
For example, only users with Developer’s role permissions can create search
resources, or only users in either the Administration or Developer roles can
create application resources.
Since most of the IA REST APIs is controlled by link relations, in some cases,
applicable link relations are only served if users own the specific role. However,
even if the link relation is present, that does not always guarantee that the given
user will be permitted to invoke certain functionality, as there are additional

OpenText InfoArchive 21.2 Page 29 of 331


details sometimes involved in this decision-making process (for example,
resource current state, concurrency, etc.).
While there is further information regarding roles in this guide, you should always
consult the IA server’s application.yml file for full details.
Note: Roles and actions are highly customizable. In this guide, and throughout some of its
examples, it is assumed that out-of-box roles and actions are leveraged. For configuring custom
roles and actions, consult the InfoArchive Configuration and Administration User Guide.

7.0 Resources and Collections

There are two main types of resources: single resources and collections. What
we have seen so far (Home Resource and Product Info) are examples of single
resources. They are characterized by a simple, two-tone structure: resource itself
and _links node.
While Home and Product-Info are not part of any specific collection, the majority of Resources
in InfoArchive are usually part of some type (usually homogenous) collection.

The other type of resource is collections. Unlike a single resource, a collection


can have many elements (individual resources) and can get very lengthy by
including a lot of returned information. The IA Rest API leverages a pagination
mechanism that allows the results to be organized by pages that are easier to
handle. Additionally, the mechanism maximizes initial server response time.
Collections are easy to identify, as they have the following three-prong structure
(three top level JSON elements):
• _embedded node – This is the main node of the collection. Based loosely
on AtomPub collection elements, there usually is a top-level collection
name element (for example, tenants, applications, searches) and its value
is an array of elements, where each element is a single item of the
collection. Items themselves will be as simple or as complex as a given
resource is. Each item will also have a corresponding _links node

OpenText InfoArchive 21.2 Page 30 of 331


allowing the client to pursue further through this item’s discovery path.
Those links are specifically for the given item in the collection.
• _links node – Standard HAL node containing useful links pertinent to the
collection as a whole. Depending on the collection size, as well as where
we currently are in the collection (for example, the beginning, middle or
end) it will have useful links pointing to “next”, “prev”, “first” or “last” pages.
• page node – This node will contain page specific details of the current
collection’s page. It will have details such as size of page (default 10),
totalElements – total number of items in entire collection, totalPages –
total number of pages in this collection (usually by formula:
totalElements/size) and number, which corresponds to current page
number (starts at zero).
All collections support pagination parameters, meaning we can append page or
size as URI query parameters and jump into the portion of the collection we are
interested in. For example, by appending ?page=2&size=15, we can ask for
third (they are zero-indexed) page, where each page has 15 elements.

7.1 Creating Items in a Collection

REST has a paradigm in which we create a new item in the collection by issuing
a POST to the collection itself, where the payload contains the item to be
created. The payload should contain all of the necessary attributes for the item to
be created. Any item omitted from the payload will get its default value. If the

OpenText InfoArchive 21.2 Page 31 of 331


attribute is a mandatory attribute, and it is missing from the payload, such a
POST request will fail.
7.2 SpEL Expressions
When doing a GET on a collection, often a spEL expression helps restrict the
number of responses to avoid paging over a huge return set.
Not all resources support spEL expressions, but many do, such as:
• Applications
• Retention policies
• Holds
• Groups
• Roles
• Audits (including audit constants and audit event types)

For resources that could have large numbers, spEL is not supported. This
includes:
• AIPs
• Managed Items
• Retained Sets
• Hold Sets
7.2.1 Common SpEL Expressions

Spel Expression Description

?spel=[?name == ‘Requested Gets the resource with the requested


Name’] name.

?spel=[(name ne null and Matches if the name or description


name?.toLowerCase() matches starts with an expression (excel in this
'^excel.*' ) or (description ne null example).
and description?.toLowerCase()
matches '^excel.*' )]

?spel=?[(name ne null and Matches if the text is anywhere in


name?.toLowerCase() matches name or description (long is this
'.*long.*' ) or (description ne null example).
and description?.toLowerCase()
matches '.*long.*' )]

OpenText InfoArchive 21.2 Page 32 of 331


Using a function on a value that can be null should first check that the attribute is
not null to avoid problems.
Some resources return transient fields and will not work as expected. For
example, to filter on purge lists, use retentionPolicy.name instead of
retentionPolicyName, as the latter is a calculated field.

7.2.2 Improving Performance from SpEL Expressions


The following rules will help improve the performance of spEL expressions:

• The expression is a selection (for example, ?[foo='bar']).


• Relational operators: lt (<), gt (>), le (<=), ge (>=), eq (==), ne (!=), matches. Regarding
matches, it translates to the XQuery function sdx:matches(). We use an extension
function instead of fn:matches to support the java.util.regex.Pattern syntax (which is used
by SpEL) instead of the XQuery regular expression syntax.)
• Logical operators: and, or can be nested.
• Method references are not supported, with the following exceptions:
 String::toLowerCase() - translates to the XQuery function
fn:lower-case()
 String::toUpperCase() - translates to the XQuery function
fn:upper-case()

7.3 Updating resources

When you update a resource, you must first GET the resource. When you get
the resource, there will be an ETAG in the header that is used to prevent
concurrent updates overriding changes.

First, we get the resource, in this case we will get the Audit Application
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207/applications?spel=%3F%5Bname%3D%3D%27Audit%27%5D%0D%0A

From the response you will need the self link, and do a GET. In the response
header, you will get an ETAG value.
etag:"564e1971233e098c26d412f2d4e652742355e616fed8ba88fc9750f869aac1c29cb944175c3
74a7b6769989aa7a4216198ee12f53bf7827850dfe28540587a97"

This etag must be included in the header when doing the PUT command.

OpenText InfoArchive 21.2 Page 33 of 331


When doing a PUT command, it is not necessary to include all of the fields, and
some fields can be left out which are considered system read-only such as:
• createdBy
• createdDate
• lastModifiedBy
• lastModifiedDate
• version
• id

8.0 Responses

All server responses consist of a response status code (standard HTTP Status
Codes), response headers and sometimes response bodies, if applicable.
Response code is a first indicator with respect to what state we are currently
dealing with – was our request processed OK or did it fail. Typically, any
response that was processed correctly will contain Status Code from the 2xx
family (for example, 200 OK, 201 Created, 202 Accepted or 204 No Content).
In addition to Status Codes from the 2xx family, we should be generally ready to

OpenText InfoArchive 21.2 Page 34 of 331


process anything from the 4xx or 5xx families, which are, respectively, client side
and server-side errors.

OpenText InfoArchive 21.2 Page 35 of 331


9.0 API changes
As IA Rest API evolves, we’ll be seeing some changes from version to version.
We’ll be making every effort to ensure that changes are always backward
compatible, it is inevitable that some changes will happen.
This will include:
1. Adding new resources
2. Adding attributes to existing resources
3. Adding new operations on existing resources
4. Moving resources from root A to root B
5. Deprecating APIs
6. Deleting APIs
Majority of these changes should not cause too much trouble especially if the
client is written using HATEOA approach (discovering resources).
As our resources are compliant with HAL spec, we have annotated deprecated
APIs with “deprecation” property (see section 5.4 of HAL’s spec:
https://tools.ietf.org/html/draft-kelly-json-hal-06#section-5.4). This will be a
property on the JSON link, similar to how we annotated “dip” resource in the
example below:

{
"id": "feb361ce-6d81-4d29-967f-9b5e496e1559",
"createdBy": "[email protected]",
"createdDate": "2018-04-19T10:42:49.197-04:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2018-04-19T10:42:49.197-04:00",
"version": 1,
"name": "PhoneCalls-aic",
"_links": {
"self": {
"href": "http://127.0.0.1:8765/systemdata/aics/feb361ce-6d81-4d29-967f-9b5e496e1559"
},
"http://identifiers.emc.com/update": {
"href": "http://127.0.0.1:8765/systemdata/aics/feb361ce-6d81-4d29-967f-9b5e496e1559"
},
"http://identifiers.emc.com/dip": {
"href": "http://127.0.0.1:8765/systemdata/aics/feb361ce-6d81-4d29-967f-
9b5e496e1559/dip",
"deprecation": "http://127.0.0.1:8765/deprecated"
}
}
}

OpenText InfoArchive 21.2 Page 36 of 331


Value of “deprecation” property resolves to HTML page as it is meant for the
human reader. You can read that HTML to learn more about deprecated
resources in InfoArchive. See example of that HTML below.

This is only an example, as there are more entries.

We now have the ability to execute cross-application searches, see section


15.11.

OpenText InfoArchive 21.2 Page 37 of 331


9.1 New link relations

To save space the prefix, has been omitted ( http://identifiers.emc.com/)

Relation Supported Resources Notes

cross-application- Search Returns a collection of


searches cross-application
searches that reference
this search.

9.2 Changed behavior


Added ability to approve a purge list with content. See section 17.7.2 for more
details.

OpenText InfoArchive 21.2 Page 38 of 331


10.0 Errors

Some REST calls may result in errors. If so, the error response code will shine a
light on the type of problem. Since all response codes are HTTP Status Codes,
when it comes to errors, we typically divide them into two sections:
• 4xx family – client-side errors: If we receive a 4xx type error, this is, in
most cases, the client’s fault and client should figure out what went wrong
and attempt to resolve the problem. Examples here would be non-JSON
compliant payload for POST, or missing a mandatory JSON attribute (both
would be 400), or PUT where version attribute is not the latest, would fail
with a 409 error. It is the client’s responsibility to figure out how to fix this
type of problem. There are usually helpful hints in the error response body
(seen next section).
• 5xx family – server-side errors. This indicates that the request was fine,
but something went wrong on the server and the request failed.
Depending on the failure, the request may or may not need to be
repeated. For example, if the status code is 500, the client typically does
not need to repeat the request, as the request is likely to fail again.
However, if the status code was 503 – the failure could have been due to
the resource contention issue (for example, lock) and repeating the
request may be successful.

OpenText InfoArchive 21.2 Page 39 of 331


10.1 Error Response Body
For most errors, you will get back JSON response body, providing some helpful
hints with respect to what actually went wrong. Analysis of the error response
should help the client figure out how to proceed further. Here is an example of
the JSON error response (this is an example of the bad POST to create new
item, where the mandatory attribute name was not provided in JSON payload):

{
"_errors": [{
"error": "name",
"errorCodes": [],
"message": "may not be empty",
"localizedMessage": "may not be empty"
}],
"_links": {}
}
As of this writing, there are two attributes in the JSON error response that will
help determine what went wrong: error and message. The array errorCodes is
currently reserved for future use and, for most errors, will not provide a specific
error code yet.

OpenText InfoArchive 21.2 Page 40 of 331


11.0 Resource Hierarchy

As previously described in section 3.0, resources are organized in a hierarchy


similar to a tree. This means, depending on where the given resource is placed
(for example, rooted), the REST Client needs to first traverse to that resource,
following a resource-discovery paradigm, before being able to interact with it. The
developer needs to be familiar with this hierarchy, either via the REST API
documentation or by interacting with the system.

12.0 Tenant
Tenant is a top-level resource and a collection that can be found right off the top
of the tree via the Home Resource. Executing a GET action on a Home
Resource will return a payload that will include the tenant’s resources

OpenText InfoArchive 21.2 Page 41 of 331


(http://identifiers.emc.com/tenants) that will be used to a create new tenant
resource.
12.1 Retrieve Tenant Resources
The first step is to access the Tenant Resource via Home Resource as shown
below:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/services
The next step is to process the response by parsing the _links node to find the
link the relation tenants (http://identifiers.emc.com/tenants) href element and
then to issue a GET request against the returned URI:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/tenants
Since the Tenants resource is a collection, the server will return one or more
Tenant Resources. If more than one Tenant resource is available, simply select
the targeted Tenant item by leveraging attributes such as the Tenant name.
12.2 Create a new Tenant Resource
12.2.1 Role Permissions

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

As shown above, only users in the Administrator’s role can create tenant
resources.

Note: If leveraging the exercise example in this guide, ensure that the correct Scope was used in
order to obtain a JWT with Administration permission with the appropriate rights, as described
in Section 4.1 of this guide. The Authorization Method example used in this guide originally
requested a “Search” Scope level access when, in this case, an Administration permission is
required.

12.2.2 Issuing POST


To create a new Tenant Resource, the same link resource href attribute used in
section 10.1 must be leveraged (for example,
http://localhost:8765/systemdata/tenants) and issue a POST method to it. Tenant
is a rather simplistic resource. In fact, IA allows for the creation of new Tenant

OpenText InfoArchive 21.2 Page 42 of 331


resource(s) by providing the name attribute alone. The Tenant Name Attribute
value must be unique.
Note: A unique name constraint applies to a lot of resources in InfoArchive. When
creating a new resource, it is a good idea to give it some meaningful, unique name.

Note: It is not recommended to create new tenants as currently the IA WebApp


currently only communicates with the INFOARCHIVE tenant.

The following example illustrates a POST Method using curl to instruct IA to


create a new Tenant Resource named “myFirstTenant”:

curl -X POST -H 'Content-Type: application/hal+json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'{"name":"myFirstTenant"}' localhost:8765/systemdata/tenants

As shown above, the POST Method (indicated by the –X argument overriding


curl’s default GET method) provides three headers: Content-Type,
Authorization and Accept. Content-Type header is needed to pass a payload
and to indicate the format of the payload. In this case, it is application/hal+json
(default type for most resources leveraged by IA) plus the Authorization header
(JSON Web Token). Finally, we want to let the server know the required
response type (HAL media type). The server will try to serve the content type that
the client can accept.
The example also includes a JSON payload with the –d argument. What follows
is our JSON payload in single quotes. We also need to include quotes around the
JSON attributes, which results in double quotes.
The last argument is the Tenants collection URI. If everything worked correctly,
we should get the 201 Created response, and JSON payload in response should
provide our newly created Tenant resource’s representation, similar to the
following:

OpenText InfoArchive 21.2 Page 43 of 331


{
"id": "1177febe-d514-41ac-a3b9-f3b7357241eb",
"createdBy": "[email protected]",
"createdDate": "2017-03-10T08:33:21.049-05:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-10T08:33:21.049-05:00",
"version": 1,
"name": "myTenant",
"permission": {
"groups": []
},
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb"
},
"http://identifiers.emc.com/groups": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/groups"
},
"http://identifiers.emc.com/applications": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/applications"
},
"http://identifiers.emc.com/application-categories": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/application-
categories"
},
"http://identifiers.emc.com/export-configurations": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/export-
configurations"
},
"http://identifiers.emc.com/export-pipelines": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/export-pipelines"
},
"http://identifiers.emc.com/export-transformations": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/export-
transformations"
},
"http://identifiers.emc.com/custom-presentation-configurations": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/custom-
presentation-configurations"
},
"http://identifiers.emc.com/retention-policies": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/retention-policies"
},
"http://identifiers.emc.com/retention-policy-categories": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/retention-policy-
categories"
},
"http://identifiers.emc.com/events": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/events"
},
"http://identifiers.emc.com/holds": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/holds"
},
"http://identifiers.emc.com/conditions": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/conditions"
},
"http://identifiers.emc.com/apply-job-properties": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/apply-job-
properties"
},
"http://identifiers.emc.com/audits": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/audits"
},
"http://identifiers.emc.com/audit-event-types": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/audit-event-types"
},
"http://identifiers.emc.com/audit-constants": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb/audit-constants"
},
"http://identifiers.emc.com/my-orders-items": {

OpenText InfoArchive 21.2 Page 44 of 331


13.0 Application

The Application resource represents collections of applications available to a


specific Tenant. InfoArchive supports two types of applications: Table Archiving
and SIP Archiving applications. The archiveType attribute displays the value
accordingly: TABLE or SIP. For more information in regard to table and SIP
archiving, refer to the InfoArchive Configuration and Administration User Guide.
13.1 Retrieving Application Resource
To retrieve a list of Application Resources, leverage the
http://identifiers.emc.com/applications href value that resulted from the
http://localhost:8765/systemdata/tenants method explained in section 10.1.
The following is an example using curl:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/tenants/41ceb11f-2943-4a4d-
9fb4-bb198509942e/applications
If
successful, then the IA Server will return a Payload Collection with one or more
configured IA Applications similar to the following example:

OpenText InfoArchive 21.2 Page 45 of 331


{
"_embedded": {
"applications": [
{
"createdBy": "[email protected]",
"createdDate": "2017-01-16T09:17:27.428-08:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-01-16T09:17:59.126-08:00",
"version": 3,
"name": "PhoneCalls",
"structuredDataStorageAllocationStrategy": "DEFAULT",
"type": "ACTIVE_ARCHIVING",
"archiveType": "SIP",
"searchCreated": true,
"xdbLibraryAssociated": true,
"state": "IN_TEST",
"viewStatus": true,
"description": "The application has customer support phone calls history",
"category": "Customer Support",
"retentionEnabled": false,
"cryptoIV": "RQB/RqfTFqHfBJ851JeQ7Q==",
"metadataCacheSize": 0,
"permission": {
"groups": []
},
"cryptoKeyID": "search_results_3b19b6d5-58ee-46a5-9b04-869fa4acbddf",
"cryptoEncoding": "base64",
"_links": {
"http://identifiers.emc.com/groups": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf/groups"
},
"self": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf"
},
"http://identifiers.emc.com/update": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf"
},
"http://identifiers.emc.com/delete-data": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf/delete-data"
},
"http://identifiers.emc.com/tenant": {
"href": "http://localhost:8765/systemdata/tenants/2f9fd3f2-5334-4f61-8538-9e5595cca4e7"
},
"http://identifiers.emc.com/managed-items": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf/managed-items"
},
"http://identifiers.emc.com/purge-candidate-lists": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf/purge-candidate-lists"

13.2 Creating an Application Resource


13.2.1 Role Permissions

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

Only users in role of an Administrator or Developer can create Application


resources.
Make sure that the correct administration-level scope or equivalent was used
when requesting the JWT via the Authorization Method.

OpenText InfoArchive 21.2 Page 46 of 331


13.2.2 Creating an application
In the previous section (12.0), a new Tenant resource was created that included
all of the links, including the link relations that point to a collection of applications
(http://identifiers.emc.com/applications). To create a new Application resource, a
POST Method must be executed to that collection.
To create an Application resource, at a minimum, the following attributes are
required: name and archiveType. We will also pass the type attribute (both are
mandatory) and that should allow for the new Application resource to be created:

curl -X POST -H 'Content-Type: application/hal+json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'{"name":"myFirstApplicaiton", "archiveType":"TABLE",
"type":"APP_DECOMM"}' localhost:8765/systemdata/tenants/1177febe-d514-
41ac-a3b9-f3b7357241eb/applications

After a successful call, the IA server will return a 201 Created response that
includes the newly created Application Resource, similar to the following
example:

OpenText InfoArchive 21.2 Page 47 of 331


{
"id": "b3ac0fbe-57b1-4555-a1d5-0d5449c68e10",
"createdBy": "[email protected]",
"createdDate": "2017-03-10T09:11:12.291-05:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-10T09:11:12.291-05:00",
"version": 1,
"name": "application1",
"structuredDataStorageAllocationStrategy": "DEFAULT",
"tenant": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb",
"type": "APP_DECOMM",
"archiveType": "TABLE",
"searchCreated": false,
"xdbLibraryAssociated": false,
"state": "IN_TEST",
"viewStatus": true,
"description": null,
"category": null,
"retentionEnabled": false,
"defaultRetentionPolicyName": null,
"cryptoIV": "iFvlKTTt7pThHJaQkKr9sQ==",
"metadataCacheSize": 0,
"permission": {
"groups": []
},
"cryptoEncoding": "base64",
"cryptoKeyID": "search_results_b3ac0fbe-57b1-4555-a1d5-0d5449c68e10",
"_links": {
"http://identifiers.emc.com/groups": {
"href": "http://localhost:8765/systemdata/applications/b3ac0fbe-57b1-4555-a1d5-0d5449c68e10/groups"
},
"self": {
"href": "http://localhost:8765/systemdata/applications/b3ac0fbe-57b1-4555-a1d5-0d5449c68e10"
},
"http://identifiers.emc.com/update": {
"href": "http://localhost:8765/systemdata/applications/b3ac0fbe-57b1-4555-a1d5-0d5449c68e10"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/applications/b3ac0fbe-57b1-4555-a1d5-0d5449c68e10"
},
"http://identifiers.emc.com/delete-data": {
"href": "http://localhost:8765/systemdata/applications/b3ac0fbe-57b1-4555-a1d5-0d5449c68e10/delete-data"
},
"http://identifiers.emc.com/tenant": {
"href": "http://localhost:8765/systemdata/tenants/1177febe-d514-41ac-a3b9-f3b7357241eb"
},
"http://identifiers.emc.com/managed-items": {
"href": "http://localhost:8765/systemdata/applications/b3ac0fbe-57b1-4555-a1d5-0d5449c68e10/managed-
items"
},
"http://identifiers.emc.com/purge-candidate-lists": {
"href": "http://localhost:8765/systemdata/applications/b3ac0fbe-57b1-4555-a1d5-0d5449c68e10/purge-
candidate-lists"
},
"http://identifiers.emc.com/retained-sets": {
"href": "http://localhost:8765/systemdata/applications/b3ac0fbe-57b1-4555-a1d5-0d5449c68e10/retained-sets"
},
"http://identifiers.emc.com/hold-sets": {
"href": "http://localhost:8765/systemdata/applications/b3ac0fbe-57b1-4555-a1d5-0d5449c68e10/hold-sets"
},
"http://identifiers.emc.com/searches": {
"href": "http://localhost:8765/systemdata/applications/b3ac0fbe-57b1-4555-a1d5-0d5449c68e10/searches"
},
"http://identifiers.emc.com/search-groups": {
"href": "http://localhost:8765/systemdata/applications/b3ac0fbe-57b1-4555-a1d5-0d5449c68e10/search-groups"
},
"http://identifiers.emc.com/orders": {
"href": "http://localhost:8765/systemdata/applications/b3ac0fbe-57b1-4555-a1d5-0d5449c68e10/orders"
},
"http://identifiers.emc.com/my-orders-items": {

Note that this REST only creates the application, to effectively use it requires
creating associated spaces and stores. Look at the sample applications to get a
better understanding of all the resources required to build an application.

OpenText InfoArchive 21.2 Page 48 of 331


13.3 Configuring Applications
As previously mentioned in Section 11.0 and through the InfoArchive
Configuration and Administration User Guide, IA supports two kinds of
application archiving: table-based and SIP-based (OAIS), which are covered in
this section.

Note: All of the following objects should be preconfigured and properly set up in the
system:
- xDB Federation (s)
- Database (s)
- Storage (s)
- Store (s)
- Space (s)
- File System Roots
Moreover, it is required to have the tenant and application properly configured.
When describing ingestion. we only focus on the way to retrieve the references and URI
to the configuration objects, if required.

The following scheme illustrates the REST structure to the endpoints, where the
data preservation configuration objects can be found and created:

13.3.1 SIP Application Configuration


A SIP application is a complex application that contains many resources to be
created prior to ingesting data. All of the resources are rooted from the
application resource.

OpenText InfoArchive 21.2 Page 49 of 331


13.3.1.1 XDB Library Policy
A SIP application can support different types of ingestion: PRIVATE, POOLED
and AGGREGATE. You can read more on ingestion types in the InfoArchive
Configuration and Administration User Guide.
In the case of aggregate mode, there should be an xDB-library-Policy object
configured in the application. The reference for the object is used in the holding–
configuration-object.
The xdb-library-policy has following properties:
• aipQuota – The maximum number of AIPs to be preserved in the
aggregate library;
• aiuQuota – The maximum amount of AIU to be preserved in the
aggregate library;
• closeMode – The mode of library closing;
• closeHintDateQuery – Optional xQuery executed on the sip.xml file;
• pKeyQuery - Optional xQuery executed on the sip.xml file; and
• closePeriod – The period, expressed in days, used according to the
close mode.
To create xDB-Library-Policy object:
Obtain the link to the collection of xdb library policies by issuing GET on the
href’s value for link relation http://identifiers.emc.com/xdb-library-policies from the
application resource.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/e97a6214-9ec8-
4187-b966-eca908f61c89/xdb-library-policies
In the case where there are no objects in the collection the response should look
like the following:

OpenText InfoArchive 21.2 Page 50 of 331


{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/xdb-library-policies"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/xdb-library-policies"
}
},
"page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}
Issue the POST request to the URI rooted from the xdb-library-policies collection
level. In other words, it is required to find out the href’s value for link relation
http://identifiers.emc.com/add from the xdb-library-policy root and perform POST,
as illustrated in the following example:

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d '{ "name": "New-
xdb-library-policy”,"aipQuota": 10,"aiuQuota": 100,"closeMode":
"CLOSE_HINT_DATE","closePeriod": 2,"pKeyQuery": "","closeHintDateQuery":
"current-dateTime()"}' localhost:8765/systemdata/applications/e97a6214-9ec8-
4187-b966-eca908f61c89/xdb-library-policies
If the request is successful, the response should be 201 CREATED.
{
"id" : "642ed8a8-d376-41a4-986d-a4edb34a5a95",
"createdBy" : "[email protected]",
"createdDate" : "2017-04-17T11:29:15.479+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-04-17T11:29:15.479+03:00",
"version" : 1,
"name" : "New-xdb-library-policy",
"application" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89",
"aipQuota" : 10,
"aiuQuota" : 100,
"closeMode" : "CLOSE_HINT_DATE",
"closePeriod" : 2,
"pKeyQuery" : "",
"closeHintDateQuery" : "current-dateTime()",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/xdb-library-policies/642ed8a8-d376-41a4-986d-a4edb34a5a95"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/xdb-library-policies/642ed8a8-d376-41a4-986d-a4edb34a5a95"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/xdb-library-policies/642ed8a8-d376-41a4-986d-a4edb34a5a95"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89"
}
}
}

If using the AGGREGATE mode, preserve the link to “self” relation to use it in the
holding configuration object.

OpenText InfoArchive 21.2 Page 51 of 331


13.3.1.2 PDI
There is a need to create a PDI object for an application.
Obtain the link to the collection of pdis by issuing GET on the href’s value for
link relation http://identifiers.emc.com/pdis from the application resource.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/e97a6214-9ec8-
4187-b966-eca908f61c89/pdis
If the collection is empty, the response would be:
{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/pdis"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/pdis"
}
},
"page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}
Issue a POST request to the URI rooted from the PDI’s collection level. In other
words, it is required to find out the href’s value for the link relation
http://identifiers.emc.com/add from the PDI’s root and perform a POST.
The PDI object is complicated enough. We will consider here only most important
properties to store the information about indexes, partitioning keys and different
sets of data for processors.
- pdiSchema - the URI links to the pdiSchema (created at the chapter
13.3.1.3),
- aiupath - it configures the path of the aiu in the structured data
- cis - it configures the unstructured contents (ci),
- search.criteria - the collection of search criteria to configure the index
(path value and/or full-text index), the partition keys and the search criteria
(link to the aic configuration),
- transformation - it stores the configuration for the transformation,
- handlers – to configure a custom SIP package ingestion, to declare a
custom implementation for a new SIP format,
- aiuRetention - it stores data about the configuration of the granular
disposition,
- useDeclarativeConfiguration - when set to true, the configuration in the pdi
object is used for the ingestion and search, ignoring the old format (data
from the pdi.xml file). When set to false, only the data from the pdi.xml file
(set as content of the pdi object) are used for the pdi configuration. This
old format is detailed in the previous version of the Config Admin Guide.

OpenText InfoArchive 21.2 Page 52 of 331


Additional information on these properties are detailed in the Holding
Configuration Details section of Config Admin Guide documentation.

The POST request is complex enough in this case.

curl --location --request POST 'http://localhost:8765/systemdata/applications/90e81464-


8564-448d-9bbb-6ee967e58bb9/pdis' --header 'Authorization: Bearer
eyJhbGciOiJIUzI1NiJ9..’ --header 'Content-Type: application/hal+json' --data-raw
'{"name": "New-pdi","aiupath": "/{urn:eas-samples:en:xsd:invoices.1.0}root/{urn:eas-
samples:en:xsd:invoices.1.0}documents","useDeclarativeConfiguration": true,
"pdiSchema": "http://localhost:8765/systemdata/pdi-schemas/c92db3fd-2935-41bd-
a342-08673ed58dff","cis": [],"transformation": null, "handlers": [],"aiuRetetnion": null,
"search": {"criteria": [{"name": "Cust_Number", "path": "/{urn:eas-
samples:en:xsd:invoices.1.0}root/{urn:eas-
samples:en:xsd:invoices.1.0}documents/{urn:eas-
samples:en:xsd:invoices.1.0}Cust_Number","type": "STRING","hint": true,"fulltext":
false,"indexed": true,"pkeys": [{"name": "values02","func": "LIST"}]},{"name":
"Cust_PO","path": "/{urn:eas-samples:en:xsd:invoices.1.0}root/{urn:eas-
samples:en:xsd:invoices.1.0}documents/{urn:eas-
samples:en:xsd:invoices.1.0}Cust_PO","type": "STRING","hint": false,"fulltext":
false,"indexed": true,"pkeys": [{"name": "values03","func": "LIST"}]}]}}'

The response should be 201 CREATED:

OpenText InfoArchive 21.2 Page 53 of 331


{
"createdBy": "[email protected]",
"createdDate": "2020-08-27T16:05:22.1606429+02:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2020-08-27T16:05:22.1606429+02:00",
"version": 1,
"id": "62104106-7c9d-4ec5-86e7-1e823bda24d5",
"name": "New-pdi",
"application": "http://localhost:8765/systemdata/applications/90e81464-8564-448d-9bbb-6ee967e58bb9",
"useDeclarativeConfiguration": true,
"aiuPath": null,
"pdiSchema": "http://localhost:8765/systemdata/pdi-schemas/c92db3fd-2935-41bd-a342-08673ed58dff",
"search": {
"criteria": [
{
"name": "Cust_Number",
"path": "/{urn:eas-samples:en:xsd:invoices.1.0}root/{urn:eas-samples:en:xsd:invoices.1.0}documents/{urn:eas-
samples:en:xsd:invoices.1.0}Cust_Number",
"type": "STRING",
"hint": true,
"fulltext": false,
"indexed": true,
"pkeys": [
{
"name": "values02",
"func": "LIST"
}
]
},
{
"name": "Cust_PO",
"path": "/{urn:eas-samples:en:xsd:invoices.1.0}root/{urn:eas-samples:en:xsd:invoices.1.0}documents/{urn:eas-
samples:en:xsd:invoices.1.0}Cust_PO",
"type": "STRING",
"hint": false,
"fulltext": false,
"indexed": true,
"pkeys": [
{
"name": "values03",
"func": "LIST"
}
]
}
]
},
"handlers": [],
"cis": [],
"transformation": null,
"aiuRetention": null,
"properties": {},
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/pdis/62104106-7c9d-4ec5-86e7-1e823bda24d5"
},
"http://identifiers.emc.com/update": {
"href": "http://localhost:8765/systemdata/pdis/62104106-7c9d-4ec5-86e7-1e823bda24d5"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/pdis/62104106-7c9d-4ec5-86e7-1e823bda24d5"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8765/systemdata/applications/90e81464-8564-448d-9bbb-6ee967e58bb9"
},
"http://identifiers.emc.com/contents": {
"href": "http://localhost:8765/systemdata/pdis/62104106-7c9d-4ec5-86e7-1e823bda24d5/contents"
},
"http://identifiers.emc.com/pdi-schema": {
"href": "http://localhost:8765/systemdata/pdi-schemas/c92db3fd-2935-41bd-a342-08673ed58dff"
}
}
}

OpenText InfoArchive 21.2 Page 54 of 331


You may preserve the link to the “self” relation to use it in the holding
configuration.

13.3.1.3 PDI-Schema
Another object that has to be configured in a SIP application is the PDI-schema.
This object describes the xsd schema of PDI files with structured content.
Obtain the link to the collection of object with objects by issuing a GET on the
href’s value for the link relation http://identifiers.emc.com/pdi-schemas from the
application root.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/e97a6214-9ec8-
4187-b966-eca908f61c89/pdi-schemas
If
no object exists, the response should be:
{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/pdi-schemas"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/pdi-schemas"
}
}, "page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}
Issue a POST request to the URI rooted from the pdi-schema’s collection level.
In other words, it is required to find out the href’s value for the link relation
http://identifiers.emc.com/add and perform a POST
The pdi-schema object has two mandatory properties: “name” and “format”. The
following is an example of the POST request:

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d '{ "name": "New-
pdi-shema",”format”:”xsd”}' localhost:8765/systemdata/applications/e97a6214-
9ec8-4187-b966-eca908f61c89/pdi-schemas
The response should be 201 CREATED:

OpenText InfoArchive 21.2 Page 55 of 331


{
"id" : "b5d138a5-bc2f-49d7-b971-3ce37dc94154",
"createdBy" : "[email protected]",
"createdDate" : "2017-04-17T15:36:10.919+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-04-17T15:36:10.919+03:00",
"version" : 1,
"name" : "New-PDI-Shema",
"application" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89",
"format" : "xsd",
"infos" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/pdi-schemas/b5d138a5-bc2f-49d7-b971-3ce37dc94154"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/pdi-schemas/b5d138a5-bc2f-49d7-b971-3ce37dc94154"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/pdi-schemas/b5d138a5-bc2f-49d7-b971-3ce37dc94154"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89"
},
"http://identifiers.emc.com/contents" : {
"href" : "http://localhost:8765/systemdata/pdi-schemas/b5d138a5-bc2f-49d7-b971-3ce37dc94154/contents"
}
}
}

You may temporarily preserve the URI to “self” relation to use in the holding
configuration.
It is also required that you pass a file that contains the xsd schema itself. Find the
href’s value for the http://identifiers.emc.com/contents link relation, as marked by
yellow in the above response.
And now it is required to issue a POST on the found URI with the multipart form-
data type. For example:

curl -X POST -H ‘Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept:


application/hal+json’ -H ‘Content-Type: multipart/form-data’ -F ‘file=@pdi-
schema.xsd’ -F ‘content={"format":"xsd"};type=application/json’
localhost:8765/systemdata/pdi-schemas/563290a3-98e6-482d-9f89-
54a3ac5edf19/contents

If successful, the response should be 201 CREATED:

OpenText InfoArchive 21.2 Page 56 of 331


{
"id" : "ce95ff36-863e-4f34-b04e-de96aac5654c",
"createdBy" : "[email protected]",
"createdDate" : "2017-04-17T15:42:51.94+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-04-17T15:42:51.944+03:00",
"version" : 2,
"parentId" : "563290a3-98e6-482d-9f89-54a3ac5edf19",
"parentType" : "pdi_schemas",
"store" : null,
"application" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89",
"format" : "xsd",
"size" : 7150,
"path" : null,
"modifier" : "00000000000000000",
"checksum" : "7b4ad8de543d64f2449940ed960a10fd505b2edf",
"orphan" : false,
"mimeType" : null,
"last" : 0,
"metadata" : { },
"properties" : { },
"blob" : null,
"options" : [ ],
"externalRefs" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/contents/ce95ff36-863e-
4f34-b04e-de96aac5654c"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/contents/ce95ff36-863e-
4f34-b04e-de96aac5654c"
},
"http://identifiers.emc.com/content-download" : {
"href" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/contents/ce95ff36-863e-
4f34-b04e-de96aac5654c/download"
}
}
}
For a SIP application, a lot of resources should be configured, including the
holding, receiver node, ingest node, ingest, PDI, etc.
This guide only documents the following: ingest, receiver node and ingestion
node.

13.3.1.4 Ingest
Obtain the link to the collection of object with objects by issuing a GET on the
href’s value for the link relation http://identifiers.emc.com/ingests from the
application root.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/e97a6214-9ec8-
4187-b966-eca908f61c89/ingests
If no object exists, the response should be:

OpenText InfoArchive 21.2 Page 57 of 331


{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/ingests"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/ingests"
}
}, }, "page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}
Issue a POST request to the URI rooted from the ingests collection level. In other
words, it is required to find out the href’s value for the link relation
http://identifiers.emc.com/add and perform a POST.
The ingest object has a single mandatory property: “name”. The following is an
example of the POST request:

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d '{ "name": "New-
ingest"}' http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-
b966-eca908f61c89/ingests
The response should be 201 CREATED:
{
"id" : "8c1cc57d-12a0-4d79-bc44-bb20bd72b5b4",
"createdBy" : "[email protected]",
"createdDate" : "2017-04-17T15:48:44.457+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-04-17T15:48:44.457+03:00",
"version" : 1,
"name" : "New-Ingest",
"application" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/ingests/8c1cc57d-12a0-4d79-bc44-bb20bd72b5b4"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/ingests/8c1cc57d-12a0-4d79-bc44-bb20bd72b5b4"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/ingests/8c1cc57d-12a0-4d79-bc44-bb20bd72b5b4"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89"
},
"http://identifiers.emc.com/contents" : {
"href" : "http://localhost:8765/systemdata/ingests/8c1cc57d-12a0-4d79-bc44-bb20bd72b5b4/contents"
}
}
}
You may temporarily preserve the link to “self” relation.
Pass a file that contains the ingestion configuration itself. We need to find the
href’s value for the http://identifiers.emc.com/contents link relation, as marked by
yellow in the above response.

OpenText InfoArchive 21.2 Page 58 of 331


4. Issue a POST on the found URI with the multipart form-data type. For
example:

curl -X POST -H ‘Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept:


application/hal+json’ -H ‘Content-Type: multipart/form-data’ -F
[email protected]’ -F ‘content={"format":"xml"};type=application/json’
localhost:8765/systemdata/ingests/8c1cc57d-12a0-4d79-bc44-
bb20bd72b5b4/contents

If successful, the response should be 201 CREATED:


{
"id" : "868dc118-f1bc-425c-95e8-6b9f67f736a2",
"createdBy" : "[email protected]",
"createdDate" : "2017-04-17T15:51:11.316+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-04-17T15:51:11.324+03:00",
"version" : 2,
"parentId" : "8c1cc57d-12a0-4d79-bc44-bb20bd72b5b4",
"parentType" : "ingest",
"store" : null,
"application" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89",
"format" : "xml",
"size" : 10743,
"path" : null,
"modifier" : "00000000000000000",
"checksum" : "2e8df37befff3fe1c87c1b90958222a9a20a653e",
"orphan" : false,
"mimeType" : null,
"last" : 0,
"metadata" : { },
"properties" : { },
"blob" : null,
"options" : [ ],
"externalRefs" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/contents/868dc118-f1bc-
425c-95e8-6b9f67f736a2"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/contents/868dc118-f1bc-
425c-95e8-6b9f67f736a2"
},
"http://identifiers.emc.com/content-download" : {
"href" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/contents/868dc118-f1bc-
425c-95e8-6b9f67f736a2/download"
}
}
}

13.3.1.5 Receiver Node


There is a link relation http://identifiers.emc.com/receiver-nodes rooted from the
application obtainable via the href’s URI value that refers to a collection on
receiver-nodes.
To do a GET method on the found URI:

OpenText InfoArchive 21.2 Page 59 of 331


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:
application/hal+json' localhost:8765/systemdata/applications/7a7b9d20-e31f-
4d5c-8bc4-d74de313a424/receiver-nodes
In case there are no items in the collection, then the server response will look like
below:
{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/receiver-nodes"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/receiver-nodes"
}
},
"page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}
It provides us information about page size, total amount of objects, the self-link to
the collection and relation link http://identifiers.emc.com/add that allows us to
issue a POST request in order to create new receiver node.
Before creating a new receiver node, the payload parameters must be
considered, such as:
• name – the name of the node.
• logLevel – configuration of log level for the node (optional).
• sips – the complex structure that allows you to set up different SIP formats
(for backward compatibility).

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'{"name":"receiver_node_01","sips":
[{"format":"sip_zip","extractorImpl":"com.emc.ia.reception.sip.extractor.impl.Zip
SipExtractor","extractorParameter":
null},{"format":"eas_sip_zip","extractorImpl":"com.emc.ia.reception.sip.extractor
.impl.LegacyZipSipExtractor","extractorParameter": null}]}'
localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-
d74de313a424/receiver-nodes
Payload response:

OpenText InfoArchive 21.2 Page 60 of 331


{
"id" : "5a7c3891-519a-4d62-aca9-a8fc781e6797",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-23T17:07:27.197+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-23T17:07:27.197+03:00",
"version" : 1,
"name" : "receiver_node_01",
"application" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424",
"logLevel" : null,
"sips" : [ {
"format" : "sip_zip",
"extractorImpl" : "com.emc.ia.reception.sip.extractor.impl.ZipSipExtractor",
"extractorParameter" : null
}, {
"format" : "eas_sip_zip",
"extractorImpl" : "com.emc.ia.reception.sip.extractor.impl.LegacyZipSipExtractor",
"extractorParameter" : null
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/receiver-nodes/5a7c3891-519a-4d62-aca9-a8fc781e6797"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/receiver-nodes/5a7c3891-519a-4d62-aca9-a8fc781e6797"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/receiver-nodes/5a7c3891-519a-4d62-aca9-a8fc781e6797"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424"
}
}
}
Under the “_links” node in the JSON response, you can see different relation
links and corresponding URIs that give you an idea of what can be done with the
receiver node object (for example, update (HTTP PUT request) or delete (HTTP
DELETE request)).

13.3.1.6 Ingestion Node


We also may want to create Ingestion Node object.
There is a link relation http://identifiers.emc.com/ingest-nodes rooted from the
single application level. We need to find it and extract a href’s value for the URI,
that is refers to a collection on ingestion-nodes.
Do a GET method on the URI.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/7a7b9d20-e31f-
4d5c-8bc4-d74de313a424/ingest-nodes
The response should look like the figure below:

OpenText InfoArchive 21.2 Page 61 of 331


{
"_embedded": {
"ingestNodes": [
{
"id": "096e5a36-74d1-47b9-abb0-4d71b1beb130",
"createdBy": "[email protected]",
"createdDate": "2017-03-22T11:17:30.594+03:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-22T11:17:30.665+03:00",
"version": 2,
"name": "ingest_node_01",
"application": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424",
"logLevel": "INFO",
"enumerationCutoffDays": 30,
"enumerationMaxResultCount": 10,
"enumerationMinusRunning": true,
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/ingest-nodes/096e5a36-74d1-47b9-abb0-4d71b1beb130"
},
"http://identifiers.emc.com/update": {
"href": "http://localhost:8765/systemdata/ingest-nodes/096e5a36-74d1-47b9-abb0-4d71b1beb130"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/ingest-nodes/096e5a36-74d1-47b9-abb0-4d71b1beb130"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424"
},
"http://identifiers.emc.com/enumeration": {
"href": "http://localhost:8765/systemdata/ingest-nodes/096e5a36-74d1-47b9-abb0-4d71b1beb130/aips"
}
}
}
]
},
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/ingest-nodes"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/ingest-nodes"
}
},
"page": {
"size": 10,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}
Before we describe how to create the object, let’s issue a DELETE request to
delete the existing one. This step is not necessary, and the only goal of ,
removing existing one is to show an example of the DELETE request. We need
to figure out the URI for the http://identifiers.emc.com/delete relation link (it is
marked by yellow in the above response) and use it for the delete request, as in
example below:

curl -X DELETE -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json’ localhost:8765/systemdata/searches/f4dfbaf6-06ff-42c3-
a897-7abe975912ae
In case of a successful response, there should be 204 status (NO_CONTENT).

OpenText InfoArchive 21.2 Page 62 of 331


We are ready to create the new ingest-node by issuing the POST request to the
URI for the http://identifiers.emc.com/add link relation rooted from the collection
of the ingest-nodes resource.
The payload for the request does not contain any references for the receiver
node or other objects. It simply contains several attributes and values.

curl -X POST -H ‘Content-Type: application/json’ -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json’ -d
'{"name":"ingest_node_01","logLevel": "INFO","enumerationCutoffDays":
30,"enumerationMaxResultCount": 10,"enumerationMinusRunning": true}'
localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-
d74de313a424/ingest-nodes

In case of a successful server response, you will get a payload similar to the
following:
{
"id" : "5545fb55-50dc-430d-92eb-a1eb46400f60",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-23T17:30:50.805+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-23T17:30:50.805+03:00",
"version" : 1,
"name" : "ingest_node_01",
"application" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424",
"logLevel" : "INFO",
"enumerationCutoffDays" : 30,
"enumerationMaxResultCount" : 10,
"enumerationMinusRunning" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/ingest-nodes/5545fb55-50dc-430d-92eb-a1eb46400f60"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/ingest-nodes/5545fb55-50dc-430d-92eb-a1eb46400f60"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/ingest-nodes/5545fb55-50dc-430d-92eb-a1eb46400f60"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424"
},
"http://identifiers.emc.com/enumeration" : {
"href" : "http://localhost:8765/systemdata/ingest-nodes/5545fb55-50dc-430d-92eb-a1eb46400f60/aips"
}
}
}
The ingest node URI can be found as the value of the node: “_links”->”self”-
>”href” is used in Holding object (highlighted).

13.3.1.7 Holding
To create a holding configuration object, it is required to find a link to where to
issue a POST request.
Let’s start from application root and find http://identifiers.emc.com/holdings link
relation.

OpenText InfoArchive 21.2 Page 63 of 331


To issue a GET on the URI (which is href’s value for the above link relation),
retrieve the list of holdings that exist in the application.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/e97a6214-9ec8-
4187-b966-eca908f61c89/holdings
If no object exists, the response should look like:
{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/holdings"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/holdings"
}
}, "page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}
Now we would like to issue a POST request to the URI rooted from the holdings
collection level. In other words, it is required to find out the href’s value for the
link relation http://identifiers.emc.com/add and issue a POST.
The holding configuration object is complex. We will consider here only most
important properties:
- ingestNodes – the URI links to the ingest nodes (created at chapter 13.3.1.6)
- sipStore – the URI to the configured store
- ciStore - the URI to the configured store
- xmlStore - the URI to the configured store
- logStore - the URI to the configured store
- renditionStore - the URI to the configured store
- managedItemStore - the URI to the configured store
- xdbStore - the URI to the configured store
- xdbLibraryPolicy - the URI links to the XDB library (created at chapter
13.3.1.1)
- pdiConfigs – collection of references to “pdiSchema” (created at chapter
13.3.1.3 and “pdi” object (created at chapter 13.3.1.2);
- xdbMode – ingestion mode. There are three supported options: PRIVATE,
POOLED, or AGGREGATE
- ingestConfigs – collection of ingestion configuration objects that have a link
to the ingest object (created at chapter 13.3.1.4)
- retention-classes – more about retention at chapter 17.0
This is an example of the POST request

OpenText InfoArchive 21.2 Page 64 of 331


curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer
eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d '{ "name":
"New_Holding","ingestConfigs": [{"sipFormat": "sip_zip","ingest":
"http://localhost:8765/systemdata/ingests/62b3b425-fa23-46bd-ad18-
6c4d7ae6f803","ingestName": "PhoneCalls-ingest"}],"pdiConfigs": [{"schema":
"urn:eas-samples:en:xsd:phonecalls.1.0","pdi":
"http://localhost:8765/systemdata/pdis/991fabbc-8809-4b27-8294-
f98864b00a96","pdiName": "New-pdi"}],"ingestNodes":
["http://localhost:8765/systemdata/ingest-nodes/c88baf21-f3a2-494c-b34d-
8ae66759b88b"],"sipStore": "http://localhost:8765/systemdata/stores/33f31d09-
d54b-48af-960a-3306db8fb580","logStore":
"http://localhost:8765/systemdata/stores/33f31d09-d54b-48af-960a-
3306db8fb580","xmlStore": "http://localhost:8765/systemdata/stores/33f31d09-
d54b-48af-960a-3306db8fb580","ciStore":
"http://localhost:8765/systemdata/stores/33f31d09-d54b-48af-960a-
3306db8fb580","xdbStore": "http://localhost:8765/systemdata/stores/33f31d09-
d54b-48af-960a-3306db8fb580","renditionStore":
"http://localhost:8765/systemdata/stores/33f31d09-d54b-48af-960a-
3306db8fb580","managedItemStore":
"http://localhost:8765/systemdata/stores/33f31d09-d54b-48af-960a-
3306db8fb580","defaultRetentionClass": "default","retentionClasses": [{"name":
"default","policies": ["PhoneCalls-policy"],"holds": null}],"xdbMode":
"PRIVATE","xdbLibraryParent":
"http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-
eca908f61c89/xdb-libraries/653afe8b-5fcd-475e-9576-
f46ca63e75f2","xdbLibraryPolicy": "http://localhost:8765/systemdata/xdb-library-
policies/642ed8a8-d376-41a4-986d-a4edb34a5a95"}'
localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-
eca908f61c89/holdings
The response should be 201 CREATED:

OpenText InfoArchive 21.2 Page 65 of 331


{
"id" : "3539a703-70b3-42a6-8be0-83d8e147327f",
"createdBy" : "[email protected]",
"createdDate" : "2017-04-17T16:34:15.63+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-04-17T16:34:15.63+03:00",
"version" : 1,
"name" : "New_Holding",
"application" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89",
"ingestConfigs" : [ {
"sipFormat" : "sip_zip",
"ingest" : "http://localhost:8765/systemdata/ingests/62b3b425-fa23-46bd-ad18-6c4d7ae6f803",
"ingestName" : "PhoneCalls-ingest"
} ],
"pdiConfigs" : [ {
"schema" : "urn:eas-samples:en:xsd:phonecalls.1.0",
"pdi" : "http://localhost:8765/systemdata/pdis/991fabbc-8809-4b27-8294-f98864b00a96",
"pdiName" : "PhoneCalls-pdi"
} ],
"ingestNodes" : [ "http://localhost:8765/systemdata/ingest-nodes/c88baf21-f3a2-494c-b34d-8ae66759b88b" ],
"priority" : 0,
"subPriorities" : null,
"pdiXmlHashEnforced" : false,
"pdiXmlHashValidationEnabled" : true,
"ciHashValidationEnabled" : true,
"syncCommitEnabled" : true,
"sipStore" : "http://localhost:8765/systemdata/stores/33f31d09-d54b-48af-960a-3306db8fb580",
"logStore" : "http://localhost:8765/systemdata/stores/33f31d09-d54b-48af-960a-3306db8fb580",
"xmlStore" : "http://localhost:8765/systemdata/stores/33f31d09-d54b-48af-960a-3306db8fb580",
"ciStore" : "http://localhost:8765/systemdata/stores/33f31d09-d54b-48af-960a-3306db8fb580",
"xdbStore" : "http://localhost:8765/systemdata/stores/33f31d09-d54b-48af-960a-3306db8fb580",
"renditionStore" : "http://localhost:8765/systemdata/stores/33f31d09-d54b-48af-960a-3306db8fb580",
"managedItemStore" : "http://localhost:8765/systemdata/stores/33f31d09-d54b-48af-960a-3306db8fb580",
"stagingStore" : null,
"keepSipAfterCommitEnabled" : false,
"keepSipOnRejInvEnabled" : false,
"keepPdiXmlAfterIngestEnabled" : true,
"keepCiOnRejInvEnabled" : false,
"keepXmlOnRejInvEnabled" : false,
"logStoreEnabled" : true,
"defaultRetentionClass" : "default",
"retentionClasses" : [ {
"name" : "default",
"policies" : [ "PhoneCalls-policy" ],
"holds" : null
} ],
"pushRetentionOnRejInvEnabled" : false,
"xdbMode" : "PRIVATE",
"xdbLibraryParent" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/xdb-libraries/653afe8b-5fcd-
475e-9576-f46ca63e75f2",
"xdbLibraryPolicy" : "http://localhost:8765/systemdata/xdb-library-policies/642ed8a8-d376-41a4-986d-a4edb34a5a95",
"permissionSet" : {
"reception" : {
"groups" : [ ]
},
"ingestion" : {
"groups" : [ ]
},
"waitingCommit" : {
"groups" : [ ]
},
"completed" : {
"groups" : [ ]
},
"purge" : {
"groups" : [ ]
},
"reject" : {
"groups" : [ ]
},
The response contains a set of links that allow you to perform different actions
with the holding and application (for example, backup, restore, detach, recovery).
From the above response, we need to preserve the URI for self, as it is used
during confirmation object creation.

OpenText InfoArchive 21.2 Page 66 of 331


13.3.1.8 Delivery-Channel
There is a link relation http://identifiers.emc.com/delivery-channels rooted from
the application. We need to find it and extract an href’s value for the URI, as it
refers to a collection on receiver-nodes.
Let’s do a GET method on the found URI.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/e97a6214-9ec8-
4187-b966-eca908f61c89/delivery-channels
In case there are no items in the collection, then the server response will look like
below:
{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/delivery-channels"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/delivery-channels"
},
"page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
} It
This provides us information about the page size, total amount of objects, the
self-link to the collection and the relation link http://identifiers.emc.com/add,
which allows us to issue a POST request to create a new delivery-channel.
Let’s do a trick and create a new delivery-channel, but first, consider the required
payload parameters.
• name – the name of the channel. It is the only mandatory field.
• fileName
• compress
• prefix
• suffix
• subPath
• store

OpenText InfoArchive 21.2 Page 67 of 331


curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer
eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d ' {"name": "New-
delivery-channel", "store": "http://localhost:8765/systemdata/stores/c3af8f9b-
43e6-4a97-b570-c82a92c03c83", "fileName": "confirmation", "subPath":
"confirmation/%ia_conf_type%", "prefix": "%aip_id%-", "suffix": ".xml",
"overwrite": true, "compress": false}'
localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-
eca908f61c89/delivery-channels

In case of a successful server response, you will get a payload:


{
"id" : "45122e2a-13fe-4523-9157-33215dcbb0f0",
"createdBy" : "[email protected]",
"createdDate" : "2017-04-17T17:50:30.842+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-04-17T17:50:30.842+03:00",
"version" : 1,
"name" : "New-delivery-channel",
"application" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89",
"parameters" : null,
"store" : "http://localhost:8765/systemdata/stores/c3af8f9b-43e6-4a97-b570-c82a92c03c83",
"fileName" : "confirmation",
"subPath" : "confirmation/%ia_conf_type%",
"prefix" : "%aip_id%-",
"suffix" : ".xml",
"overwrite" : true,
"compress" : false,
"metadata" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/delivery-channels/45122e2a-13fe-4523-9157-33215dcbb0f0"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/delivery-channels/45122e2a-13fe-4523-9157-33215dcbb0f0"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/delivery-channels/45122e2a-13fe-4523-9157-33215dcbb0f0"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89"
}
}
}
Under the “_links” node in JSON response, you can see different relation links
and corresponding URIs that give you an idea what can be done with the
delivery-channel object (for example, update (HTTP PUT request) or delete
(HTTP DELETE request)).
From the above response, we need to preserve the URI for self, as it is used
during the confirmation object creation.

13.3.1.9 Confirmation
There is a link relation http://identifiers.emc.com/confirmations rooted from the
application. We need to find it and extract an href’s value for the URI, as it refers
to a collection on confirmations.
Let’s do a GET method on the found URI.

OpenText InfoArchive 21.2 Page 68 of 331


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:
application/hal+json' localhost:8765/systemdata/applications/e97a6214-9ec8-
4187-b966-eca908f61c89/confirmations
In case there are no items in the collection, then the server response will look like
below:
{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/confirmations"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/confirmations"
}
}, "page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}
The link relation http://identifiers.emc.com/add allows us to issue a POST request
to create a new confirmation object.
Let’s create a confirmation, but first consider the required payload parameters:
• name – the name of the confirmation. It is the only mandatory field.
• types – the list of constant values
• holdings – collection of the URI that refers to the Holding objects (see
chapter 13.3.1.7)
• deliveryChannel - URI that are refers to the Delivery-Channel objects (see
chapter13.3.1.8)
• deliveryChannelParameters – complex type that describes the delivery-
channel-parameters

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d '{ "name": "New-
confirmation", "types": [ "RECEIPT", "INVALID", "REJECT", "STORAGE",
"PURGE" ], "holdings": [ "http://localhost:8765/systemdata/holdings/c65efd22-
3a22-4c29-9be9-be5bcbb3bb13" ], "deliveryChannel":
"http://localhost:8765/systemdata/delivery-channels/40778839-e630-44e3-ac6f-
afd28a55a75f", "deliveryChannelParameters": { "aip_id": "%ia_conf_aip_id%",
"ia_conf_datetime": "%ia_conf_datetime%", "ia_conf_type": "%ia_conf_type%"
}}' localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-
eca908f61c89/confirmations
In case of a successful server response, you will get a payload with 201
CREATED response:

OpenText InfoArchive 21.2 Page 69 of 331


{
"id" : "d6d0c861-3110-4e14-9e99-e6d0e1af28fd",
"createdBy" : "[email protected]",
"createdDate" : "2017-04-17T18:02:46.253+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-04-17T18:02:46.253+03:00",
"version" : 1,
"name" : "New-confirmation",
"application" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89",
"types" : [ "RECEIPT", "INVALID", "REJECT", "STORAGE", "PURGE" ],
"holdings" : [ "http://localhost:8765/systemdata/holdings/c65efd22-3a22-4c29-9be9-be5bcbb3bb13" ],
"sipQuery" : null,
"pdiQuery" : null,
"deliveryChannel" : "http://localhost:8765/systemdata/delivery-channels/40778839-e630-44e3-ac6f-afd28a55a75f",
"deliveryChannelParameters" : {
"aip_id" : "%ia_conf_aip_id%",
"ia_conf_datetime" : "%ia_conf_datetime%",
"ia_conf_type" : "%ia_conf_type%"
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/confirmations/d6d0c861-3110-4e14-9e99-e6d0e1af28fd"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/confirmations/d6d0c861-3110-4e14-9e99-e6d0e1af28fd"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/confirmations/d6d0c861-3110-4e14-9e99-e6d0e1af28fd"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89"
},
"http://identifiers.emc.com/confirmations" : {
"href" : "http://localhost:8765/systemdata/confirmations/d6d0c861-3110-4e14-9e99-e6d0e1af28fd/holdings"
},
"http://identifiers.emc.com/delivery-channel" : {
"href" : "http://localhost:8765/systemdata/delivery-channels/40778839-e630-44e3-ac6f-afd28a55a75f"
}
}
}
Under the “_links” node in the JSON response, you can see different relation
links and corresponding URIs that give you an idea of what can be done with the
delivery-channel object (for example, update (HTTP PUT request) or delete
(HTTP DELETE request)).

13.3.2 Table Application Configuration


As describe in section 11.1, let’s say we have an URI to a table application
resource named Baseball. From that application root, the following REST links
are available.

OpenText InfoArchive 21.2 Page 70 of 331


13.3.2.1 Creating a Database Resource
The first step is to create new database.
We need to issue a GET request to the URI related to the href’s value for the
http://identifiers.emc.com/databases link relation from the application root.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/ba91b6b0-730d-
417e-b29a-335d796e8120/databases
In case no databases exist, obtain a 200 response with following payload:
{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/ba91b6b0-730d-417e-b29a-335d796e8120/databases"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/ba91b6b0-730d-417e-b29a-335d796e8120/databases"
}
},
"page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}

Next, we need to issue a POST to the URI related to the


http://identifiers.emc.com/add link relation from the database collection root (see
above).
In the payload, we need to set up:
- name

OpenText InfoArchive 21.2 Page 71 of 331


- defaultSchema
- xdbStore
- ciStore
- managedItemStore
NOTE: We didn’t show the way how to obtain the links to the stores here.

curl -X POST -H ‘Content-Type: application/hal+json’ -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept: application/json’ -d ‘{"name": "Baseball-
sql-db","defaultSchema":"BASEBALL","xdbStore":
"http://localhost:8765/systemdata/stores/a0b9364b-f9e5-4918-82fa-
10975717a94a","ciStore": "http://localhost:8765/systemdata/stores/a0b9364b-
f9e5-4918-82fa-10975717a94a","managedItemStore":
"http://localhost:8765/systemdata/stores/a0b9364b-f9e5-4918-82fa-
10975717a94a"}’ localhost:8765/systemdata/applications/ba91b6b0-730d-417e-
b29a-335d796e8120/databases
In case of successful execution, the response is as follows:

OpenText InfoArchive 21.2 Page 72 of 331


{
"id" : "89992374-aa85-4077-8c4a-b5146e216690",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-24T12:24:22.93+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-24T12:24:22.93+03:00",
"version" : 1,
"name" : "Baseball-sql-db",
"application" : "http://localhost:8765/systemdata/applications/ba91b6b0-730d-417e-b29a-335d796e8120",
"description" : null,
"storageAllocationStrategy" : null,
"user" : null,
"password" : null,
"connectionString" : null,
"caseSensitive" : false,
"defaultSchema" : "BASEBALL",
"indexingOnIngest" : false,
"validatingOnIngest" : false,
"locale" : "en-US",
"hashSalt" : null,
"structureIv" : null,
"unstructureIv" : null,
"structuredKeyID" : null,
"unstructuredKeyID" : null,
"xdbStore" : "http://localhost:8765/systemdata/stores/a0b9364b-f9e5-4918-82fa-10975717a94a",
"ciStore" : "http://localhost:8765/systemdata/stores/a0b9364b-f9e5-4918-82fa-10975717a94a",
"managedItemStore" : "http://localhost:8765/systemdata/stores/a0b9364b-f9e5-4918-82fa-10975717a94a",
"unstructuredCryptoIv" : null,
"structuredCryptoIv" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-b5146e216690"
},
"http://identifiers.emc.com/schemas" : {
"href" : "http://localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-b5146e216690/schemas"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/ba91b6b0-730d-417e-b29a-335d796e8120"
},
"http://identifiers.emc.com/ci-store" : {
"href" : "http://localhost:8765/systemdata/stores/a0b9364b-f9e5-4918-82fa-10975717a94a"
},
"http://identifiers.emc.com/managed-item-store" : {
"href" : "http://localhost:8765/systemdata/stores/a0b9364b-f9e5-4918-82fa-10975717a94a"
},
"http://identifiers.emc.com/xdb-store" : {
"href" : "http://localhost:8765/systemdata/stores/a0b9364b-f9e5-4918-82fa-10975717a94a"
},
"http://identifiers.emc.com/index-build" : {
"href" : "http://localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-b5146e216690/index-build"
},
"http://identifiers.emc.com/index-rebuild" : {
"href" : "http://localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-b5146e216690/index-rebuild"
},
"http://identifiers.emc.com/index-remove" : {
"href" : "http://localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-b5146e216690/index-remove"
},
"http://identifiers.emc.com/index-status" : {
"href" : "http://localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-b5146e216690/index-status"
},
"http://identifiers.emc.com/index-merge" : {
"href" : "http://localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-b5146e216690/index-merge"
},
"http://identifiers.emc.com/index-merge-status" : {
"href" : "http://localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-b5146e216690/index-merge-status"
}
}
}

13.3.2.2 Creating a Schema Resource


In the above response, you may see the http://identifiers.emc.com/schemas link
relation rooted from the database.

OpenText InfoArchive 21.2 Page 73 of 331


The first step is to issue a GET request to the URI related to the schemas (see
the example above).

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' http://localhost:8765/systemdata/databases/89992374-aa85-
4077-8c4a-b5146e216690/schemas
If no schemas exist, a 200 response is returned with following payload:
{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-b5146e216690/schemas"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-b5146e216690/schemas"
}
},
"page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}
Next, we need to issue a POST request to the URI related to
http://identifiers.emc.com/add link relation from the schemas collection root
(marked by yellow on the above response).
The payload needs the attributes: “name” and “storageAllocationstrategy”. You
may add a description also, but it is an optional attribute.
Example request:

curl -X POST -H ‘Content-Type: application/hal+json’ -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept: application/hal+json’ -d ‘{"name":
"BASEBALL","storageAllocationStrategy": {"name": "DEFAULT"}}’
localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-
b5146e216690/schemas
If successful, the response would be:

OpenText InfoArchive 21.2 Page 74 of 331


{
"id" : "c49f0686-c12a-423e-9626-92f12e3f907d",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-24T12:38:42.953+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-24T12:38:42.953+03:00",
"version" : 1,
"name" : "BASEBALL",
"description" : null,
"storageAllocationStrategy" : {
"name" : "DEFAULT"
},
"tableCount" : 0,
"database" : "http://localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-b5146e216690",
"xdbStore" : null,
"chainOfCustodyResult" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/schemas/c49f0686-c12a-423e-9626-92f12e3f907d"
},
"http://identifiers.emc.com/tables" : {
"href" : "http://localhost:8765/systemdata/schemas/c49f0686-c12a-423e-9626-92f12e3f907d/tables"
},
"http://identifiers.emc.com/database" : {
"href" : "http://localhost:8765/systemdata/databases/89992374-aa85-4077-8c4a-b5146e216690"
},
"http://identifiers.emc.com/chain-of-custody" : {
"href" : "http://localhost:8765/systemdata/schemas/c49f0686-c12a-423e-9626-92f12e3f907d/chain-of-custody"
}
}
}

13.3.2.3 Creating a Table Resource


Included in the above response is the http://identifiers.emc.com/tables link
relation rooted from the schemas.
The first step is to issue a GET request to the URI related to the schemas (see
example above).

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/schemas/c49f0686-c12a-423e-
9626-92f12e3f907d/tables
If no tables exist, the server returns a 200 response with following payload:
{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/schemas/c49f0686-c12a-423e-9626-92f12e3f907d/tables"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/schemas/c49f0686-c12a-423e-9626-92f12e3f907d/tables"
}
},
"page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}

Next we need issuing POST to URI related to http://identifiers.emc.com/add link


relation from the table’s collection root (marked by yellow on the above
response).
The payload requires the following attributes:

OpenText InfoArchive 21.2 Page 75 of 331


name - the name of the table;
columnList – this is a complex structure.
The following payload simply shows the way to create a new table with a single
column.

curl -X POST -H ‘Content-Type: application/hal+json’ -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept: application/hal+json’ -d ‘{"name":
"ASSIGNMENT_RECORDS","columnList": [{"name":
"ASSIGNMENT_RECORD_ID","ordinal": 1,"type": "INTEGER","typeLength":
20,"scale": 0,"index": true,"fullText": false,"encrypt": false}]}’
localhost:8765/systemdata/schemas/c49f0686-c12a-423e-9626-
92f12e3f907d/tables
The successful 201 (CREATED) response looks like:
{
"id" : "967b4efa-b674-43e9-8d1e-58642ed5866d",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-24T12:53:07.434+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-24T12:53:07.434+03:00",
"version" : 1,
"name" : "ASSIGNMENT_RECORDS",
"application" : "http://localhost:8765/systemdata/applications/ba91b6b0-730d-417e-b29a-335d796e8120",
"description" : null,
"storageAllocationStrategy" : {
"name" : "DEFAULT"
},
"chainOfCustodyResult" : null,
"columnValuesCharCount" : null,
"recordCount" : 0,
"columnList" : [ {
"name" : "ASSIGNMENT_RECORD_ID",
"ordinal" : 1,
"type" : "INTEGER",
"typeLength" : 20,
"scale" : 0,
"index" : true,
"fullText" : false,
"encrypt" : false
} ],
"pathValueIndexList" : [ ],
"schema" : "http://localhost:8765/systemdata/schemas/c49f0686-c12a-423e-9626-92f12e3f907d",
"projectedDispositionDate" : null,
"underHold" : false,
"underRetention" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/tables/967b4efa-b674-43e9-8d1e-58642ed5866d"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/tables/967b4efa-b674-43e9-8d1e-58642ed5866d"
},
"http://identifiers.emc.com/delete-content" : {
"href" : "http://localhost:8765/systemdata/tables/967b4efa-b674-43e9-8d1e-58642ed5866d/content"
},
"http://identifiers.emc.com/schema" : {
"href" : "http://localhost:8765/systemdata/schemas/c49f0686-c12a-423e-9626-92f12e3f907d"
},
"http://identifiers.emc.com/chain-of-custody" : {
"href" : "http://localhost:8765/systemdata/tables/967b4efa-b674-43e9-8d1e-58642ed5866d/chain-of-custody"
},
"http://identifiers.emc.com/ingest" : {
"href" : "http://localhost:8765/systemdata/tables/967b4efa-b674-43e9-8d1e-58642ed5866d/content"
}
}
}

OpenText InfoArchive 21.2 Page 76 of 331


13.3.3 Declarative Configuration
Declarative configuration allows one to configure multiple objects in a single
REST call. These can be SIP applications, table applications, or even both. The
syntax and semantics of the declarative configuration is explained in the
Configuration and Administration User Guide.
Use the http://identifiers.emc.com/configuration link relation to
discover URLs for importing or exporting declarative configurations.
The home resource supports importing a declarative configuration via PUT. This
call takes the YAML as content:

curl -X PUT -H ‘Content-Type: text/yaml’ -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept: application/hal+json’ –T configuration.yml
localhost:8765/systemdata/configuration

Alternatively, you can import a ZIP file that contains the configuration YAML file
plus any external files that are referenced by the YAML:

curl -X POST -H ‘Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept:


application/hal+json’ -H ‘Content-Type: multipart/form-data’ -F
[email protected]’ localhost:8765/systemdata/configuration
Exporting to a declarative configuration is supported on multiple levels: system,
tenant, application, and holding. For instance, to export all configuration objects
of an application to a single YAML file:

curl -X GET -H ‘Accept: text/yaml’ -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ localhost:8765/systemdata/applications/5287aff2-3fd1-
416d-875d-
9e9ead71a471/configuration?exportReferenceDetails=create_or_update
The exportReferenceDetails query parameter accepts these values:

create_or_update Export all properties of referenced


objects.

create (default) Export all properties of referenced


objects. Also adds configure:
create to prevent overwrites when
importing the YAML file.

use_existing Export only the name and parents of


referenced objects. Also adds
configure: use existing to
prevent overwrites when importing the
YAML file.

OpenText InfoArchive 21.2 Page 77 of 331


For more information on the configure property, see the section on declarative
configuration in the Configuration and Administration User Guide.
You can also export the declarative configuration to a ZIP file. This ZIP will then
contain the YAML file as before, but various larger pieces of content will be
stored in separate files. This makes it easier to edit those files with dedicated
editors, e.g. an HTML editor for XForms. Use the Accept header to specify the
desired media type:

curl -X GET -H ‘Accept: application/zip’ -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ localhost:8765/systemdata/5287aff2-3fd1-416d-875d-
9e9ead71a471/configuration?exportReferenceDetails

13.3.4 Deleting a table or its content


It is possible to delete a table or its content via REST if the following conditions
are met:
• The application is in In-Test
• The table is not under retention or under hold
• None of the records inside the table are under retention or under
hold

In order to delete the table, for the application, need to get the table link by doing
GETs on the databases, and then in schema, and then in the tables link.

Here is an example of the REST request to list the tables for a schema

curl -X GET -H ‘Accept: application/zip’ -H 'Authorization: Bearer eyJhbGciOi-


JIUzI1NiJ9..’ http://localhost:8765/systemdata/schemas/ed92fd35-7001-4042-
a8fb-529a0f2306f5/tables

This is response

OpenText InfoArchive 21.2 Page 78 of 331


{
"createdBy" : "[email protected]",
"createdDate" : "2019-08-27T17:45:59.2207214-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2019-08-27T17:46:07.5556869-04:00",
"version" : 10,
"id" : "AAAADA",
"rowIdType" : "TYPE_18",
"name" : "STATEMENT_LINE",
"application" : "http://localhost:8765/systemdata/applications/da731f72-0cf4-4010-ad37-
e1b129f53868",
"description" : null,
"storageAllocationStrategy" : {
"name" : "DEFAULT"
},
"chainOfCustodyResult" : null,
"columnValuesCharCount" : 384310,
"recordCount" : 12496,
"actualRecordCount" : 12496,

…,
"pathValueIndexList" : [ ],
"schema" : "http://localhost:8765/systemdata/schemas/ed92fd35-7001-4042-a8fb-529a0f2306f5",
"lastIngestionDate" : "2019-08-27T17:46:07.5536844-04:00",
"projectedDispositionDate" : null,
"underHold" : false,
"underRetention" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/tables/AAAADA"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/tables/AAAADA"
},
"http://identifiers.emc.com/delete-content" : {
"href" : "http://localhost:8765/systemdata/tables/AAAADA/content"
},
"http://identifiers.emc.com/schema" : {
"href" : "http://localhost:8765/systemdata/schemas/ed92fd35-7001-4042-a8fb-
529a0f2306f5"
},
"http://identifiers.emc.com/chain-of-custody" : {
"href" : "http://localhost:8765/systemdata/tables/AAAADA/chain-of-custody"
},
"http://identifiers.emc.com/ingest" : {
"href" : "http://localhost:8765/systemdata/tables/AAAADA/content"
}
}
} ]

A post to either link will return an order item in the response.

13.4 Background application process


13.4.1 Sip background application process

13.4.1.1 Load balance the xDB libraries after xDB library policy update
The command launches the load balancing as a background process after the
xDB library policy configuration has been updated.
The use case for this process is to allow the data nodes to be load balanced
using a command, after the configuration has been updated.
So typical example is the data node is full, then the administrator decides to add

OpenText InfoArchive 21.2 Page 79 of 331


two new data nodes in order to scale.
Doing so, the structured data is only in the full data node. We need to allow the
administrator to load balance the data in the available data nodes.
A job is not relevant on this use case as it is a one shot need.
After this load balancing, the cache out job and the cache in requests (from
search or other functionalities) will automatically load balance the data on the fly.
(Another use case could be a load balance issue during the production).
In order to launch the process, perform a POST on the following link:

curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1N..’


http://localhost:8765/systemdata/applications/d259ebca-179e-4b85-bba2-
90bd567b1632/apply-xdb-library-policy’

The response is:

OpenText InfoArchive 21.2 Page 80 of 331


{
"createdBy": "[email protected]",
"createdDate": "2019-10-18T11:08:36.7055824+02:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2019-10-18T11:08:36.7524575+02:00",
"version": 2,
"id": "244a51e7-415a-42a2-9d57-b5bc379dca5a",
"name": "ApplyXdbLibraryPolicy-[d259ebca-179e-4b85-bba2-90bd567b1632]-[244a51e7-415a-42a2-9d57-b5bc379dca5a]",
"type": "APPLY_XDB_LIBRARY_POLICY",
"application": "http://localhost:8765/systemdata/applications/d259ebca-179e-4b85-bba2-90bd567b1632",
"permission": {
"groups": []
},
"log": null,
"priority": 0,
"eligibilityDate": "2019-10-18T11:08:36.7474708+02:00",
"state": "IN_QUEUE",
"userName": "[email protected]",
"startDate": null,
"endDate": null,
"duration": 0,
"retentionDate": "2019-10-19T11:08:36.6846381+02:00",
"hidden": false,
"suspended": false,
"canceled": false,
"returnMessage": "",
"stateDescription": "",
"logLevel": null,
"contextOperation": null,
"consumerContext": null,
"dipCount": 0,
"dipCrypto": false,
"collection": null,
"matter": null,
"aip": null,
"holding": null,
"xdbLibrary": null,
"purgeCandidateList": null,
"table": null,
"search": null,
"searchComposition": null,
"searchResult": null,
"store": null,
"holdOperation": null,
"items": null,
"payload": null,
"exportSettings": null,
"restorePolicy": null,
"applicationName": "Audit",
"executionLogContentFormat": "IA_ORDER_ITEM_LOG_GZIP",
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/order-items/244a51e7-415a-42a2-9d57-b5bc379dca5a"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8765/systemdata/applications/d259ebca-179e-4b85-bba2-90bd567b1632"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/order-items/244a51e7-415a-42a2-9d57-b5bc379dca5a"
},
"http://identifiers.emc.com/suspend": {
"href": "http://localhost:8765/systemdata/order-items/244a51e7-415a-42a2-9d57-b5bc379dca5a/suspend"

An order item of type APPLY_XDB_LIBRARY_POLICY is created to perform the


load balance. Please see Viewing your own background tasks for managing the
order items.

OpenText InfoArchive 21.2 Page 81 of 331


13.5 Caching-in and caching-out table applications
Caching-in/caching-out is a new feature for applications of ‘Table’ type (not
applicable to SIP applications). Now cache-in(online) / cache-out(offline)
operation can be performed at the application level,
The table-based applications get the following new states represented by the
field cacheState attribute.
Applications have a new cache state attribute. These are the possible values.

1. CACHED_IN (online) - Represents the initial state when the application is


created/ made online. Note that SIP applications will always return this value.
2. CACHED_OUT (offline) - The state the application gets to once the application
is made offline
3. BEING_CACHED_OUT - The intermediate state to represent that
CACHED_OUT operation is in progress
4. BEING_CACHED_IN - The intermediate state to represent the CACHED_IN is
operation is in progress
5. CACHEOUT_FAILED - Represents a failure during caching out operation.
6. CACHEIN_FAILED - Represents a failure during the cache in operation

13.5.1 Cache-out application

Creates a background request for caching-out an application (offlining).


The operation caches-out the structured content from the recent backup
available and moves the application to CACHED_OUT (offline) state on
successful execution essentially making the application frozen (won’t be able to
perform searches etc.)
The API by default creates a backup for all existing database Schemas for the
application before taking the application offline.

Optionally the backup can be skipped (provided an existing schema backup


already exists for each schema) by the user by specifying the "createBackups":
false in the request body parameter as shown in Rest request below.

Rest API:

POST "http://localhost:8765/systemdata/applications/<applicaition-id>/cache-out-
application"

OpenText InfoArchive 21.2 Page 82 of 331


{ "name" : "mycacheOutorderitem", "createBackups" : true }

The Post body is optional and the below default values will be used if none
specified
"name:: <application name>_CacheOutData_timestamp
"createBackups" : true which means backup before caching out

Note:
It is recommended to always let backup creation to happen, to have up to content
available as backup (The backed-up content is used for cache-in operation
subsequently).
User needs to ensure that the existing backup is up to date if opting to skip the
backup, If not, it is recommended to always request a backup.
Example:
curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6…-H 'Accept:
application/hal+json' localhost:8765/systemdata/applications/ac66619f-2c63-40e6-86fd-
ffeab754126f/cache-out-application

If successful, you’ll get response like this:

OpenText InfoArchive 21.2 Page 83 of 331


{
"createdBy" : "[email protected]",
"createdDate" : "2020-08-28T10:16:35.4913858-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2020-08-28T10:16:35.5143319-04:00",
"version" : 2,
"id" : "d2af94c0-67f3-4d7c-b95b-244c2af044c9",
"name" : "Baseball_CacheOutData_2020-08-28T10:16:35-04:00",
"type" : "TABLE_APPLICATION_CACHE_OUT",
"application" : "http://localhost:8765/systemdata/applications/ac66619f-2c63-40e6-86fd-ffeab754126f",
"permission" : {
"groups" : [ ]
},
"log" : null,
"priority" : 0,
"eligibilityDate" : "2020-08-28T10:16:35.5123687-04:00",
"state" : "IN_QUEUE",
"userName" : "[email protected]",
"startDate" : null,
"endDate" : null,
"duration" : 0,
"retentionDate" : "2020-08-29T10:16:35.4883838-04:00",
"hidden" : false,
"suspended" : false,
"canceled" : false,
"returnMessage" : "",
"stateDescriptionCode" : null,
"stateDescription" : "",
"logLevel" : null,
"contextOperation" : null,
"onBehalfOfUser" : null,
"consumerContext" : null,
"dipCount" : 0,
"dipCrypto" : false,
"applicationCacheState" : "BEING_CACHED_OUT",
"applicationName" : "Baseball",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/order-items/d2af94c0-67f3-4d7c-b95b-244c2af044c9"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/ac66619f-2c63-40e6-86fd-ffeab754126f"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/order-items/d2af94c0-67f3-4d7c-b95b-244c2af044c9"
},
"http://identifiers.emc.com/suspend" : {
"href" : "http://localhost:8765/systemdata/order-items/d2af94c0-67f3-4d7c-b95b-244c2af044c9/suspend"
},
"http://identifiers.emc.com/cancel" : {
"href" : "http://localhost:8765/systemdata/order-items/d2af94c0-67f3-4d7c-b95b-244c2af044c9/cancel"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/order-items/d2af94c0-67f3-4d7c-b95b-244c2af044c9/groups"
}
}
}

13.5.2 Cache-in application:

Creates a background request for caching-in (onlining).

OpenText InfoArchive 21.2 Page 84 of 331


The operation caches-in the structured content from the recent backup available
and moves the application to CACHED_IN (online) state on successful
execution.

Rest API:

POST "http://localhost:8765/systemdata/applications/<applicaiton-id>/cache-in-
application"

{ "name" : "mycacheInorderitem" }
Note: The post body is optional and default name "<application
name>_CacheInData_timestamp " will be used if none specified

Example:
curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6…-H 'Accept:
application/hal+json' localhost:8765/systemdata/applications/ac66619f-2c63-40e6-86fd-
ffeab754126f/cache-in-application

If successful, you’ll get response like this:

OpenText InfoArchive 21.2 Page 85 of 331


{
"createdBy" : "[email protected]",
"createdDate" : "2020-08-28T10:24:30.3267448-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2020-08-28T10:24:30.3287441-04:00",
"version" : 2,
"id" : "af5ba452-b910-4f91-9751-3298ca51f38f",
"name" : "Baseball_CacheInData_2020-08-28T10:24:30-04:00",
"type" : "TABLE_APPLICATION_CACHE_IN",
"application" : "http://localhost:8765/systemdata/applications/ac66619f-2c63-40e6-86fd-ffeab754126f",
"permission" : {
"groups" : [ ]
},
"log" : null,
"priority" : 0,
"eligibilityDate" : "2020-08-28T10:24:30.3287441-04:00",
"state" : "IN_QUEUE",
"userName" : "[email protected]",
"startDate" : null,
"endDate" : null,
"duration" : 0,
"retentionDate" : "2020-08-29T10:24:30.3257441-04:00",
"hidden" : false,
"suspended" : false,
"canceled" : false,
"returnMessage" : "",
"stateDescriptionCode" : null,
"stateDescription" : "",
"logLevel" : null,
"contextOperation" : null,
"onBehalfOfUser" : null,
"consumerContext" : null,
"dipCount" : 0,
"dipCrypto" : false,
"applicationCacheState" : "BEING_CACHED_IN",
"applicationName" : "Baseball",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/order-items/af5ba452-b910-4f91-9751-3298ca51f38f"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/ac66619f-2c63-40e6-86fd-ffeab754126f"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/order-items/af5ba452-b910-4f91-9751-3298ca51f38f"
},
"http://identifiers.emc.com/suspend" : {
"href" : "http://localhost:8765/systemdata/order-items/af5ba452-b910-4f91-9751-3298ca51f38f/suspend"
},
"http://identifiers.emc.com/cancel" : {
"href" : "http://localhost:8765/systemdata/order-items/af5ba452-b910-4f91-9751-3298ca51f38f/cancel"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/order-items/af5ba452-b910-4f91-9751-3298ca51f38f/groups"
}
}
}

13.5.3 Errors
As this feature is specific for table-based application, trying to cache-out SIP
based application will result in error:

OpenText InfoArchive 21.2 Page 86 of 331


{
"_errors" : [ {
"error" : "Internal Server Error.",
"errorCodes" : [ ],
"message" : "cache-in operation is not supported for application of type SIP ",
"localizedMessage" : "cache-in operation is not supported for application of type SIP "
} ],
"_links" : { }
}

Caching-out cannot be performed while indexing job is running for that


application. Trying to cache-out that application will also result in the following
error:

{
"_errors" : [ {
"error" : "A conflict occurred.",
"errorCodes" : [ ],
"message" : "Cannot cache-out data from application when indexing job is underway",
"localizedMessage" : "Cannot cache-out data from application when indexing job is
underway"
} ],
"_links" : { }
}

14.0 Ingestion
As far as InfoArchive supports two kinds of application for archiving: Table based
and SIP based, then there are two different mechanism of data ingestion to each
type of applications. Both ingestion ways are covered in the chapter.
When planning about data ingestion from the REST perspective, it is
recommended to start working at the application level via “Home Resource” ->
“Tenant” -> “Application”.
14.1 SIP Ingestion
Using the SIP based demo application named PhoneCalls as an example, the
following REST Links are available.
From that application root, we have following REST links available.

OpenText InfoArchive 21.2 Page 87 of 331


14.1.1 Batch Ingestion
Batch ingestion is performed in two steps: Receive SIP step and Ingest SIP step.
Every step is performed by separate REST calls.
At first, we need to find the link relation http://identifiers.emc.com/aips rooted
from the single SIP application, and get an URI for the collection of AIPs by
extracting href’s value for the link relation.
Based on this URI, we perform a GET call to retrieve the collection of AIP object:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/7a7b9d20-e31f-
4d5c-8bc4-d74de313a424/aips
When there is no SIP data ingested into the application, the response is as
follows:
{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips"
},
"http://identifiers.emc.com/receive": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips"
},
"http://identifiers.emc.com/ingest-direct": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips?ingestDirect=true"
}
},
"page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}

It contains only the page information and the number of relation links to perform
different actions: “receive” and “ingest-direct”.

14.1.1.1 Receive Step


We need to take an href’s value (URI) for the http://identifiers.emc.com/receive
link relation rooted from the AIP’s collection resource. It is used for the reception
step.
The reception is performed by a POST request to the above link, but it is required
to set up several important parameters to set up form-data:

OpenText InfoArchive 21.2 Page 88 of 331


- -F “format=sip_zip” – it is a mandatory parameter that sets up the SIP
format to be received. In the below example, it is “sip_zip”. Receiver
nod should support provided format.
- -F “[email protected]” - a parameter that contains a
path to the received SIP package. NOTE, that in the below example
the SIP package is located in the same folder as curl executed.

curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H "Accept:


application/json" -H "Accept: multipart/form-data" -F "sip=@PhoneCallsSample-
2001.zip" -F "format=sip_zip" localhost:8765/systemdata/applications/7a7b9d20-
e31f-4d5c-8bc4-d74de313a424/aips
After the SIP package is received, the response contains a newly created AIP
object. The response is very large because the AIP object has many fields. The
below example of response payload is truncated in order to show the relation
links on the whole page.

OpenText InfoArchive 21.2 Page 89 of 331


{
"id" : "6728b300-0383-497b-9faa-e205b8433aff",
"name" : "PhoneCalls-CC-1000000-1",
"application" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424",
"sipProductionDate" : "2001-12-01T00:00:00+01:00",
"sipSeqno" : 1,
"sipIsLast" : true,
"sipAiuCount" : 3,
"sipPageCount" : 0,
"sipPdiHashAlgorithm" : null,
"sipPdiHashEncoding" : null,
"sipPdiHash" : null,
"dirty" : false,
"pkeys" : null,
"ingestDeadlineDate" : "2017-03-23T19:37:58.367+03:00",
"pdiFileSize" : null,
"pdiValuesCharCount" : null,
"xdbMode" : "PRIVATE",
"xdbLibrary" : null,
"xdbPdiSchema" : null,
"partOfAggregate" : false,
"aggregateCiSeqno" : 0,
"aggregateAiuSeqno" : 0,
"pdiConfigName" : null,
"priority" : 1,
"receiveStartDate" : "2017-03-23T17:57:58.367+03:00",
"receiverNodeName" : "receiver_node_01",
"sipFileFormat" : "sip_zip_crypto",
"sipFileSize" : 123186,
"returnMsg" : null,
"projectedDispositionDate" : null,
"underHold" : false,
"underRetention" : false,
"permission" : {
"groups" : [ ]
},
"state" : "Waiting ingestion",
"xdbLibraryDetached" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424"
},
"http://identifiers.emc.com/contents" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/contents"
},
"http://identifiers.emc.com/ingest" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/ingest"
},
"http://identifiers.emc.com/invalid" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/invalid"
},
"http://identifiers.emc.com/sip-crypto-object" : {
"href" : "http://localhost:8765/systemdata/crypto-objects/32d47a3f-0609-430b-bf69-6a7ebcf5746a"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/groups"
}
}}
The “state” attribute and its value “Waiting ingestion” confirms the newly created
AIP is ready for ingestion via the http://identifiers.emc.com/ingest link relation,
included below.

OpenText InfoArchive 21.2 Page 90 of 331


14.1.1.2 Ingest Step
From that reception response, it is worth taking the URI for the
http://identifiers.emc.com/ingest link relation. It is rooted from the single AIP
resource. The URI is used to perform the ingestion by issuing a POST request
without any payload.

curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json’ localhost:8765/systemdata/applications/7a7b9d20-e31f-
4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-e205b8433aff/ingest
After a successful response, the payload contains the same AIP object, but with
updated attributes. To be more explicit, we are showing on the below listing only
the links relation for the AIP.
The POST request accepts a parameter named allowBackgroundRequest. If this
parameter is set to true (default value is false) and if the structured database is
not available, the ingestion will failback to an asynchronous ingestion. In this
case the result will be an AIP in “Pending” State, which will contain a link
http://identifiers.emc.com/order-item to the corresponding asynchronous
ingestion order item.

OpenText InfoArchive 21.2 Page 91 of 331


…..

"aggregate" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424"
},
"http://identifiers.emc.com/contents" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/contents"
},
"http://identifiers.emc.com/ris" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/ris"
},
"http://identifiers.emc.com/invalid" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/invalid"
},
"http://identifiers.emc.com/transform" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/transform"
},
"http://identifiers.emc.com/xdb-library" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/xdb-libraries/8890e309-1168-4608-a551-
a0b230bf2406"
},
"http://identifiers.emc.com/backup" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/backup"
},
"http://identifiers.emc.com/recovery" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/recovery"
},
"http://identifiers.emc.com/restore" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/restore"
},
"http://identifiers.emc.com/detach" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/detach"
},
"http://identifiers.emc.com/ci-crypto-object" : {
"href" : "http://localhost:8765/systemdata/crypto-objects/32d47a3f-0609-430b-bf69-6a7ebcf5746a"
},
"http://identifiers.emc.com/pdi-crypto-object" : {
"href" : "http://localhost:8765/systemdata/crypto-objects/32d47a3f-0609-430b-bf69-6a7ebcf5746a"
},
"http://identifiers.emc.com/sip-crypto-object" : {
"href" : "http://localhost:8765/systemdata/crypto-objects/32d47a3f-0609-430b-bf69-6a7ebcf5746a"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-
e205b8433aff/groups"
}
}
}

The number of links (and the link relations) of the ingested AIP object have been
changed in comparison to the reception state.

OpenText InfoArchive 21.2 Page 92 of 331


14.1.1.3 Enumeration Step
In the previous example, we saw a step-by-step on how to receive and ingest a
single SIP package.

However, real life requirements dictate optimizing the process to increase batch
ingestion performance. That translates into first receiving several SIP files
following the instructions shown in Section 12.2.2.1 (Reception Step).
Once the reception step is completed for several SIPs, the Enumeration
Resource is leveraged to create a collection of SIPs that status is “Waiting
Ingestion”.
The enumeration resource eliminates the need for leveraging the
“http://identifiers.emc.com/aips” URI previously covered in section 12.1.2, which
would have resulted in getting all of the application’s AIPs, regardless of status,
and then the need to examine each individual AIP.
Instead, the Enumeration response includes an http://identifiers.emc.com/ingest
relation for each in individual AIPs in the collection greatly simplifying
development and increasing performance.
See the example enumeration response below (abbreviated):

OpenText InfoArchive 21.2 Page 93 of 331


{
"createdBy": "[email protected]",
"createdDate": "2017-04-17T14:28:31.427-04:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-04-17T14:28:31.427-04:00",
"version": 1,
"name": "PhoneCalls-CC-1000007-1",
"aipId": "2646207a-3f0d-4f92-b366-eb2812ade4d7",
"……..
},

"state": "Waiting ingestion",


"openAggregate": false,
"validAggregate": false,
"aggregate": false,
"phase": "Waiting Ingestion",
"xdbLibraryDetached": false,
"xdbLibraryIndexSize": 0,
"sipCryptoObjectName": "PhoneCalls-crypto-object",
"xdbLibrarySize": 0,
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf/aips/2646207a-3f0d-4f92-b366-eb2812ade4d7"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf/aips/2646207a-3f0d-4f92-b366-eb2812ade4d7"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf"
},
"http://identifiers.emc.com/contents": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf/aips/2646207a-3f0d-4f92-b366-eb2812ade4d7/contents"
},
"http://identifiers.emc.com/ingest": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf/aips/2646207a-3f0d-4f92-b366-eb2812ade4d7/ingest"
},
"http://identifiers.emc.com/invalid": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf/aips/2646207a-3f0d-4f92-b366-eb2812ade4d7/invalid"
},
"http://identifiers.emc.com/sip-crypto-object": {
"href": "http://localhost:8765/systemdata/crypto-objects/bf7c3b60-04c9-4a18-be50-921b81b101a8"
},
"http://identifiers.emc.com/groups": {
"href": "http://localhost:8765/systemdata/applications/3b19b6d5-58ee-46a5-9b04-869fa4acbddf/aips/2646207a-3f0d-4f92-b366-eb2812ade4d7/groups"
}
}

Note: The enumeration resource (http://identifiers.emc.com/enumeration) can be


obtained via the http://identifiers.emc.com/ingest-nodes URI as covered in
section 12.3.1.6 (Ingestion-Nodes) related to the targeted SIP application. See
the example below of the Ingestion-Nodes response.

OpenText InfoArchive 21.2 Page 94 of 331


{
"_embedded": {
"ingestNodes": [
{
"id": "096e5a36-74d1-47b9-abb0-4d71b1beb130",
"createdBy": "[email protected]",
"createdDate": "2017-03-22T11:17:30.594+03:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-22T11:17:30.665+03:00",
"version": 2,
"name": "ingest_node_01",
"application": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424",
"logLevel": "INFO",
"enumerationCutoffDays": 30,
"enumerationMaxResultCount": 10,
"enumerationMinusRunning": true,
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/ingest-nodes/096e5a36-74d1-47b9-abb0-4d71b1beb130"
},
"http://identifiers.emc.com/update": {
"href": "http://localhost:8765/systemdata/ingest-nodes/096e5a36-74d1-47b9-abb0-4d71b1beb130"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/ingest-nodes/096e5a36-74d1-47b9-abb0-4d71b1beb130"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424"
},
"http://identifiers.emc.com/enumeration": {
"href": "http://localhost:8765/systemdata/ingest-nodes/096e5a36-74d1-47b9-abb0-4d71b1beb130/aips"
}
}
}
]
},
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/ingest-nodes"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/ingest-nodes"
}
},
"page": {
"size": 10,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}

14.1.1.4 Invalidation of Ingested AIP


Every AIP object link relation is relevant to a particular action. So that, from the
ingested state, we may perform AIP invalidation by issuing a POST request to
the URI that corresponds to the http://identifiers.emc.com/invalid link relation.
The example of an Invalidation request is below:

curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json’ localhost:8765/systemdata/applications/7a7b9d20-e31f-
4d5c-8bc4-d74de313a424/aips/6728b300-0383-497b-9faa-e205b8433aff/invalid
If successful, the response is the same AIP, but with updated attributes.

OpenText InfoArchive 21.2 Page 95 of 331


14.1.1.5 Rollback of Invalidated or Rejected AIP
When an AIP is marked as Invalidated or Rejected, its state is either Waiting
Invalidation or Waiting Rejection until the Invalidation Job is ran an the AIP is
effectively invalidated or rejected. If the AIP was invalidated or rejected from
Completed state and still in Waiting Invalidation or Waiting Rejection state, it can
be reverted to Completed state by issuing a POST request to the URI that
corresponds to the http://identifiers.emc.com/rollback link relation. The example
of an Rollback request is below:
curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H "Accept:
application/json" localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-
8bc4-d74de313a424/aips/2646207a-3f0d-4f92-b366-eb2812ade4d7/rollback

If successful, the response is the same AIP, but with updated attributes.

14.1.2 Direct Ingestion


When ingesting a large number of SIPs via a batch, it is first necessary to receive
all the SIP packages and then ingest them into the application, as described in
the previous sections. InfoArchive’ s unitary archiving allows for simultaneous
reception\ingestion of a single SIP via an exposed REST resource, resulting in a
reduction of steps.
For performing the direct ingest, leverage the href’s value (URI) for the
http://identifiers.emc.com/ingest-direct link relation rooted from the AIP’s
collection resource. As shown in section 13.3.1.55.
Please note the parameter “?ingestDirect=true”.

"http://identifiers.emc.com/ingest-direct": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-
8bc4-d74de313a424/aips?ingestDirect=true"
}

The direct ingest is performed by POST request to the above link, but it is
required to set up several important parameters to set up form-data:
- -F “format=sip_zip” – it is a mandatory parameter that sets up the SIP
format to be received. In the below example, it is “sip_zip”. Receiver
node should support provided format.
- -F “[email protected]” - a parameter that contains a
path to the received SIP package. NOTE, that in the below example,
the SIP package is located in the same folder as curl executed.

curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H "Accept:


application/json" -H "Accept: multipart/form-data" -F "sip=@PhoneCallsSample-
2001.zip" -F "format=sip_zip" localhost:8765/systemdata/applications/7a7b9d20-
e31f-4d5c-8bc4-d74de313a424/aips?ingestDirect=true

OpenText InfoArchive 21.2 Page 96 of 331


In case of a successful response, you may notice that in the response payload
the AIP state is “Completed”.
The POST request accepts a parameter named allowBackgroundRequest. If this
parameter is set to true (default value is false) and if the structured database is
not available, the direct ingestion will failback to an asynchronous ingestion. In
this case the result will be an AIP in “Pending” State, which will contain a link
http://identifiers.emc.com/order-item to the corresponding asynchronous
ingestion order item.

{
"id" : "88556ddc-3a1a-4bb6-9400-fb9bb2240af3",
"aipId" : "88556ddc-3a1a-4bb6-9400-fb9bb2240af3",
"sipProductionDate" : "2001-12-01T00:00:00+01:00",
"sipSeqno" : 1,
"sipIsLast" : true,
"sipAiuCount" : 3,
"sipPageCount" : 0,
"sipPdiHashAlgorithm" : null,
"sipPdiHashEncoding" : null,
"sipPdiHash" : null,
"dirty" : false,
"ingestDeadlineDate" : "2017-03-23T20:21:06.658+03:00",

………….

"returnCode" : "OK",
"returnMsg" : "",
"projectedDispositionDate" : null,
"underHold" : false,
"underRetention" : false,
"permission" : {
"groups" : [ ]
},
"state" : "Completed",
"xdbLibraryDetached" : false,
"openAggregate" : false,
"phase" : "Completed",
"pdiCryptoObjectName" : "PhoneCalls-crypto-object",
"sipCryptoObjectName" : "PhoneCalls-crypto-object",
"xdbLibrarySize" : 249856,
"validAggregate" : false,
"xdbLibraryIndexSize" : 53248,
"ciCryptoObjectName" : "PhoneCalls-crypto-object",
"xdbLibraryName" : "b4419f0e-9067-42b1-8ad0-c62cfe76d34e",
"aggregate" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/88556ddc-3a1a-4bb6-9400-
fb9bb2240af3"
},
"http://identifiers.emc.com/delete" : {
"href" : http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/88556ddc-3a1a-4bb6-9400-
fb9bb2240af3

…..
"href" : "http://localhost:8765/systemdata/crypto-objects/32d47a3f-0609-430b-bf69-6a7ebcf5746a"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-8bc4-d74de313a424/aips/88556ddc-3a1a-4bb6-9400-
fb9bb2240af3/groups"
}
}
}

OpenText InfoArchive 21.2 Page 97 of 331


14.2 Asynchronous ingestion:
To launch a direct background ingestion, from the list of AIPs of an application,
perform a POST request to the new link "http://identifiers.emc.com/ingest-async":

"http://identifiers.emc.com/ingest-async ": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-
8bc4-d74de313a424/aips/ingest-async?sip&format&name&eligibilityDate }

Parameters sip and format are mandatory, and their usage is exactly the same
than for Reception.
Parameters name and eligibilityDate are optional:
• name : name of the Ingestion Order Item that will be returned. If no name
is specified, the system name the Order Item with the name of the AIP.
• eligibilityDate: minimum date on which the Ingestion Order Item created
should be taken into account by the IA Server.
Result of a successful execution of the Rest Call is
• HTTP Code ACCEPTED (202)
• A JSON representation of the created Ingestion Order Item.

To launch a background ingestion after a reception or an enumeration, from the


received AIP resource: perform a POST request to the new link
"http://identifiers.emc.com/ingest-async":

"http://identifiers.emc.com/ingest-async ": {
"href": "http://localhost:8765/systemdata/applications/7a7b9d20-e31f-4d5c-
8bc4-d74de313a424/aips/41a054af-0e27-4a6c-9cee-80c223aa3203/ingest-
async?sip&format&name&eligibilityDate }

Parameters name and eligibilityDate are optional:


• name : name of the Ingestion Order Item that will be returned. If no name
is specified, the system name the Order Item with the name of the AIP.
• eligibilityDate: minimum date on which the Ingestion Order Item created
should be considered by the IA Server.
Result of a successful execution of the Rest Call is
• HTTP Code ACCEPTED (202)
• A JSON representation of the created Ingestion Order Item.

OpenText InfoArchive 21.2 Page 98 of 331


14.3 Table Ingestion
In the section 11.3.2.3, we configured a new table to preserve the data and
received the response for a newly created table.
In the response, the http://identifiers.emc.com/ingest link relation is included, and
it is rooted from the tables. This link is used for issuing a POST request in order
to ingest the data to the table.
14.3.1 XML ingest
Let’s ingest the data for the created table with a single column. The data is stored
in “sample_data.xml” file and located in curl execution directory.
File content is following:
<ROW>
<ASSIGNMENT_RECORD_ID>1</ASSIGNMENT_RECORD_ID>
</ROW>

In the request, we need to set up a header for content type to “application/xml”,


as the table data is presented with xml (we’re covering multi-part form data in the
next section). Also, we need to provide the @sample_data.xml file in the request.

curl -X POST -H ‘Content-Type: application/xml’ -H ‘Accept: application/json’ -H


'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -d @sample_data.xml
localhost:8765/systemdata/tables/967b4efa-b674-43e9-8d1e-
58642ed5866d/content
After issuing the POST, we should receive 201 status – CREATED.

At that point, we have covered the data ingestion for both the SIP application
type and table application types. And we are ready to perform the search on the
data. So, we are moving to the next chapter - Searches.
14.3.2 Attachment ingest
Here is an example of an XML file with references to attachments:

OpenText InfoArchive 21.2 Page 99 of 331


<?xml version="1.0" encoding="UTF-8"?>
<TICKETS>
<TICKET_ATTACHMENT>
<ROW>
<TICKET_NUMBER>10023331</TICKET_NUMBER>
<ATTACHMENT ref="../blobs/ticket4.jpg" />
</ROW>
<ROW>
<TICKET_NUMBER>10023332</TICKET_NUMBER>
<ATTACHMENT ref="../blobs/ticket5.jpg" />
</ROW>
</TICKET_ATTACHMENT>
</TICKETS>
As can be seen we have references in the XML to external files. In order to
ingest this inside the same data transaction, and to ensure we have expected
data integrity, we need to create a POST request of type multipart/form-data –
and pass all three content files (one XML and two JPEG files) in the same
stream.
See an example of how this can be accomplished using curl:

curl -X POST -H "Authorization: Bearer eyJhbG...XI" -H "Content-Type: multipart/form-data" -


F "data=@\"C:\InfoArchive\examples\applications\Tickets\data\TICKETS\TICKETS-
TICKET_ATTACHMENT-00002.xml\";filename=TICKETS-TICKET_ATTACHMENT-
00002.xml" -F
"../blobs/ticket4.jpg=@\"C:\InfoArchive\examples\applications\Tickets\data\blobs\ticket4.jpg\";f
ilename=\"ticket4.jpg\"" -F
"../blobs/ticket5.jpg=@\"C:\InfoArchive\examples\applications\Tickets\data\blobs\ticket5.jpg\";f
ilename=\"ticket5.jpg\"" http://localhost:8080/restapi/systemdata/tables/1d6f8ee1-e702-4494-
bffc-54db04544529/content

As you can see we use “form” option of data upload with curl – and provide all
three references. All these files are attached to the POST request and are
uploaded to the server. If everything goes well we’re getting 201 Created
response (note – you will need to add “-i” option to curl to actually see the
response headers, which are normally suppressed):
HTTP/1.1 201
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Expires: 0
Pragma: no-cache
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
RequestID: e3b34451-1372-4856-94bf-afdf07118d1b
Date: Fri, 14 Jun 2019 14:46:29 GMT
X-Content-Type-Options: nosniff
Content-Length: 0

OpenText InfoArchive 21.2 Page 100 of 331


15.0 Search

Search data model


15.1 Overview
Search is one of the primary and frequently used resources in InfoArchive. In the
resource hierarchy, searches are located under Home Resource->Tenants-
>Applications->Searches)
The search resource is a composite resource that consists of several,
independent resources, logically creating one higher level resource. This
approach allows for some flexibility.
See the following hierarchy representation, showing similarities and differences,
for Searches depending on what application they are associated with. You’ll
notice that there are some differences whether a search is created for application
of archivalType: TABLE versus application of archivalType: SIP – see below:

OpenText InfoArchive 21.2 Page 101 of 331


Each search needs to be associated with a Data Set and, depending on which
application a given search is rooted with, that Data Set could be:
• Searches rooted under SIP Application
o A Data Set is a combination of AIC and Query resources. It is worth
pointing out that a search resource does not contain these
resources itself, but instead, has links to such. For example, a SIP
application has link relations to a collection of AICs and to a
collection of Queries, where the objects are persisted and a whole
collection can be explored from the root application resource.
Moreover, not all combinations of AIC and Query are possible. AIC
is bound to a certain number of configured Queries. In the next
chapters, it is explained how to find correct AIC and Query pair for
the search.
• Searches rooted under Table Application
o Data Set could be either a Database or Schema/Table. If your
search can be narrow down to a single table query, it’s best to set
both: Schema and Table references when creating search. Setting
Table reference is crucial if you want to allow users ability to put
holds/retention on the search results (if search has no Table
reference set, users won’t be able to put search results on holds for
example).
o For cross-table searches only Schema reference should be set as
then search is run on the Schema.
o For cross-schema searches only Database reference should be
set.
In addition, each search is associated with a search-composition resource.
Furthermore, each search-composition is associated with xform and result-
master resources. For a table application, search-composition is also associated
with the xquery resource.

OpenText InfoArchive 21.2 Page 102 of 331


In fact, a search can have one or more associations with search-compositions.
Each search-composition can be assigned group permission(s). This way, at run
time, the system dynamically selects the search composition(s) that is applicable
to a given user based on that user’s group membership. Using this approach, the
same search may act differently depending on which user is executing it.
Furthermore, searches associated with AIC and Query resources leverages
dynamically created XQuery during the search execution (as a criterion and
xQuery components are configured ahead of time during the creation of the
query resource). For Schema/Table, the xQuery resource is manually
preconfigured.
15.2 Determining available searches
15.2.1 Roles/permission for search execution

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

15.2.2 Determine what searches are available

Effectively, we need to do a GET on the search resources that are available from
an application.
To help facilitate this procedure, install the sample Audit application, which has
some default searches available.
From the applications link, find the searches link

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: applica-


tion/hal+json'
"http://localhost:8765/systemdata/applications/800c33e2-c88e-4bf9-9d9e-
d8e7e72b7edd/searches"
Here is an example of the response:

OpenText InfoArchive 21.2 Page 103 of 331


{
"_embedded" : {
"searches" : [ {
"id" : "929ae172-8ddb-4bfa-8f17-d4347d56e356",
"createdBy" : "[email protected]",
"createdDate" : "2017-06-26T16:59:39.29-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-06-26T16:59:40.054-04:00",
"version" : 2,
"name" : "Application Audit",
"application" : "http://localhost:8765/systemdata/applications/800c33e2-c88e-4bf9-9d9e-
d8e7e72b7edd",
"description" : null,
"searchGroup" : null,
"schema" : null,
"table" : null,
"aic" : "http://localhost:8765/systemdata/aics/287b0894-b2f6-4eca-821b-d9b29195aea9",
"query" : "http://localhost:8765/systemdata/queries/51896ce0-ba37-46a3-8309-444b24c1305f",
"usedBySearches" : null,
"nestedSearch" : false,
"state" : "PUBLISHED",
"inUse" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/searches/929ae172-8ddb-4bfa-8f17-
d4347d56e356"
},
"http://identifiers.emc.com/search-compositions" : {
"href" : "http://localhost:8765/systemdata/searches/929ae172-8ddb-4bfa-8f17-
d4347d56e356/search-compositions"
},
"http://identifiers.emc.com/all-components" : {
"href" : "http://localhost:8765/systemdata/searches/929ae172-8ddb-4bfa-8f17-
d4347d56e356/all-components"
},
"http://identifiers.emc.com/export" : {
"href" : "http://localhost:8765/systemdata/searches/929ae172-8ddb-4bfa-8f17-
d4347d56e356"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/searches/929ae172-8ddb-4bfa-8f17-
d4347d56e356"
},
"http://identifiers.emc.com/copy" : {
"href" : "http://localhost:8765/systemdata/searches/929ae172-8ddb-4bfa-8f17-
d4347d56e356/copy"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/searches/929ae172-8ddb-4bfa-8f17-
d4347d56e356"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/800c33e2-c88e-4bf9-9d9e-
d8e7e72b7edd"
},
"http://identifiers.emc.com/aic" : {
"href" : "http://localhost:8765/systemdata/aics/287b0894-b2f6-4eca-821b-d9b29195aea9"
},
"http://identifiers.emc.com/query" : {
"href" : "http://localhost:8765/systemdata/queries/51896ce0-ba37-46a3-8309-
444b24c1305f"
},
"http://identifiers.emc.com/ci" : {
"href" : "http://localhost:8765/systemdata/applications/800c33e2-c88e-4bf9-9d9e-
d8e7e72b7edd/ci?cid="
}
}
}…
"page" : {
"size" : 10,
"totalElements" : 3,
"totalPages" : 1,
"number" : 0
}
}

OpenText InfoArchive 21.2 Page 104 of 331


Search object can be either Primary or Nested. Primary searches can refer to
Nested searches (Nested search would typically expend on the results returned
to Primary search.
By default, collection of searches returns all searches, regardless of whether they
are Primary or Nested.
Search also can be in any of the two states: DRAFTED or PUBLISHED. By
default, collection of searches returns all searches, regardless of the state.

The following (optional) filters can be used to further refine the collection of
searches:

URI query parameter Values Notes

nestedSearches true/false If set to true, only nested


searches are returned, if
set to false, only primary
searches are returned

searchState DRAFT/PUBLISHED If set to DRAFT only


searches in DRAFT
state are returned, if set
to PUBLISHED, only
searches in
PUBLISHED state are
returned

Search supports spEL. The following attribute, however, cannot be used, as it is


a calculated field:
- inUse

If a spEL expression is passed, the above filters are ignored.

Even though a search is returned, there may be no search sets available to run.
If the search is not published, only developers can run the search. It is also
possible that the permission set during search composition has limited the
access of the search.

OpenText InfoArchive 21.2 Page 105 of 331


15.3 Search creation
15.3.1 Role Permission

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

To create a search, we’ll need to do a POST to a Searches collection.


15.3.2 Find reference to collection of searches
As explained in the guide, the first step is to get the response from the Home
Resource (Home Resource->Tenants->Applications->Searches)

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/services
Followed by tenants (Home Resource->Tenants->Applications->Searches), as
explained in section 10.1, via the value of the href element and issue a GET
request against that URI:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/tenants
As explain in section 10.1, the Tenants resource is a collection whose response
needs to be processed to find the tenant item we want to select. In most cases, a
collection of tenants will contain just one element so we can select it.
Alternatively, we could process the collection and try finding tenant by name.
To process the collections, we follow the _embedded JSON element that is
followed by the tenant’s JSON array. The first element in our array has a name
INFOARCHIVE, which is the name of our default tenant.
This array element also has its own _links JSON element that contains a full set
of links applicable to the given (tenant) resource.
We now have two choices in terms of following our path to Searches:
1. We can find self-link relation and issue a GET against its href value. This
would then take us to the tenant resource directly. This way, we’ll get our
tenant resource representation.
2. We can scan all available links here (within the _links node in our first
array element) and select a link relation of interest directly from within the
embedded resource. Since the item in the array is actually a full resource
representation, by processing it directly within the collection response, we
can avoid having to do step #1 (above) and treat this as a shortcut.

OpenText InfoArchive 21.2 Page 106 of 331


Note – it may be handy to keep reference to our instance of application.
We found it in Step 1 (above) so, even if we choose not to use it directly
right now, it’s probably worthwhile to keep it handy as we may need to use
it later.

TIP: in the current release of InfoArchive, we typically deal with just a single tenant.
There is a link relation http://identifiers.emc.com/tenant to point to a tenant resource
instance directly from the Home Resource. So, alternatively, we could look for that link
relation instead of looking for collection of tenants. This would be a shortcut of sort.

This discovery process continues – by selecting links to resources or collections


until we arrive at our destination.
Because the process is pretty much repetitive, we’ll skip re-explaining it every
time and focus on the sequence of calls required to arrive at a collection of
searches so that we can create a new Search instance.
Since we’re now at the tenant resource, we need to find a link to the collection of
applications (http://identifiers.emc.com/applications). When we do find this link,
we’ll issue GET on it as follows:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/tenants/41ceb11f-2943-4a4d-
9fb4-bb198509942e/applications
The next step is to process the Application’s collection (Home Resource-
>Tenants->Applications->Searches) as explained in section 11.1). Since
Searches are associated with application instances, the Application’s collection
needs to be processed to find the required application in the array.
15.3.3 Table Searches
Step #1
This example leverages the Searches associated with the TABLE Type,
“Baseball” application, which needs to be found thought the array, as described
earlier in this guide. Once found, take note of the link relation
“http://identifiers.emc.com/databases and “http://identifiers.emc.com/searches”.
We will need both href values URI to be use later in Step #2 and Step #6,
respectively.
See example below:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/tenants/2f9fd3f2-5334-4f61-
8538-9e5595cca4e7/applications
The response is:

OpenText InfoArchive 21.2 Page 107 of 331


{
"createdBy": "[email protected]",
"createdDate": "2017-04-17T17:11:11.600-04:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-04-17T17:12:57.207-04:00",
"version": 2,
"name": "Baseball",
"structuredDataStorageAllocationStrategy": "DEFAULT",
"type": "APP_DECOMM",
"archiveType": "TABLE",
"searchCreated": true,
................
},
"http://identifiers.emc.com/searches": {
"href": "http://localhost:8765/systemdata/applications/910b7efa-4741-4cc5-b533-fe4a57130254/searches"
},
"http://identifiers.emc.com/search-groups": {
"href": "http://localhost:8765/systemdata/applications/910b7efa-4741-4cc5-b533-fe4a57130254/search-groups"
},
"http://identifiers.emc.com/orders": {
"href": "http://localhost:8765/systemdata/applications/910b7efa-4741-4cc5-b533-fe4a57130254/orders"
},
"http://identifiers.emc.com/my-orders-items": {
"href": "http://localhost:8765/systemdata/applications/910b7efa-4741-4cc5-b533-fe4a57130254/order-items"
},
"http://identifiers.emc.com/spaces": {
"href": "http://localhost:8765/systemdata/applications/910b7efa-4741-4cc5-b533-fe4a57130254/spaces"
},
"http://identifiers.emc.com/databases": {
"href": "http://localhost:8765/systemdata/applications/910b7efa-4741-4cc5-b533-fe4a57130254/databases"
},
"http://identifiers.emc.com/typeAliases": {
"href": "http://localhost:8765/systemdata/applications/910b7efa-4741-4cc5-b533-fe4a57130254/typeAliases"
...............

TIP – it may be handy to keep reference to our instance of application we just found - even if we
choose not to use it directly right now. It’s probably worthwhile to keep it around as we may
need to use it later. In general, due to the discovery process involved in finding resources, it is a
good idea to keep some key resource references so we won’t have to look for them again in near
future.

OpenText InfoArchive 21.2 Page 108 of 331


15.3.3.1 Finding the Reference to a Search’s Data Set
Step #2
Each Search needs to be associated with a data set. Baseball is an application of
“archiveType TABLE”, so searches associated with the Baseball application will
need to have an association with a Schema or both: Schema and a Table.
To find the reference to either one, we’ll use now our reference to databases
(http://identifiers.emc.com/databases) resource found in Step #1:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/e7691d42-b562-
4178-9958-e18114ff13b6/databases
Step #3
Step #2 returns a collection of databases for the Baseball application, and we’ll
process it to find database of interest to us and then examine its _links node to
find the link relation to schemas (http://identifiers.emc.com/schemas). When we
do, we issue a GET on it:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/databases/f8fd9488-c3ff-456e-
9d64-119a127fb040/schemas
Step #4
Step #3 returns a collection of schemas. Find the schema of interest in the array
and, for that schema, find the self-link relation and its value, and save the value
to be used in Step #6 tables (http://identifiers.emc.com/tables).
Step #5
Issue a GET on the value of the table’s link relation:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/schemas/e8309487-0821-4d19-
90c3-cbc10d4c2445/tables
Now iterate over the collection of tables and find the table of interest, comparing
name attributes of each item in the array until we find the one we want. Let’s say
we’ll be looking for table SALARIES. When found, store the value of its reference
URI (value of href attribute on self-link relation), since it is needed in Step #4.

15.3.3.2 Getting it All Together


Step #6

OpenText InfoArchive 21.2 Page 109 of 331


Now that we know the reference to our collection of searches (Step #1), we also
know the reference to both the Schema (Step #4) and Table (Step #5) we are
ready to create our first search.
We’ll need to do a POST to our collection of searches, and we’ll pass the
search’s attributes in a JSON payload.
To create a search for a TABLE archiving application, we need to set the
following attributes: name, description (optional), schema and table.

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'{"name":"mySampleSearch","description":"my
description","schema":"http://localhost:8765/systemdata/schemas/379762dd-5f49-
4964-8c7d-
46fb3bb3a0dd","table":"http://localhost:8765/systemdata/tables/c87656f2-c50c-
48dd-86ea-96fff83ecba4"}' localhost:8765/systemdata/applications/e7691d42-
b562-4178-9958-e18114ff13b6/searches
Let’s analyze our POST:
1. We are sending POST request, so –X POST will set that for curl.
2. Payload for our post is JSON, so we indicate that by setting the Content-
Type header to application/json. Note that most resources support both:
application/json as well as application/hal+json for both: outbound and
inbound operations.
3. Our payload itself is indicated by –d parameter. You will see what follows
is JSON within single quotes. Note that the name and value of each JSON
attribute is quoted as well. Because we use single quotes to indicate the
JSON payload, we use double quotes within JSON.
4. Note that our JSON payload has four attributes: name, description,
schema and table. Name and description are standard. Name has to be
unique for each search instance. However, both schema and table JSON
attributes are actually references to REST resources obtained during Step
#4 & Step #5. We pass those references by providing the URI to each
specific resource. Those will be later converted into Java object instances
inside the InfoArchive REST layer.
5. Finally, notice that our POST request is done on the collection of searches
URI (Step #1 - “http://identifiers.emc.com/searches”).
If successful, we should get back a 201 Created response, with a JSON payload
containing our newly created search resource, similar to the example below:

OpenText InfoArchive 21.2 Page 110 of 331


{
"id": "3f0bc8d4-c3aa-4913-b37a-2eff7f196827",
"createdBy": "[email protected]",
"createdDate": "2017-03-09T15:32:44.73-05:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-09T15:32:44.73-05:00",
"version": 1,
"name": "mySampleSearch",
"application": "http://localhost:8765/systemdata/applications/7c297548-6eab-44fb-bf73-46368ea8a75e",
"description": "my description",
"searchGroup": null,
"schema": "http://localhost:8765/systemdata/schemas/e4bfa77a-ea59-4b9e-b209-9ff3854bd68d",
"table": "http://localhost:8765/systemdata/tables/d22d79bc-1141-433e-be68-37699eda5a85",
"aic": null,
"query": null,
"usedBySearches": null,
"nestedSearch": false,
"state": "DRAFT",
"inUse": false,
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827"
},
"http://identifiers.emc.com/search-compositions": {
"href": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827/search-compositio
},
"http://identifiers.emc.com/all-components": {
"href": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827/all-comp
},
"http://identifiers.emc.com/export": {
"href": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827"
},
"http://identifiers.emc.com/update": {
"href": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827"
},
"http://identifiers.emc.com/copy": {
"href": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827/copy"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8765/systemdata/applications/7c297548-6eab-44fb-bf73-46368ea8a75e"
},
"http://identifiers.emc.com/schema": {
"href": "http://localhost:8765/systemdata/schemas/e4bfa77a-ea59-4b9e-b209-9ff3854bd68d"
},
"http://identifiers.emc.com/table": {
"href": "http://localhost:8765/systemdata/tables/d22d79bc-1141-433e-be68-37699eda5a85"
}
}
}

15.3.4 SIP Searches


Let’s say we’re looking for Searches associated with the PhoneCalls application,
which is a SIP application. To find the application, we have to use the same
response, which is received by issuing a GET on the relation link to the collection
of applications. This time, we process every item in the response array until we
meet application with name == PhoneCalls.

OpenText InfoArchive 21.2 Page 111 of 331


After the required application has been found, it is worth looking into its _links
element and find link relation http://identifiers.emc.com/searches, the same
relation name as Table searches. When we find our match, it is required to save
its href’s value – it will be a URI to collection of Searches. We’ll need to keep it
handy, as we’ll be creating a search by issuing POST on that URI.
In addition, we have to find a link relation http://identifiers.emc.com/aics that
contains href’s value as a URI to the collection of AICs, defined for the
application.
Keep these href values available for a while, as they will be used by us, when
creating Data Set for the SIP Search.
Let’s summarize a bit.
At this point, we have following links discovered:
- A URI to the collection of searches for the application that will be used for
issuing a POST for creating a search;
- A URI to the collection of AICs for the application that will be used to issue a
GET to find the href to the required item.

15.3.4.1 Finding the Reference to a Search’s Data Set


As we are considering a search for a SIP application type, then its data set
should be associated with AIC and Query references. Both resources are
mandatory for the search.
Let’s try to find a reference for the required single AIC object first. To retrieve an
AICs collection, we have to issue a GET to the URI for AICs (the URI was found
in the previous step).

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/14b5ffbe-e91b-
456c-8dc9-5134f7585887/aics
The response for that request contains an array of AICs. Assume that the array
contains a single element, which is named “PhoneCalls-aic”. What is required for
now is to find the self-link relation for that particular item, and save its value for a
while in notepad or any other desired text editor.
Now it is time to find a reference for a required single Query object.
NOTE: There are two roots from where a collection of Queries can be retrieved: application root
and AIC root. Both roots have the same link relation http://identifiers.emc.com/queries, which
contains the href’s value to the URI for the collection of Queries. It worth pointing out that all
Queries that exist in the system can be found from application root.

For defining the search, we need to retrieve and only select the Queries that are
bounded with a certain AIC. Otherwise, you may select an inappropriate Query
object for that given AIC, which will lead to from search configuration.

OpenText InfoArchive 21.2 Page 112 of 331


That is why we need to perform a GET on the URI from the selected AIC root
and find a relation for the collection of queries in order to take href’s value for
bounded queries for that AIC.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/aics/683b95c0-71f2-45f4-a031-
01747ab93f1c/queries
We’ll process the collection of queries, find a query of interest in the array, and,
for that query, find the self-link relation and its value, which is a direct URI to that
particular item. Keep track of this.
At the moment, we have two URIs for a single AIC and single Query that are
used when creating a search.

15.3.4.2 Creating a new SIP serach


We know the reference to our collection of searches, we know the reference to
both: AIC and Query (that we collected in the previous steps) and so, we are
ready to create our first search for a SIP application.
We’ll need to do POST to our collection of searches, and we’ll pass the search’s
attributes in a JSON payload.
To create a search for a SIP application, we need to set the following attributes:
name, description (optional), state (optional), reference to AIC and reference to
Query.

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -H 'Accept:
application/hal+json' -d '{"name":"mySipSearchSample","description":"my
description","aic":"http://localhost:8765/systemdata/aics/dbd3c486-9e61-4937-
8e03-9c824405b39d","query":"http://localhost:8765/systemdata/queries/ccc2af23-
e99f-4870-865f-84a7fbe16df6","state":"DRAFT"}'
localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-
5134f7585887/searches
The explanation of the POST is almost the same as for creating the search for a
TABLE application, except for the different payload object attributes.
Pay attention to the “state” attribute. It is an optional attribute and can be one of
the values: either “DRAFT” or “PUBLISHED”.
If the server responded with a status different from 201 HTTP, then there is an
issue with the POST request. For example, for the response message as below,
we have to analyze the request body, all the passed attributes and values in the
payload, check for quotas, brackets and so on.

OpenText InfoArchive 21.2 Page 113 of 331


{
"_errors" : [ {
"error" : "HttpMessage not readable.",
"errorCodes" : [ ],
"message" : "Problem reading the request body.",
"localizedMessage" : "Problem reading the request body."
} ],
"_links" : { }
}
In case of successful request, we should get back 201 Created response with the
JSON payload containing our newly created search resource, similar to the
example below:

OpenText InfoArchive 21.2 Page 114 of 331


{
"id" : "8d1711ba-a542-4351-b1ca-57c4144ed101",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-18T19:51:59.814+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-18T19:51:59.814+03:00",
"version" : 1,
"name" : "mySampleSearch",
"application" : "http://localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-5134f7585887",
"description" : "my description",
"searchGroup" : null,
"schema" : null,
"table" : null,
"aic" : "http://localhost:8765/systemdata/aics/dbd3c486-9e61-4937-8e03-9c824405b39d",
"query" : "http://localhost:8765/systemdata/queries/ccc2af23-e99f-4870-865f-84a7fbe16df6",
"usedBySearches" : null,
"nestedSearch" : false,
"state" : "DRAFT",
"inUse" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/searches/8d1711ba-a542-4351-b1ca-57c4144ed101"
},
"http://identifiers.emc.com/search-compositions" : {
"href" : "http://localhost:8765/systemdata/searches/8d1711ba-a542-4351-b1ca-57c4144ed101/search-compositions"
},
"http://identifiers.emc.com/all-components" : {
"href" : "http://localhost:8765/systemdata/searches/8d1711ba-a542-4351-b1ca-57c4144ed101/all-components"
},
"http://identifiers.emc.com/export" : {
"href" : "http://localhost:8765/systemdata/searches/8d1711ba-a542-4351-b1ca-57c4144ed101"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/searches/8d1711ba-a542-4351-b1ca-57c4144ed101"
},
"http://identifiers.emc.com/copy" : {
"href" : "http://localhost:8765/systemdata/searches/8d1711ba-a542-4351-b1ca-57c4144ed101/copy"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/searches/8d1711ba-a542-4351-b1ca-57c4144ed101"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-5134f7585887"
},
"http://identifiers.emc.com/aic" : {
"href" : "http://localhost:8765/systemdata/aics/dbd3c486-9e61-4937-8e03-9c824405b39d"
},
"http://identifiers.emc.com/query" : {
"href" : "http://localhost:8765/systemdata/queries/ccc2af23-e99f-4870-865f-84a7fbe16df6"
},
"http://identifiers.emc.com/ci" : {
"href" : "http://localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-5134f7585887/ci?cid="
}
}
}

15.3.5 Cross-application Searches


Cross application searches provide the ability to write a search that allows a set
of criteria to be mapped into delegate searches.

OpenText InfoArchive 21.2 Page 115 of 331


The cross-application search creation will use existing “simple” searches. We will
not focus on cross application creation in this documentation, to create one,
please refer to the UI documentation.
15.4 Search Components
15.4.1 Role/Permission to create search components

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

A search is a compound resource. It consists of an array of search-compositions.


Each search-composition (for both Table and SIP applications) consists of an
Xform, ResultMaster and, for table applications, an Xquery resource.
We’ll need to create these resources before we can execute search.
15.4.2 Creating a search composition resource
Search-composition is created by issuing a POST on the collection of search-
compositions, which are rooted at Search.
In response of newly the created search in a previous step, we’ll find the link
relation search-compositions (http://identifiers.emc.com/search-compositions).
We’ll send a POST to that location. To create a search-composition, a JSON
payload is straightforward, as at minimum requires name attribute only.

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'{"name":"mySearchComposition"}'
localhost:8765/systemdata/searches/4d2e0d9a-cff4-4fda-8d17-
e8a7472322a8/search-compositions
As long as the name is unique, that POST should be successful, and we should
get back a 201 Created response code and the payload should contain the newly
created search-composition resource.
Search-Composition contains 6 optional fields permitting to set quotas for SIP
searches:
- aipQueryQuota/ aipQueryQuotaAsync - maximum number of AIPs that can
be embraced for the synchronous and asynchronous search respectively;
- aiuQueryQuota/aiuQueryQuotaAsync - maximum number of AIUs that can
be embraced for the synchronous and asynchronous search respectively;
- dipQueryQuota/dipQueryQuotaAsync - maximum number of AIU returns by
the synchronous and asynchronous search respectively.

OpenText InfoArchive 21.2 Page 116 of 331


Note all the links rooted as this resource. You’ll notice that one of them is
execute – we’ll be using it later to execute our Search.
See example response below:
{
"id": "b33c09fd-f5b4-45bf-9a85-a01631299845",
"createdBy": "[email protected]",
"createdDate": "2017-03-10T10:11:55.596-05:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-10T10:11:55.596-05:00",
"version": 1,
"permission": null,
"name": "mySearchComposition",
"search": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827",
"customPresentationConfiguration": null,
"searchName": "mySampleSearch",
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-
a01631299845"
},
"http://identifiers.emc.com/search": {
"href": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827"
},
"http://identifiers.emc.com/execute": {
"href": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-
a01631299845"
},
"http://identifiers.emc.com/execute-async": {
"href": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-
a01631299845/async"
},
"http://identifiers.emc.com/copy": {
"href": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-
a01631299845/copy"
},
"http://identifiers.emc.com/all-components": {
"href": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-
a01631299845/all-components"
},
"http://identifiers.emc.com/xforms": {
"href": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-
a01631299845/xforms"
},
"http://identifiers.emc.com/result-masters": {
"href": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-
a01631299845/result-masters"
},
"http://identifiers.emc.com/schema": {
"href": "http://localhost:8765/systemdata/schemas/e4bfa77a-ea59-4b9e-b209-9ff3854bd68d"
},
"http://identifiers.emc.com/table": {
"href": "http://localhost:8765/systemdata/tables/d22d79bc-1141-433e-be68-37699eda5a85"
},
"http://identifiers.emc.com/xqueries": {
"href": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-
a01631299845/xqueries"
}
}
}

OpenText InfoArchive 21.2 Page 117 of 331


NOTE – we execute a search by doing a POST on the execute link relation found on
the search-composition resource.

We should process the _links node to get references to a number of collections,


depending on the application type:
- xqueries, xforms and result-masters – for Table applications.
- xforms and result-masters – for SIP applications
We’ll need those collection references to create Xquery, Xform and
ResultMaster resources, respectively.
Each request will be a POST.
Those subcomponents work in the following way:
• Xquery resource has a definition of query, which is an actual xQuery that
will be executed as part of search. It is actually only for Table applications.
• Xform has a form definition, which can be used by an application to
provide input from the user. In the case of TABLE based applications, all
xQuery variables needed to be resolved for search to work. This means
either a default is provided in the xquery or the xform will provide value for
the variables.. For a SIP application, the xForm provides a set of criteria,
operands and values that are used to generate the xQuery, which
represents the search during execution.
• Result-master is a nested structure of panels/tabs and columns. At the top
most level we have array of panels. Each panel has an array of tabs. Each
tab has an array of columns. This structure allows the client to create a UI
for the response – allowing the client to bind a column in the UI to the
column of search result. Using this model, the client can create a
sophisticated and dynamic UI showcasing search results.

15.4.3 Creating an xform resource


This step is similar to the previous step, except the xform has one attribute called
form.
Note – just like with xquery, here we create a dummy form. We provide example
of the form in the appendix.
We create a form issuing POST to collection of xforms:

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'{"form":"<myform></myform>”}' localhost:8765/systemdata/search-
compositions/a7852f89-4dbf-4350-8c18-ec707a08b56b/xforms
NOTE – just like with an xQuery, we do not focus on the xForm here. We will
show an example of a properly defined xForm in the appendix.

OpenText InfoArchive 21.2 Page 118 of 331


See example response below:
{
"id": "d654f2a0-4d1a-464b-9b82-30142f3d996f",
"createdBy": "[email protected]",
"createdDate": "2017-03-10T10:15:46.164-05:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-10T10:15:46.164-05:00",
"version": 1,
"name": null,
"application": null,
"form": "<myform></myform>",
"searchComposition": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-
a01631299845",
"search": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827",
"searchName": "mySampleSearch",
"compositionName": "mySearchComposition",
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/xforms/d654f2a0-4d1a-464b-9b82-30142f3d996f"
},
"http://identifiers.emc.com/search-composition": {
"href": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-
a01631299845"
},
"http://identifiers.emc.com/search": {
"href": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827"
}
}
}

15.4.4 Creating the result-master resource


Do a POST on a collection of result-masters. Again, for simplicity, we will focus
on how to create a result-master and not focus on the structure of that resource.
To make sure that you understand the example, you should remember that the
result-master resource contains a nested structure of panels/tabs and columns.
Therefore, the JSON payload to create the result-master is quite complex. See
below, where we create one panel that contains one tab with one column.

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d '{ "panels": [{
"name": "Main Panel", "title": "main panel title", "description": "panel
description", "tabs": [{ "name": "Default Tab", "title": "tab title", "description":
"tab description", "columns": [{ "name": "First Name" }] }] }] }'
localhost:8765/systemdata/search-compositions/a7852f89-4dbf-4350-8c18-
ec707a08b56b/result-masters
Again, if all went well, we should have received a 201 Created response with a
payload of our newly created result master resource.
See response below:

OpenText InfoArchive 21.2 Page 119 of 331


{
"id": "0a709a04-d9d0-4eea-8a46-8d57e2e2c61b",
"createdBy": "[email protected]",
"createdDate": "2017-03-10T10:17:07.364-05:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-10T10:17:07.364-05:00",
"version": 1,
"searchComposition": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-a01631299845",
"search": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827",
"panels": [{
"name": "Main Panel",
"title": "main panel title",
"description": "panel description",
"tabs": [{
"name": "Default Tab",
"title": "tab title",
"description": "tab description",
"columns": [{
"name": "First Name",
"label": null,
"cellLabel": null,
"xdbElementName": null,
"hidden": false,
"encrypt": false,
"masked": false,
"exportable": true,
"showIcon": false,
"rowIdentifier": false,
"dataType": null,
"type": null,
"order": 0,
"sortable": false,
"defaultSort": null,
"nestedSearch": null,
"url": null,
"parameterMapping": {},
"groupName": null,
"groupPath": null,
"path": null,
"mediaType": null,
"mediaTypeProvider": null,
"mediaTypeProviderName": null,
"viewer": null,
"printable": true,
"downloadable": true,
"_links": {},
"nestedSearchName": null
}],
"exportEnabled": false,
"createCollectionEnabled": false,
"exportConfigurations": null,
"customPresentationConfiguration": null,
"customPresentation": null,
"exportConfigs": null
}]
}],
"namespaces": [],
"searchName": "mySampleSearch",
"compositionName": "mySearchComposition",
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/result-masters/0a709a04-d9d0-4eea-8a46-8d57e2e2c61b"
},
"http://identifiers.emc.com/search-composition": {
"href": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-a01631299845"
},
"http://identifiers.emc.com/search": {
"href": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827"
}
}

OpenText InfoArchive 21.2 Page 120 of 331


15.4.5 Creating the search mapping resource
The search mapping is required for cross-application searches.
This resource should be created either through DC or the UI.
15.4.6 Table search specific resources
Some resources are required for TABLE applications, but not required for SIP
applications. This chapter covers TABLE resources.

15.4.6.1 Creating a XQuery resource


Xquery has the only query attribute which is a string, and represent xQuery that
is executed when we run search.
Perhaps this is all starting to come together - you can see that if we create our
Xquery resource, that object has a reference to a search-composition (parent),
which, in turn, has a reference to a search (parent), which, in turn, is associated
with a schema and/or table. All of these elements are needed for a proper search
execution. This way we know what to execute and where.
Here we don’t really pass an actual xQuery value that makes sense, or is
syntactically correct. This is all to focus on how we create xquery resource – and
not to be sidetracked by actual xQuery definition. For your search to work, you’ll
have to make sure that the query attribute contains the proper xQuery definition,
corresponding to the schema/table the search will be executed on. If you have
your own working xQuery, you can use that xQuery in the curl example below. If
not, we provide an example of an xQuery in Appendix 0.

TIP – since the curl tool is a command line interface, we have to make sure that it is
parsed correctly. For example, parameters can’t contain new line characters because it
will prevent curl from working as expected. You’ll have to remove new lines and any
other special formatting characters that my not work in the command line tool. Typically,
this boils down to removing line breaks.

In the previous step, we obtained the reference to the collection of xqueries. We


can use that reference to create the xquery resource. See the example below:

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d '{"query":"define
blah blah blah"}' localhost:8765/systemdata/search-compositions/a7852f89-4dbf-
4350-8c18-ec707a08b56b/xqueries
If successful, the response should be a 201 Created and newly created xquery
resource will be in the JSON payload. See example below:

OpenText InfoArchive 21.2 Page 121 of 331


{
"id": "42d9949f-438b-4b6a-b4c1-e6ba0d86c593",
"createdBy": "[email protected]",
"createdDate": "2017-03-10T10:13:48.711-05:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-10T10:13:48.711-05:00",
"version": 1,
"name": null,
"application": null,
"query": "define blah blah blah;",
"searchComposition": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-
a01631299845",
"search": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827",
"moduleNamespaces": null,
"searchName": "mySampleSearch",
"compositionName": "mySearchComposition",
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/xqueries/42d9949f-438b-4b6a-b4c1-e6ba0d86c593"
},
"http://identifiers.emc.com/search-composition": {
"href": "http://localhost:8765/systemdata/search-compositions/b33c09fd-f5b4-45bf-9a85-
a01631299845"
},
"http://identifiers.emc.com/search": {
"href": "http://localhost:8765/systemdata/searches/3f0bc8d4-c3aa-4913-b37a-2eff7f196827"
}
}
}

15.4.7 SIP Search-Specific resources


Some resources are required for SIP application searches, and are used as a
reference by the URI when creating a search. They are AIC and Query.
These resources should be pre-created in the application before going to issue a
new POST request to the search URI. This chapter covers the way SIP
resources are created.
SIP applications are more complex than Table applications. Below is the
structure of the REST (limited with more important resources for that part of
guide) for SIP based applications.

OpenText InfoArchive 21.2 Page 122 of 331


15.4.7.1 Creating an AIC Resource
The AIC resource contains references to Holdings. There can be single
reference, or the AIC may refer to several holdings at once, in the case of cross-
holding-search. So, in order to create an AIC resource, you must obtain the URI
to at least one holding.
The holding objects are rooted from the application level. At first, we need to take
the application URI and take the href’s value (URI) for the link relation
http://identifiers.emc.com/holdings. Then we issue a GET request to that URI to
obtain a list of defined Holdings for an application.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/14b5ffbe-e91b-
456c-8dc9-5134f7585887/holdings
As before, we need to look over the connection of holdings until we find the
required items. For every holding that needs to be referred to by the search, we
need to take an href’s value for a self-link and save the found URIs for a while.
An AIC object does not have any more mandatory references, but has a quite
complicated list of attributes, such as: “criterias” and “predicates”. Both are
collections.
We are not focused here on the way how to create a powerful AIC. We would like
to show the minimum required payload to create a dummy AIC. In the example
below, the payload contains three attributes: holding reference, criteria array with
a single element and an empty predicate list.
Starting from here, we can prepare a payload for creating an AIC and issue a
POST request. In previous chapters, we have already shown the way to obtain a
URI for http://identifiers.emc.com/aics. Now, the goal is to issue POST to that
URI.

OpenText InfoArchive 21.2 Page 123 of 331


curl -X POST -H 'Content-Type: application/hal+json' -H 'Authorization: Bearer
eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d '{"name": "myAic",
"criterias": [ { "name": "myCriteria", "label": "My Criteria", "type": "STRING",
"indexed": "false" } ], "holdings": [
"http://localhost:8765/systemdata/holdings/a8e8f037-d9df-4056-8c53-
aa9162196c4a" ], "predicate": "" }'
localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-
5134f7585887/aics
On a successful response, we should receive a 201 Created and a newly created
AIC resource will be in the JSON payload. See example below:
{
"id" : "3c5d0d8e-b5a1-475c-b1d5-1c47a9bfb84b",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-18T23:24:32.333+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-18T23:24:32.333+03:00",
"version" : 1,
"name" : "myAIC",
"application" : "http://localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-5134f7585887",
"criterias" : [ {
"name" : "myCriteria",
"label" : "My Criteria",
"type" : "STRING",
"pKeyMinAttr" : null,
"pKeyMaxAttr" : null,
"pKeyValuesAttr" : null,
"indexed" : false
} ],
"holdings" : [ "http://localhost:8765/systemdata/holdings/a8e8f037-d9df-4056-8c53-aa9162196c4a" ],
"predicate" : "",
"pdiCryptoQueryGroup" : null,
"pdiCryptoAccessGroup" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/aics/3c5d0d8e-b5a1-475c-b1d5-1c47a9bfb84b"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/aics/3c5d0d8e-b5a1-475c-b1d5-1c47a9bfb84b"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/aics/3c5d0d8e-b5a1-475c-b1d5-1c47a9bfb84b"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-5134f7585887"
},
"http://identifiers.emc.com/queries" : {
"href" : "http://localhost:8765/systemdata/aics/3c5d0d8e-b5a1-475c-b1d5-1c47a9bfb84b/queries"
},
"http://identifiers.emc.com/holdings" : {
"href" : "http://localhost:8765/systemdata/aics/3c5d0d8e-b5a1-475c-b1d5-1c47a9bfb84b/holdings"
}
}
}
We need to save the URI to that AIC object, as it will be used when creating the

OpenText InfoArchive 21.2 Page 124 of 331


Query object. The URI can be found in the usual place – href’s value for the self-
link.

15.4.7.2 Creating a Query-Quota Resource


As of 21.2, the Query-Quota resource is deprecated and will be removed in
future release. The Quota now should be set on the Search Composition
resource.

15.4.7.3 Creating Query Resource


The last resource to be created in order to be ready for issuing a POST for
searches is the Query resource. Issuing the POST request should be sent to
Queries URI from the application root.
We need to figure out the URI to the collection of queries from the application
root. It can be done the same way as described in chapter 0, but for application.
We need to:
- find a http://identifiers.emc.com/queries link relation from the application root;
- look for the href’s value to figure out the URI for the queries collection.
What we are going to do is to issue a POST request to the URI for Queries. First,
we have to understand which attributes should be defined for the payload for
POST.
Upon close inspection of the Query object, we will see:
- name – the name of the object;
- aics – it is a collection of references for AICs objects. Single Query can refer
to a non-empty list of AICs;
- resultSchema – it is URN of the schema in which the query results are
returned (in XML);
- xdbPdiConfigs – complex structure of the search configuration;
- namespaces – optional, it is a collection of namespaces used by search;
- resultRootElement –optional, it is a name of the root element to be parent for
all found AIUs during the search;
- order – optional, the reference for a single order item, which is a
configuration object for background search.
NOTE: Query is a complex object. The REST Development guide is not going to cover all the
required attributes and its structure. For more information about required and optional attributes,
their meanings, you can read in the User guide, which covers object configuration

At this point, we have preserved:


URI to AIC, that will be used in “aics” attributeThe rest values let’s take from
Sample PhoneCalls application.
Let’s create our payload by issuing the POST for a query, as in the example
below.

OpenText InfoArchive 21.2 Page 125 of 331


curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer
eyJhbGciOiJIUzI1NiJ9..’ –H 'Accept: application/hal+json' -d
'{"name":"MyNewQuery","aics":["http://localhost:8765/systemdata/aics/3c5d0d8e
-b5a1-475c-b1d5-
1c47a9bfb84b"],"quota":"http://localhost:8765/systemdata/query-
quotas/39f4e576-1e95-431f-9d96-
835ac1d1ef8f","quotaAsync":"http://localhost:8765/systemdata/query-
quotas/39f4e576-1e95-431f-9d96-835ac1d1ef8f","namespaces":[{"uri":"urn:eas-
samples:en:xsd:phonecalls.1.0","prefix":"n"}],"xdbPdiConfigs":[{"orderBy":[],"o
perands":[{"name":"myCriteria","path":"n:CallStartDate","type":"STRING","ind
ex":false}],"schema":"urn:eas-
samples:en:xsd:phonecalls.1.0","entityPath":"/n:Calls/n:Call"}],"resultSchema":"
urn:eas-
samples:en:xsd:phonecalls.1.0","resultRootElement":"result","resultRootNsEnabl
ed":false} ' localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-
5134f7585887/queries
In case of error, you can access the rest_warnings.log and figure out the root
cause of the issue but, in case of a successful request, you should see 201
Created HTTP status with response body payload, as follows:

OpenText InfoArchive 21.2 Page 126 of 331


{
"id" : "dec3b2ba-eb4b-47cb-b9c1-b94772d11267",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-20T10:49:56.442+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-20T10:49:56.442+03:00",
"version" : 1,
"name" : "MyNewQuery",
"application" : "http://localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-5134f7585887",
"aics" : [ "http://localhost:8765/systemdata/aics/3c5d0d8e-b5a1-475c-b1d5-1c47a9bfb84b" ],
"quota" : "http://localhost:8765/systemdata/query-quotas/39f4e576-1e95-431f-9d96-835ac1d1ef8f",
"quotaAsync" : "http://localhost:8765/systemdata/query-quotas/39f4e576-1e95-431f-9d96-835ac1d1ef8f",
"order" : null,
"namespaces" : [ {
"uri" : "urn:eas-samples:en:xsd:phonecalls.1.0",
"prefix" : "n"
} ],
"prolog" : null,
"xdbPdiConfigs" : [ {
"orderBy" : [ ],
"operands" : [ {
"name" : "myCriteria",
"path" : "n:CallStartDate",
"type" : "STRING",
"index" : false
} ],
"schema" : "urn:eas-samples:en:xsd:phonecalls.1.0",
"entityPath" : "/n:Calls/n:Call",
"template" : "return $aiu"
} ],
"resultSchema" : "urn:eas-samples:en:xsd:phonecalls.1.0",
"resultRootElement" : "result",
"resultRootNsEnabled" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/queries/dec3b2ba-eb4b-47cb-b9c1-b94772d11267"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/queries/dec3b2ba-eb4b-47cb-b9c1-b94772d11267"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/queries/dec3b2ba-eb4b-47cb-b9c1-b94772d11267"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-5134f7585887"
},
"http://identifiers.emc.com/query-quota" : {
"href" : "http://localhost:8765/systemdata/query-quotas/39f4e576-1e95-431f-9d96-835ac1d1ef8f"
},
"http://identifiers.emc.com/query-quota-async" : {
"href" : "http://localhost:8765/systemdata/query-quotas/39f4e576-1e95-431f-9d96-835ac1d1ef8f"
},
"http://identifiers.emc.com/result-configuration-helpers" : {
"href" : "http://localhost:8765/systemdata/queries/dec3b2ba-eb4b-47cb-b9c1-b94772d11267/result-configuration-helpers"
},
"http://identifiers.emc.com/aics" : {
"href" : "http://localhost:8765/systemdata/queries/dec3b2ba-eb4b-47cb-b9c1-b94772d11267/aics"
}
}
}

OpenText InfoArchive 21.2 Page 127 of 331


15.4.8 Exporting/Deleting/Importing Searches
The above chapter covers the manual way to create search artifacts, issuing
POST requests to create every resource and then a whole search. As you can
see this way of moving is quite complex and involves huge efforts to create every
search artifact. Manual creating of search-compositions, xForm and
ResultMaster are error prone processes.
We recommend that you create Searches with the InfoArchive web application,
which has a flexible graphical editor for xForm and result masters. It also does
not allow creating invalid resources.
In other words, it is supposed that the user will create a search with the UI, then
export it into ZIP archive, which contains all the required resources with the set-
up values for attributes. And, after that, the ZIP archive can be shared with all the
InfoArchive users to import them back to application.
Creating AIC and Query objects are still required manual efforts.

15.4.8.1 Exporting a Search


At first, you should issue a GET request on a collection of searches for an
application. The way to do this is shown in the previous chapter.
When you obtain a list of searches, then you need to find the required search
that you want to export into ZIP archive. For the required search, you have to find
a http://identifiers.emc.com/configuration link relation, and take its href’s value
(URI). That URI is used to issue a GET request for exporting.
The difference here from previous GET requests is that we can set up “Accept”
header with “application/zip” type. And, as a REST response provides byte
stream response in the response body, then we need to redirect the output to the
file. Let’s say it will be “MyExportedSearch.zip”:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/zip’ localhost:8765/systemdata/searches/f4dfbaf6-06ff-42c3-a897-
7abe975912ae > MyExportedSearch.zip
In case of a successful request, then you should see the following response
corresponding to 200 HTTP status.

% Total % Received % Xferd Average Speed Time Time Time Current


Dload Upload Total Spent Left Speed
100 3652 100 3652 0 0 1236 0 0:00:02 0:00:02 --:--:-- 1243
Keep track of where you exported the search as we are going now to import it
back to the UI.

OpenText InfoArchive 21.2 Page 128 of 331


15.4.8.2 Deleting a Search
Before importing the “MyExportedSearch.zip” back, let’s issue a DELETE request
for the exported search and remove the existing one.
To remove the search, we need to find a URI (href’s value) for the search related
to the http://identifiers.emc.com/delete relation link and issue a DELETE request.
The example is below.

curl -X DELETE -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json’ localhost:8765/systemdata/searches/f4dfbaf6-06ff-42c3-
a897-7abe975912ae
In case of a successful response, you should obtain a 204 HTTP response
(NO_CONTENT).

15.4.8.3 Importing a Search


Now we are ready to import a search back. For doing this, we need to first issue
a GET request on the collection of searches from the application root (we did it
several times in the previous chapters). And find a link relation
http://identifiers.emc.com/import for a collection of searches. At this point, as
usual, we need to take an href’s value (URI) for that link.
The found URI is used to issue a POST request in order to import a search. We
also need to set up “-F” parameter to specify a “form-data” and pass after it a
“file” parameter with imported file name. In the below example the file is located
at the same place where curl is executed.

curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept:


application/json’ -H ‘Accept: multipart/form-data’ -F
[email protected]’ localhost:8765/systemdata/applications/14b5ffbe-
e91b-456c-8dc9-5134f7585887/import
In case of a successful request, you should see the JSON representation of the
created search.

OpenText InfoArchive 21.2 Page 129 of 331


{
"id" : "6abfe723-1199-42a4-ac54-b3f9be4db553",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-20T13:17:14.568+03:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-20T13:17:14.568+03:00",
"version" : 1,
"name" : "TextFieldFirstName",
"application" : "http://localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-5134f7585887",
"description" : null,
"searchGroup" : null,
"schema" : null,
"table" : null,
"aic" : "http://localhost:8765/systemdata/aics/dbd3c486-9e61-4937-8e03-9c824405b39d",
"query" : "http://localhost:8765/systemdata/queries/ccc2af23-e99f-4870-865f-84a7fbe16df6",
"usedBySearches" : null,
"nestedSearch" : false,
"state" : "DRAFT",
"inUse" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/searches/6abfe723-1199-42a4-ac54-b3f9be4db553"
},
"http://identifiers.emc.com/search-compositions" : {
"href" : "http://localhost:8765/systemdata/searches/6abfe723-1199-42a4-ac54-b3f9be4db553/search-compositions"
},
"http://identifiers.emc.com/all-components" : {
"href" : "http://localhost:8765/systemdata/searches/6abfe723-1199-42a4-ac54-b3f9be4db553/all-components"
},
"http://identifiers.emc.com/export" : {
"href" : "http://localhost:8765/systemdata/searches/6abfe723-1199-42a4-ac54-b3f9be4db553"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/searches/6abfe723-1199-42a4-ac54-b3f9be4db553"
},
"http://identifiers.emc.com/copy" : {
"href" : "http://localhost:8765/systemdata/searches/6abfe723-1199-42a4-ac54-b3f9be4db553/copy"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/searches/6abfe723-1199-42a4-ac54-b3f9be4db553"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-5134f7585887"
},
"http://identifiers.emc.com/aic" : {
"href" : "http://localhost:8765/systemdata/aics/dbd3c486-9e61-4937-8e03-9c824405b39d"
},
"http://identifiers.emc.com/query" : {
"href" : "http://localhost:8765/systemdata/queries/ccc2af23-e99f-4870-865f-84a7fbe16df6"
},
"http://identifiers.emc.com/ci" : {
"href" : "http://localhost:8765/systemdata/applications/14b5ffbe-e91b-456c-8dc9-5134f7585887/ci?cid="
}
}
}
In case you wrongly deleted the search in the previous step, you will see the
DUPLICATE KEY error, which means the search with the given name already
exists:

OpenText InfoArchive 21.2 Page 130 of 331


{
"_errors" : [ {
"error" : "DUPLICATE_KEY",
"errorCodes" : null,
"message" : "Search name: MyExportedSearch already exists",
"localizedMessage" : "Search name: MyExportedSearch already exists"
} ],
"_links" : {
"http://identifiers.emc.com/search" : {
"href" : "http://localhost:8765/systemdata/searches/660981ab-2000-4381-934f-1db67dc520d6",
"templated" : false
}
}
}
At this point, we have covered almost all aspects of search creation, search data
set creation and export/import of searches, so we can start looking into search
execution.
15.5 Executing a Synchronous Search
15.5.1 Roles/Permission for Search Execution

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

OpenText InfoArchive 21.2 Page 131 of 331


15.5.2 Search Execution
In previous steps, we created all ingredients necessary to execute a search.
Now, we are ready to execute a search.
If you recall, for simplicity, we created an xquery resource with not valid xQuery
(query element of that resource is not syntactically valid xQuery), as we just
passed some dummy value. Even though this is technically not the best way to
create an xquery resource, there is one benefit – we’ll try to execute our search
to see how error handling works 
Since we’ll need a proper xQuery to do our search, we’ll update it now and set it
to the proper value.
If you recall in section 0, we created a search-composition resource and we had
received, in response, links, including a link relation execute
(http://identifiers.emc.com/execute) – we’ll need that link relation to execute our
search.
The execution of the search is through a POST on the search-composition’s
execute link relation. Since search uses an xForm as a means of rendering the
UI for collecting user’s input, our request ContentType header needs to be set to
application/xml and the payload will be XML (flattened to a string).
The other thing worth noting is that searches may take a long time to execute.
Sometimes, too long for the client to wait, as this is a synchronous call (we’ll look
at the asynchronous way to execute search later). There is a default time out,
configurable (in the server’s application.yml file –
rest.search.defaultTimeOutMs) set OOTB to 8 seconds (its value is in
milliseconds, so technically it is set to 8000ms). What that means is that, if a
search takes longer than the default 8 seconds, it will be internally interrupted
and will return an error. To override the default time out, we can pass timeout
URI query parameter to our request to set it to some other value, if client can wait
a bit longer. During testing, it is a good idea to extend the default time out to
properly tune your searches (otherwise they may be timing out on you).
Payload should be enclosed in <data></data> XML nodes. So, you’ll see that in
the example below, in which we set search the input value to birthYear 2013-01-
01.
As you can see we also set the time out to 300 seconds, which is probably
excessive.
Let’s try to execute this now.

OpenText InfoArchive 21.2 Page 132 of 331


curl -X POST -H 'Content-Type: application/xml' -H 'Authorization: Bearer
eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'<data><birthYear>2013-01-01</birthYear></data>'
localhost:8765/systemdata/search-compositions/eac888b4-325f-4595-9e5f-
bb532b8be504?timeOut=300000
Since our xQuery is a dummy substitute for now, we’ll get the error, similar to the
one below:

{
"_errors": [{
"error": "XQuery",
"errorCodes": [],
"message": "Search failed create XQuery, please check XQuery for possible
issues: query:1:6:XQUERY_PARSE_ERROR: no viable alternative at input 'blah' (NCName)
(XPST0003)",
"localizedMessage": "Search failed create XQuery, please check XQuery for
possible issues: query:1:6:XQUERY_PARSE_ERROR: no viable alternative at input 'blah'
(NCName) (XPST0003)"
}],
"_links": {}
}

Luckily for us, the error is fairly descriptive and points to the issues with parsing
our dummy xQuery. Let’s fix it now.

15.5.3 Getting to Know PUT


PUT is how in REST APIs we typically update our resources. So, as you’d
expect, we’ll have to issue a PUT request for our Xquery resource and update
the query attribute.
A PUT requires full resource to be passed in the payload but, in practice, we just
need to pass all non-system attributes. You can pass the entire resource,
including system attributes, but keep in mind that system attributes values will
simply be ignored.
So, let’s first issue a GET request for our Xquery resource to make sure we know
how to build our JSON payload for PUT.
If you don’t have reference to Xquery resource handy, do a GET on the search,
then do a GET on the search-composition and find link to the xquery resource
there. Once you have it, do a GET just like we do it below:

OpenText InfoArchive 21.2 Page 133 of 331


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:
application/hal+json' localhost:8765/systemdata/xqueries/7a35a0e1-ad5f-4a68-
824d-5502e74759ec
We should get back an Xquery resource similar to the one below:
{
"id": "7a35a0e1-ad5f-4a68-824d-5502e74759ec",
"createdBy": null,
"createdDate": null,
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-03T10:23:22.99-05:00",
"version": 3,
"name": null,
"application": null,
"query": "blah blah",
"searchComposition": "http://localhost:8765/systemdata/search-compositions/eac888b4-325f-4595-9e5f-
bb532b8be504",
"search": "http://localhost:8765/systemdata/searches/7435da19-aa2c-4bdf-bd1d-09edccca2a05",
"moduleNamespaces": null,
"searchName": "test",
"compositionName": "Decrypted First Name",
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/xqueries/7a35a0e1-ad5f-4a68-824d-
5502e74759ec"
},
"http://identifiers.emc.com/search-composition": {
"href": "http://localhost:8765/systemdata/search-compositions/eac888b4-325f-4595-9e5f-
bb532b8be504"
},
"http://identifiers.emc.com/search": {
"href": "http://localhost:8765/systemdata/searches/7435da19-aa2c-4bdf-bd1d-
09edccca2a05"
}
}
}
To create payload for PUT, you can ignore HAL links, and provide all other
attributes. If you want to strip system attributes (in this case: id, createdBy,
createdDate, lastModifiedBy and lastModifiedDate) that’s fine as well. Be sure to
set the ETAG header.
Note – so far we’ve been using curl as it is a really great tool for interacting with
REST APIs. But we can use any REST client, and, in fact, some clients are
easier to use than curl, especially for some cases. One of those cases is passing
long payloads. In fact, updating Xquery resource is an example where the
payload becomes really messy – we’ll have to remove all the line breaks; we’ll
have to escape JSON quotes, etc. It can be done, but if you have access to
InfoArchive Web Application you can update Xquery resource much easier there
– it has entire UI section dedicated to Search Composition so copying, pasting
and updating xQuery is a lot easier there. I recommend using that tool for this

OpenText InfoArchive 21.2 Page 134 of 331


type of functionality. Nevertheless, we’ll show you that it can be done using curl
as well, just to be consistent with other examples.
Keep in mind that the search is executing against actual, live data in the system.
That means that you’ll have to adjust the xQuery to your data in the system.
Here is how our update through curl would look like:

curl -X PUT -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d '{"version": 3, "query": "declare
namespace ia = \"urn:x-emc:ia:schema:fn\";\ndeclare namespace table=\"urn:x-
emc:ia:schema:table\";\n\ndeclare function ia:create-encrypted-condition($expressionStr as
xs:string, $operator as xs:string, $columnValue as xs:string*) as xs:string external;\ndeclare
function ia:decrypt-value($columnValue as xs:string*) as xs:string* external; \n\ndeclare
variable $page external;\ndeclare variable $size external;\n\ndeclare variable $firstName
external := \"\";\ndeclare variable $lastName external := \"\";\ndeclare variable $sortDirection
external := \"ascending\";\ndeclare variable $columnName external :=
\"NAMEFIRST\";\n\ndeclare function local:getResultsPage($rows, $page, $size) {\n let $offset
:= $page * $size\n let $total := count($rows)\n return <results total=\"{ $total }\"> {\n for
$row in subsequence($rows, $offset + 1, $size)\n return $row\n } </results>\n};\n\ndeclare
function local:addClause($whereClause as xs:string, $var as xs:string*, $expr as xs:string) as
xs:string\n{\nif (empty($var) or $var = \"\")\nthen $whereClause\nelse if ($whereClause = \"\")
then $expr else concat($whereClause, \" and \", $expr)\n};\n\n\nlet $whereClause :=
local:addClause(\"\", $firstName, ia:create-encrypted-condition(\"$elem/NAMEFIRST\", \"=\",
$firstName))\nlet $whereClause := local:addClause($whereClause, $lastName,
concat(\"$elem/NAMELAST = &apos;\", $lastName, \"&apos;\"))\nlet $whereClause := if
($whereClause != \"\") then concat(\"where \", $whereClause) else $whereClause\n\nlet $query-
str := concat(\"for $elem in /BASEBALL/MASTER/ROW \", $whereClause, \" return
$elem\")\n\nlet $main-query := xhive:evaluate($query-str)\n\nlet $rows := \n for $elem in
$main-query\n\n let $fname := ia:decrypt-value($elem/NAMEFIRST/text()) \n let $lname :=
$elem/NAMELAST/text()\n let $bmonth := $elem/BIRTHMONTH/text()\n let $bday :=
$elem/BIRTHDAY/text()\n let $height := $elem/HEIGHT/text()\n let $weight :=
$elem/WEIGHT/text()\n let $debut := $elem/DEBUT/text()\n let $finalGame :=
$elem/FINALGAME/text()\n \n (: do additional check on the decrypted value because we only
checked the @hashed_value in the $query-str :)\n where empty($firstName) or $firstName=\"\"
or $fname = $firstName\n\n return\n <row id=\"{string($elem/@table:id)}\">\n <column
name=\"lastName\">{ $lname }</column>\n <column name=\"firstName\">{ $fname
}</column>\n <column name=\"birthYear\">{ $elem/BIRTHYEAR/text() }</column>\n
<column name=\"birthMonth\">{ $bmonth }</column>\n <column name=\"birthDay\">{
$bday }</column>\n <column name=\"height\">{ $height }</column>\n <column
name=\"weight\">{ $weight }</column>\n <column name=\"debut\">{ $debut
}</column>\n <column name=\"finalGame\">{ $finalGame }</column>\n
</row>\n\n\nreturn local:getResultsPage($rows, $page, $size)", "searchComposition":
"http://localhost:8765/systemdata/search-compositions/eac888b4-325f-4595-9e5f-
bb532b8be504", "search": "http://localhost:8765/systemdata/searches/7435da19-aa2c-4bdf-
bd1d-09edccca2a05" }' localhost:8765/systemdata/xqueries/7a35a0e1-ad5f-4a68-824d-
5502e74759ec

OpenText InfoArchive 21.2 Page 135 of 331


Yes, very messy indeed. Most xQueries can be rather complicated so this is the
main reason why this update is so big, but works nevertheless.
15.5.4 Getting Back to Search Execution
Now, since we fixed our xQuery, we can try to re-execute our search.
We’ll reuse the curl command we already tried before (which failed due to
xQuery issues):

curl -X POST -H 'Content-Type: application/xml' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'<data><birthYear>2013-01-01</birthYear></data>'
localhost:8765/systemdata/search-compositions/eac888b4-325f-4595-9e5f-
bb532b8be504
If your data sample is big enough, and your xQuery is broad enough, you may
encounter a time out issue. If you notice above, we didn’t try to override default
time out so a default time out of 8 seconds took place (my search with my data
sample returns 18,000 items so it take a bit longer than 8 seconds, on average)
and we were able to trigger time out. Here is what the error response with time
out looks like:
{
"_errors": [{
"error": "SEARCH_TIMEOUT",
"errorCodes": null,
"message": "The search takes too long to execute : test",
"localizedMessage": "The search takes too long to execute : test"
}],
"_links": {
"http://identifiers.emc.com/execute-async": {
"href": "http://localhost:8765/systemdata/search-compositions/eac888b4-325f-4595-9e5f-
bb532b8be504/async",
"templated": false
},
"self": {
"href": "http://localhost:8765/systemdata/search-compositions/eac888b4-325f-4595-9e5f-
bb532b8be504?timeOut=8000",
"templated": false
}
}
}
Let’s fix this by appending timeOut URI query parameter, like this:

OpenText InfoArchive 21.2 Page 136 of 331


curl -X POST -H 'Content-Type: application/xml' -H 'Authorization: Bearer
eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'<data><birthYear>2013-01-01</birthYear></data>'
localhost:8765/systemdata/search-compositions/eac888b4-325f-4595-9e5f-
bb532b8be504?timeOut=300000
Note – my xQuery expects birthYear parameter so we set it in the payload
above within the data XML element. If xQuery expects multiple parameters they
all should be included between data XML node like this:
<data><birthYear>2013-01-
01</birthYear><birthMonth>July</birthMonth></data>
Depending on the xQuery and your data size, this should take a bit of time and
eventually should return. The response JSON is a collection, so you’ll get first
page of the results back. By default, collections are paginated using 10 elements
per page (this is again configurable in server’s application.yml file –
rest.collections section). Your response will contain the results JSON element
in _embedded node. It will be an array of rows, each consisting of array of
columns. Each column will have a set of attributes that will depend on the
xQuery itself.
The results collection will also contain, just like all collections, quick links to first,
last, next and prev pages, if applicable. The Page JSON element will contain
details on the size of paging, totalElements will be set to the number of rows our
query returns (all together), totalPages will specify how many pages all results
span across and number will tell us which page we are on currently (it is zero-
indexed).
For Sip searches that exceed the dipQueryQuota, the Partial JSON element will
be set to “True” which indicate the results doesn’t contain all the elements
corresponding to the search criteria because quota was applied.
Here is an example of the response returned:

OpenText InfoArchive 21.2 Page 137 of 331


{
"_embedded": {
"results": [{
"rows": [{
"columns": [{
"name": "lastName",
"value": "Aardsma",
"rows": null
}, {
"name": "firstName",
"value": "2cIKhlfRgyVYynAvi2snWA==",
"rows": null
}, {
"name": "birthState",
"value": "CO",
"rows": null
}, {
"name": "birthCountry",
"value": "USA",
"rows": null
}],
"id": "703e6776-f071-4ff2-8220-aa47b4fa578b:row:4ed79251-584f-46d9-8b2f-
4afd495f6919"
}],
"totalElements": 1,
"executionTime": 141,
"empty": false
"partial": false
}]
},
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/search-compositions/da1cf6cd-bab3-49f3-b870-
25c555336cc8/search-results/c73c9e7e-4a90-409a-a3b1-ee433c1357f2"
},
"http://identifiers.emc.com/export": {
"href": "http://localhost:8765/systemdata/search-compositions/da1cf6cd-bab3-49f3-b870-
25c555336cc8/search-results/c73c9e7e-4a90-409a-a3b1-ee433c1357f2/export"
}
},
"page": {
"size": 10,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}

15.6 Search Results


As we can see in the previous section, when executing search, we are getting
search results. Those are returned with the payload to the original request. But
we’re also getting a link to SearchResult resource which is a temporary cache
where our results are stored for improved performance when paging.

OpenText InfoArchive 21.2 Page 138 of 331


The primary difference here is in performance and can be easily visualized when
paging comes into picture. If you wanted to execute a search and render only
one page (i.e. 1st page) of results, but search returned very large number of
results, you’d be adding extra overhead when processing entire results set (i.e.
large payload of response, etc.). And if you only get 1st page of results, trying to
get to next page would force you to re-execute the search (again – performance
penalty).
This is where SearchResults come into play. Even though you execute search by
doing POST on SearchComposition resource, you’ll notice that in response all
links, including “self” link relation, point to SearchResult resource. That includes
“first”, “last”, “next”, “prev” – all paging related links.
And because the HTTP operation on SearchResults resource is GET, you don’t
even need to provide payload for your request, since the results are obtained
directly from the cache.
Here is the comparison of the two approaches:
POST on SearchComposition:

curl -X POST -H 'Content-Type: application/xml' -H 'Authorization: Bearer


_AaiQ…' -H 'Accept: application/hal+json' -d
'<data><firstName></firstName><lastName>Miller</lastName></data>'
localhost:8765/systemdata/search-compositions/e7b39f2e-a356-4887-885c-
7d0ce4e467e2?timeOut=300000
And GET on SearchResults:

curl -H 'Authorization: Bearer _AaiQ…' -H 'Accept: application/hal+json'


localhost:8765/systemdata/search-results/8bc22a12-b9fb-43f0-8d89-
c6f0172e1657?page=1
Executing GET on that link allows us to retrieve page of results directly from
cache rather than re-executing search.
15.7 SIP Search and AIU ID
Since 16.3 release SIP Searches and SearchResults have one more optional
property, namely “id” for the AIU. For SIP Search that is created to include that
property in the results, each column will contain a link, with relation
“identifiers.emc.com/id” that for value will have URI pointing directly to the AIU as
you can see in the snippet below:

OpenText InfoArchive 21.2 Page 139 of 331


Client can use that value to fetch the details of that AIU by following that URI.
Note that the HTTP method for that is POST. The response would be similar to
this:

OpenText InfoArchive 21.2 Page 140 of 331


OpenText InfoArchive 21.2 Page 141 of 331
15.8 Asynchronous Search
15.8.1 Roles/Permission

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

15.8.2 Asynchronous Search Execution

The alternative way is to execute search is to do it in asynchronous fashion. The


difference here is that if we execute search in synchronous fashion, that call will
block until results are returned to the caller. However, when choosing an
asynchronous search execution, we’ll be creating an order-item resource and it
will be returned as a response. The actual search is then scheduled and is going
to be executed at some point in the future.

OpenText InfoArchive 21.2 Page 142 of 331


15.8.3 Executing an Asynchronous Search
If you recall from the section on synchronous search, we need to execute a link
relation to search in synchronous mode. There is another link relation, execute-
async, for running searches in the background. We use it in a similar fashion.
Here is an example:

curl -X POST -H 'Content-Type: application/xml' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'<data><birthYear>2013-01-01</birthYear></data>'
localhost:8765/systemdata/search-compositions/da1cf6cd-bab3-49f3-b870-
25c555336cc8/async?name=myBackgroundSearch
As you can see, this is the same payload, but since we’re using different link
relation the end point is different as well. In addition to a different end point (the
URI), we also pass the URI query parameter name – this could be anything – it’s
an opportunity for us to add some custom name to our order-item resource. The
response is to our call comes back immediately and looks like this:

OpenText InfoArchive 21.2 Page 143 of 331


{
"id": "2511237a-144a-407f-957b-3d92d7d4cea8",
"createdBy": "[email protected]",
"createdDate": "2017-03-06T12:01:47.111-05:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-06T12:01:47.111-05:00",
"version": 1,
"name": "myBackgroundTest",
"type": "SEARCH",
"application": "http://localhost:8765/systemdata/applications/7c297548-6eab-44fb-bf73-46368ea8a75e",
"search": "http://localhost:8765/systemdata/searches/ce4aa173-8a75-475a-beec-77dcdcb77ab9",
"searchComposition": "http://localhost:8765/systemdata/search-compositions/da1cf6cd-bab3-49f3-b870-25c555336cc8",
"searchResult": null,
"collection": null,
"matter": null,
"aip": null,
"table": null,
"holding": null,
"xdbLibrary": null,
"store": null,
"holdOperation": null,
"items": null,
"payload": "<data> \n\n</data>",
"priority": 0,
"eligibilityDate": "2017-03-06T12:01:47.104-05:00",
"state": "IN_QUEUE",
"userName": "[email protected]",
"consumerContext": null,
"dipCount": 0,
"dipCrypto": false,
"startDate": null,
"endDate": null,
"duration": 0,
"retentionDate": null,
"hidden": false,
"suspended": false,
"returnMessage": null,
"exportSettings": null,
"permission": {
"groups": []
},
"applicationName": "Baseball",
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/order-items/2511237a-144a-407f-957b-3d92d7d4cea8"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8765/systemdata/applications/7c297548-6eab-44fb-bf73-46368ea8a75e"
},
"http://identifiers.emc.com/search": {
"href": "http://localhost:8765/systemdata/searches/ce4aa173-8a75-475a-beec-77dcdcb77ab9"
},
"http://identifiers.emc.com/search-composition": {
"href": "http://localhost:8765/systemdata/search-compositions/da1cf6cd-bab3-49f3-b870-25c555336cc8"
},
"http://identifiers.emc.com/hide": {
"href": "http://localhost:8765/systemdata/order-items/2511237a-144a-407f-957b-3d92d7d4cea8/hide"
},
"http://identifiers.emc.com/groups": {
"href": "http://localhost:8765/systemdata/order-items/2511237a-144a-407f-957b-3d92d7d4cea8/groups"
}
}
}

OpenText InfoArchive 21.2 Page 144 of 331


Note – the order-item resource is a generic resource that is not exclusively tied to search. It is a
generic resource that is part of background processing infrastructure and can be applied to
many use cases that require some type of background processing. Currently, we’re using it in a
context search but, as you’ll see later, we’ll also see it used as part of other use cases, such as
search results export, for example.

15.8.4 Enquiring about Asynchronous Search Progress


Once we submit an asynchronous search request, an order-item resource is
created, and it is returned with the response. Since the order-item is created, it
will be scheduled to run in the future. Since we, as a client, don’t know when it
will start or finish, if we want to find out about its progress, we should poll. This
way we can learn about the progress of our search.
You’ll see in the response from asynchronous search that we have a self-link
relation. Since we created an order-item, that self-link relation points us to that
instance of the order-item resource.
We can now issue a GET request against that link and we’ll get updated version
of order-item resource.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/order-items/2511237a-144a-
407f-957b-3d92d7d4cea8
We should get back response very similar to the previous response as,
essentially, we’re getting back the latest state of the order-item resource.

OpenText InfoArchive 21.2 Page 145 of 331


{
"id": "2511237a-144a-407f-957b-3d92d7d4cea8",
"createdBy": "[email protected]",
"createdDate": "2017-03-06T12:01:47.111-05:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-06T12:01:59.424-05:00",
"version": 2,
"name": "myTest",
"type": "SEARCH",
"application": "http://localhost:8080/restapi/systemdata/applications/7c297548-6eab-44fb-bf73-46368ea8a75e",
"search": "http://localhost:8080/restapi/systemdata/searches/ce4aa173-8a75-475a-beec-77dcdcb77ab9",
"searchComposition": "http://localhost:8080/restapi/systemdata/search-compositions/da1cf6cd-bab3-49f3-b870-25c555336cc8",
"searchResult": "http://localhost:8080/restapi/systemdata/search-compositions/da1cf6cd-bab3-49f3-b870-25c555336cc8/search-
results/8eef6f1f-ae03-493b-9b8c-40dd439bce4d",
"collection": null,
"matter": null,
"aip": null,
"table": null,
"holding": null,
"xdbLibrary": null,
"store": null,
"holdOperation": null,
"items": null,
"payload": "<data> \n\n</data>",
"priority": 0,
"eligibilityDate": "2017-03-06T12:01:47.104-05:00",
"state": "COMPLETED",
"userName": "[email protected]",
"consumerContext": null,
"dipCount": 18589,
"dipCrypto": false,
"startDate": "2017-03-06T12:01:49.642-05:00",
"endDate": "2017-03-06T12:01:59.422-05:00",
"duration": 9779,
"retentionDate": null,
"hidden": false,
"suspended": false,
"returnMessage": null,
"exportSettings": null,
"permission": {
"groups": []
},
"applicationName": "Baseball",
"_links": {
"self": {
"href": "http://localhost:8080/restapi/systemdata/order-items/2511237a-144a-407f-957b-3d92d7d4cea8"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8080/restapi/systemdata/applications/7c297548-6eab-44fb-bf73-46368ea8a75e"
},
"http://identifiers.emc.com/search": {
"href": "http://localhost:8080/restapi/systemdata/searches/ce4aa173-8a75-475a-beec-77dcdcb77ab9"
},
"http://identifiers.emc.com/search-composition": {
"href": "http://localhost:8080/restapi/systemdata/search-compositions/da1cf6cd-bab3-49f3-b870-
25c555336cc8"
},
"http://identifiers.emc.com/search-result": {
"href": "http://localhost:8080/restapi/systemdata/order-items/2511237a-144a-407f-957b-3d92d7d4cea8/search-
results/8eef6f1f-ae03-493b-9b8c-40dd439bce4d"
},
"http://identifiers.emc.com/export": {
"href": "http://localhost:8080/restapi/systemdata/order-items/2511237a-144a-407f-957b-3d92d7d4cea8/search-
results/8eef6f1f-ae03-493b-9b8c-40dd439bce4d/export"
},
"http://identifiers.emc.com/hide": {
"href": "http://localhost:8080/restapi/systemdata/order-items/2511237a-144a-407f-957b-3d92d7d4cea8/hide"
},
"http://identifiers.emc.com/groups": {
"href": "http://localhost:8080/restapi/systemdata/order-items/2511237a-144a-407f-957b-3d92d7d4cea8/groups"

OpenText InfoArchive 21.2 Page 146 of 331


Note the state attribute of the order-item resource. The order-item resource can
be in one of the following states: IN_QUEUE, IN_PROGRESS, COMPLETE,
EXCEPTION and WAITING. As you can see in the previous example, when we
first created the order-item, it was in its initial state: IN_QUEUE. It will continue to
be in that state until the search is actually running. If we were to poll order-item
resource at that point in time, its status would be set to PROGRESS. Typically,
the client would poll the order-item until it goes into one of its final states: either
COMPLETE or EXCEPTION. If the order-item resource is in the COMPLETED
state, it means that search has completed. At this point, it will have a link relation
search-result that can be used to retrieve results of our asynchronous search.
It is also possible that the state is WAITING. which can happen for a search
involving Glacier storage where the system is waiting for the restore request.
15.8.5 Retrieving Results of Asynchronous Search
Once the order-item is in COMPLETE state, we can find the link relation to the
search-result. To retrieve results of an asynchronous search, the flow is very
similar to executing a synchronous search – we need to set the same Content-
Type header, and we need to set the same payload with search criteria.

curl -X POST -H 'Content-Type: application/xml' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'<data><birthYear>2013-01-01</birthYear></data>'
localhost:8765/systemdata/order-items/42a26e3f-3693-4306-9035-
be7f1d2b2ffe/search-results/9ede5012-d41f-4173-8f94-ef2d44f4af2d

NOTE – when collecting search results from an asynchronous search, the results are already
waiting to be retrieved so, technically, the payload (search criteria) to the above call is optional.
However, as a matter of good style, it is a good idea to pass them. As the search results sit in a
temporary cache, if the client waits long enough to retrieve the results, it is possible for the
cache to expire and the results will vanish. In that case, if we do pass search criteria, the system
will re-execute our search and be able to deliver proper results to us, even if they expired from
the cache.

In response to our call, we will get back results similar to the ones below:

OpenText InfoArchive 21.2 Page 147 of 331


{
"_embedded": {
"results": [{
"rows": [{
"columns": [{
"name": "lastName",
"value": "Aardsma",
"rows": null
}, {
"name": "firstName",
"value": "2cIKhlfRgyVYynAvi2snWA==",
"rows": null
}, {
"name": "birthState",
"value": "CO",
"rows": null
}, {
"name": "birthCountry",
"value": "USA",
"rows": null
}],
"id": "703e6776-f071-4ff2-8220-aa47b4fa578b:row:4ed79251-584f-46d9-8b2f-
4afd495f6919"
}],
"totalElements": 1,
"executionTime": 141,
"empty": false,
"partial": false

}]
},
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/search-compositions/da1cf6cd-bab3-49f3-b870-
25c555336cc8/search-results/c73c9e7e-4a90-409a-a3b1-ee433c1357f2"
},
"http://identifiers.emc.com/export": {
"href": "http://localhost:8765/systemdata/search-compositions/da1cf6cd-bab3-49f3-b870-
25c555336cc8/search-results/c73c9e7e-4a90-409a-a3b1-ee433c1357f2/export"
}
},
"page": {
"size": 10,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}

OpenText InfoArchive 21.2 Page 148 of 331


15.9 Search Results Export
15.9.1 Roles/Permission

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

As you can see in the last response example, when we look at search-result
resource (regardless of how search was executed – in synchronous or
asynchronous mode) there is a link relation export.
The export of search results is somewhat similar to executing search in an
asynchronous way – in a sense that it is also a background process. Because it
is a background process, we’ll be interacting with the order-item resource again.
We’ll have to create an order-item resource that will be responsible for gathering
search results and converting them to some external format so that they can be
exported out of the InfoArchive system.
If you look at the order-item resource, you will recall that one of the attributes
there is type. You can see in our examples when we create background search,
its value is SEARCH. Similarly, when we create an order-item for export, its value
should be EXPORT. Let’s see do that.
To create export order-item, we need to do a POST to link relation export.

curl -X POST -H 'Content-Type: application/hal+json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' localhost:8765/
systemdata/order-items/42a26e3f-3693-4306-9035-be7f1d2b2ffe/search-
results/9ede5012-d41f-4173-8f94-ef2d44f4af2d/export?name=myExport
Note – just like for asynchronous search, we pass the name as a URI query
parameter.
This should return response similar to the following:

OpenText InfoArchive 21.2 Page 149 of 331


{
"id": "2bb8df12-3352-4986-ab41-e042d98f343a",
"createdBy": "[email protected]",
"createdDate": "2017-03-06T15:13:51.594-05:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-06T15:13:51.594-05:00",
"version": 1,
"name": "myExport",
"type": "EXPORT",
"application": "http://localhost:8765/systemdata/applications/7c297548-6eab-44fb-bf73-46368ea8a75e",
"search": null,
"searchComposition": "http://localhost:8765/systemdata/search-compositions/47689a54-98f6-43f5-9032-385d9770dccb",
"searchResult": "http://localhost:8765/systemdata/search-compositions/47689a54-98f6-43f5-9032-385d9770dccb/search-
results/9ede5012-d41f-4173-8f94-ef2d44f4af2d",
"collection": null,
"matter": null,
"aip": null,
"table": null,
"holding": null,
"xdbLibrary": null,
"store": null,
"holdOperation": null,
"items": null,
"payload": null,
"priority": 0,
"eligibilityDate": "2017-03-06T15:13:51.59-05:00",
"state": "IN_QUEUE",
"userName": "[email protected]",
"consumerContext": null,
"dipCount": 0,
"dipCrypto": false,
"startDate": null,
"endDate": null,
"duration": 0,
"retentionDate": null,
"hidden": false,
"suspended": false,
"returnMessage": null,
"exportSettings": {
"exportConfiguration": "http://localhost:8765/systemdata/export-configurations/8ed32b55-179e-46e9-ab42-
574577a463ec",
"includedRows": [],
"excludedRows": [],
"includedColumns": [],
"excludedColumns": []
},
"permission": {
"groups": []
},
"applicationName": "Baseball",
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/order-items/2bb8df12-3352-4986-ab41-e042d98f343a"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8765/systemdata/applications/7c297548-6eab-44fb-bf73-46368ea8a75e"
},
"http://identifiers.emc.com/hide": {
"href": "http://localhost:8765/systemdata/order-items/2bb8df12-3352-4986-ab41-e042d98f343a/hide"
},
"http://identifiers.emc.com/groups": {
"href": "http://localhost:8765/systemdata/order-items/2bb8df12-3352-4986-ab41-e042d98f343a/groups"
}
}
}

OpenText InfoArchive 21.2 Page 150 of 331


As you can see in the response, this order-item resource is of type EXPORT and,
currently, in IN_QUEUE state. Again, just like with asynchronous searches, we’ll
have to poll the system until the state becomes COMPLETE (or EXCEPTION).
Here is an example how we can poll order-item resource:

curl -H 'Content-Type: application/hal+json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json'
localhost:8765/systemdata/order-items/7e7bcc08-2481-45cb-a798-21189ededd1a
Eventually, we should get the response similar to the one below:

OpenText InfoArchive 21.2 Page 151 of 331


{
"id": "2bb8df12-3352-4986-ab41-e042d98f343a",
"createdBy": "[email protected]",
"createdDate": "2017-03-06T15:13:51.594-05:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-03-06T15:14:00.133-05:00",
"version": 3,
"name": "myExport",
"type": "EXPORT",
"application": "http://localhost:8765/systemdata/applications/7c297548-6eab-44fb-bf73-46368ea8a75e",
"search": null,
"searchComposition": "http://localhost:8765/systemdata/search-compositions/47689a54-98f6-43f5-9032-385d9770dccb",
"searchResult": "http://localhost:8765/systemdata/search-compositions/47689a54-98f6-43f5-9032-385d9770dccb/search-
results/9ede5012-d41f-4173-8f94-ef2d44f4af2d",
"collection": null,
"matter": null,
"aip": null,
"table": null,
"holding": null,
"xdbLibrary": null,
"store": null,
"holdOperation": null,
"items": null,
"payload": null,
"priority": 0,
"eligibilityDate": "2017-03-06T15:13:51.59-05:00",
"state": "COMPLETE",
"userName": "[email protected]",
"consumerContext": null,
"dipCount": 0,
"dipCrypto": false,
"startDate": "2017-03-06T15:13:54.186-05:00",
"endDate": "2017-03-06T15:14:00.13-05:00",
"duration": 5944,
"retentionDate": null,
"hidden": false,
"suspended": false,
"returnMessage": null,
"exportSettings": {
"exportConfiguration": "http://localhost:8765/systemdata/export-configurations/8ed32b55-179e-46e9-ab42-
574577a463ec",
"includedRows": [],
"excludedRows": [],
"includedColumns": [],
"excludedColumns": []
},
"permission": {
"groups": []
},
"applicationName": "Baseball",
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/order-items/2bb8df12-3352-4986-ab41-e042d98f343a"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8765/systemdata/applications/7c297548-6eab-44fb-bf73-46368ea8a75e"
},
"http://identifiers.emc.com/hide": {
"href": "http://localhost:8765/systemdata/order-items/2bb8df12-3352-4986-ab41-e042d98f343a/hide"
},
"http://identifiers.emc.com/content-download": {
"href": "http://localhost:8765/systemdata/applications/7c297548-6eab-44fb-bf73-
46368ea8a75e/contents/0b8dcb2a-51f7-42cd-934d-
41a7fe1589f6/download?filename=Search%20By%20Player%20Name_20170306151345%20export.csv.gz"
},
"http://identifiers.emc.com/groups": {
"href": "http://localhost:8765/systemdata/order-items/2bb8df12-3352-4986-ab41-e042d98f343a/groups"
}
}
}

OpenText InfoArchive 21.2 Page 152 of 331


If the state is COMPLETE, we need to find the link relation content-download.
We’ll use it next to get the content downloaded to the local file system.

curl -H 'Content-Type: application/hal+json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -o mydownload4.gzip
localhost:8765/systemdata/applications/7c297548-6eab-44fb-bf73-
46368ea8a75e/contents/0b8dcb2a-51f7-42cd-934d-
41a7fe1589f6/download?filename=someName.csv.gz
The response should be 200 OK, followed by binary content streamed to the
local folder.

NOTE
-o mydownload.gzip – this is a curl specific way of downloading binary data to the local folder.
File upload and download is a bit more complicated type of interaction with any server so the
actual negotiation between client and server may be little bit different, depending on the client.
For example, when using some other client you may need to specifically set Accept header:
Accept: application/octet-stream
Furthermore, you can see we also used URI query parameter filename. This parameter is used
by IA REST API to set Content-Disposition header like this:
Content-Disposition: attachment; filename="someName.csv.gz”
This can be leveraged, for example, by the Javascript in your browser to automatically download
content to user’s file system.
In addition, the following headers are set and might be useful:
Accept-Ranges: bytes
Content-Range: bytes 0-863920/863921
Content-Length: 863921
They could be leveraged, for example, to validate if entire content has been collected.

15.10 Value lists


Value lists provide ability for a query to use a range of values. For
example, in the sample application for Audit, two value lists are used for
the system event types and the tenant event type.
15.10.1 Roles/Permission

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

OpenText InfoArchive 21.2 Page 153 of 331


The value-lists link relation can be found from the application link
15.10.2 Viewing value lists for an
application
Do a get on the value-lists link relation

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/applications/4173bd70-fd98-4534-b111-
6646a554dea4/value-lists

From the response, find the link relation for the audit event types (removed one
of the two values from the output for brevity/clarity).
{
"_embedded" : {
"valueLists" : [ {
"id" : "73881e50-e688-429f-b1e9-01194c2e3cbf",
"createdBy" : "[email protected]",
"createdDate" : "2017-10-12T14:23:22.959-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-10-12T14:23:23.021-04:00",
"version" : 2,
"name" : "event-types",
"application" : "http://localhost:8765/systemdata/applications/4173bd70-fd98-4534-b111-
6646a554dea4",
"description" : "Event Types",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/value-lists/73881e50-e688-429f-b1e9-
01194c2e3cbf"
},
"http://identifiers.emc.com/value-list-content" : {
"href" : "http://localhost:8765/systemdata/value-lists/73881e50-e688-429f-b1e9-
01194c2e3cbf/content"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/value-lists/73881e50-e688-429f-b1e9-
01194c2e3cbf"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/value-lists/73881e50-e688-429f-b1e9-
01194c2e3cbf"
},
"http://identifiers.emc.com/value-list-query" : {
"href" : "http://localhost:8765/systemdata/value-lists/73881e50-e688-429f-b1e9-
01194c2e3cbf"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/4173bd70-fd98-4534-b111-
6646a554dea4"
}
}
}, …
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/applications/4173bd70-fd98-4534-b111-
6646a554dea4/value-lists?page=0&size=10"
},
"http://identifiers.emc.com/add" : {
"href" : "http://localhost:8765/systemdata/applications/4173bd70-fd98-4534-b111-
6646a554dea4/value-lists"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/4173bd70-fd98-4534-b111-
6646a554dea4"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}

OpenText InfoArchive 21.2 Page 154 of 331


So, it is the content link that will contain the xml that indicates the possible
values.

IF a get is done on the content and the content type is set to xml, the content can
be viewed for the value list.

Here is a section of what that XML looks like:

15.11 Executing a Cross-application Search


The cross-application search is a specific search that allows the user to execute
searches across different applications.

The next chapters will explain how to execute a cross application search and
how to get the results.
15.11.1 Executing a synchronous
cross-application search
The synchronous execution is not the preferred way to execute a cross
application search. This kind of search is (most of the time) long; so, the
synchronous execution will not be terminated before the maximum execution

OpenText InfoArchive 21.2 Page 155 of 331


time. However, the synchronous execution is provided if the delegated searches
are fast.
The execution of the search is through a POST on the search-composition’s
execute link relation.
Here is a sample of an execution, search the “Burton” value on the delegated
searches:

curl -X POST -H 'Content-Type: application/xml' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'<data><criterion><name>name</name><operator>EQUAL</operator><valu
e>Burton</value></criterion></data>'localhost:8080/restapi/systemdata/search
-compositions/0d8d81c6-2879-4d42-973e-722449680057/run-cas-search
The sample below presents the cross-application search result. The number of
total elements is 6, and the total execution time is 821 ms.
There are 2 sub results (one for each delegated search). The first one has 0
results (its name is TextFieldFirstName (Set 1)). The second one has 6 results,
(its name is Trade Search (Set 1)). Each of the sub result is the same as one
search result. For further information, please refer to the classic search result
chapter.

OpenText InfoArchive 21.2 Page 156 of 331


{
"crossApplicationSearch" : true,
"totalElements" : 6,
"executionTime" : 821,
"results" : [ {
"label" : "TextFieldFirstName (Set 1)",
"totalElements" : 0,
"executionTime" : 367,
"hideColumns" : null,
"debug" : false,
"partial" : false,
"_links" : {
"http://identifiers.emc.com/search-result" : {
"href" : "http://localhost:8080/restapi/systemdata/search-results/3ff8c565-2fe2-474d-
9eee-2b357264183a"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8080/restapi/systemdata/applications/b83f252e-7684-4505-9100-
f578ee8bd804"
},
"http://identifiers.emc.com/search" : {
"href" : "http://localhost:8080/restapi/systemdata/searches/9be9ebd2-b0ad-4c43-8fb6-
457fb2bae3be"
},
"http://identifiers.emc.com/search-composition" : {
"href" : "http://localhost:8080/restapi/systemdata/search-compositions/e091060d-6264-
4edf-8482-4add744e404f"
}
},
"applicationName" : "PhoneCalls",
"applicationCacheState" : "CACHED_IN",
"applicationArchiveType" : "SIP",
"searchName" : "TextFieldFirstName",
"searchCompositionName" : "Set 1"
}, (…)

OpenText InfoArchive 21.2 Page 157 of 331


(…)
"applicationName" : "PhoneCalls",
"applicationCacheState" : "CACHED_IN",
"applicationArchiveType" : "SIP",
"searchName" : "TextFieldFirstName",
"searchCompositionName" : "Set 1"
}, {
"label" : "Trade Search (Set 1)",
"totalElements" : 6,
"executionTime" : 375,
"hideColumns" : null,
"debug" : false,
"partial" : false,
"_links" : {
"http://identifiers.emc.com/search-result" : {
"href" : "http://localhost:8080/restapi/systemdata/search-results/88bd3a1b-498c-47f1-
a46f-7296fabbc5e8"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8080/restapi/systemdata/applications/00bc264d-4ffa-481f-b4e4-
793b43cf354a"
},
"http://identifiers.emc.com/search" : {
"href" : "http://localhost:8080/restapi/systemdata/searches/bb73117b-d6c6-411e-baf6-
9757f0d07fdf"
},
"http://identifiers.emc.com/search-composition" : {
"href" : "http://localhost:8080/restapi/systemdata/search-compositions/694ffcb9-74dc-
4a49-aa73-6c41604ed089"
}
},
"applicationName" : "Trades",
"applicationCacheState" : "CACHED_IN",
"applicationArchiveType" : "SIP",
"searchName" : "Trade Search",
"searchCompositionName" : "Set 1"
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/restapi/systemdata/search-results/81b56947-1480-4bab-81ad-
de9bac2691a5/cas"
}
}
}
OpenText InfoArchive 21.2 Page 158 of 331
15.11.2 Executing an asynchronous cross-application search
The asynchronous execution is the preferred way to execute a cross application
search.

15.11.2.1 Asynchronous cross application execution


The execution of the search is through a POST on the search-composition’s
execute link relation. It is the same that a classic search.
There is a link relation named execute-async.
Here is a sample of an execution, search the “Burton” value on the delegated
searches:

curl -X POST -H 'Content-Type: application/xml' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d
'<data><criterion><name>name</name><operator>EQUAL</operator><valu
e>Burton</value></criterion></data>'localhost:8080/restapi/systemdata/search
-compositions/0d8d81c6-2879-4d42-973e-722449680057/async
&name=CrossAppSearchOrderItem
We pass the URI query parameter name – this could be anything – it’s an
opportunity for us to add some custom name to our order-item resource. The
response is to our call comes back immediately and looks like this sample:

OpenText InfoArchive 21.2 Page 159 of 331


{
"createdBy" : "[email protected]",
"createdDate" : "2021-02-26T17:57:49.7492904+01:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2021-02-26T17:57:49.8669776+01:00",
"version" : 2,
"id" : "2d7d9c8b-65c3-488d-8939-6a1566ca6be9",
"name" : "CrossAppSearchOrderItem",
"type" : "CA_SEARCH",
"application" : "http://localhost:8080/restapi/systemdata/applications/b83f252e-7684-4505-
9100-f578ee8bd804",
"permission" : {
"groups" : [ ]
},
"priority" : 0,
"eligibilityDate" : "2021-02-26T17:57:49.8659797+01:00",
"state" : "IN_QUEUE",
"userName" : "[email protected]",
"duration" : 0,
"retentionDate" : "2021-03-05T17:57:49.7467003+01:00",
"hidden" : false,
"suspended" : false,
"canceled" : false,
"returnMessage" : "",
"stateDescription" : "",
"logLevel" : null,
"contextOperation" : null,
"onBehalfOfUser" : null,
"applicationName" : "PhoneCalls",
"applicationCacheState" : "CACHED_IN",
"searchCompositionName" : "Set 1",
"searchName" : "Cross App Search Sample",
"consumerContext" : "<?xml version=\"1.0\" encoding=\"UTF-
8\"?><data><name>Burton</name></data>",
"_links" : {
"self" : {
"href" : "http://localhost:8080/restapi/systemdata/order-items/2d7d9c8b-65c3-488d-8939-
6a1566ca6be9"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8080/restapi/systemdata/applications/b83f252e-7684-4505-9100-
f578ee8bd804"
},
(…)
"http://identifiers.emc.com/search-composition" : {
"href" : "http://localhost:8080/restapi/systemdata/search-compositions/0d8d81c6-2879-4d42-
973e-722449680057"
},
"http://identifiers.emc.com/batches" : {
"href" : "http://localhost:8080/restapi/systemdata/order-items/2d7d9c8b-65c3-488d-8939-
6a1566ca6be9/batches"
},
"http://identifiers.emc.com/context" : {
"href" : "http://localhost:8080/restapi/systemdata/order-items/2d7d9c8b-65c3-488d-8939-
6a1566ca6be9/context"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8080/restapi/systemdata/order-items/2d7d9c8b-65c3-488d-8939-
6a1566ca6be9/groups"
OpenText
} InfoArchive 21.2 Page 160 of 331
}
}
15.11.2.2 Retrieving results of asynchronous cross application search
The process is the same as a classic asynchronous search. So, the order item
must be “complete” to be able to get the result. Once the order item is
terminated, a search-result link is available in the REST response. To get the
order item, do a get on the order item link:

curl -X GET -H 'Content-Type: application/xml' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json'
localhost:8765/systemdata/order-items/2d7d9c8b-65c3-488d-8939-6a1566ca6be9

OpenText InfoArchive 21.2 Page 161 of 331


{
"createdBy" : "[email protected]",
"createdDate" : "2021-02-26T17:57:49.7492904+01:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2021-02-26T17:57:53.2141175+01:00",
"version" : 10,
"id" : "2d7d9c8b-65c3-488d-8939-6a1566ca6be9",
"name" : "CrossAppSearchOrderItem",
"type" : "CA_SEARCH",
"application" : "http://localhost:8080/restapi/systemdata/applications/b83f252e-7684-4505-
9100-f578ee8bd804",
"permission" : {
"groups" : [ ]
},
"priority" : 0,
"eligibilityDate" : "2021-02-26T17:57:52.7314093+01:00",
"state" : "COMPLETE",
"userName" : "[email protected]",
"startDate" : "2021-02-26T17:57:51.3269199+01:00",
"endDate" : "2021-02-26T17:57:53.0874563+01:00",
"duration" : 1761,
"retentionDate" : "2021-03-05T17:57:49.7467003+01:00",
"hidden" : false,
"suspended" : false,
"canceled" : false,
"returnMessage" : "",
"stateDescriptionCode" : null,
"stateDescription" : "2 batches have completed",
"logLevel" : null,
"contextOperation" : null,
"onBehalfOfUser" : null,
"applicationName" : "PhoneCalls",
"applicationCacheState" : "CACHED_IN",
"searchCompositionName" : "Set 1",
"searchName" : "Cross App Search Sample",
"consumerContext" : "<?xml version=\"1.0\" encoding=\"UTF-
8\"?><data><name>Burton</name></data>",
"dipCount" : 6,
"_links" : {
"self" : {
"href" : "http://localhost:8080/restapi/systemdata/order-items/2d7d9c8b-65c3-488d-8939-
6a1566ca6be9"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8080/restapi/systemdata/applications/b83f252e-7684-4505-
9100-f578ee8bd804"
},
"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8080/restapi/systemdata/order-items/2d7d9c8b-65c3-488d-8939-
6a1566ca6be9/log"
},
"http://identifiers.emc.com/download-execution-log" : {
"href" : "http://localhost:8080/restapi/systemdata/order-items/2d7d9c8b-65c3-488d-8939-
6a1566ca6be9/contentsaa41ff4a-6118-471d-b181-
c436faadb4b6/download?filename=CrossAppSearchOrderItem.log.gz"
},
"http://identifiers.emc.com/search-composition" : {
"href" : "http://localhost:8080/restapi/systemdata/search-compositions/0d8d81c6-2879-
4d42-973e-722449680057"
},
"http://identifiers.emc.com/search-result" : {
"href" : "http://localhost:8080/restapi/systemdata/search-results/1fd3c734-be73-49a8-
8f0f-2f34320bc5bb/cas"
},
"http://identifiers.emc.com/batches" : {
"href" : "http://localhost:8080/restapi/systemdata/order-items/2d7d9c8b-65c3-488d-8939-
6a1566ca6be9/batches"
OpenText }, InfoArchive 21.2 Page 162 of 331
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8080/restapi/systemdata/order-items/2d7d9c8b-65c3-488d-8939-
6a1566ca6be9/groups"
}
Once the order item is complete, it provides a search-result link. This search
result is a composite of all the search results composed by the sub searches
(also known as delegate searches):

curl -X GET -H 'Content-Type: application/xml' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json'
localhost:8080/restapi/systemdata/search-results/1fd3c734-be73-49a8-8f0f-
2f34320bc5bb/cas

{
"crossApplicationSearch" : true,
"totalElements" : 6,
"executionTime" : 933,
"results" : [ {
"label" : "TextFieldFirstName (Set 1)",
"totalElements" : 0,
"executionTime" : 394,
"hideColumns" : null,
"debug" : false,
"partial" : false,
"_links" : {
"http://identifiers.emc.com/search-result" : {
"href" : "http://localhost:8080/restapi/systemdata/search-results/687fc710-8790-4988-
aabf-f0d374653439"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8080/restapi/systemdata/applications/b83f252e-7684-4505-9100-
f578ee8bd804"
},
"http://identifiers.emc.com/search" : {
"href" : "http://localhost:8080/restapi/systemdata/searches/9be9ebd2-b0ad-4c43-8fb6-
457fb2bae3be"
},
"http://identifiers.emc.com/search-composition" : {
"href" : "http://localhost:8080/restapi/systemdata/search-compositions/e091060d-6264-
4edf-8482-4add744e404f"
}
},
"applicationName" : "PhoneCalls",
"applicationCacheState" : "CACHED_IN",
"applicationArchiveType" : "SIP",
"searchName" : "TextFieldFirstName",
"searchCompositionName" : "Set 1"
}, (…)

OpenText InfoArchive 21.2 Page 163 of 331


(…){
"label" : "Trade Search (Set 1)",
"totalElements" : 6,
"executionTime" : 539,
"hideColumns" : null,
"debug" : false,
"partial" : false,
"_links" : {
"http://identifiers.emc.com/search-result" : {
"href" : "http://localhost:8080/restapi/systemdata/search-results/4a371c88-5675-4181-
9008-06f636a4daaa"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8080/restapi/systemdata/applications/00bc264d-4ffa-481f-b4e4-
793b43cf354a"
},
"http://identifiers.emc.com/search" : {
"href" : "http://localhost:8080/restapi/systemdata/searches/bb73117b-d6c6-411e-baf6-
9757f0d07fdf"
},
"http://identifiers.emc.com/search-composition" : {
"href" : "http://localhost:8080/restapi/systemdata/search-compositions/694ffcb9-74dc-
4a49-aa73-6c41604ed089"
}
},
"applicationName" : "Trades",
"applicationCacheState" : "CACHED_IN",
"applicationArchiveType" : "SIP",
"searchName" : "Trade Search",
"searchCompositionName" : "Set 1"
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/restapi/systemdata/search-results/1fd3c734-be73-49a8-8f0f-
2f34320bc5bb/cas"
}
}
}

As a result, the response is a search-result composite. Meaning it is a list of


“classic” search result. From there there is a search-result link per delegate
searches.In our sample thare are 2 search result, because the cross application
search is composed by 2 delegate searches. Each one, provides a “classic
search result” link. Please refer to asynchronous search result in order to get
more details.

OpenText InfoArchive 21.2 Page 164 of 331


16.0 Audits
The following can be done through REST
• Configure which audit event types to enable/disable
• Determine constants used by audits
• View audits that have not been archived
• View audits that have been archived
Enabling audits is always based on a pair:
• The type of object
• The event
What is important to know is that the audits are divided into three categories:
• System audits
• Tenant audits
• Application audits

Here is the overall view

From the root level, it is possible to get the system level audits by posting to the
audits link rel. All link rel specific to EMC will have this prefix:
http://identifiers.emc.com/
Similarly, to the tenant audit and event types are anchored from the tenant.

Finally, each application can have its own audits. In order to disable an
application audit, the audit must be disabled at both the tenant and the
application level.

OpenText InfoArchive 21.2 Page 165 of 331


16.1 Role Permission

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

Only administrators are allowed to manipulate the audits.


By default, everyone has access to the Audit application

OpenText InfoArchive 21.2 Page 166 of 331


16.2 Determining the List of all System Audit-Event-Types

Note that links can always change, and the appropriate URLs can be discovered
from the /services endpoint.

Start with a get on the top-level service:


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/services

From the response, find the link relation for the audit event types:
{
"name" : "InfoArchive Home Resource",
"_links" : {
"self" : {
"href" : "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info" : {
"href" : "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants" : {
"href" : "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},

"http://identifiers.emc.com/audit-event-types" : {
"href" : "http://localhost:8765/systemdata/audit-event-types"
},
"http://identifiers.emc.com/audit-extended-event-types": {
"href": "http://localhost:8765/systemdata/audit-extended-event-types"
},
"http://identifiers.emc.com/audit-constants" : {
"href" : "http://localhost:8765/systemdata/audit-constants"
},
"http://identifiers.emc.com/audit-constants-names": {
"href" : "http://localhost:8765/systemdata/audit-constants-names"
},
"http://identifiers.emc.com/audits" : {
"href" : "http://localhost:8765/systemdata/audits"
},

}
}

Do a get on that resource:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept:


application/hal+json' http://localhost:8765/systemdata/audit-event-types

OpenText InfoArchive 21.2 Page 167 of 331


The response will look similar to this (we only show the one entry. By default, 10
are reported on a page.
{
"_embedded" : {
"auditEventTypeResults" : [ {
"id" : "5e08700e-9670-4dc9-b025-8c77fa3d4f4d",
"type" : "login",
"name" : "failed",
"applicationId" : null,
"tenantId" : null,
"enabled" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/5e08700e-9670-
4dc9-b025-8c77fa3d4f4d"
},
"http://identifiers.emc.com/disable" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/5e08700e-9670-
4dc9-b025-8c77fa3d4f4d/disable"
},
"http://identifiers.emc.com/enable" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/5e08700e-9670-
4dc9-b025-8c77fa3d4f4d/enable"
}
}

"_links" : {
"first" : {
"href" : "http://localhost:8765/systemdata/audit-event-types?page=0&size=10"
},
"self" : {
"href" : "http://localhost:8765/systemdata/audit-event-types"
},
"next" : {
"href" : "http://localhost:8765/systemdata/audit-event-types?page=1&size=10"
},
"last" : {
"href" : "http://localhost:8765/systemdata/audit-event-types?page=5&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 52,
"totalPages" : 6,
"number" : 0
}
}

To enable or disable the particular audit, post to the either the disable or enable
link. That same procedure can be used to set the tenant or application audits by
following the linkrels from the tenant or application.

curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H


'Content-Type: application/hal+json' http://localhost:8765/systemdata/audit-event-types/5e08700e-9670-
4dc9-b025-8c77fa3d4f4d/enable

OpenText InfoArchive 21.2 Page 168 of 331


And the response should look like this (abbreviated):
{
"id" : "5e08700e-9670-4dc9-b025-8c77fa3d4f4d",
"type" : "login",
"name" : "failed",
"applicationId" : null,
"tenantId" : null,
"enabled" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/5e08700e-9670-4dc9-
b025-8c77fa3d4f4d"
},
"http://identifiers.emc.com/disable" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/5e08700e-9670-4dc9-
b025-8c77fa3d4f4d/disable"
},
"http://identifiers.emc.com/enable" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/5e08700e-9670-4dc9-
b025-8c77fa3d4f4d/enable"
}
}
}

Notice that the enabled in the response changed from false to true.

OpenText InfoArchive 21.2 Page 169 of 331


16.3 Determining the List of all System Audit-Event-Types
grouped by type property

Start with a get on the top-level service:


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/services

From the response, find the link relation for the audit event types:
{
"name" : "InfoArchive Home Resource",
"_links" : {
"self" : {
"href" : "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info" : {
"href" : "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants" : {
"href" : "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},

"http://identifiers.emc.com/audit-event-types" : {
"href" : "http://localhost:8765/systemdata/audit-event-types"
},
"http://identifiers.emc.com/audit-extended-event-types": {
"href": "http://localhost:8765/systemdata/audit-extended-event-types"
},
"http://identifiers.emc.com/audit-constants" : {
"href" : "http://localhost:8765/systemdata/audit-constants"
},
"http://identifiers.emc.com/audit-constants-names": {
"href" : "http://localhost:8765/systemdata/audit-constants-names"
},
"http://identifiers.emc.com/audits" : {
"href" : "http://localhost:8765/systemdata/audits"
},

}
}

Do a get on that resource:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept:


application/hal+json' http://localhost:8765/systemdata/audit-extended-event-types

OpenText InfoArchive 21.2 Page 170 of 331


The response will look similar to this (we only show the one entry. By default, 10
are reported on a page.
{
"_embedded" : {
"auditGroupedExtendedEventTypes": [{
"type": "archive_center_credential",
"display": "AUDIT_TYPE_ARCHIVE_CENTER_CREDENTIAL",
"extendedEvents": [{
"category": "provisioning",
"display": "AUDIT_NAMES_CREATE",
"event": {
"id": "7c5a0014-3256-4642-8f45-640eb59a436f",
"type": "archive_center_credential",
"name": "create",
"applicationId": null,
"tenantId": null,
"enabled": true
}
},{
"category": "provisioning",
"display": "AUDIT_NAMES_UPDATE",
"event": {
"id": "66410e1a-6277-472e-8b84-557bfa52d274",
"type": "archive_center_credential",
"name": "update",
"applicationId": null,
"tenantId": null,
"enabled": false
}
}…]
}…
"_links" : {
"first": {
"href": http://localhost:8765/systemdata/audit-extended-event-
types?page=0&size=10 },
"self": {
"href": http://localhost:8765/systemdata/audit-extended-event-
types?page=0&size=10 },
"next": {
"href": http://localhost:8765/systemdata/audit-extended-event-
types?page=1&size=10 },
"last": {
"href": http://localhost:8765/systemdata/audit-extended-event-
types?page=2&size=10 },
"http://identifiers.emc.com/audit-extended-event-types-enable": {
"href": http://localhost:8765/systemdata/audit-extended-event-types/enable },
"http://identifiers.emc.com/audit-extended-event-types-disable": {
"href": "http://localhost:8765/systemdata/audit-extended-event-types/disable"
} },
"page" : {
"size" : 10,
"totalElements" : 52,
"totalPages" : 6,
"number" : 0
}
}

OpenText InfoArchive 21.2 Page 171 of 331


16.4 Determining What Types are Available at the System Level

Start with a get on the top-level service:


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/services

From the response, find the link rel for the audit constants:
{
"name" : "InfoArchive Home Resource",
"_links" : {
"self" : {
"href" : "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info" : {
"href" : "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants" : {
"href" : "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},

"http://identifiers.emc.com/audit-event-types" : {
"href" : "http://localhost:8765/systemdata/audit-event-types"
},
"http://identifiers.emc.com/audit-extended-event-types": {
"href": "http://localhost:8765/systemdata/audit-extended-event-types"
},
"http://identifiers.emc.com/audit-constants" : {
"href" : "http://localhost:8765/systemdata/audit-constants"
},
"http://identifiers.emc.com/audit-constants-names": {
"href" : "http://localhost:8765/systemdata/audit-constants-names"
},
"http://identifiers.emc.com/audits" : {
"href" : "http://localhost:8765/systemdata/audits"
},

}
}

Do a get on that link relation:


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/audit-constants

OpenText InfoArchive 21.2 Page 172 of 331


And the response should look like this:
{
"_embedded" : {
"auditConstantsRests" : [ {
"display" : "AUDIT_TYPE_LOGIN",
"value" : "login",
"category" : "system"
}, {
"display" : "AUDIT_TYPE_LOGOUT",
"value" : "logout",
"category" : "system"
}, {
"display" : "AUDIT_TYPE_TENANT",
"value" : "tenant",
"category" : "system"

"display" : "AUDIT_TYPE_FEDERATION",
"value" : "federation",
"category" : "administrative"

"display" : "AUDIT_TYPE_CRYPTO_OBJECT",
"value" : "crypto_object",
"category" : "administrative"
}, {
"display" : "AUDIT_TYPE_ECS_CREDENTIAL",
"value" : "ecs_credential",
"category" : "system"
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8765/systemdata/audit-constants?page=0&size=10"
},
"self" : {
"href" : "http://localhost:8765/systemdata/audit-constants"
},
"next" : {
"href" : "http://localhost:8765/systemdata/audit-constants?page=1&size=10"
},
"last" : {
"href" : "http://localhost:8765/systemdata/audit-constants?page=1&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 13,
"totalPages" : 2,
"number" : 0
}
}

The category is used by the IAWA client to categorize the system audits.

OpenText InfoArchive 21.2 Page 173 of 331


16.5 Determining What Categorized Types are Available at the
System Level

Start with a get on the top-level service:


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/services

From the response, find the link rel for the audit constants:
{
"name" : "InfoArchive Home Resource",
"_links" : {
"self" : {
"href" : "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info" : {
"href" : "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants" : {
"href" : "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},

"http://identifiers.emc.com/audit-event-types" : {
"href" : "http://localhost:8765/systemdata/audit-event-types"
},
"http://identifiers.emc.com/audit-extended-event-types": {
"href": "http://localhost:8765/systemdata/audit-extended-event-types"
},
"http://identifiers.emc.com/audit-constants" : {
"href" : "http://localhost:8765/systemdata/audit-constants"
},
"http://identifiers.emc.com/audit-constants-names": {
"href" : "http://localhost:8765/systemdata/audit-constants-names"
},
"http://identifiers.emc.com/audits" : {
"href" : "http://localhost:8765/systemdata/audits"
},

}
}

Do a get on that link relation:


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/audit-constants-names

OpenText InfoArchive 21.2 Page 174 of 331


And the response should look like this:
{
"content": {
"other": [{
"display": "AUDIT_NAMES_ACTIVE",
"value": "active",
"category": "other"
},{
"display": "AUDIT_NAMES_DISABLE",
"value": "disable",
"category": "other"
},{
"display": "AUDIT_NAMES_ENABLE",
"value": "enable",
"category": "other"
}],
"provisioning": [{
"display": "AUDIT_NAMES_CREATE",
"value": "create",
"category": "provisioning"
},{
"display": "AUDIT_NAMES_DELETE",
"value": "delete",
"category": "provisioning"
},{
"display": "AUDIT_NAMES_RETRIEVE",
"value": "retrieve",
"category": "provisioning"
},{
"display": "AUDIT_NAMES_UPDATE",
"value": "update",
"category": "provisioning"
}]
}
}

OpenText InfoArchive 21.2 Page 175 of 331


16.6 Enabling a Specific Audit for an Application

In this example, at least one application needs to be installed. I recommend


installing the Audit application.

Start with a get on the top-level service


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/services

From the response, find the link relation for the tenant:
{
"name" : "InfoArchive Home Resource",
"_links" : {
"self" : {
"href" : "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info" : {
"href" : "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants" : {
"href" : "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},

}

Tip: we could have followed the tenants link relation and got the first tenant but
following this link relation saves a few REST calls

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207

OpenText InfoArchive 21.2 Page 176 of 331


The response will look like this (abbreviated)
{
"id" : "66139448-0814-4c73-9ffd-5810c64c1207",
"createdBy" : "system",
"createdDate" : "2017-02-24T10:38:02.448-05:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-02-24T10:38:02.448-05:00",
"version" : 1,
"name" : "INFOARCHIVE",
"permission" : {
"groups" : [ ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207/groups"
},
"http://identifiers.emc.com/applications" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207/applications"
},

}
}

Now we will follow this link but add a spel expression to limit the applications, as
we want to focus on the Audit application (the spEL expression isn’t strictly
necessary if there is only one application, but ensures we get the one).

The syntax is a little tricky, but this is the spEL expression before encoding:
spel=?[name=='Audit']
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207/applications?spel=%3F%5Bname%3D%3D%27Audit%27%5D%0D%0A

OpenText InfoArchive 21.2 Page 177 of 331


This is what the response will look like:
{
"_embedded" : {
"applications" : [ {
"id" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"createdBy" : "[email protected]",
"createdDate" : "2017-02-24T10:40:48.727-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-02-24T10:41:00.462-05:00",
"version" : 2,
"name" : "Audit",
"structuredDataStorageAllocationStrategy" : "DEFAULT",
"tenant" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207",
"type" : "ACTIVE_ARCHIVING",
"archiveType" : "SIP",
"searchCreated" : true,
"xdbLibraryAssociated" : true,
"state" : "IN_TEST",
"viewStatus" : true,
"description" : "This application stores the audit history",

"_links" : {
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13/groups"
},
"self" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13"
},

"http://identifiers.emc.com/audit-event-types" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13/audit-event-types"
},
"http://identifiers.emc.com/audit-constants" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13/audit-constants"
},
"http://identifiers.emc.com/audits" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13/audits"
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207/applications?spel=%3F%5Bname%3D%3D%27Audit%27%5D%0D%0A"
},
"http://identifiers.emc.com/add" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207/applications"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}

OpenText InfoArchive 21.2 Page 178 of 331


Next, use a spEL expression to pick out the specific audit we want to enable.
For this example, we will enable the apply hold audit, which is an application
audit.

The syntax is a little tricky, so this is the spEL expression before encoding:
spel=?[type=='hold' and name==’apply’].

Note that the audit-event-types should not be splitting across multiple lines
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-a330-
6c4894b30b13/audit-event-
types?spel=%3F%5Bname%3D%3D%27apply%27%20and%20type%3D%3D%27hold%27%5D

The response should look like this (only one audit returned):
{
"_embedded" : {
"auditEventTypeResults" : [ {
"id" : "ab09d3ff-0022-4a23-8507-d8ba9b5d7b33",
"type" : "hold",
"name" : "apply",
"applicationId" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"enabled" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/ab09d3ff-0022-
4a23-8507-d8ba9b5d7b33"
},
"http://identifiers.emc.com/disable" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/ab09d3ff-0022-
4a23-8507-d8ba9b5d7b33/disable"
},
"http://identifiers.emc.com/enable" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/ab09d3ff-0022-
4a23-8507-d8ba9b5d7b33/enable"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-a330-
6c4894b30b13/audit-event-
types?spel=%3F%5Bname%3D%3D%27apply%27%20and%20type%3D%3D%27hold%27%5D"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}

OpenText InfoArchive 21.2 Page 179 of 331


To enable the audit, post to that link

curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H


'Content-Type: application/hal+json' http://localhost:8765/systemdata/audit-event-types/ab09d3ff-0022-
4a23-8507-d8ba9b5d7b33/enable

16.7 Getting the Audits that Have Not Been Archived Yet
It is possible via the rest to get the audits at either the system, tenant, or
application level by doing a GET on the audit’s link relationNote that each time
the Archive Audits job is run, this list is cleared out.
This REST API has been deprecated and it is recommended instead to archive
the audits and view the archived audits.

16.8 Viewing the Audits that Have Been Archived


See the section on running a search. Choose one of the five available searches
shipped with the Audit application.

Note that it is important the on the xform additional criteria that distinguishes
between the System, Tenant, and Application Audits searches. If that additional
criteria is not passed, the search will return all three types of audits.

For example, the following criteria returns the Application audits only
<data><criterion><name>producer</name>
<operator>NOT_EQUAL</operator>
<value>System</value><value>INFOARCHIVE</value>
</criterion></data>
The following criteria returns the System audits only
<data><criterion><name>producer</name>
<operator>EQUAL</operator><value>System</value>
</criterion></data>

The following criteria returns the Tenant audits only


<data><criterion><name>producer</name>
<operator>EQUAL</operator><value>INFOARCHIVE</value>
</criterion></data>
16.9 Configuring Custom Audits
This section describes an example of configuring and viewing custom audits.

OpenText InfoArchive 21.2 Page 180 of 331


The steps are:
- Register your event type.
- Optionally, enable the audit.
- Create the audit.
- View the audit.

There are some caveats with custom audits that the GUI cannot be used to
enable/disable these audit event types.
16.9.1 Registering an Event Type
You need to decide if the event type is going to be at the system, tenant,
or application level. Depending on the level, there are three REST
endpoints for each.

For simplicity, this example will create the audit event type at the system
level.
curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H
'Content-Type: application/hal+json' -d '{"enabled": true, "name" : "MyEventName", "type" :
"MyEventType" }' localhost:8765/systemdata/audit-event-types

Note that you do not need to pass the tenant or application id for creating an
application audit event, as this information is inferred from the path.
The response should look like the following (only one audit returned):
{
"id" : "af78176c-420f-4f88-b330-697ed01d1b4c",
"type" : "MyEventType",
"name" : "MyEventName",
"applicationId" : null,
"tenantId" : null,
"enabled" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/af78176c-420f-4f88-
b330-697ed01d1b4c"
},
"http://identifiers.emc.com/disable" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/af78176c-420f-4f88-
b330-697ed01d1b4c/disable"
},
"http://identifiers.emc.com/enable" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/af78176c-420f-4f88-
b330-697ed01d1b4c/enable"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/audit-event-types/af78176c-420f-4f88-
b330-697ed01d1b4c"
}
}
}

Some things to point out:

OpenText InfoArchive 21.2 Page 181 of 331


- If this had been done at the application level, the applicationId and tenantId
would have been filed in on the response.
- We could have had the audit disabled upon creation.
16.9.2 [Optionally] Enabling the Audit Event Type
This can be done by following the link relation to enable the audit event type (or
disable, if desired). If the delete link is present, you can delete the event.
.

Any event types can be deleted, so use caution with this API.
16.9.3 Creating an Audit
This is normally done automatically but, for a custom audit, a REST call is
required to do the audit. If the custom code was on the server, there is no need
to go through REST.
Again, there are three different endpoints, depending on if it is a system, tenant,
or application audit.

For simplicity, this example will create the audit at the system level.
curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H
'Content-Type: application/hal+json' -d '{"eventName" : "MyEventName", "eventType" : "MyEventType",
"eventSource" : "SOURCE", "applicationName" : "MyApp", "auditedObjectId" : "74bd48f5-b891-44bd-
a2c3-9d7df6aaed5b", "supplementalData" : {"field1" : "value1", "field2" : "value2"} }' lo-
calhost:8765/systemdata/audits

The mandatory fields are the eventName and eventType.


Usually, you will want to ensure the auditObjectId is set and should be the UUID
of that type of object if it is not, consider auditing against a different type. There
are cases where the auditObjectId may not match, which is why additional
information can be encoded in the supplemental data. The tenantId and
applicationId fields will automatically be set, depending on if it was posted to a
tenant or application end-point (our example was a system one).

The supplemental data is effectively a map of string, and the key cannot have a
space, but the value can.

The createdBy will be the user that is making the rest call. One possibility is to
specify in the supplementalData who actually performed the action, as creating
audits is restricted to the Administrator role.

Here is the response:

OpenText InfoArchive 21.2 Page 182 of 331


{
"id" : "ad50940d-65a0-4ea8-97a5-99e780896aba",
"createdBy" : "[email protected]",
"createdDate" : "2017-06-26T16:03:25.552-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-06-26T16:03:25.552-04:00",
"version" : 1,
"eventType" : "MyEventType",
"eventName" : "MyEventName",
"eventSource" : "SOURCE",
"auditedObjectId" : "74bd48f5-b891-44bd-a2c3-9d7df6aaed5b",
"supplementalData" : {
"field1" : "value1",
"field2" : "value2"
},
"tenantId" : null,
"applicationName" : "MyApp",
"applicationId" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/audits/ad50940d-65a0-4ea8-97a5-
99e780896aba"
}
}
}

Normally the applicationName would not be set for a system audit and usually
would not be passed in the payload.

16.9.4 Viewing Audits Not Ingested Yet


It is possible via rest to get the audits at either the system, tenant, or application
level by doing a GET on the audits link relation.
For simplicity, this example will get the audit at the system level, and we
specify a sort, so we see the most recent audits first:

curl H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….'


localhost:8765/systemdata/audits?sort=createdDate,desc
Here is the response:

OpenText InfoArchive 21.2 Page 183 of 331


{
"_embedded" : {
"audits" : [ {
"id" : "ad50940d-65a0-4ea8-97a5-99e780896aba",
"createdBy" : "[email protected]",
"createdDate" : "2017-06-26T16:03:25.552-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-06-26T16:03:25.552-04:00",
"version" : 1,
"eventType" : "MyEventType",
"eventName" : "MyEventName",
"eventSource" : "SOURCE",
"auditedObjectId" : "74bd48f5-b891-44bd-a2c3-9d7df6aaed5b",
"supplementalData" : {
"field1" : "value1",
"field2" : "value2"
},
"tenantId" : null,
"applicationName" : "MyApp",
"applicationId" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/audits/ad50940d-65a0-4ea8-97a5-
99e780896aba"
}
}
}, …
"page" : {
"size" : 10,
"totalElements" : 48,
"totalPages" : 5,
"number" : 0
}

OpenText InfoArchive 21.2 Page 184 of 331


17.0 Retention
The compliance system involves many resources and the following diagram
shows how to access the resources from the tenant. All compliance resources
are anchored from the tenant.

Tenant resources:
• Retention policies can be used by multiple applications as well as holds.
• Retention policy categories are automatically created when creating a
retention policy
• Events are automatically created when either event or mixed retention
policies are created
Application resources:
• Retained sets associate managed items to retention policies. Retained
sets always have at least one item in the set.
• Holds sets store which items have a hold applied
• Purge-lists are created automatically and are used to track the disposition
process

The following steps will explain how to do various operations.

OpenText InfoArchive 21.2 Page 185 of 331


17.1 Role Permission

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

Only retention managers can do retention operations.


By default, everyone has access to the Audit application.
Note that running jobs needs to be done by administrators.

OpenText InfoArchive 21.2 Page 186 of 331


17.2 Creating a Retention Policy

From now on, this document assumes that you know how to find the tenant link
from the main services page.
To get the retention-policies link do a get on the tenant, use the following:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207

The response will look like this (abbreviated)

{
"id" : "66139448-0814-4c73-9ffd-5810c64c1207",
"createdBy" : "system",
"createdDate" : "2017-02-24T10:38:02.448-05:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-02-24T10:38:02.448-05:00",
"version" : 1,
"name" : "INFOARCHIVE",
"permission" : {
"groups" : [ ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207/groups"
},
"http://identifiers.emc.com/applications" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207/applications"
},

"http://identifiers.emc.com/retention-policies" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207/retention-policies"
},…
}

We will create a duration-based retention policy with annual cutoff on December


31st.
Here is what the payload looks like (as the curl can be hard to read). When
sending the request, you do not need to format the payload with carriage returns
(done for readability).

OpenText InfoArchive 21.2 Page 187 of 331


{
"name":"RetainForOneYear",
"description":"Test sample",
"category":"Finance",
"agingStrategy":{
"type":"DURATION",
"agingPeriod":{
"units":"YEARS",
"value":1
},
"cutoff":{
"type":"ANNUAL",
"monthDay":"--12-31"
}
},
"dispositionStrategy":{
"type":"DESTROY_ALL"
},
"approval":{
"approver":"John Doe",
"approvedDate":"2017-02-01T00:00:00-05:00"
},
"note":"A note that can help explain its use",
"dispositionBlocked":false
}

Here is the request:


curl -X POST -d '{"name":"RetainForOneYear","description":"Test sam-
ple","category":"Finance","agingStrategy":{"type":"DURATION","agingPeriod":{"units":"YEARS","val
ue":1},"cutoff":{"type":"ANNUAL","monthDay":"--12-
31"}},"dispositionStrategy":{"type":"DESTROY_ALL"},"approval":{"approver":"John
Doe","approvedDate":"2017-02-01T00:00:00-05:00"},"note":"A note that can help explain its
use","dispositionBlocked":false}' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.ey…’ -H 'Accept:
application/hal+json' -H 'Content-Type: application/hal+json'
http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-5810c64c1207/retention-policies

OpenText InfoArchive 21.2 Page 188 of 331


The response will look like this (abbreviated):
{
"id" : "755f8c21-4635-4e56-b1e8-ca302957fd27",
"createdBy" : "[email protected]",
"createdDate" : "2017-02-24T17:17:12.772-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-02-24T17:17:12.772-05:00",
"version" : 1,
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"name" : "RetainForOneYear",
"description" : "Test sample",
"agingStrategy" : {
"type" : "DURATION",
"name" : "DURATION",
"agingPeriod" : {
"units" : "YEARS",
"value" : 1
},
"cutoff" : {
"type" : "ANNUAL",
"monthDay" : "--12-31"
}
},
"dispositionStrategy" : {
"type" : "DESTROY_ALL"
},
"customAttributes" : null,
"approval" : {
"approver" : "John Doe",
"approvedDate" : "2017-02-01T05:00:00Z"
},
"jurisdiction" : null,
"note" : "A note that can help explain its use",
"category" : "Finance",
"dispositionBlocked" : false,
"inUse" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/retention-policies/755f8c21-4635-
4e56-b1e8-ca302957fd27"
},
"http://identifiers.emc.com/retained-sets" : {
"href" : "http://localhost:8765/systemdata/retention-policies/755f8c21-4635-
4e56-b1e8-ca302957fd27/retained-sets"
},
"http://identifiers.emc.com/apply" : {
"href" : "http://localhost:8765/systemdata/retention-policies/755f8c21-4635-
4e56-b1e8-ca302957fd27/retained-sets"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/retention-policies/755f8c21-4635-
4e56-b1e8-ca302957fd27"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/retention-policies/755f8c21-4635-
4e56-b1e8-ca302957fd27"
}
}
}

Note that a retained-sets link relation provides an ability to view the retained sets
that are created when a retention policy is created.

OpenText InfoArchive 21.2 Page 189 of 331


Let’s create an event-based retention policy. As well, we will associate some
custom attributes with the retention policy (custom attributes are shown on the
GUI but cannot be edited).

{
"name": "Event",
"description": "",
"category": "",
"agingStrategy": {
"type": "EVENT",
"conditions": ["NoLongerNeeded"],
"agingPeriod": {
"units": "YEARS",
"value": 0
},
"cutoff": {
"type": "ANNUAL",
"monthDay": "--07-01"
}
},
"dispositionStrategy": {
"type": "DESTROY_ALL"
},
"approval": {
"approver": "",
"approvedDate": ""
},
"note": "",
"dispositionBlocked": false,
"customAttributes": {
"RECORD-CLASS-CODE": "ACC0001",
"RECORD-CLASS-NAME": "Accounts Payable",
"RECORD-RETENTION-MARKET": "CAD",
"RETENTION-EVENT-DESC": "The retention period begins on the last day of the fiscal
year in which the record is created."
}
}

OpenText InfoArchive 21.2 Page 190 of 331


Here is the request:

curl -X POST -d'


{"name":"Event","description":"","category":"","agingStrategy":{"type":"EVENT","conditions":["NoLo
ngerNeeded"],"agingPeriod":{"units":"YEARS","value":0},"cutoff":{"type":"ANNUAL","monthDay":"--
07-
01"}},"dispositionStrategy":{"type":"DESTROY_ALL"},"approval":{"approver":"","approvedDate":""},"
note":"","dispositionBlocked":false,"customAttributes": {"RECORD-CLASS-CODE": "ACC0001",
"RECORD-CLASS-NAME": "Accounts Payable","RECORD-RETENTION-MARKET":
"CAD","RETENTION-EVENT-DESC": "The retention period begins on the last day of the fiscal year in
which the record is created."}}' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept:
application/hal+json' -H 'Content-Type: application/hal+json'
http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-5810c64c1207/retention-policies

OpenText InfoArchive 21.2 Page 191 of 331


The response will look like this (abbreviated):
{
"id" : "20319b0b-14b0-4296-96c9-a061feb4a00c",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-06T14:21:37.056-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-06T14:21:37.056-05:00",
"version" : 1,
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"name" : "Event",
"description" : "",
"agingStrategy" : {
"type" : "EVENT",
"name" : "EVENT",
"conditions" : [ "NoLongerNeeded" ],
"agingPeriod" : {
"units" : "YEARS",
"value" : 0
},
"cutoff" : {
"type" : "ANNUAL",
"monthDay" : "--07-01"
}
},
"dispositionStrategy" : {
"type" : "DESTROY_ALL"
},
"customAttributes" : {
"RECORD-CLASS-CODE" : "ACC0001",
"RECORD-CLASS-NAME" : "Accounts Payable",
"RECORD-RETENTION-MARKET" : "CAD",
"RETENTION-EVENT-DESC" : "The retention period begins on the last day of the fis-
cal year in which the record is created."
},
"approval" : {
"approver" : "",
"approvedDate" : null
},
"jurisdiction" : null,
"note" : "",
"category" : "",
"dispositionBlocked" : false,
"inUse" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/retention-policies/20319b0b-14b0-
4296-96c9-a061feb4a00c"
},
"http://identifiers.emc.com/retained-sets" : {
"href" : "http://localhost:8765/systemdata/retention-policies/20319b0b-14b0-
4296-96c9-a061feb4a00c/retained-sets"
},
"http://identifiers.emc.com/apply" : {
"href" : "http://localhost:8765/systemdata/retention-policies/20319b0b-14b0-
4296-96c9-a061feb4a00c/retained-sets"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/retention-policies/20319b0b-14b0-
4296-96c9-a061feb4a00c"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/retention-policies/20319b0b-14b0-
4296-96c9-a061feb4a00c"
}
}

Some key points:


- When specifying custom attributes, the keys are not allowed to have
spaces, but the values can have spaces.

OpenText InfoArchive 21.2 Page 192 of 331


17.3 Modifying a Retention Policy

If a retention policy can be modified, when doing a get on the retention policy, a
link relation for the update will be returned if the retention policy can be updated.
Retention polices that are in use have a limitation on what can be changed.
The following are rules governing retention policies in use:
• Cannot have the name changed
• Cannot changed the agingStrategy to a different type (for example,
change from DURATION to FIXED_DATE)
• Cannot change conditions for event or mixed retention policies

OpenText InfoArchive 21.2 Page 193 of 331


17.4 Applying Retention to an Application Manually
To apply retention to an application, package, or table, the resource needs to be
looked up. In this example, we will apply retention to a named table. A table
application needs to be installed.

Here is an overview (from the tenant):

For simplicity, the databases, schemas, and tables are shown. You obviously
need to find the appropriate database from the collection and, similarly, for the
schemas and tables.
In the following procedure, we provide the step to get the href for an application
(in this case Audit). We will need this as the object that we want to apply
retention to.
The call to apply retention is done against the retention policy. We assume that
you have looked up the retention-policies link from the tenant.

abc

OpenText InfoArchive 21.2 Page 194 of 331


Here is the command to list the retention policies:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…’. -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207/retention-policies
The rest response will look like this: (note that it depends on how many retention
policies were created; in this example, only the sample Audit application defined
a retention policy).
{
"_embedded" : {
"retentionPolicies" : [ {
"createdBy" : "[email protected]",
"createdDate" : "2019-08-27T17:44:01.972085-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2019-08-27T17:44:01.972085-04:00",
"version" : 1,
"id" : "66412cec-9a08-4176-8c9b-e1601de1afe7",
"tenantId" : "c5ea421d-e8fd-4fb0-8006-cf96712cb9e1",
"name" : "Audit-policy",
"description" : null,
"agingStrategy" : {
"type" : "DURATION",
"name" : "DURATION",
"agingPeriod" : {
"units" : "DAYS",
"value" : 89
},
"cutoff" : null
},
"dispositionStrategy" : {
"type" : "DESTROY_ALL"
},
"customAttributes" : null,
"approval" : null,
"jurisdiction" : null,
"note" : null,
"category" : null,
"dispositionBlocked" : false,
"inUse" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/retention-policies/66412cec-9a08-
4176-8c9b-e1601de1afe7"
},
"http://identifiers.emc.com/retained-sets" : {
"href" : "http://localhost:8765/systemdata/retention-policies/66412cec-9a08-
4176-8c9b-e1601de1afe7/retained-sets"
},
"http://identifiers.emc.com/apply" : {
"href" : "http://localhost:8765/systemdata/retention-policies/66412cec-9a08-
4176-8c9b-e1601de1afe7/retained-sets"
},
"http://identifiers.emc.com/apply-async" : {
"href" : "http://localhost:8765/systemdata/retention-policies/66412cec-9a08-
4176-8c9b-e1601de1afe7/async"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/retention-policies/66412cec-9a08-
4176-8c9b-e1601de1afe7"
}
}
}, …

There are now two APIs, you can either call apply (synchronous) or apply-async.

OpenText InfoArchive 21.2 Page 195 of 331


This is what the JSON payload looks like for the apply retention call
(synchronous)
{
"itemsToProtect":[
{"itemToProtect":http://localhost:8080/restapi/systemdata/applications/8701a41a-
e195-41f1-a330-6c4894b30b13
}],
"type":"application",
"retainedSetName":"MyRetentionSet",
"retainedSetDescription":"a description",
"application":"http://localhost:8080/restapi/systemdata/applications/8701a41a-e195-
41f1-a330-6c4894b30b13",
"baseDate":"2017-02-27T00:00:00-05:00",
"ageIndividually":false
}

If the asynchronous method was called, a 202 (Accepted) response is returned


and the order item for apply retention is returned.

OpenText InfoArchive 21.2 Page 196 of 331


Attribute Requir Descript Notes
ed ion

itemsToProtect Y An array of Can specify a name to help with lookups


attributes

type Y Type of One of:


object
- application
being
- aip
retained
- table
- aiu
- row

retainedSetName Y Name of Set must not already exist


the set to
use

retainedSetDescr N Description
iption

application Y Application For example,


reference "http://localhost:8765/systemdata/applicati
ons/4ab79d38-e080-4b57-bd1a-652a364040b0"

baseDate N Mandatory for duration and mixed retention


policies if the set is not aging individually
When applying retention, the base date
parameter should be in the
ISO_OFFSET_DATE_TIME format, for example
2020-02-20T16:01:54-05:00

eventContext N Mandatory for mixed and event retention


policies if the set is aging individually

ageIndividually N If multiple
items are
added to
the set,
how do
they age

If items are to age individually (currently only for records), then the baseDate and
eventContext need to be set for each item, depending on the retention strategy.
Here is an example of the payload for a mixed retention policy where both items
are put in the same set, but age individually. Both records could share the same
context if the same event governs both.

OpenText InfoArchive 21.2 Page 197 of 331


{
"itemsToProtect":[{
"name":"Record 1",
"itemToProtect": “8701a41a-e195-41f1-a330-6c4894b30b13:aiu:12345”
"baseDate":"2017-02-27T00:00:00-05:00",
“eventContext":"12345",
},{
name":"Record 2",
"itemToProtect":“8701a41a-e195-41f1-a330-6c4894b30b13:aiu:12346”,
"baseDate":"2017-01-27T00:00:00-05:00",
“eventContext":"12346",
],
"type":"aiu",
"retainedSetName":"MyRetentionSet",
"retainedSetDescription":"a description",
"application":"http://localhost:8080/restapi/systemdata/applications/8701a41a-e195-
41f1-a330-6c4894b30b13",
"ageIndividually":true
}

It is not possible to put two applications into the same set as, by definition, they
will be in separate applications.

Here is the call to apply retention to the application (synchronous):


curl -X POST -d
'{"itemsToProtect":[{"itemToProtect":"http://localhost:8080/restapi/systemdata/applications/8701a41a-
e195-41f1-a330-
6c4894b30b13"}],"type":"application","retainedSetName":"MyRetentionSet","retainedSetDescription":"
a description","application":"http://localhost:8080/restapi/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13","baseDate":"2017-02-27T00:00:00-05:00","ageIndividually":false}' -H 'Authoriza-
tion: Bearer eyJhbGciOiJIUzI1NiJ9….’ -H 'Accept: application/hal+json' -H 'Content-Type: applica-
tion/hal+json' http://localhost:8765/systemdata/retention-policies/05e63aac-54f8-470b-bef7-
be5bbd73676b/retained-sets

OpenText InfoArchive 21.2 Page 198 of 331


Here is the response:
{
"id" : "9defde79-c950-4ec6-aace-898eb7e811be",
"createdBy" : "[email protected]",
"createdDate" : "2017-02-27T17:41:14.903-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-02-27T17:41:15.059-05:00",
"version" : 2,
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"filterName" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"name" : "MyRetentionSet",
"description" : "a description",
"baseDate" : "2017-02-27T05:00:00Z",
"ageIndividually" : false,
"retentionPolicy" : "http://localhost:8765/systemdata/retention-policies/05e63aac-
54f8-470b-bef7-be5bbd73676b",
"qualificationDate" : "2017-05-27T05:00:00Z",
"type" : "application",
"externalReference" : null,
"externalReferenceContext" : null,
"partitionkeys" : [ "8701a41a-e195-41f1-a330-6c4894b30b13" ],
"events" : null,
"retentionPolicyName" : "Audit-policy",
"retentionPolicyAgingStrategyName" : "DURATION",
"count" : 1,
"supplementalData" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/retained-sets/9defde79-c950-4ec6-
aace-898eb7e811be"
},
"http://identifiers.emc.com/retention-applications" : {
"href" : "http://localhost:8765/systemdata/retained-sets/9defde79-c950-4ec6-
aace-898eb7e811be/managed-items"
},
"http://identifiers.emc.com/retention-policy" : {
"href" : "http://localhost:8765/systemdata/retention-policies/05e63aac-54f8-
470b-bef7-be5bbd73676b"
}
}
}

Some tips:
- If you get violation of uniqueness constraint, then the purge set name was
already in use.
- The response returns information about the set. If the set is not aging
individually, a qualification date may be calculated for the set.
- We can confirm that the correct retention policy was used.

The same retention policy can be applied multiple times to an item.

Following the retention-applications link gives access to information about the


items in the set. Depending on the type of item that retention was applied to,
different information can be made available.

OpenText InfoArchive 21.2 Page 199 of 331


17.4.1 Apply retention to records matching a query

Applying retention to records based on a search result requires running a job.


The reason for running a job is that search criteria being used could act on a
large result set and the job provides more flexibility for defining a base date
based on a field on the record.
The steps required are:
1. Create the job definition
2. Run the job (a job instance is created)
3. Wait for the job instance to finish

The general steps are generic for any job, but these instructions focus on
applying retention to records (as the parameters required differ depending on the
job )

17.4.1.1 Creating the job definition

For the first step, a job definition needs to exist that indicates
- Which search to run (a search name and search set) which also indicates
which fields to be shown later when these records show up in purge lists
- Which application is the search defined in
- What search criteria to use
- Which retention policy to apply
- Which attribute to use as the base date (for duration-based retention
policies)

Here is a description of the job parameters

Parameter Description

searchName This is the name of the search to execute. The search must be
defined in the application and must be in the “ready” state.

searchSet Search set (also mentioned as search-composition in REST) within


the search to use.

searchCriteria Specify in XML the search criteria to use.


File e.g.

OpenText InfoArchive 21.2 Page 200 of 331


Parameter Description

<data><criterion><name>CustomerFirstName</name><operator>S
TARTS_WITH</operator><value>Morgan</value></criterion></da
ta>

This is the same criteria used by any search and you can use Chrome
F12 for a search via the GUI to see the format

retentionPolic All four types of retention policies are supported. Depending on the
yName type of policy, other properties are required to be set.

contextType Used for Event policies. There are two possible values
• Attribute: The job gets the context from an attribute in the data.
The attribute is set in the context field.
• Fixed: The job uses the value in this field as the context for the
events.
For Example, if you want to have all records for an employee
age for five years after she/he has left the company. You would
make the context the employee ID, since it will be the same for
all documents. InfoArchive groups all documents with the same
context together and you would trigger the event using this
context. All records associated with this context (i.e., employee #)
will be eligible for disposition in five years

context The value is dependent on the contextType. Either the attribute (its
value) to be used as the context or a value entered into this field will
be used as a context for all records that are returned by the search.

retentionDate This value is used for Duration and Duration portion of Mixed
Attribute retention policies. Duration policies that are applied to records need
to have a date to calculate the age of the record. The date will be
taken from the attribute specified in this field. If the attribute does
not have a date, the record will be skipped meaning a policy will not
be applied

trigger Event policies can be triggered using the records data. There are two
possible values for this property:
• True: The job will attempt to trigger the event policy that was
applied to the records.
• False:
Set the value to false if not using either event or mixed retention
policy

triggerCheck The job has the ability to use an attribute to determine if the trigger
Attribute should be performed. For example, if the data has a field that

OpenText InfoArchive 21.2 Page 201 of 331


Parameter Description

indicated if the employee has left the company. hasLeft = true,


for example. The attribute is ’hasLeft’ and the value is ’true’. The
TriggerCheckValue would be the set to the value to check, in this
case ’true’. If the value in the attribute is anything but the trigger
check value, then the event would not be triggered.

triggerCheck This is value to check against for whether the event should be
Value triggered.

triggerDateAtt The job requires a date to trigger the event. This property is an
ribute attribute name where the job will get the trigger date. For example,
if the event is to keep all employee records five years after the
employee leaves the company. There would be an attribute called
’terminationDate’ that contains the date the employee left the
company. Putting terminationDate in the TriggerDateAttribute
property would instruct the job to fetch the trigger date from the
terminationDate attribute.

OpenText InfoArchive 21.2 Page 202 of 331


The following table explains the job attributes we are setting:

Name Value Notes

Name My Apply Retention Policy Must be unique. Will get a


to Records duplicate key exception (400) if
not unique

handlerName ApplyPolicyToRecordsJob This value must be one of


handler names for one of the
existing jobs. (Same handler as
the Apply Policy To Records job)

Description Applies a specific retention Optional. Use to distinguish this


policy to records matching job
a search criterion .

expirationInterval 60000 Same value as on the Apply


Retention Policy to Records

logLevel INFO Level for logging

Interval 0 Want the job to be run manually


not on an interval

This table explains the job parameters

OpenText InfoArchive 21.2 Page 203 of 331


Name Value Notes

searchName FirstName_Operator Must be one of the published searches defined


for the application

searchSet Set 1 Must be the search set name (by default, Set 1,
space is required)

searchCriteriaFile <data> This is a search criterion and its value is specific


<criterion><name>Cust
omerFirstName</name to the search being used.
>
<operator>STARTS_WI
TH</operator><value>
Morgan</value></criteri
on></data>

applications Link for the application Link for the application where the records reside.

retentionPolicyName Audit-policy Name of the retention policy to apply, in this case


we picked a duration-based retention policy

contextType attribute Indicates the context type

context “” Used for event-based retention

retentionDateAttribute CallEndDate Name of one of columns returned in the search


that store the base date to use for our duration-
based retention policy

trigger false Leaving as same as Apply Retention Policy to


Records (for event-based retention)

triggerCheckAttribute trigger Leaving as same as Apply Retention Policy to


Records (for event-based retention)

triggerCheckValue “” Leaving as same as Apply Retention Policy to


Records (for event-based retention)

Using the following command to create the job definition (simplified version,
doesn’t allow manualRetry, removes values:

OpenText InfoArchive 21.2 Page 204 of 331


curl -X POST -d'{"name":"Test Apply Retention Policy to Records", "handlerName":"Ap-
plyPolicyToRecordsJob","applicationScoped":true,"interval":0,"expirationInter-
val":600000,"rescheduleInterval":60000,"properties":{"searchName":"FirstName_Opera-
tor","searchSet":"Set 1","searchCriteriaFile":"<data> <criterion><name>CustomerFirst-
Name</name><operator>STARTS_WITH</operator><value>Morgan</value></crite-
rion></data>","retentionPolicyName":"Audit-policy","contextType":"attribute","con-
text":"","retentionDateAttribute":"CallEndDate","trigger":"false","triggerCheckAttrib-
ute":"","triggerCheckValue":"","triggerDateAttribute":""},"applications":["http://lo-
calhost:8080/restapi/systemdata/applications/5b0ce807-ce0c-4d2a-97b5-3776e2d32fe6"]} '
-H 'Authorization: Bearer eyJhbGci… -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/job-definitions

This is the full example providing all of the values for creating a job
curl -X POST -d'{"name":"My Apply Retention Policy to Records","handlerName":"Apply-
PolicyToRecordsJob","description":"Applies a specific retention policy to records
matching a search criteria ..","inactive":false,"readOnly":false,"cancelE-
nabled":false,"manualRetryEnabled":true,"repeatable":true,"applica-
tionScoped":true,"systemScoped":false,"tenantScoped":false,"interval":0,"max-
Attempts":0,"expirationInterval":600000,"rescheduleInterval":60000,"cronExpres-
sion":"","logLevel":"INFO","properties":{"searchName":"FirstName_Opera-
tor","searchSet":"Set 1","searchCriteriaFile":"<data> <criterion><name>CustomerFirst-
Name</name><operator>STARTS_WITH</operator><value>Morgan</value></crite-
rion></data>","retentionPolicyName":"Audit-policy","contextType":"attribute","con-
text":"","retentionDateAttribute":"CallEndDate","trigger":"false","triggerCheckAttrib-
ute":"","triggerCheckValue":"","triggerDateAttribute":""},"applications":["http://lo-
calhost:8080/restapi/systemdata/applications/5b0ce807-ce0c-4d2a-97b5-
3776e2d32fe6"],"internal":false} ' -H 'Authorization: Bearer eyJhbG… -H 'Accept: ap-
plication/hal+json' -H 'Content-Type: application/hal+json' http://localhost:8765/sys-
temdata/job-definitions

OpenText InfoArchive 21.2 Page 205 of 331


Here is a typical response (using the full example)
{
"id" : "02ae4673-6b99-44f6-9846-7f98bdcdd393",
"createdBy" : "[email protected]",
"createdDate" : "2018-09-17T15:17:42.893-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2018-09-17T15:17:42.893-04:00",
"version" : 1,
"name" : "My Apply Retention Policy to Records",
"handlerName" : "ApplyPolicyToRecordsJob",
"description" : "Applies a specific retention policy to records matching a search
criteria ..",
"inactive" : false,
"readOnly" : false,
"internal" : false,
"protect" : false,
"manualRetryEnabled" : true,
"cancelEnabled" : false,
"applicationScoped" : true,
"tenantScoped" : false,
"systemScoped" : false,
"cronExpression" : "",
"interval" : 0,
"maxAttempts" : 0,
"expirationInterval" : 600000,
"rescheduleInterval" : 60000,
"applications" : [ "http://localhost:8765/systemdata/applications/5b0ce807-ce0c-
4d2a-97b5-3776e2d32fe6" ],
"tenants" : [ ],
"roles" : null,
"groups" : null,
"properties" : {
"searchName" : "FirstName_Operator",
"searchSet" : "Set 1",
"searchCriteriaFile" : "<data> <criterion><name>CustomerFirstName</name><opera-
tor>STARTS_WITH</operator><value>Morgan</value></criterion></data>",
"retentionPolicyName" : "Audit-policy",
"contextType" : "attribute",
"context" : "",
"retentionDateAttribute" : "CallEndDate",
"trigger" : "false",
"triggerCheckAttribute" : "",
"triggerCheckValue" : "",
"triggerDateAttribute" : ""
},
"logLevel" : "INFO",
"lastRun" : null,
"lastStatus" : null,
"lastScheduledBy" : null,
"nextRun" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-definitions/02ae4673-6b99-44f6-
9846-7f98bdcdd393"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-definitions/02ae4673-6b99-44f6-
9846-7f98bdcdd393"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/job-definitions/02ae4673-6b99-44f6-
9846-7f98bdcdd393"
},
"http://identifiers.emc.com/activate" : {
"href" : "http://localhost:8765/systemdata/job-definitions/02ae4673-6b99-44f6-
9846-7f98bdcdd393/activate"
},
"http://identifiers.emc.com/inactivate" : {
"href" : "http://localhost:8765/systemdata/job-definitions/02ae4673-6b99-44f6-
9846-7f98bdcdd393/inactivate"
},
"http://identifiers.emc.com/job-instances" : {

Key points:

OpenText InfoArchive 21.2 Page 206 of 331


- If we want to use the search to apply a hold or apply retention, the search
needs to be published.
- Within a search, different search sets (search compositions) define which
fields to use.
A quick explanation of the parameters for our example:
- SearchName and Search Set indicate what search will be used and what
fields will be shown later when items are viewed in retained sets or purge
lists
- The context type is set to attribute, so we indicate which column in the
search contains the base date field (required for the Duration policy)
- We used the Audit retention policy as it was a duration-based policy
- The retentionDateAttribute is the attribute we want to use as the base date
from the search results. That has to be a column returned in your search
results.

17.4.1.2 Running the job


So, in the post parameters, we specify two values: “now” that we want the job to
run immediately, and the application link that the job instance will be scoped to.
The possible values are:

Name Type Description

now boolean Whether not to run the job


now (or schedule it)

application Link (string) For jobs that support


application scoping the
application to run against

Tenant Link(string) Reserved for future use.

The application link is the same as what was specified when creating the job
definition. The reason for including the application link on the run is that in the
job definition it is possible to scope the definition to multiple applications but in
this case running a job instance is for a particular application.

To run the job, use the following:


It is possible to get the job instances link from the earlier response
(http://identifiers.emc.com/job-instances).

OpenText InfoArchive 21.2 Page 207 of 331


curl -X POST -d'{"now":true,"application":"http://localhost:8080/restapi/sys-
temdata/applications/5b0ce807-ce0c-4d2a-97b5-3776e2d32fe6"} ' -H 'Authorization:
Bearer eyJhbGciO…-H 'Accept: application/hal+json' -H 'Content-Type: applica-
tion/hal+json' http://localhost:8765/systemdata/job-definitions/02ae4673-6b99-44f6-
9846-7f98bdcdd393/job-instances

This is the expected output from the REST call:

OpenText InfoArchive 21.2 Page 208 of 331


{
"id" : "350580c9-4958-4e00-ab1a-93ff7b79eceb",
"jobDefinition" : "http://localhost:8765/systemdata/job-definitions/02ae4673-6b99-44f6-9846-
7f98bdcdd393",
"application" : "http://localhost:8765/systemdata/applications/5b0ce807-ce0c-4d2a-97b5-
3776e2d32fe6",
"parent" : null,
"tenant" : null,
"log" : null,
"inactive" : false,
"scheduledAt" : 1537214390105,
"scheduledBy" : "[email protected]",
"scheduledAtString" : "2018-09-17T19:59:50.105Z",
"startTime" : null,
"endTime" : null,
"attempt" : 1,
"expirationTime" : 1537214990116,
"firstTime" : true,
"canceled" : false,
"status" : "SCHEDULED",
"properties" : null,
"roles" : null,
"groups" : null,
"creatorId" : null,
"successorId" : null,
"result" : null,
"logLevel" : "INFO",
"manualRetryCount" : 0,
"uniqueForJobDefinition" : null,
"permission" : {
"groups" : [ ]
},
"logger" : null,
"jobProperties" : {
"retentionDateAttribute" : "CallEndDate",
"triggerCheckValue" : "",
"searchCriteriaFile" : "<data> <criterion><name>CustomerFirstName</name><opera-
tor>STARTS_WITH</operator><value>Morgan</value></criterion></data>",
"triggerCheckAttribute" : "",
"retentionPolicyName" : "Audit-policy",
"searchName" : "FirstName_Operator",
"searchSet" : "Set 1",
"contextType" : "attribute",
"context" : "",
"trigger" : "false",
"triggerDateAttribute" : ""
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-instances/350580c9-4958-4e00-ab1a-
93ff7b79eceb"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-instances/350580c9-4958-4e00-ab1a-
93ff7b79eceb"
},
"http://identifiers.emc.com/unskip" : {
"href" : "http://localhost:8765/systemdata/job-instances/350580c9-4958-4e00-ab1a-
93ff7b79eceb/unskip"
},
"http://identifiers.emc.com/skip" : {
"href" : "http://localhost:8765/systemdata/job-instances/350580c9-4958-4e00-ab1a-
93ff7b79eceb/skip"
},
"http://identifiers.emc.com/job-children" : {
"href" : "http://localhost:8765/systemdata/job-instances/350580c9-4958-4e00-ab1a-
93ff7b79eceb/job-children"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/5b0ce807-ce0c-4d2a-97b5-
3776e2d32fe6"
},
"http://identifiers.emc.com/job-definition" : {
"href" : "http://localhost:8765/systemdata/job-definitions/02ae4673-6b99-44f6-9846-
7f98bdcdd393"
}
}
}

OpenText InfoArchive 21.2 Page 209 of 331


The sections highlighted in the REST response are of particular interest:

- The scheduledAtString tells us when the job is scheduled to run


- The status tells us that it is scheduled
- The self-link can be used to determine when the job has finished (by doing
a GET)

17.4.1.3 Waiting for the job to finish

The section 23.5 give details for viewing details of a job instance, and following
other links to get more information. The GUI can also be used to view
information about your job. Polling can be done by doing a GET on the job
instance link.
Some other points of interest:
- If this was a one-shot operation to apply retention to a search, if you want
to clean everything up, the job instances need to be removed from the job
definition first and then the job definition can be deleted.
o Job instances can only be deleted after they have completed,
failed, or expired
- It is possible to modify the job using a PUT and change the criteria,
retention policy to do a different search. Each job instance tracks what
parameters were used for the run.

It is possible to use an event retention policy (specifying which field sets up the
context for the event. If the job was configured to trigger events, the “Process
Retention Events” job must be run.

17.4.2 Apply retention to a collection of AIPs

A new link relation has been added to the AIP collection to allow retention to be
applied.

Here is an example of how to find that link:


curl -H 'Authorization: Bearer eyJhbGciO -H 'Accept: application/hal+json' -H 'Content-Type: applica-
tion/hal+json' http://localhost:8765/systemdata/applications/c8038da4-7852-461f-8f66-
b9f109a65dde/aips

OpenText InfoArchive 21.2 Page 210 of 331


{
"_embedded" : {
"aips" : [ {

},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/applications/c8038da4-7852-461f-8f66-
b9f109a65dde/aips?page=0&size=10"
},
"http://identifiers.emc.com/receive" : {
"href" : "http://localhost:8765/systemdata/applications/c8038da4-7852-461f-8f66-
b9f109a65dde/aips"
},
"http://identifiers.emc.com/ingest-direct" : {
"href" : "http://localhost:8765/systemdata/applications/c8038da4-7852-461f-8f66-
b9f109a65dde/aips?ingestDirect=true"
},
"http://identifiers.emc.com/ingest-async" : {
"href" : "http://localhost:8765/systemdata/applications/c8038da4-7852-461f-8f66-
b9f109a65dde/aips/ingest-async"
},
"http://identifiers.emc.com/apply-retention" : {
"href" : "http://localhost:8765/systemdata/applications/c8038da4-7852-461f-8f66-
b9f109a65dde/aips/apply-retention"
}
},
"page" : {
"size" : 10,
"totalElements" : 7,
"totalPages" : 1,
"number" : 0
}
}

The parameters for this post are the same as for a GET on packages,
The expected body has three parameters
• retentionPolicyName
• retainedSetName
• retainedSetDescription

The first two parameters are mandatory and the retainedSetName must not
already exist.

OpenText InfoArchive 21.2 Page 211 of 331


17.5 Ensuring Retention has been Applied Correctly

Here is a reference of the hierarchy:

So, when items are put under retention, managed items are created as well as
retained sets.

When we applied retention, we got a reference to retained set.


View the items in retained set by following the retention-applications link on the
retained set
Here is the command:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/retained-sets/9defde79-c950-4ec6-aace-
898eb7e811be/managed-items

OpenText InfoArchive 21.2 Page 212 of 331


{
"_embedded" : {
"policyApplications" : [ {
"id" : "49a01ab5-6593-475e-badf-d14ee3b0eb19",
"createdBy" : "[email protected]",
"createdDate" : "2017-02-27T17:41:15.044-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-02-27T17:41:15.044-05:00",
"version" : 1,
"managedItem" : "http://localhost:8765/systemdata/managed-items/298b321f-e778-
4549-9ef4-e893868a7017/partition/8701a41a-e195-41f1-a330-6c4894b30b13",
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"partitionKey" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"retainedSet" : "http://localhost:8765/systemdata/retained-sets/9defde79-c950-
4ec6-aace-898eb7e811be",
"retentionPolicyName" : "Audit-policy",
"retainedSetName" : "MyRetentionSet",
"retentionPolicyAgingStrategyName" : "DURATION",
"ageIndividually" : false,
"projectedDispositionDate" : "2017-05-27T05:00:00Z",
"underHold" : false,
"applicationDate" : "2017-02-27T17:41:14.981-05:00",
"baseDate" : "2017-02-27T05:00:00Z",
"qualificationDate" : "2017-05-27T05:00:00Z",
"managedItemExternalId" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"managedItemType" : "application",
"supplementalData" : [ {
"key" : "name",
"value" : "Audit"
}, {
"key" : "description",
"value" : "This application stores the audit history"
}, {
"key" : "category",
"value" : "Administration"
}, {
"key" : "status",
"value" : "IN_TEST"
}, {
"key" : "applicationType",
"value" : "ACTIVE_ARCHIVING"
}, {
"key" : "archiveType",
"value" : "SIP"
}, {
"key" : "defaultRetentionPolicy",
"value" : null
} ],
"events" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/retention-applications/49a01ab5-
6593-475e-badf-d14ee3b0eb19/partition/8701a41a-e195-41f1-a330-6c4894b30b13"
},
"http://identifiers.emc.com/managed-item" : {
"href" : "http://localhost:8765/systemdata/managed-items/298b321f-e778-4549-
9ef4-e893868a7017/partition/8701a41a-e195-41f1-a330-6c4894b30b13"
},
"http://identifiers.emc.com/retained-set" : {
"href" : "http://localhost:8765/systemdata/retained-sets/9defde79-c950-4ec6-
aace-898eb7e811be"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/retention-applications/49a01ab5-
6593-475e-badf-d14ee3b0eb19/partition/8701a41a-e195-41f1-a330-6c4894b30b13"
}
}
} ]
},

OpenText InfoArchive 21.2 Page 213 of 331


Things to note:
- Link relations are provided to remove the item from the set. If no items
would remain in the set, then the set is automatically deleted.
- A link relation is provided is to look at the managed item. This could be of
interest if the item has multiple retention policies or holds applied.
- The projected disposition date considers all retention that is applied to the
item

The supplemental data varies depending on the type of item chosen:

Type Fields

Application Fixed fields

Table Fixed fields

Package Fixed fields

Records Based on the search used to find the


records. Changes to the search affect
which values are available.

Tip: For records, ensure that the search is always published. Otherwise, only the
ID of the record is returned in the supplemental data.

We don’t want to always iterate through the retained sets to determine if


something is under retention. For this, queries against the managed items link-rel
is required.
Let’s assume that you know how to get the link relation for the application.
Do a get on the applications from the tenant link, and we will use a spEL
expression to get the Audit application:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9… -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207/applications?spel=%3F%5Bname%3D%3D%27Audit%27%5D%0D%0A

OpenText InfoArchive 21.2 Page 214 of 331


The response should look something like this:
{
"_embedded" : {
"applications" : [ {
"id" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"createdBy" : "[email protected]",
"createdDate" : "2017-02-24T10:40:48.727-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-02-24T10:41:00.462-05:00",
"version" : 2,
"name" : "Audit",
"structuredDataStorageAllocationStrategy" : "DEFAULT",
"tenant" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207",
"type" : "ACTIVE_ARCHIVING",
"archiveType" : "SIP",
"searchCreated" : true,
"xdbLibraryAssociated" : true,
"state" : "IN_TEST",
"viewStatus" : true,
"description" : "This application stores the audit history",
"category" : "Administration",
"retentionEnabled" : false,
"defaultRetentionPolicyName" : null,
"cryptoIV" : "99svB8pShrgM7PWENnD+nA==",
"metadataCacheSize" : 0,
"permission" : {
"groups" : [ ]
},
"cryptoEncoding" : "base64",
"cryptoKeyID" : "search_results_8701a41a-e195-41f1-a330-6c4894b30b13",
"_links" : {
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13/groups"
},
"self" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13"
},

"http://identifiers.emc.com/managed-items" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13/managed-items"
},
"http://identifiers.emc.com/purge-candidate-lists" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13/purge-candidate-lists"
},
"http://identifiers.emc.com/retained-sets" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13/retained-sets"
},
},

The following is the request. We specifically specify the type and the externalId of
the resource we want to check if it is managed:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9… -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-a330-
6c4894b30b13/managed-
items?type=application&externalId=http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13

OpenText InfoArchive 21.2 Page 215 of 331


Here is the response:
{
"_embedded" : {
"managedItems" : [ {
"id" : "298b321f-e778-4549-9ef4-e893868a7017",
"createdBy" : "[email protected]",
"createdDate" : "2017-02-27T17:41:14.966-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-02-27T17:41:14.981-05:00",
"version" : 2,
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"filterName" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"externalId" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"name" : null,
"type" : "application",
"parentId" : null,
"directlyUnderRetention" : true,
"directlyUnderHold" : false,
"waitingForConfirmation" : false,
"estimatedFinalDisposition" : "2017-05-27T05:00:00Z",
"externalReference" : null,
"supplementalData" : null,
"projectedDispositionDate" : "2017-05-27T05:00:00Z",
"longestRetentionPolicyName" : "Audit-policy",
"longestRetentionSourceType" : "application",
"longestRetentionEventBased" : false,
"eventDate" : null,
"baseDate" : "2017-02-27T05:00:00Z",
"purgeList" : null,
"partitionKey" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"underHold" : false,
"underRetention" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/managed-items/298b321f-e778-4549-
9ef4-e893868a7017/partition/8701a41a-e195-41f1-a330-6c4894b30b13"
},
"http://identifiers.emc.com/retention-applications" : {
"href" : "http://localhost:8765/systemdata/managed-items/298b321f-e778-4549-
9ef4-e893868a7017/partition/8701a41a-e195-41f1-a330-6c4894b30b13/retention-
applications"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-a330-
6c4894b30b13/managed-items?type=application"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}

There are some key points about this API that need highlighting:

• It is possible to look up AIUs, row, tables, or packages, as well.


• When the managed item is returned, check the response. The type might
not match what you passed, which means that the item is not a managed
item, but either its parent or the application is under retention.

OpenText InfoArchive 21.2 Page 216 of 331


• The longest retention source type indicates where the retention is being
inherited from.
• If the call returns an empty collection, then neither a hold or a retention
policy is governing the item.

The external ID passed is the href for applications, tables, and AIPs
(packages).
The external ID passed for records is the row identifier returned from
searches.

When making the call to get managed items, it is scoped to a particular


application.

OpenText InfoArchive 21.2 Page 217 of 331


17.6 Creating Purge Lists Using the Generate Purge List Job
The recommendation is to install the PhoneCalls application, which automatically
applies retention to packages on ingestion, so that when we run the Generate
Purge List job, items are eligible and at least one purge list is created.
Here is an overview of the resources we will be accessing:

Overview of what we will do:


• Find the job-definition for our job.
• Use the job instances to determine the status of our job.
• Get the purge-list for our application. As the job is system scoped, purge
lists are created for each application.
Find the job-definition.

Start with a get on the top-level service:


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/services

OpenText InfoArchive 21.2 Page 218 of 331


From the response, find the link rel for the job-definitions:
{
"name" : "InfoArchive Home Resource",
"_links" : {
"self" : {
"href" : "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info" : {
"href" : "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants" : {
"href" : "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},…
"http://identifiers.emc.com/job-definitions" : {
"href" : "http://localhost:8765/systemdata/job-definitions"
},

}

Do a get on the job-definitions. We will use a spel expression to find our


particular job:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9… -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/job-
definitions?spel=%3F%5Bname%3D%3D%27GeneratePurgeCandidateList%27%5D%0D%0A

OpenText InfoArchive 21.2 Page 219 of 331


Here is the response:
{
"_embedded" : {
"jobDefinitions" : [ {
"id" : "dfe5bc74-d789-49de-b7a3-6c1552b2117e",
"createdBy" : "system",
"createdDate" : "2017-02-24T10:38:03.008-05:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-02-24T10:38:03.008-05:00",
"version" : 1,
"name" : "GeneratePurgeCandidateList",
"handlerName" : "GeneratePurgeCandidateListJob",
"description" : "Generate a Purge Candidate List",
"inactive" : false,
"readOnly" : false,
"internal" : false,
"repeatable" : true,
"applicationScoped" : false,
"tenantScoped" : false,
"systemScoped" : true,
"cronExpression" : null,
"interval" : 604800000,
"maxAttempts" : 1,
"expirationInterval" : 600000,
"rescheduleInterval" : 60000,
"applications" : [ ],
"tenants" : [ ],
"roles" : null,
"groups" : null,
"properties" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-definitions/dfe5bc74-d789-
49de-b7a3-6c1552b2117e"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-definitions/dfe5bc74-d789-
49de-b7a3-6c1552b2117e"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/job-definitions/dfe5bc74-d789-
49de-b7a3-6c1552b2117e"
},

"http://identifiers.emc.com/job-instances" : {
"href" : "http://localhost:8765/systemdata/job-definitions/dfe5bc74-d789-
49de-b7a3-6c1552b2117e/job-instances"
},

}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-definitions"
},
"http://identifiers.emc.com/add" : {
"href" : "http://localhost:8765/systemdata/job-definitions"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}

OpenText InfoArchive 21.2 Page 220 of 331


Job definitions are either scheduled by an interval, cron expression, or manual.
This job definition is scheduled to run on an interval (every week).
If the job was manual, the cron expression would be null and the interval would
be set to 0.

Let’s run the job. We post to the job-instances link off the job-definition: Note
running a job can be found in 23.4.

curl -X POST -d '{"now":true}' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: applica-


tion/hal+json' -H 'Content-Type: application/hal+json' http://localhost:8765/systemdata/job-
definitions/dfe5bc74-d789-49de-b7a3-6c1552b2117e/job-instances

OpenText InfoArchive 21.2 Page 221 of 331


This is an example of the response:
{
"id" : "dfe0b78d-eade-4173-b77f-029104512469",
"jobDefinition" : "http://localhost:8765/systemdata/job-definitions/dfe5bc74-d789-
49de-b7a3-6c1552b2117e",
"application" : null,
"parent" : null,
"tenant" : null,
"inactive" : false,
"scheduledAt" : 1488403829974,
"scheduledBy" : "[email protected]",
"scheduledAtString" : "2017-03-01T21:30:29.974Z",
"startTime" : null,
"endTime" : null,
"attempt" : 1,
"expirationTime" : 1488403829975,
"firstTime" : true,
"status" : "SCHEDULED",
"properties" : null,
"roles" : null,
"groups" : null,
"logger" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-
b77f-029104512469"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-
b77f-029104512469"
},
"http://identifiers.emc.com/unskip" : {
"href" : "http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-
b77f-029104512469/unskip"
},
"http://identifiers.emc.com/skip" : {
"href" : "http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-
b77f-029104512469/skip"
},
"http://identifiers.emc.com/job-children" : {
"href" : "http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-
b77f-029104512469/job-children"
},
"http://identifiers.emc.com/job-definition" : {
"href" : "http://localhost:8765/systemdata/job-definitions/dfe5bc74-d789-49de-
b7a3-6c1552b2117e"
},
"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-
b77f-029104512469/log"
}
}
}

Wait a few minutes and do a get on our job instance (note that job may be still be
r:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9… -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-b77f-
029104512469

OpenText InfoArchive 21.2 Page 222 of 331


Here is the response:
{
"id" : "dfe0b78d-eade-4173-b77f-029104512469",
"jobDefinition" : "http://localhost:8765/systemdata/job-definitions/dfe5bc74-d789-
49de-b7a3-6c1552b2117e",
"application" : null,
"parent" : null,
"tenant" : null,
"inactive" : false,
"scheduledAt" : 1488403829974,
"scheduledBy" : "[email protected]",
"scheduledAtString" : "2017-03-01T21:30:29.974Z",
"startTime" : "2017-03-01T16:30:30.004-05:00",
"endTime" : "2017-03-01T16:30:30.354-05:00",
"attempt" : 1,
"expirationTime" : 1488403829975,
"firstTime" : true,
"status" : "SUCCESS",
"properties" : null,
"roles" : null,
"groups" : null,
"logger" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-
b77f-029104512469"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-
b77f-029104512469"
},
"http://identifiers.emc.com/unskip" : {
"href" : "http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-
b77f-029104512469/unskip"
},
"http://identifiers.emc.com/skip" : {
"href" : "http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-
b77f-029104512469/skip"
},
"http://identifiers.emc.com/job-children" : {
"href" : "http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-
b77f-029104512469/job-children"
},
"http://identifiers.emc.com/job-definition" : {
"href" : "http://localhost:8765/systemdata/job-definitions/dfe5bc74-d789-49de-
b7a3-6c1552b2117e"
},
"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-
b77f-029104512469/log"
}
}
}

Interesting points:
There is a link to get at the logs (useful if something went wrong):

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/job-instances/dfe0b78d-eade-4173-b77f-
029104512469/log

OpenText InfoArchive 21.2 Page 223 of 331


Here is a sample response:
{
"id" : "aecfc98b-e6ee-4ba9-a349-a36b9da70152",
"contextId" : "dfe0b78d-eade-4173-b77f-029104512469",
"contextType" : "job",
"contextTypeId" : "GeneratePurgeCandidateList",
"mdc" : {
"jobName" : "GeneratePurgeCandidateList",
"jobHandler" : "GeneratePurgeCandidateListJob",
"context" : "name=GeneratePurgeCandidateList, scheduled by [email protected],
scheduled at 2017-03-01T21:30:29.974Z, attempt=1",
"context-id" : "dfe0b78d-eade-4173-b77f-029104512469",
"context-type" : "job",
"user" : "system"
},
"logMessages" : [ {
"time" : 1488403830012,
"level" : "INFO",
"message" : "Generating purge lists",
"stacktrace" : null
} ]
}

This job doesn’t log a lot, but other jobs could have more information. This is the
information is shown in the UI when clicking on the information for a job instance.

Now we look at our purge lists. This document will assume that you can find the
link for the PhoneCalls application (see example on how we found the Audit
application in the Audit section).

Start with a get on the PhoneCalls application (find under Tenant->applications):


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166

OpenText InfoArchive 21.2 Page 224 of 331


Here is the abbreviated response:
{
"id" : "c565f2d1-b32e-42ae-acbc-2476b70b1166",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-01T15:46:37.497-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-01T15:47:02.005-05:00",
"version" : 2,
"name" : "PhoneCalls",
"structuredDataStorageAllocationStrategy" : "DEFAULT",
"tenant" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207",
"type" : "ACTIVE_ARCHIVING",
"archiveType" : "SIP",
"searchCreated" : true,
"xdbLibraryAssociated" : true,
"state" : "IN_TEST",
"viewStatus" : true,
"description" : "The application has customer support phone calls history",
"category" : "Customer Support",
"retentionEnabled" : false,
"defaultRetentionPolicyName" : null,
"cryptoIV" : "vCNkLLCZNzuTt+ykK+rPKA==",
"metadataCacheSize" : 0,
"permission" : {
"groups" : [ ]
},
"cryptoEncoding" : "base64",
"cryptoKeyID" : "search_results_c565f2d1-b32e-42ae-acbc-2476b70b1166",
"_links" : {
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/groups"
},
"self" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166"
},
"http://identifiers.emc.com/delete-data" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/delete-data"
},
"http://identifiers.emc.com/tenant" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},
"http://identifiers.emc.com/managed-items" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/managed-items"
},
"http://identifiers.emc.com/purge-candidate-lists" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/purge-candidate-lists"
},
"

}
}
}

OpenText InfoArchive 21.2 Page 225 of 331


Now, we follow that link to look at our purge lists:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9… -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/purge-candidate-lists

Here is the abbreviated response:


{
"_embedded" : {
"purgeCandidateLists" : [ {

"id" : "fc6ff1f8-48bd-4de0-8b97-6b7c0399d24c",
"createdBy" : "system",
"createdDate" : "2017-03-01T16:30:30.053-05:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-03-01T16:30:30.337-05:00",
"version" : 2,
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"name" : "Purgelist-1",
"filterName" : "c565f2d1-b32e-42ae-acbc-2476b70b1166",
"status" : "UNDER_REVIEW",
"count" : 10,
"retentionPolicy" : "http://localhost:8765/systemdata/retention-
policies/1e74f1d8-522a-497a-a13b-18bba5ac0a70",
"dispositionSummary" : null,
"dispositionDate" : null,
"approvedDate" : null,
"rejectedDate" : null,
"cancelledDate" : null,
"retentionPolicyName" : "PhoneCalls-policy",
"type" : "aip",
"externalReference" : null,
"customAttributes" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-
48bd-4de0-8b97-6b7c0399d24c"
},
"http://identifiers.emc.com/approve" : {
"href" : "http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-
48bd-4de0-8b97-6b7c0399d24c/approve"
},
"http://identifiers.emc.com/reject" : {
"href" : "http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-
48bd-4de0-8b97-6b7c0399d24c/reject"
},
"http://identifiers.emc.com/retention-policy" : {
"href" : "http://localhost:8765/systemdata/retention-policies/1e74f1d8-522a-
497a-a13b-18bba5ac0a70"
},
"http://identifiers.emc.com/managed-items" : {
"href" : "http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-
48bd-4de0-8b97-6b7c0399d24c/managed-items"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/purge-candidate-lists"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}

OpenText InfoArchive 21.2 Page 226 of 331


OpenText InfoArchive 21.2 Page 227 of 331
Here are some points to notice in the response:
- We can see the type of items in the purge lists is AIPs.
- The number of items in the list is 10 because, for the PhoneCalls
application, there were 10 ingested AIPs that had projected disposition
dates in the past.
- The linkrels returned are based on the state of the purge list. Because the
purge list is in the review state, approve and reject are valid operations.
- To view information about the items in the purge list, follow the managed-
items link.
-
If the AIPs had different retention policies applied to them, different purge
lists would be generated.

If the GeneratePurgeCandidateList job was run again before the lists were
approved and the disposition job ran, then the old list is marked cancelled
and items that are eligible would be put into a new purge list.

17.7 Approving a Purge List


You can now approve a purge list with or without content. The approve purge list
allows a reason to be specified as an optional parameter.

OpenText InfoArchive 21.2 Page 228 of 331


17.7.1 Approving a Purge List
From the previous steps, we have the link relation for approve. The post does not
take any parameters:

curl -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H


'Content-Type: application/hal+json' http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-
48bd-4de0-8b97-6b7c0399d24c/approve

Here is the abbreviated response:


{
"id" : "fc6ff1f8-48bd-4de0-8b97-6b7c0399d24c",
"createdBy" : "system",
"createdDate" : "2017-03-01T16:30:30.053-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-01T17:24:12.337-05:00",
"version" : 3,
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"name" : "Purgelist-2",
"filterName" : "c565f2d1-b32e-42ae-acbc-2476b70b1166",
"status" : "APPROVED",
"count" : 10,
"retentionPolicy" : "http://localhost:8765/systemdata/retention-policies/1e74f1d8-
522a-497a-a13b-18bba5ac0a70",
"dispositionSummary" : null,
"dispositionDate" : null,
"approvedDate" : "2017-03-01T17:24:12.336-05:00",
"rejectedDate" : null,
"cancelledDate" : null,
"retentionPolicyName" : "PhoneCalls-policy",
"type" : "aip",
"externalReference" : null,
"customAttributes" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-48bd-
4de0-8b97-6b7c0399d24c"
},
"http://identifiers.emc.com/revoke" : {
"href" : "http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-48bd-
4de0-8b97-6b7c0399d24c/revoke"
},
"http://identifiers.emc.com/retention-policy" : {
"href" : "http://localhost:8765/systemdata/retention-policies/1e74f1d8-522a-
497a-a13b-18bba5ac0a70"
},
"http://identifiers.emc.com/managed-items" : {
"href" : "http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-48bd-
4de0-8b97-6b7c0399d24c/managed-items"
}
}
}

Interesting points:
- If we made a mistake and approved the wrong purge list, the revoke link
will work as long as the DisposePurgeCandidateList job hasn’t already
started running.
The approve/reject/revoke links require the user to be a Retention Manager.

OpenText InfoArchive 21.2 Page 229 of 331


17.7.2 Approving a Purge List with Content
From the previous steps, we have the link relation for approve. Here is an
example of approving a purge list with a document and a reason:
curl --location --request POST 'http://localhost:8080/restapi/systemdata/purge-candidate-lists/362ad548-89c6-41ce-8014-
c282e47d67d3/approve?reason=Test' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…’\--form 'file=@"/C:/IA-Language-issue.docx"'

Here is the abbreviated response:


{
"createdBy" : "system",
"createdDate" : "2021-03-08T17:51:16.2112804-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2021-03-09T14:12:18.9581538-05:00",
"id" : "362ad548-89c6-41ce-8014-c282e47d67d3",
"name" : "Purgelist-1",
"filterName" : "9f748f68-6447-42a7-9a2c-f3efde83233b",
"status" : "APPROVED",
"count" : 1,
"partitionKeys" : [ "7f89865b-4fb7-4b34-8b01-1953e435d164_20210308" ],
"retentionPolicy" : "http://localhost:8080/restapi/systemdata/retention-policies/46c5e391-8ba7-
4e31-bd12-662cc371b060",
"dispositionSummary" : {
"countProcessed" : 0,
"countSkipped" : 0
},
"dispositionDate" : null,
"approvedDate" : "2021-03-09T14:12:18.9531568-05:00",
"retentionPolicyName" : "Trades-policy",
"type" : "aip",
"externalReference" : null,
"customAttributes" : null,
"context" : "b25e5a26-daf5-40f8-9f0f-3a96b680a585",
"_links" : {
"self" : {
"href" : "http://localhost:8080/restapi/systemdata/purge-candidate-lists/362ad548-89c6-
41ce-8014-c282e47d67d3"
},
"http://identifiers.emc.com/contents" : {
"href" : "http://localhost:8080/restapi/systemdata/purgelists/362ad548-89c6-41ce-8014-
c282e47d67d3/contents"
},
"http://identifiers.emc.com/revoke" : {
"href" : "http://localhost:8080/restapi/systemdata/purge-candidate-lists/362ad548-89c6-
41ce-8014-c282e47d67d3/revoke"
},
"http://identifiers.emc.com/retention-policy" : {
"href" : "http://localhost:8080/restapi/systemdata/retention-policies/46c5e391-8ba7-4e31-
bd12-662cc371b060"
},
"http://identifiers.emc.com/managed-items" : {
"href" : "http://localhost:8080/restapi/systemdata/purge-candidate-lists/362ad548-89c6-
41ce-8014-c282e47d67d3/managed-items"
}
}
}

OpenText InfoArchive 21.2 Page 230 of 331


17.8 Running the DisposePurgeCandidateList Job

Start with a get on the top-level service:


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/services

From the response, find the link relation for the job-definitions:
{
"name" : "InfoArchive Home Resource",
"_links" : {
"self" : {
"href" : "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info" : {
"href" : "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants" : {
"href" : "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},…
"http://identifiers.emc.com/job-definitions" : {
"href" : "http://localhost:8765/systemdata/job-definitions"
},

}

Do a get on the job-definitions. We will use a spel expression to find our


particular job:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9… -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/job-
definitions?spel=%3F%5Bname%3D%3D%27DisposePurgeCandidateList%27%5D%0D%0A

OpenText InfoArchive 21.2 Page 231 of 331


Here is the response:
{
"_embedded" : {
"jobDefinitions" : [ {
"id" : "1eaeec23-0831-4f45-ab69-7180e81407a6",
"createdBy" : "system",
"createdDate" : "2017-02-24T10:38:03.028-05:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-02-24T10:38:03.028-05:00",
"version" : 1,
"name" : "DisposePurgeCandidateList",
"handlerName" : "DisposePurgeCandidateListJob",
"description" : "Dispose of Approved Purge Candidate List",
"inactive" : false,
"readOnly" : false,
"internal" : false,
"repeatable" : true,
"applicationScoped" : false,
"tenantScoped" : false,
"systemScoped" : true,
"cronExpression" : null,
"interval" : 604800000,
"maxAttempts" : 1,
"expirationInterval" : 3600000,
"rescheduleInterval" : 60000,
"applications" : [ ],
"tenants" : [ ],
"roles" : null,
"groups" : null,
"properties" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-definitions/1eaeec23-0831-
4f45-ab69-7180e81407a6"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-definitions/1eaeec23-0831-
4f45-ab69-7180e81407a6"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/job-definitions/1eaeec23-0831-
4f45-ab69-7180e81407a6"
},
"http://identifiers.emc.com/activate" : {
"href" : "http://localhost:8765/systemdata/job-definitions/1eaeec23-0831-
4f45-ab69-7180e81407a6/activate"
},
"http://identifiers.emc.com/inactivate" : {
"href" : "http://localhost:8765/systemdata/job-definitions/1eaeec23-0831-
4f45-ab69-7180e81407a6/inactivate"
},
"http://identifiers.emc.com/job-instances" : {
"href" : "http://localhost:8765/systemdata/job-definitions/1eaeec23-0831-
4f45-ab69-7180e81407a6/job-instances"
},

}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-definitions"
},
"http://identifiers.emc.com/add" : {
"href" : "http://localhost:8765/systemdata/job-definitions"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}

OpenText InfoArchive 21.2 Page 232 of 331


Warning: If the job is set to run on an interval, and has already been started, do
not use this command, as multiple instances of the job will be scheduled. Modify
the job definition to remove the interval to avoid this problem.

Now we run the job:

curl -X POST -d'{"now":true}' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept:


application/hal+json' -H 'Content-Type: application/hal+json' http://localhost:8765/systemdata/job-
definitions/1eaeec23-0831-4f45-ab69-7180e81407a6/job-instances

OpenText InfoArchive 21.2 Page 233 of 331


Here is the response:
{
"id" : "3a6808b4-434b-4322-a696-d45565625eb0",
"jobDefinition" : "http://localhost:8765/systemdata/job-definitions/1eaeec23-0831-
4f45-ab69-7180e81407a6",
"application" : null,
"parent" : null,
"tenant" : null,
"inactive" : false,
"scheduledAt" : 1488408870339,
"scheduledBy" : "[email protected]",
"scheduledAtString" : "2017-03-01T22:54:30.339Z",
"startTime" : null,
"endTime" : null,
"attempt" : 1,
"expirationTime" : 1488412470340,
"firstTime" : true,
"status" : "SCHEDULED",
"properties" : null,
"roles" : null,
"groups" : null,
"logger" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-instances/3a6808b4-434b-4322-
a696-d45565625eb0"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-instances/3a6808b4-434b-4322-
a696-d45565625eb0"
},
"http://identifiers.emc.com/unskip" : {
"href" : "http://localhost:8765/systemdata/job-instances/3a6808b4-434b-4322-
a696-d45565625eb0/unskip"
},
"http://identifiers.emc.com/skip" : {
"href" : "http://localhost:8765/systemdata/job-instances/3a6808b4-434b-4322-
a696-d45565625eb0/skip"
},
"http://identifiers.emc.com/job-children" : {
"href" : "http://localhost:8765/systemdata/job-instances/3a6808b4-434b-4322-
a696-d45565625eb0/job-children"
},
"http://identifiers.emc.com/job-definition" : {
"href" : "http://localhost:8765/systemdata/job-definitions/1eaeec23-0831-4f45-
ab69-7180e81407a6"
},
"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8765/systemdata/job-instances/3a6808b4-434b-4322-
a696-d45565625eb0/log"
}
}
}

OpenText InfoArchive 21.2 Page 234 of 331


Wait a few minutes and we can do a call to look at the logs:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/job-instances/3a6808b4-434b-4322-a696-
d45565625eb0/log

And here is the response:


{
"id" : "6a3baa69-aa85-4852-98ad-c96b388052b2",
"contextId" : "3a6808b4-434b-4322-a696-d45565625eb0",
"contextType" : "job",
"contextTypeId" : "DisposePurgeCandidateList",
"mdc" : {
"jobName" : "DisposePurgeCandidateList",
"jobHandler" : "DisposePurgeCandidateListJob",
"context" : "name=DisposePurgeCandidateList, scheduled by [email protected],
scheduled at 2017-03-01T22:54:30.339Z, attempt=1",
"context-id" : "3a6808b4-434b-4322-a696-d45565625eb0",
"context-type" : "job",
"user" : "system"
},
"logMessages" : [ {
"time" : 1488408870386,
"level" : "INFO",
"message" : "Dispose purgelist",
"stacktrace" : null
}, {
"time" : 1488408870386,
"level" : "DEBUG",
"message" : "Prepare all Eligible Purge Lists - No Tenant Specified",
"stacktrace" : null
}, {
"time" : 1488408871075,
"level" : "DEBUG",
"message" : "Finished preparing lists",
"stacktrace" : null
}, {
"time" : 1488408871075,
"level" : "DEBUG",
"message" : "Dispose all Eligible Purge Lists - No Tenant Specified",
"stacktrace" : null
}, {
"time" : 1488408871482,
"level" : "DEBUG",
"message" : "Done handling all tenants",
"stacktrace" : null
}, {
"time" : 1488408871482,
"level" : "INFO",
"message" : "Processed 1 purge lists",
"stacktrace" : null
} ]
}

Let’s now do a get on our Purge list and see the impact:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.. ' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-48bd-4de0-
8b97-6b7c0399d24c
And here is the response:

OpenText InfoArchive 21.2 Page 235 of 331


{
"id" : "fc6ff1f8-48bd-4de0-8b97-6b7c0399d24c",
"createdBy" : "system",
"createdDate" : "2017-03-01T16:30:30.053-05:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-03-01T17:54:31.478-05:00",
"version" : 5,
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"name" : "Purgelist-2",
"filterName" : "c565f2d1-b32e-42ae-acbc-2476b70b1166",
"status" : "DISPOSED",
"count" : 10,
"retentionPolicy" : "http://localhost:8765/systemdata/retention-policies/1e74f1d8-
522a-497a-a13b-18bba5ac0a70",
"dispositionSummary" : {
"countProcessed" : 10,
"countSkipped" : 0
},
"dispositionDate" : "2017-03-01T17:54:31.477-05:00",
"approvedDate" : "2017-03-01T17:24:12.336-05:00",
"rejectedDate" : null,
"cancelledDate" : null,
"retentionPolicyName" : "PhoneCalls-policy",
"type" : "aip",
"externalReference" : null,
"customAttributes" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-48bd-
4de0-8b97-6b7c0399d24c"
},
"http://identifiers.emc.com/retention-policy" : {
"href" : "http://localhost:8765/systemdata/retention-policies/1e74f1d8-522a-
497a-a13b-18bba5ac0a70"
},
"http://identifiers.emc.com/managed-items" : {
"href" : "http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-48bd-
4de0-8b97-6b7c0399d24c/managed-items"
}
}
}

Let’s now follow that managed item link relation:


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-48bd-4de0-
8b97-6b7c0399d24c/managed-items

OpenText InfoArchive 21.2 Page 236 of 331


And here is the response:
{
"_embedded" : {
"managedItems" : [ {
"id" : "96c89e1a-5463-44ae-a9e8-90716ab0dab6",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-01T15:46:46.09-05:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-03-01T16:30:30.055-05:00",
"version" : 4,
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"filterName" : "c565f2d1-b32e-42ae-acbc-2476b70b1166",
"externalId" : "19259d3a-6989-4f55-a78d-c01951265a9b",
"name" : null,
"type" : "aip",
"parentId" : null,
"directlyUnderRetention" : true,
"directlyUnderHold" : false,
"waitingForConfirmation" : false,
"estimatedFinalDisposition" : "2002-02-28T00:00:00+01:00",
"externalReference" : null,
"supplementalData" : [ {
"key" : "name",
"value" : "PhoneCalls-CC-1000000-1"
}, {
"key" : "status",
"value" : "Purge"
}, {
"key" : "count",
"value" : "3"
} ],
"projectedDispositionDate" : null,
"longestRetentionPolicyName" : null,
"longestRetentionSourceType" : null,
"longestRetentionEventBased" : false,
"eventDate" : null,
"baseDate" : null,
"purgeList" : "http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-
48bd-4de0-8b97-6b7c0399d24c",
"partitionKey" : "19259d3a-6989-4f55-a78d-c01951265a9b",
"underHold" : false,
"underRetention" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/managed-items/96c89e1a-5463-44ae-
a9e8-90716ab0dab6/partition/19259d3a-6989-4f55-a78d-c01951265a9b"
},
"http://identifiers.emc.com/purge-candidate-list" : {
"href" : "http://localhost:8765/systemdata/purge-candidate-lists/fc6ff1f8-
48bd-4de0-8b97-6b7c0399d24c"
},
"http://identifiers.emc.com/restore" : {
"href" : "http://localhost:8765/systemdata/managed-items/96c89e1a-5463-44ae-
a9e8-90716ab0dab6/partition/19259d3a-6989-4f55-a78d-
c01951265a9b/restore?xdbLibraryId=8ef58b9d-5909-4a1e-b3c1-5bf375c5803e"
},
"http://identifiers.emc.com/detach" : {
"href" : "http://localhost:8765/systemdata/managed-items/96c89e1a-5463-44ae-
a9e8-90716ab0dab6/partition/19259d3a-6989-4f55-a78d-c01951265a9b/detach"
}
}
}, …

We can see here (we only show one of the 10 items) that the status of the
AIP changed to purge (this is specific to AIP disposition).

OpenText InfoArchive 21.2 Page 237 of 331


17.9 Completing Disposition for Packages
As mentioned, if retention is applied to packages, a confirmation is required
before the packages are disposed.
Start with a get on the top-level service:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/services

From the response, find the link rel for the job-definitions:
{
"name" : "InfoArchive Home Resource",
"_links" : {
"self" : {
"href" : "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info" : {
"href" : "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants" : {
"href" : "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},…
"http://identifiers.emc.com/job-definitions" : {
"href" : "http://localhost:8765/systemdata/job-definitions"
},

}

Do a get on the job-definitions. We will use a spel expression to find our


particular named job:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9… -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/job-
definitions?spel=%3F%5Bname%3D%3D%27Confirmation%27%5D%0D%0A

OpenText InfoArchive 21.2 Page 238 of 331


Here is the response:
{
"_embedded" : {
"jobDefinitions" : [ {
"id" : "e04baea0-5ccf-40cb-96fc-23e72c3a0730",
"createdBy" : "system",
"createdDate" : "2017-02-24T10:38:02.938-05:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-02-24T10:38:02.938-05:00",
"version" : 1,
"name" : "Confirmation",
"handlerName" : "ConfirmationJob",
"description" : "Confirms that some events on packages occurred (Receive, Stor-
age, Purge, Invalidation)",
"inactive" : false,
"readOnly" : true,
"internal" : false,
"repeatable" : false,
"applicationScoped" : false,
"tenantScoped" : false,
"systemScoped" : true,
"cronExpression" : null,
"interval" : 0,
"maxAttempts" : 1,
"expirationInterval" : 60000,
"rescheduleInterval" : 60000,
"applications" : [ ],
"tenants" : [ ],
"roles" : null,
"groups" : null,
"properties" : {
"cutOffDays" : ""
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-definitions/e04baea0-5ccf-
40cb-96fc-23e72c3a0730"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-definitions/e04baea0-5ccf-
40cb-96fc-23e72c3a0730"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/job-definitions/e04baea0-5ccf-
40cb-96fc-23e72c3a0730"
},
"http://identifiers.emc.com/activate" : {
"href" : "http://localhost:8765/systemdata/job-definitions/e04baea0-5ccf-
40cb-96fc-23e72c3a0730/activate"
},
"http://identifiers.emc.com/inactivate" : {
"href" : "http://localhost:8765/systemdata/job-definitions/e04baea0-5ccf-
40cb-96fc-23e72c3a0730/inactivate"
},
"http://identifiers.emc.com/job-instances" : {
"href" : "http://localhost:8765/systemdata/job-definitions/e04baea0-5ccf-
40cb-96fc-23e72c3a0730/job-instances"
},

}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-definitions"
},
"http://identifiers.emc.com/add" : {
"href" : "http://localhost:8765/systemdata/job-definitions"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,

OpenText InfoArchive 21.2 Page 239 of 331


So, we run the job (this job is always manual and is recommended to never run
on a schedule):

curl -X POST -d'{"now":true}' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: applica-


tion/hal+json' -H 'Content-Type: application/hal+json' http://localhost:8765/systemdata/job-
definitions/e04baea0-5ccf-40cb-96fc-23e72c3a0730/job-instances

Here is the response:


{
"id" : "c92c2cdf-651e-467d-a528-41b3e12c84ff",
"jobDefinition" : "http://localhost:8765/systemdata/job-definitions/e04baea0-5ccf-
40cb-96fc-23e72c3a0730",
"application" : null,
"parent" : null,
"tenant" : null,
"inactive" : false,
"scheduledAt" : 1488480194653,
"scheduledBy" : "[email protected]",
"scheduledAtString" : "2017-03-02T18:43:14.653Z",
"startTime" : null,
"endTime" : null,
"attempt" : 1,
"expirationTime" : 1488480254654,
"firstTime" : true,
"status" : "SCHEDULED",
"properties" : null,
"roles" : null,
"groups" : null,
"logger" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-instances/c92c2cdf-651e-467d-
a528-41b3e12c84ff"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-instances/c92c2cdf-651e-467d-
a528-41b3e12c84ff"
},
"http://identifiers.emc.com/unskip" : {
"href" : "http://localhost:8765/systemdata/job-instances/c92c2cdf-651e-467d-
a528-41b3e12c84ff/unskip"
},
"http://identifiers.emc.com/skip" : {
"href" : "http://localhost:8765/systemdata/job-instances/c92c2cdf-651e-467d-
a528-41b3e12c84ff/skip"
},
"http://identifiers.emc.com/job-children" : {
"href" : "http://localhost:8765/systemdata/job-instances/c92c2cdf-651e-467d-
a528-41b3e12c84ff/job-children"
},
"http://identifiers.emc.com/job-definition" : {
"href" : "http://localhost:8765/systemdata/job-definitions/e04baea0-5ccf-40cb-
96fc-23e72c3a0730"
},
"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8765/systemdata/job-instances/c92c2cdf-651e-467d-
a528-41b3e12c84ff/log"
}
}
}

This job runs fairly quickly, and you can follow the self-link to see when it
finishes.

OpenText InfoArchive 21.2 Page 240 of 331


So, we need to get the AIPs link from the application by doing a get:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166

Here is the response (we need the aips link-rel):


{
"id" : "c565f2d1-b32e-42ae-acbc-2476b70b1166",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-01T15:46:37.497-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-01T15:47:02.005-05:00",
"version" : 2,
"name" : "PhoneCalls",
"structuredDataStorageAllocationStrategy" : "DEFAULT",
"tenant" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207",
"type" : "ACTIVE_ARCHIVING",
"archiveType" : "SIP",
"searchCreated" : true,
"xdbLibraryAssociated" : true,
"state" : "IN_TEST",
"viewStatus" : true,
"description" : "The application has customer support phone calls history",
"category" : "Customer Support",
"retentionEnabled" : false,
"defaultRetentionPolicyName" : null,
"cryptoIV" : "vCNkLLCZNzuTt+ykK+rPKA==",
"metadataCacheSize" : 0,
"permission" : {
"groups" : [ ]
},
"cryptoEncoding" : "base64",
"cryptoKeyID" : "search_results_c565f2d1-b32e-42ae-acbc-2476b70b1166",
"_links" : {
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/groups"
},
"self" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166"
},
"http://identifiers.emc.com/delete-data" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/delete-data"
},
"http://identifiers.emc.com/tenant" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},
"http://identifiers.emc.com/aics" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/aics"
},
"http://identifiers.emc.com/aips" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/aips"
},

}
}

OpenText InfoArchive 21.2 Page 241 of 331


Do a get on the AIP link rel:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/aips

OpenText InfoArchive 21.2 Page 242 of 331


And we should see the AIPs:
{
"id" : "c565f2d1-b32e-42ae-acbc-2476b70b1166",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-01T15:46:37.497-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-01T15:47:02.005-05:00",
"version" : 2,
"name" : "PhoneCalls",
"structuredDataStorageAllocationStrategy" : "DEFAULT",
"tenant" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207",
"type" : "ACTIVE_ARCHIVING",
"archiveType" : "SIP",
"searchCreated" : true,
"xdbLibraryAssociated" : true,
"state" : "IN_TEST",
"viewStatus" : true,
"description" : "The application has customer support phone calls history",
"category" : "Customer Support",
"retentionEnabled" : false,
"defaultRetentionPolicyName" : null,
"cryptoIV" : "vCNkLLCZNzuTt+ykK+rPKA==",
"metadataCacheSize" : 0,
"permission" : {
"groups" : [ ]
},
"cryptoEncoding" : "base64",
"cryptoKeyID" : "search_results_c565f2d1-b32e-42ae-acbc-2476b70b1166",
"_links" : {
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/groups"
},
"self" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166"
},
"http://identifiers.emc.com/delete-data" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/delete-data"
},
"http://identifiers.emc.com/tenant" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},
"http://identifiers.emc.com/aics" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/aics"
},
"http://identifiers.emc.com/aips" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/aips"
},

}
}

OpenText InfoArchive 21.2 Page 243 of 331


Here is the response:
{
"_embedded" : {
"aips" : [ {
"id" : "19259d3a-6989-4f55-a78d-c01951265a9b",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-01T15:46:46.647-05:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-03-02T13:43:16.071-05:00",
"version" : 17,
"name" : "PhoneCalls-CC-1000000-1",
"application" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-
42ae-acbc-2476b70b1166",
"aipId" : "19259d3a-6989-4f55-a78d-c01951265a9b",
"dss" : {

},

"riCount" : 3,
"stateCode" : "PUR_WPROC",
"phaseCode" : "PUR",
"xdbMode" : "PRIVATE",

"rejectUserName" : null,
"confirmation" : {
"receiveDate" : "2017-03-02T13:43:15.07-05:00",
"commitDate" : "2017-03-02T13:43:16.064-05:00",
"purgeDate" : "2017-03-02T13:43:15.578-05:00",
"rejectDate" : null,
"invalidDate" : null
},
"pdiCryptoConfigName" : "PhoneCalls-pdi-crypto",
"pdiCryptoObject" : "http://localhost:8765/systemdata/crypto-objects/52aee12d-
b384-4f0b-8807-d6068eea3a98",
"pdiCryptoIv" : "nOhyIUnOey3ARJtzbWoTBw==",
"pdiCryptoKeyId" : "PDI_c565f2d1-b32e-42ae-acbc-2476b70b1166",
"cryptoEncoding" : "base64",
"pdiCryptoHashSalt" : "V6I4dJ41DkbTCg7kvjRpKw==",
"ciCryptoObject" : "http://localhost:8765/systemdata/crypto-objects/52aee12d-
b384-4f0b-8807-d6068eea3a98",
"ciCryptoKeyId" : "CI_c565f2d1-b32e-42ae-acbc-2476b70b1166",
"ciCryptoIv" : "jZsBbYFbAGf3E9chDXJ55A==",
"sipCryptoObject" : "http://localhost:8765/systemdata/crypto-objects/52aee12d-
b384-4f0b-8807-d6068eea3a98",
"sipCryptoKeyId" : "SIP_c565f2d1-b32e-42ae-acbc-2476b70b1166",
"sipCryptoIv" : "0OBeUlLVo7AR/2Ja68aJZA==",
"returnCode" : "OK",
"returnMsg" : "",
"projectedDispositionDate" : "2002-02-28T00:00:00+01:00",
"underHold" : false,
"underRetention" : true,
"permission" : {
"groups" : [ ]
},
"state" : "Waiting processing",
"phase" : "Purge",
"openAggregate" : false,

"xdbLibrarySize" : 253952,
"xdbLibraryIndexSize" : 53248,
"xdbLibraryDetached" : false,
"validAggregate" : false,
"aggregate" : false,
"xdbLibraryName" : "ea657358-5701-4ba0-8236-b850eea5a032",

"page" : {
"size" : 10,
"totalElements" : 10,
"totalPages" : 1,
"number" : 0
}
}

OpenText InfoArchive 21.2 Page 244 of 331


Important points:
• Notice the dates in the confirmation. When the Confirmation job was run,
the job set the date. The purge date was set when disposition was first
run.

We now want to run the Disposition job again (we got this link earlier when we
first ran disposition):

curl -X POST -d'{"now":true}' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept:


application/hal+json' -H 'Content-Type: application/hal+json' http://localhost:8765/systemdata/job-
definitions/1eaeec23-0831-4f45-ab69-7180e81407a6/job-instances

OpenText InfoArchive 21.2 Page 245 of 331


This is the response:
{
"id" : "3c5310ef-da5a-40e3-84a5-2eafacbc8527",
"jobDefinition" : "http://localhost:8765/systemdata/job-definitions/1eaeec23-0831-
4f45-ab69-7180e81407a6",
"application" : null,
"parent" : null,
"tenant" : null,
"inactive" : false,
"scheduledAt" : 1488482319995,
"scheduledBy" : "[email protected]",
"scheduledAtString" : "2017-03-02T19:18:39.995Z",
"startTime" : null,
"endTime" : null,
"attempt" : 1,
"expirationTime" : 1488485920020,
"firstTime" : true,
"status" : "SCHEDULED",
"properties" : null,
"roles" : null,
"groups" : null,
"logger" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-instances/3c5310ef-da5a-40e3-
84a5-2eafacbc8527"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-instances/3c5310ef-da5a-40e3-
84a5-2eafacbc8527"
},
"http://identifiers.emc.com/unskip" : {
"href" : "http://localhost:8765/systemdata/job-instances/3c5310ef-da5a-40e3-
84a5-2eafacbc8527/unskip"
},
"http://identifiers.emc.com/skip" : {
"href" : "http://localhost:8765/systemdata/job-instances/3c5310ef-da5a-40e3-
84a5-2eafacbc8527/skip"
},
"http://identifiers.emc.com/job-children" : {
"href" : "http://localhost:8765/systemdata/job-instances/3c5310ef-da5a-40e3-
84a5-2eafacbc8527/job-children"
},
"http://identifiers.emc.com/job-definition" : {
"href" : "http://localhost:8765/systemdata/job-definitions/1eaeec23-0831-4f45-
ab69-7180e81407a6"
},
"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8765/systemdata/job-instances/3c5310ef-da5a-40e3-
84a5-2eafacbc8527/log"
}
}
}

Wait a few minutes, and let’s repeat the AIPs linkrel call:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/aips

OpenText InfoArchive 21.2 Page 246 of 331


Here is the response:
{
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/aips"
},
"http://identifiers.emc.com/receive" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/aips"
},
"http://identifiers.emc.com/ingest-direct" : {
"href" : "http://localhost:8765/systemdata/applications/c565f2d1-b32e-42ae-acbc-
2476b70b1166/aips?ingestDirect=true"
}
},
"page" : {
"size" : 10,
"totalElements" : 0,
"totalPages" : 0,
"number" : 0
}
}

All 10 AIPs ingested have been removed from the system.


In order to fully recover all of the unstructured content space, the Clean job
needs to be run (there have been examples on how to find a job and run it)
For this example, install the PhoneCallsGranular sample application. That
application installs mixed and event-based retention policies and some sample
rules.

OpenText InfoArchive 21.2 Page 247 of 331


17.10 Event Based Retention
Here is an overview:

In the section for creating retention policies, there is an example for creating an
event-based retention policy. If the PhoneCalls granular application is installed,
two addition policies are installed.

The only way to fulfill events is via jobs or via REST.


Earlier, we applied retention to some search events that shared one event that
we gave the context as Test.

Here is the request:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/events/4ace752f-f48e-4b8e-a30c-
d97c7c86fd39

OpenText InfoArchive 21.2 Page 248 of 331


This is the response:
{
"id" : "4ace752f-f48e-4b8e-a30c-d97c7c86fd39",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-06T16:39:21.902-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-06T16:39:21.902-05:00",
"version" : 1,
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"filterName" : "15a4ec2c-1c7e-48f1-bc04-9fe87c327173",
"name" : "NoLongerNeeded",
"context" : null,
"fulfillmentDate" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/events/4ace752f-f48e-4b8e-a30c-
d97c7c86fd39"
},
"http://identifiers.emc.com/fulfill" : {
"href" : "http://localhost:8765/systemdata/events/4ace752f-f48e-4b8e-a30c-
d97c7c86fd39"
}
}
}

17.10.1 Fulfilling the Event


Here is the request:
curl -X POST -d'{"fulfillmentDate":"2017-02-27T00:00:00-05:00"}' -H 'Authorization: Bearer ey-
JhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-Type: application/hal+json'
http://localhost:8765/systemdata/events/4ace752f-f48e-4b8e-a30c-d97c7c86fd39
This is the response:
{
"id" : "4ace752f-f48e-4b8e-a30c-d97c7c86fd39",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-06T16:39:21.902-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-07T13:44:26.06-05:00",
"version" : 2,
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"filterName" : "15a4ec2c-1c7e-48f1-bc04-9fe87c327173",
"name" : "NoLongerNeeded",
"context" : null,
"fulfillmentDate" : "2017-02-27T05:00:00Z",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/events/4ace752f-f48e-4b8e-a30c-
d97c7c86fd39"
},
"http://identifiers.emc.com/fulfill" : {
"href" : "http://localhost:8765/systemdata/events/4ace752f-f48e-4b8e-a30c-
d97c7c86fd39"
}
}
}

Note that this call no longer runs requalification for records associated with the
event. Instead, after all of the events have been fulfilled, run the “Process
Retention Events” job.

OpenText InfoArchive 21.2 Page 249 of 331


18.0 Holds
The following diagram gives an overview of the hierarchy for holds:

Holds are per tenant and there are two types of holds: permanent and legal.
Functionally, they are same in that the holds prevent the item from being either
deleted or disposed. The main difference is a legal hold is typically temporary
and the intent is that at some point the hold will be removed.

18.1 Role Permission

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

Only retention managers can apply holds.

18.2 Creating a Hold


Let’s assume we want to create a Legal hold requested by Jane Doe and
approved by John Doe on Jan 1, 2017 which was last review on March 3, 2017

OpenText InfoArchive 21.2 Page 250 of 331


Find the link relation from the tenant for holds:
curl -X POST -d' {"name":"MyLegalHold","description":"Sample descripton","reviewDate":"2017-03-
03T00:00:00-05:00","holdType":{"type":"LEGAL","matters":["Matter"]},"requestedBy":"Jane
Doe","note":"Extra notes go here.","reason":"","approval":{"approver":"John
Doe","approvedDate":"2017-01-01T00:00:00-05:00"}}' -H 'Authorization: Bearer eyJhbGciOi-
JIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-Type: application/hal+json'
http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-5810c64c1207/holds
Here is the response:
{
"id" : "77c5a029-0213-4a6f-a6de-de4747f4532f",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-03T15:40:22.107-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-03T15:40:22.107-05:00",
"version" : 1,
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"name" : "MyLegalHold",
"description" : "Sample descripton",
"reviewDate" : "2017-03-03T05:00:00Z",
"holdType" : {
"type" : "LEGAL",
"name" : "LEGAL",
"matters" : [ "Matter" ]
},
"requestedBy" : "Jane Doe",
"note" : "Extra notes go here.",
"reason" : "",
"approval" : {
"approver" : "John Doe",
"approvedDate" : "2017-01-01T05:00:00Z"
},
"customAttributes" : null,
"inUse" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/holds/77c5a029-0213-4a6f-a6de-
de4747f4532f"
},
"http://identifiers.emc.com/hold-sets" : {
"href" : "http://localhost:8765/systemdata/holds/77c5a029-0213-4a6f-a6de-
de4747f4532f/hold-sets"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/holds/77c5a029-0213-4a6f-a6de-
de4747f4532f"
},
"http://identifiers.emc.com/apply" : {
"href" : "http://localhost:8765/systemdata/holds/77c5a029-0213-4a6f-a6de-
de4747f4532f/hold-sets"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/holds/77c5a029-0213-4a6f-a6de-
de4747f4532f"
}
}
}

Of particular note is the apply link relation. This allows the hold to be applied to
an object. The operation is done to the hold rather than object being protected.

There are only two types supported:


- PERMANENT
- LEGAL

OpenText InfoArchive 21.2 Page 251 of 331


When specifying matters for a legal hold, which is optional, it is possible to
specify more than one string.
18.3 Applying a Hold to an Application
One way of quickly protecting an application is to put a hold on the application.

Let’s assume that you have at least one application (say Audit) and we will apply
the hold to the application.

We need to look up the href for the Audit application (this is included in other
examples):
http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-a330-
6c4894b30b13

OpenText InfoArchive 21.2 Page 252 of 331


curl -X POST -d' {"itemsToProtect":["http://localhost:8765/systemdata/applications/8701a41a-e195-
41f1-a330-6c4894b30b13"],"type":"application","holdSetName":"MyHoldSet","holdSetDescription":"All
audits need to be on hold.","application":"http://localhost:8765/systemdata/applications/8701a41a-e195-
41f1-a330-6c4894b30b13"}' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: applica-
tion/hal+json' -H 'Content-Type: application/hal+json' http://localhost:8765/systemdata/holds/77c5a029-
0213-4a6f-a6de-de4747f4532f/hold-sets
Here is the response:
{
"id" : "f80e8628-ad20-49c4-ad1a-17ae4c350d6f",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-03T16:37:37.762-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-03T16:37:37.762-05:00",
"version" : 1,
"name" : "MyHoldSet_2017-03-03T16:37:37.759-05:00",
"type" : "APPLY_HOLD",
"application" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13",
"search" : null,
"searchComposition" : null,
"searchResult" : null,
"collection" : null,
"matter" : null,
"aip" : null,
"table" : null,
"holding" : null,
"xdbLibrary" : null,
"store" : null,
"holdOperation" : {
"alwaysCreateNewSet" : "true",
"externalReference" : null,
"holdName" : "MyLegalHold",
"holdSetName" : "MyHoldSet",
"itemsType" : "items",
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"filterName" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"holdSetDescription" : "All audits need to be on hold.",
"type" : "application",
"externalReferenceContext" : null,
"parentId" : null
},
"items" : [ "8701a41a-e195-41f1-a330-6c4894b30b13" ],
"payload" : null,
"priority" : 0,
"eligibilityDate" : "2017-03-03T16:37:37.759-05:00",
"state" : "DORMANT",
"userName" : "[email protected]",

"applicationName" : "Audit",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/order-items/f80e8628-ad20-49c4-ad1a-
17ae4c350d6f"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-a330-
6c4894b30b13"
},
"http://identifiers.emc.com/hide" : {
"href" : "http://localhost:8765/systemdata/order-items/f80e8628-ad20-49c4-ad1a-
17ae4c350d6f/hide"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/order-items/f80e8628-ad20-49c4-ad1a-
17ae4c350d6f/groups"
}
}
}

OpenText InfoArchive 21.2 Page 253 of 331


Apply hold is an asynchronous operation and, as such, an order item was
returned that indicates that operation is to be done.

Because we only applied a hold to one object, the request should be done
quickly. We can see the status of the order item.
Here is the call to look at the status of the order item:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/order-items/f80e8628-ad20-49c4-ad1a-
17ae4c350d6f

A very important point is that it is the responsibility of the caller to ensure that the
item to protect is a valid item. For applications, tables, and packages, this is the
href. There is no check that the item is still actually in the system.
For table rows and AIUs, the id is the row identifier returned in the search.

OpenText InfoArchive 21.2 Page 254 of 331


Here is the response:
{
"id" : "f80e8628-ad20-49c4-ad1a-17ae4c350d6f",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-03T16:37:37.762-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-03T16:37:44.865-05:00",
"version" : 3,
"name" : "MyHoldSet_2017-03-03T16:37:37.759-05:00",
"type" : "APPLY_HOLD",
"application" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13",
"search" : null,
"searchComposition" : null,
"searchResult" : null,
"collection" : null,
"matter" : null,
"aip" : null,
"table" : null,
"holding" : null,
"xdbLibrary" : null,
"store" : null,
"holdOperation" : {
"alwaysCreateNewSet" : "true",
"externalReference" : null,
"holdName" : "MyLegalHold",
"holdSetName" : "MyHoldSet",
"itemsType" : "items",
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"filterName" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"holdSetDescription" : "All audits need to be on hold.",
"type" : "application",
"externalReferenceContext" : null,
"parentId" : null
},
"items" : [ "8701a41a-e195-41f1-a330-6c4894b30b13" ],
"payload" : null,
"priority" : 0,
"eligibilityDate" : "2017-03-03T16:37:37.759-05:00",
"state" : "TERMINATED",
"userName" : "[email protected]",
"consumerContext" : null,
"dipCount" : 0,
"dipCrypto" : false,
"startDate" : "2017-03-03T16:37:44.751-05:00",
"endDate" : "2017-03-03T16:37:44.863-05:00",
"duration" : 112,

"applicationName" : "Audit",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/order-items/f80e8628-ad20-49c4-ad1a-
17ae4c350d6f"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-a330-
6c4894b30b13"
},
"http://identifiers.emc.com/hide" : {
"href" : "http://localhost:8765/systemdata/order-items/f80e8628-ad20-49c4-ad1a-
17ae4c350d6f/hide"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/order-items/f80e8628-ad20-49c4-ad1a-
17ae4c350d6f/groups"
}
}
}

If a problem happened, the state would be EXCEPTION.

OpenText InfoArchive 21.2 Page 255 of 331


18.4 Viewing Hold Sets
Hold sets can be viewed either directly from the application or as a link rel from
the hold:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/holds/77c5a029-0213-4a6f-a6de-
de4747f4532f/hold-sets

OpenText InfoArchive 21.2 Page 256 of 331


Here is the response:
{
"_embedded" : {
"holdSets" : [ {
"id" : "32a01653-53e5-4224-96b0-4b40a157cdd5",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-03T16:37:44.757-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-03T16:37:44.814-05:00",
"version" : 2,
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"filterName" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"partitionkeys" : [ "8701a41a-e195-41f1-a330-6c4894b30b13" ],
"name" : "MyHoldSet",
"description" : "All audits need to be on hold.",
"hold" : "http://localhost:8765/systemdata/holds/77c5a029-0213-4a6f-a6de-
de4747f4532f",
"type" : "application",
"externalReference" : null,
"externalReferenceContext" : null,
"holdName" : "MyLegalHold",
"holdTypeName" : "LEGAL",
"holdReviewDate" : "2017-03-03T05:00:00Z",
"count" : 1,
"supplementalData" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/hold-sets/32a01653-53e5-4224-
96b0-4b40a157cdd5"
},
"http://identifiers.emc.com/hold-applications" : {
"href" : "http://localhost:8765/systemdata/hold-sets/32a01653-53e5-4224-
96b0-4b40a157cdd5/managed-items"
},
"http://identifiers.emc.com/hold" : {
"href" : "http://localhost:8765/systemdata/holds/77c5a029-0213-4a6f-a6de-
de4747f4532f"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/hold-sets/32a01653-53e5-4224-
96b0-4b40a157cdd5"
},
"http://identifiers.emc.com/bulk-remove" : {
"href" : "http://localhost:8765/systemdata/hold-sets/32a01653-53e5-4224-
96b0-4b40a157cdd5/managed-items"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/holds/77c5a029-0213-4a6f-a6de-
de4747f4532f/hold-sets"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}

So, we can see the name of the hold set and how many items are in the set.

On this hold set, a DELETE on the delete link relation will remove the entire hold
set and, for the call, a reason can be given which will be part of the audit (if
enabled).

OpenText InfoArchive 21.2 Page 257 of 331


If the hold set contained multi-items in the set, the bulk-remove linkrel can be
used to remove multiple items from the set. Note that a POST call is made.
If a get is done on the hold-application’s link relation, each item in the hold is
described:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/hold-sets/32a01653-53e5-4224-96b0-
4b40a157cdd5/managed-items

OpenText InfoArchive 21.2 Page 258 of 331


Here is the response:
{
"_embedded" : {
"holdApplications" : [ {
"id" : "ae2596b4-8dd1-40f6-a04a-ef11e846c932",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-03T16:37:44.81-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-03T16:37:44.81-05:00",
"version" : 1,
"managedItem" : "http://localhost:8765/systemdata/managed-items/298b321f-e778-
4549-9ef4-e893868a7017/partition/8701a41a-e195-41f1-a330-6c4894b30b13",
"tenantId" : "66139448-0814-4c73-9ffd-5810c64c1207",
"holdSet" : "http://localhost:8765/systemdata/hold-sets/32a01653-53e5-4224-96b0-
4b40a157cdd5",
"filterName" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"applicationDate" : "2017-03-03T16:37:44.76-05:00",
"partitionKey" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"holdName" : "MyLegalHold",
"holdTypeName" : "LEGAL",
"holdSetName" : "MyHoldSet",
"reviewDate" : "2017-03-03T05:00:00Z",
"managedItemExternalId" : "8701a41a-e195-41f1-a330-6c4894b30b13",
"managedItemType" : "application",
"supplementalData" : [ {
"key" : "name",
"value" : "Audit"
}, {
"key" : "description",
"value" : "This application stores the audit history"
}, {
"key" : "category",
"value" : "Administration"
}, {
"key" : "status",
"value" : "IN_TEST"
}, {
"key" : "applicationType",
"value" : "ACTIVE_ARCHIVING"
}, {
"key" : "archiveType",
"value" : "SIP"
}, {
"key" : "defaultRetentionPolicy",
"value" : null
} ],
"projectedDispositionDate" : "2017-05-27T05:00:00Z",
"underRetention" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/hold-applications/ae2596b4-8dd1-
40f6-a04a-ef11e846c932/partition/8701a41a-e195-41f1-a330-6c4894b30b13"
},
"http://identifiers.emc.com/managed-item" : {
"href" : "http://localhost:8765/systemdata/managed-items/298b321f-e778-4549-
9ef4-e893868a7017/partition/8701a41a-e195-41f1-a330-6c4894b30b13"
},
"http://identifiers.emc.com/hold-set" : {
"href" : "http://localhost:8765/systemdata/hold-sets/32a01653-53e5-4224-
96b0-4b40a157cdd5"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/hold-applications/ae2596b4-8dd1-
40f6-a04a-ef11e846c932/partition/8701a41a-e195-41f1-a330-6c4894b30b13"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/hold-sets/32a01653-53e5-4224-96b0-
4b40a157cdd5/managed-items"
}

OpenText InfoArchive 21.2 Page 259 of 331


As you can see, this hold application refers to the Audit application and some
details are provided. In this example, the Audit application happened to be under
retention and a projected disposition date was scheduled. As long as this hold
remains, this application will not show in purge lists even though it is eligible for
disposition.

A DELETE call to the delete link relation will remove the item from the hold set. If
the hold set would no longer have any items, the hold set is automatically
cleaned up.

Doing a DELETE on the self-link would be equivalent, however, following the


delete linkrel is useful to know if the current user can remove the item from the
purge list.

18.5 Removing One or More Items from a Hold Set


Here is the command. Note that itemsToRemove are the hold application hrefs,
not the ids of the original items being deleted. The possible values come from
hold-application’s linkrel on the hold set:

curl -X POST -d' {"itemsToRemove":["http://localhost:8765/systemdata/hold-applications/ae2596b4-


8dd1-40f6-a04a-ef11e846c932/partition/8701a41a-e195-41f1-a330-6c4894b30b13"],"reason":"Case
closed"}' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H
'Content-Type: application/hal+json' http://localhost:8765/systemdata/hold-sets/32a01653-53e5-4224-
96b0-4b40a157cdd5/managed-items

OpenText InfoArchive 21.2 Page 260 of 331


Here is the response:
{
"id" : "f1338eba-c79b-4938-801c-e0abd67464cc",
"createdBy" : "[email protected]",
"createdDate" : "2017-03-03T17:30:24.515-05:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-03-03T17:30:24.515-05:00",
"version" : 1,
"name" : "MyHoldSet_removeholditems_2017-03-03T17:30:24.512-05:00",
"type" : "REMOVE_HOLD",
"application" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-
a330-6c4894b30b13",
"search" : null,
"searchComposition" : null,
"searchResult" : null,
"collection" : null,
"matter" : null,
"aip" : null,
"table" : null,
"holding" : null,
"xdbLibrary" : null,
"store" : null,
"holdOperation" : {
"reason" : "Case closed",
"itemsType" : "removeholditems"
},
"items" : [ "http://localhost:8765/systemdata/hold-applications/ae2596b4-8dd1-40f6-
a04a-ef11e846c932/partition/8701a41a-e195-41f1-a330-6c4894b30b13" ],
"payload" : "Case closed",
"priority" : 0,
"eligibilityDate" : "2017-03-03T17:30:24.513-05:00",
"state" : "DORMANT",
"userName" : "[email protected]",
"consumerContext" : null,
"dipCount" : 0,
"dipCrypto" : false,
"startDate" : null,
"endDate" : null,
"duration" : 0,
"retentionDate" : null,
"hidden" : false,
"suspended" : false,
"returnMessage" : null,
"exportSettings" : null,
"permission" : {
"groups" : [ ]
},
"applicationName" : "Audit",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/order-items/f1338eba-c79b-4938-801c-
e0abd67464cc"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/8701a41a-e195-41f1-a330-
6c4894b30b13"
},
"http://identifiers.emc.com/hide" : {
"href" : "http://localhost:8765/systemdata/order-items/f1338eba-c79b-4938-801c-
e0abd67464cc/hide"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/order-items/f1338eba-c79b-4938-801c-
e0abd67464cc/groups"
}
}
}

OpenText InfoArchive 21.2 Page 261 of 331


Again, this bulk remove is an asynchronous method and, as seen earlier, once
the order item completes the items will be removed from the hold. In this case,
because the hold set no longer contains any items, it will be destroyed).
Finally, we make sure that the hold set is gone:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/holds/77c5a029-0213-4a6f-a6de-
de4747f4532f/hold-sets

Here is the response:


{
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/holds/77c5a029-0213-4a6f-a6de-
de4747f4532f/hold-sets"
}
},
"page" : {
"size" : 10,
"totalElements" : 0,
"totalPages" : 0,
"number" : 0
}
}

OpenText InfoArchive 21.2 Page 262 of 331


19.0 Metrics

These are the resources for the metrics, and they are per tenant.

From the metrics link, there is a refresh linkrel that can be used to update the
metrics. This linkrel will now return a 410(GONE) response. Normally, the
customer would use the Refresh Metrics job to automatically refresh the metrics.
From the metrics link, there are two sub-resources for viewing either the
compliance-metrics or the storage metrics. This information is shown in the GUI
through the dashboards.

Note that as of 16EP5, additional metrics are available as part of the Reports
application. It is possible to use REST calls to run searches to get information
about the application.

In 16EP6, additional information to the Reports table was added including:


- Number of records in each application. Records for table-based
applications are defined as table rows.
- Numbers of containers in each application. For table-based applications,
these are tables. For SIP based applications, these are the AIPs.
- Information about the schemas and number of tables and containers

OpenText InfoArchive 21.2 Page 263 of 331


19.1 Role Permission

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

Administrators, business owners get access to the storage metrics.

Retention mangers get access to the compliance metrics.

19.2 Viewing the Compliance and Storage Metrics

Start with a get on the top-level service:


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9… -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/services

From the response, find the link rel for the tenant:
{
"name" : "InfoArchive Home Resource",
"_links" : {
"self" : {
"href" : "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info" : {
"href" : "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants" : {
"href" : "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant" : {
"href" : "http://localhost:8765/systemdata/tenants/66139448-0814-4c73-9ffd-
5810c64c1207"
},

}

Tip: We could have followed the tenant’s link and got the first tenant, but
following this linkrel saves a few REST calls:
curl --location --request GET 'http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…’

OpenText InfoArchive 21.2 Page 264 of 331


The response will look like this (abbreviated):
{
"id": "205ae826-a096-4684-b431-b147c8dacf21",
"name": "INFOARCHIVE",
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21"
},
"http://identifiers.emc.com/applications": {
"href": "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/applications"
},
"http://identifiers.emc.com/application-categories": {
"href": "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/application-categories"
},
"http://identifiers.emc.com/retention-policies": {
"href": "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/retention-policies"
},
"http://identifiers.emc.com/retention-policy-categories": {
"href": "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/retention-policy-categories"
},
"http://identifiers.emc.com/holds": {
"href": "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/holds"
},
"http://identifiers.emc.com/conditions": {
"href": "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/conditions"
},
"http://identifiers.emc.com/my-orders-items": {
"href": "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/my-order-items"
},
"http://identifiers.emc.com/metrics": {
"href": "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/metrics"
},
"http://identifiers.emc.com/configuration": {
"href": "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/configuration"
}
}
}

To do a get on the metrics link relation, the request is:

OpenText InfoArchive 21.2 Page 265 of 331


curl --location --request GET 'http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/metrics' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…’

The response will look like this if the metrics were refreshed:
{
"createdBy" : "system",
"createdDate" : "2021-03-09T16:18:41.4244618-05:00",
"id" : "3b9a82e0-abbc-4ccc-abb9-bdd23f352cfb",
"tenant" : "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-b147c8dacf21",
"applicationCount" : 4,
"retentionPolicyCount" : 2,
"holdCount" : 2,
"purgeCandidateListCount" : 1,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/metrics"
},
"http://identifiers.emc.com/refresh" : {
"href" : "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/metrics"
},
"http://identifiers.emc.com/compliance-metrics" : {
"href" : "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/compliance-metrics"
},
"http://identifiers.emc.com/storage-metrics" : {
"href" : "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/storage-metrics"
}
}
}

Tip: If the createdBy is set to null, it means that the refresh was never done for
the metrics.
Do not post to refresh link relation, as it will always return Gone (410) response.

Access to the compliance-metrics link is limited to Retention Managers.


Access to the storage-metrics link is limited to Administrators.

OpenText InfoArchive 21.2 Page 266 of 331


To do a get on the compliance linkrel, the request is:

OpenText InfoArchive 21.2 Page 267 of 331


curl --location --request GET 'http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/compliance-metrics' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…’

OpenText InfoArchive 21.2 Page 268 of 331


This is what the response may look like:
{
"id": "4be1e63d-1c65-4f91-8858-2691557d9c25",
"percentageUnderRetention": 99,
"percentageUnderHold": 0,
"noRetentionCoverageApplicationCount": 2,
"partialRetentionCoverageApplicationCount": 0,
"fullRetentionCoverageApplicationCount": 2,
"records": 6145,
"recordsUnderRetention": 6125,
"recordsUnderHold": 0,
"recordsInPurgeLists": 20,
"recordsNotUnderRetention": 20,
"purgeCountPredictions": [
{
"estimatedRecords": 20,
"month": "MARCH"
},
{
"estimatedRecords": 0,
"month": "APRIL"
},
{
"estimatedRecords": 127,
"month": "MAY"
},
{
"estimatedRecords": 5978,
"month": "JUNE"
},
……
{
"estimatedRecords": 0,
"month": "SEPTEMBER"
}
],
"_links": {
"http://identifiers.emc.com/retention-coverage": {
"href": "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/compliance-metrics/retention-coverage"
},
"http://identifiers.emc.com/export": {
"href": "http://localhost:8765/systemdata/compliance-metrics/4be1e63d-1c65-4f91-8858-
2691557d9c25/export"
}
}

OpenText InfoArchive 21.2 Page 269 of 331


This output reflects what you may see if Report, PhoneCalls , Trades and Audit
applications were installed, and the command was run March. .
This information matches what is shown in the compliance dashboard.
To do a get on the storage-metrics linkrel, the request is:

curl --location --request GET 'http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-


b147c8dacf21/storage-metrics' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…’

OpenText InfoArchive 21.2 Page 270 of 331


OpenText InfoArchive 21.2 Page 271 of 331
This is what the first part of the response may look like:
{
"id" : "d72ebf0a-13d5-4ed1-b6fa-940d5cb692c3",
"tenant" : "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21",
"decommissionedApplicationCount" : 0,
"activeArchiveApplicationCount" : 2,
"totalDecommissionedApplicationCount" : 1,
"totalActiveArchiveApplicationCount" : 3,
"pricingDecommissionedStorageUsage" : 0,
"pricingActiveArchiveStorageUsage" : 4412,
"pricingMetadataStorageUsage" : 2727,
"pricingContentStorageUsage" : 1684,
"totalDecommissionedStorageUsage" : 0,
"totalActiveArchiveStorageUsage" : 17095,
"totalIndexStorageUsage" : 2448,
"totalMetadataStorageUsage" : 9780,
"totalContentStorageUsage" : 4867,
"auditStorageUsage" : 3366251,
"units" : "KB",
"freedStorageInMonthPredictions" : [ {
"value" : 1527,
"pricingValue" : 1527,
"totalValue" : 0,
"month" : "MARCH"
}, {
"value" : 0,
"pricingValue" : 0,
"totalValue" : 0,
"month" : "APRIL"
}, {
"value" : 39,
"pricingValue" : 39,
"totalValue" : 0,
"month" : "MAY"
}, {
"value" : 3049,
"pricingValue" : 3049,
"totalValue" : 0,
"month" : "JUNE"
}, {
"value" : 0,
"pricingValue" : 0,
"totalValue" : 0,

OpenText InfoArchive 21.2 Page 272 of 331


The top storage by application shows only the top applications. Again, since this
command was run in March, the forecasts are for the next seven months (starting
with this month).
"topStorageByApplication" : [ {
"applicationName" : "Trades",
"metadataStorageUsage" : 7860,
"contentStorageUsage" : 3313,
"indexStorageUsage" : 1608,
"pricingMetadataStorageUsage" : 2717,
"pricingContentStorageUsage" : 266,
"applicationType" : "ACTIVE_ARCHIVING"
}, {
"applicationName" : "PhoneCalls",
"metadataStorageUsage" : 1920,
"contentStorageUsage" : 1554,
"indexStorageUsage" : 840,
"pricingMetadataStorageUsage" : 10,
"pricingContentStorageUsage" : 1418,
"applicationType" : "ACTIVE_ARCHIVING"
} ],
"storageByApplication" : [ {
"applicationName" : "Trades",
"metadataStorageUsage" : 7860,
"contentStorageUsage" : 3313,
"indexStorageUsage" : 1608,
"pricingMetadataStorageUsage" : 2717,
"pricingContentStorageUsage" : 266,
"applicationType" : "ACTIVE_ARCHIVING"
}, {
"applicationName" : "PhoneCalls",
"metadataStorageUsage" : 1920,
"contentStorageUsage" : 1554,
"indexStorageUsage" : 840,
"pricingMetadataStorageUsage" : 10,
"pricingContentStorageUsage" : 1418,
"applicationType" : "ACTIVE_ARCHIVING"
} ],

This is the storageFootprintBy part of the response, which is shown on the


storage dashboard.

OpenText InfoArchive 21.2 Page 273 of 331


"storageFootprintBy" : {
"system" : [ {
"name" : "auditDatabase",
"totalSegmentSize" : 3596,
"collections" : [ {
"name" : "Audit",
"segmentSize" : 3596
} ]
}, {
"name" : "rollForwardDatabase",
"totalSegmentSize" : 1548,
"collections" : [ {
"name" : "AipCommitRF",
"segmentSize" : 380
}, {
"name" : "RecordsRF",
"segmentSize" : 1028
}, {
"name" : "DisposeRF",
"segmentSize" : 140
} ]
}, {
"name" : "synchronizationDatabase",
"totalSegmentSize" : 940,
"collections" : [ {
"name" : "Lock",
"segmentSize" : 940
} ]
}, {
"name" : "managedItemDatabase",
"totalSegmentSize" : 956,
"collections" : [ {
"name" : "ManagedItem",
"segmentSize" : 956
} ]
}, {
"name" : "mainDatabase",
"totalSegmentSize" : 30955,
"collections" : [ {
"name" : "OrderItem",
"segmentSize" : 332
}, {
"name" : "JobInstance",

This section of the response shows the detail storage break down per
application:

OpenText InfoArchive 21.2 Page 274 of 331


"applications" : [ {
"name" : "Audit",
"archiveType" : "SIP",
"type" : "ACTIVE_ARCHIVING",
"pricingMetadata" : 0,
"pricingContent" : 0,
"totalStorageContentCount" : 105,
"totalStorageContentSize" : 448,
"stores" : [ {
"storeType" : "REGULAR",
"name" : "default-store",
"type" : "FILESYSTEM",
"contentCount" : 73,
"contentSize" : 327
}, {
"storeType" : "RESULT",
"name" : "default-result-store",
"type" : "FILESYSTEM",
"contentCount" : 32,
"contentSize" : 121
} ],
"totalStructuredDatabaseLibraryCount" : 13,
"totalStructuredDatabaseLibrarySize" : 3276,
"totalStructuredDatabaseLibraryIndexSize" : 756,
"structuredDatabases" : [ {
"databaseName" : "Audit-xdb",
"type" : "DATA",
"count" : 12,
"size" : 2960,
"indexSize" : 660
}, {
"databaseName" : "Search_Results-xdb",
"type" : "SEARCH_RESULTS",
"count" : 1,
"size" : 316,
"indexSize" : 96
} ],
"databases" : [ {
"name" : "mainDatabase",
"totalSegmentSize" : 2516,
"collections" : [ {
"name" : "AIP",
"segmentSize" : 912

This is part of the response that shows the links available:

OpenText InfoArchive 21.2 Page 275 of 331


{
......
"_links" : {
"self" : {
"href" : "http://localhost:8080/restapi/systemdata/tenants/205ae826-a096-4684-
b431-b147c8dacf21/storage-metrics"
},
"http://identifiers.emc.com/export" : {
"href" : "http://localhost:8080/restapi/systemdata/tenants/205ae826-a096-4684-
b431-b147c8dacf21/storage-metrics/export"
}
}
}

Both compliance metrics and storage metrics have an export link relation which
allows us to export the metrics data into zip file which contains some csv file
inside.

To do a get on the retention coverage of compliance metrics, the request is:

curl --location --request GET 'http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-


b147c8dacf21/compliance-metrics/retention-coverage' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…’

OpenText InfoArchive 21.2 Page 276 of 331


This is the response (we have 4 applications installed):

OpenText InfoArchive 21.2 Page 277 of 331


{
"_embedded": {
"applicationRetentionCoverages": [
{
"applicationName": "Audit",
"totalRecords": 605,
"totalRecordsUnderRetention": 605,
"totalRecordsNotUnderRetention": 0
},
{
"applicationName": "PhoneCalls",
"totalRecords": 38,
"totalRecordsUnderRetention": 38,
"totalRecordsNotUnderRetention": 0
},
{
"applicationName": "Reports",
"totalRecords": 13,
"totalRecordsUnderRetention": 0,
"totalRecordsNotUnderRetention": 13
},
{
"applicationName": "Trades",
"totalRecords": 5520,
"totalRecordsUnderRetention": 5520,
"totalRecordsNotUnderRetention": 0
}
]
},
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/tenants/205ae826-a096-4684-b431-
b147c8dacf21/compliance-metrics/retention-coverage?page=0&size=10"
}
},
"page": {
"size": 10,
"totalElements": 4,
"totalPages": 1,
"number": 0
}
}

OpenText InfoArchive 21.2 Page 278 of 331


20.0 Crypto Resources
20.1 Role Permission

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

20.2 Retrieving Crypto-objects


There is a link relation available from Home Resource
http://identifiers.emc.com/crypto-objects that allows retrieving a collection of
existing crypto-objects for InfoArchive.
All link relations that are available from the Home Resource are shown below:

OpenText InfoArchive 21.2 Page 279 of 331


{
"name": "InfoArchive Home Resource",
"_links": {
"self": {
"href": "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info": {
"href": "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants": {
"href": "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant": {
"href": "http://localhost:8765/systemdata/tenants/cd532002-62f7-4ce1-a0db-954bb3a65434"
},
"http://identifiers.emc.com/federations": {
"href": "http://localhost:8765/systemdata/federations"
},
"http://identifiers.emc.com/xdb-databases": {
"href": "http://localhost:8765/systemdata/xdb-databases"
},
"http://identifiers.emc.com/file-system-roots": {
"href": "http://localhost:8765/systemdata/file-system-roots"
},
"http://identifiers.emc.com/crypto-objects": {
"href": "http://localhost:8765/systemdata/crypto-objects"
},
"http://identifiers.emc.com/groups": {
"href": "http://localhost:8765/systemdata/groups"
},
"http://identifiers.emc.com/roles": {
"href": "http://localhost:8765/systemdata/roles"
},
"http://identifiers.emc.com/job-definitions": {
"href": "http://localhost:8765/systemdata/job-definitions"
},
"http://identifiers.emc.com/cron-expressions": {
"href": "http://localhost:8765/systemdata/cron-expressions/evaluate"
},
"http://identifiers.emc.com/job-instances": {
"href": "http://localhost:8765/systemdata/job-instances"
},
"http://identifiers.emc.com/audit-event-types": {
"href": "http://localhost:8765/systemdata/audit-event-types"
},
"http://identifiers.emc.com/audit-constants": {
"href": "http://localhost:8765/systemdata/audit-constants"
},
"http://identifiers.emc.com/audits": {
"href": "http://localhost:8765/systemdata/audits"
},
"http://identifiers.emc.com/jdbc-connection": {
"href": "http://localhost:8765/jdbc/connection"
},
"http://identifiers.emc.com/recovery/orphaned-objects": {
"href": "http://localhost:8765/recovery/orphaned-objects"
},
"http://identifiers.emc.com/recovery": {
"href": "http://localhost:8765/systemdata/recovery"
},
"http://identifiers.emc.com/storage-end-points": {
"href": "http://localhost:8765/systemdata/storage-end-points"
},
"http://identifiers.emc.com/ecs-end-points": {
"href": "http://localhost:8765/systemdata/storage-end-points"
},
"http://identifiers.emc.com/content-addressed-storages": {
"href": "http://localhost:8765/systemdata/content-addressed-storages"
},
"http://identifiers.emc.com/custom-storages": {
"href": "http://localhost:8765/systemdata/custom-storages"
},
"http://identifiers.emc.com/spaces": {
"href": "http://localhost:8765/systemdata/spaces"
},
"http://identifiers.emc.com/current-user-groups": {
"href": "http://localhost:8765/systemdata/user-groups"
},
"http://identifiers.emc.com/batch": {
"href": "http://localhost:8765/systemdata/batch"

It is possible to issue a GET request to the URI (marked by yellow on the above
listing) related to the crypto object. The example of the request is below:

OpenText InfoArchive 21.2 Page 280 of 331


curl -H 'Authorization: Bearer …’ -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/crypto-objects
The response is 200 and looks like:
{
"_embedded": {
"cryptoObjects": [
{
"id": "ec073b9e-3827-4324-8c5e-b67094ae19a7",
"createdBy": null,
"createdDate": "2017-04-21T12:18:57.641+03:00",
"lastModifiedBy": null,
"lastModifiedDate": "2017-04-21T12:18:57.641+03:00",
"version": 1,
"name": "system_crypto_object",
"securityProvider": "Bouncy Castle",
"keySize": 256,
"inUse": true,
"encryptionMode": "CBC",
"paddingScheme": "PKCS7PADDING",
"encryptionAlgorithm": "AES",
"naeCryptoConfiguration": null,
"naecryptoConfiguration": null,
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/crypto-objects/ec073b9e-3827-4324-8c5e-b67094ae19a7"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/crypto-objects/ec073b9e-3827-4324-8c5e-b67094ae19a7"
},
"http://identifiers.emc.com/crypto-object": {
"href": "http://localhost:8765/systemdata/crypto-objects/ec073b9e-3827-4324-8c5e-b67094ae19a7"
}
}
}
]
},
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/crypto-objects"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/crypto-objects"
}
},
"page": {
"size": 10,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}

OpenText InfoArchive 21.2 Page 281 of 331


20.3 Creating a New Crypto-object
On the above response, you may see the link relation
http://identifiers.emc.com/add available for the collection resource that allows
creating new crypto-object.
Let’s add a new crypto object by issuing a POST request, but consider the
parameters that should be setup for the object. They are
• "name":
• "securityProvider":
• "keySize":
• "inUse":
• "encryptionMode":
• "paddingScheme":
• "encryptionAlgorithm":
The explanation of the parameters can be found in InfoArchive Configuration and
Administration User Guide.
The example of the POST request is below:
curl -X POST -H 'Content-Type: application/hal+json' -H 'Authorization: Bearer …' -H
'Accept: application/hal+json' -d '{"now":true}' http://localhost:8765/systemdata/job-
definitions/bc37dc50-e956-45db-a4bb-ec118c3a84bf/job-instances

In case of successful object creation, the response should be 201 CREATED:


{
"id": "35591661-be52-476b-b6d4-65f37c2c6408",
"createdBy": "[email protected]",
"createdDate": "2017-09-12T14:39:04.732-04:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-09-12T14:39:04.732-04:00",
"version": 1,
"name": "my-crypto-object",
"securityProvider": "SunJCE",
"keySize": 256,
"inUse": false,
"encryptionMode": "CBC",
"paddingScheme": "PKCS5PADDING",
"encryptionAlgorithm": "AES",
"naeCryptoConfiguration": null,
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/crypto-objects/35591661-be52-476b-b6d4-65f37c2c6408"
},
"http://identifiers.emc.com/crypto-object": {
"href": "http://localhost:8765/systemdata/crypto-objects/35591661-be52-476b-b6d4-65f37c2c6408"
},
"http://identifiers.emc.com/update": {
"href": "http://localhost:8765/systemdata/crypto-objects/35591661-be52-476b-b6d4-65f37c2c6408"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/crypto-objects/35591661-be52-476b-b6d4-65f37c2c6408"
}
}
}

Please note “inUse” system attribute, in our case with “false” value. CryptoObject
that are not (yet) used can be updated/deleted/etc. – since they haven’t been
used by any process. Any CryptoObject that has been used for any type of
encryption is protected and cannot be updated or deleted.

OpenText InfoArchive 21.2 Page 282 of 331


20.4 Updating CryptoObject
CryptoObject that has not been used by the system can be updated, if needed,
by issuing a PUT request to the CryptoObject resource itself. This is useful if
initially created object needs to be updated with a different attribute, such as new
security provider, different algorithm, different padding or different key size. Here
is how we could go about updating CryptoObject created in a previous section.
Let’s say that we wanted to update our object and specify a new value for the
“keySize” attribute – namely 128 (as it was originally created with value 256). We
would issue a PUT call like this:

curl -X PUT -H 'Content-Type: application/hal+json' -H 'Authorization: Bearer.tv-


RlATVPoQnOHgzW6..' -H 'Accept: application/hal+json' -d '{"name": "my-
crypto-object", "version":1, "securityProvider": "SunJCE","keySize":
128,"encryptionMode": "CBC","paddingScheme": "PKCS5PADDING",
"encryptionAlgorithm": "AES"}' http://localhost:8765/systemdata/crypto-
objects/35591661-be52-476b-b6d4-65f37c2c6408
Note that we are passing all objects’ attributes (except internal attributes)
including “version” which is a must for PUT, as we always want to ensure we’re
updating latest version.
For successful PUT operation, we should get HTTP response OK 200, with
JSON payload like this:
{
"id": "35591661-be52-476b-b6d4-65f37c2c6408",
"createdBy": "[email protected]",
"createdDate": "2017-09-12T14:39:04.732-04:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-09-12T15:02:31.63-04:00",
"version": 2,
"name": "my-crypto-object",
"securityProvider": "SunJCE",
"keySize": 128,
"inUse": false,
"encryptionMode": "CBC",
"paddingScheme": "PKCS5PADDING",
"encryptionAlgorithm": "AES",
"naeCryptoConfiguration": null,
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/crypto-objects/35591661-be52-476b-b6d4-65f37c2c6408"
},
"http://identifiers.emc.com/crypto-object": {
"href": "http://localhost:8765/systemdata/crypto-objects/35591661-be52-476b-b6d4-65f37c2c6408"
},
"http://identifiers.emc.com/update": {
"href": "http://localhost:8765/systemdata/crypto-objects/35591661-be52-476b-b6d4-65f37c2c6408"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/crypto-objects/35591661-be52-476b-b6d4-65f37c2c6408"
}
}
}

Note – as expected, our “keySize” attribute has been updated to requested value
of 128 instead of 256.

OpenText InfoArchive 21.2 Page 283 of 331


20.5 Deleting a New Crypto-object
Crypto-object can be deleted (if it has not been used yet by the system) by
sending a DELETE request to the URI related to the link relation
http://identifiers.emc.com/delete.
The example is below:

curl -X DELETE -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json’ localhost:8765/systemdata/crypto-objects/4698c94b-d1a5-
4f56-96dd-e8c9bca0418b
In case of a successful response, you should obtain a 204 HTTP response
(NO_CONTENT).
20.6 SIP Application crypto-objects
The URI for a created crypto-object can be used when creating an application
that needs an encryption.
For a SIP application, there are the following link relations available from the
application root:

Application
(SIP)

Holding-
Pdi-cryptos
cryptos

ci-crypto- pdi-crypto- sip-crypto-


Contents
object object object

20.6.1 Creating a Pdi-crypto


Creating a PDI-crypto is similar to the PDI object described in section 11.3.1.2
At first, obtain the link to the collection of PDI crypto objects issuing a GET on
the href’s value for the link relation http://identifiers.emc.com/pdis from the
application root:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/e97a6214-9ec8-
4187-b966-eca908f61c89/pdi-cryptos
In no PDI-cryptos have been defined for the application, the response should be:

OpenText InfoArchive 21.2 Page 284 of 331


{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/pdi-cryptos"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-eca908f61c89/pdi-cryptos"
}
},
"page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}
The second thing is to issue a POST request to the URI rooted from the pdi-
crypto’s collection level. In other words, it is required to find out the href’s value
for the link relation http://identifiers.emc.com/add from the pdi-cryptos root and
perform a POST.
The PDI-crypto object has a single mandatory property, “name”. The POST
request is quite simple:

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d '{ "name": "New-
pdi-crypto"}' localhost:8765/systemdata/applications/e97a6214-9ec8-4187-b966-
eca908f61c89/pdi-cryptos
The response should be 201 CREATED:
"id": "9a8eb07f-fe33-4e88-a418-b2c321d851c0",
"createdBy": "[email protected]",
"createdDate": "2017-04-21T13:10:05.241+03:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-04-21T13:10:05.241+03:00",
"version": 1,
"name": "New-pdi-crypto",
"application": "http://localhost:8765/systemdata/applications/cbb9de50-161f-403b-b725-6f20471d121c",
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/pdi-cryptos/9a8eb07f-fe33-4e88-a418-b2c321d851c0"
},
"http://identifiers.emc.com/update": {
"href": "http://localhost:8765/systemdata/pdi-cryptos/9a8eb07f-fe33-4e88-a418-b2c321d851c0"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/pdi-cryptos/9a8eb07f-fe33-4e88-a418-b2c321d851c0"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8765/systemdata/applications/cbb9de50-161f-403b-b725-6f20471d121c"
},
"http://identifiers.emc.com/contents": {
"href": "http://localhost:8765/systemdata/pdi-cryptos/9a8eb07f-fe33-4e88-a418-b2c321d851c0/contents"
}
}
You may preserve the link to the “self” relation to use it in the holding-crypto
configuration.

OpenText InfoArchive 21.2 Page 285 of 331


In addition to the “name”, it is required to pass a file that contains the information
about indexes and partitioning keys to be encrypted. We are not talking here
about the pdi-crypto.xml file content. Instead, we are focusing on the POST
request structure.
It is required that you find the href’s value for the
http://identifiers.emc.com/contents link relation, as marked by yellow on the
above response.
And now it is required to issue a POST on the found URI with multipart form-data
type.
The example is below:

curl -X POST -H ‘Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept:


application/hal+json’ -H ‘Content-Type: multipart/form-data’ -F ‘file=@pdi-
crypto.xml’ -F ‘content={"format":"xml"};type=application/json’
localhost:8765/systemdata/pdi-cryptos/9a8eb07f-fe33-4e88-a418-
b2c321d851c0/contents
It worth considering that we setup a “Content-Type” header to “multipart/form-
data” and pass the file “pdi.xml” within the request. At the same time, we are
passing the json parameter “content”, which has “Content-Type” of
“application/json”. That particular content-type is applied directly to the
parameter.
In case of successful request, the response should be 201 CREATED.
20.6.2 Creating a Holding-crypto
In order to create Holding-Crypto object, first, it is required that you obtain the link
to the collection of t holding-crypto objects by issuing a GET on the href’s value
for the link relation http://identifiers.emc.com/holding-cryptos from the
application root.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:


application/hal+json' localhost:8765/systemdata/applications/cbb9de50-161f-
403b-b725-6f20471d121c/holding-cryptos
In no holding-cryptos are defined for the application, the response should be:

OpenText InfoArchive 21.2 Page 286 of 331


{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/cbb9de50-161f-403b-b725-6f20471d121c/holding-cryptos"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/cbb9de50-161f-403b-b725-6f20471d121c/holding-cryptos"
},
"page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}
The second thing is to issue a POST request to the URI rooted from the holding-
crypto’s collection level. In other words, it is required to find out the href’s value
for the link relation http://identifiers.emc.com/add from the pdi-crypto’s root and
perform a POST.
The holding-crypto object has following parameters:
• name - the name of the object
• holding - the URI to the main holding object (see section 11.3.1.7)
• cryptoEncoding – the encoding
• ci - complex structure that contains the URI to the crypto-object (see 19.3)
• pdi - complex structure that contains the URI to the crypto-object (see
19.3)
• sip- complex structure that contains the URI to the crypto-object (see 19.3)
• pdis- complex structure that contains the URI to the pdi-object (see 19.5.1)
At this point, we should know all the URI for the structure.
The POST example is below:

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d '{ { "name": "New-
holding-crypto", "holding": "http://localhost:8765/systemdata/holdings/870cae03-
ecea-4ae8-a42b-7e5da89f636f", "pdis": [ { "schema": "urn:eas-
samples:en:xsd:phonecalls.1.0", "pdiCrypto":
"http://localhost:8765/systemdata/pdi-cryptos/9a8eb07f-fe33-4e88-a418-
b2c321d851c0" } ], "cryptoEncoding": "base64", "sip": { "cryptoEnabled": true,
"cryptoObject": "http://localhost:8765/systemdata/crypto-objects/4543592e-5cca-
45be-9c06-cd51c8f7fa23" }, "pdi": { "cryptoEnabled": true, "cryptoObject":
"http://localhost:8765/systemdata/crypto-objects/4543592e-5cca-45be-9c06-
cd51c8f7fa23" }, "ci": { "cryptoEnabled": true, "cryptoObject":
"http://localhost:8765/systemdata/crypto-objects/4543592e-5cca-45be-9c06-
cd51c8f7fa23" } }}' localhost:8765/systemdata/applications/cbb9de50-161f-403b-
b725-6f20471d121c/holding-cryptos
The response should be 201 CREATED.

OpenText InfoArchive 21.2 Page 287 of 331


{
"id": "f721ee7f-2173-4391-ae36-1f219fa438ba",
"createdBy": "[email protected]",
"createdDate": "2017-04-21T14:59:12.204+03:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-04-21T14:59:12.204+03:00",
"version": 1,
"name": "New-holding-crypto",
"application": "http://localhost:8765/systemdata/applications/cbb9de50-161f-403b-b725-6f20471d121c",
"holding": "http://localhost:8765/systemdata/holdings/870cae03-ecea-4ae8-a42b-7e5da89f636f",
"pdis": [
{
"schema": "urn:eas-samples:en:xsd:phonecalls.1.0",
"pdiCrypto": "http://localhost:8765/systemdata/pdi-cryptos/9a8eb07f-fe33-4e88-a418-b2c321d851c0"
}
],
"cryptoEncoding": "base64",
"sip": {
"cryptoEnabled": true,
"cryptoObject": "http://localhost:8765/systemdata/crypto-objects/4543592e-5cca-45be-9c06-cd51c8f7fa23"
},
"pdi": {
"cryptoEnabled": true,
"cryptoObject": "http://localhost:8765/systemdata/crypto-objects/4543592e-5cca-45be-9c06-cd51c8f7fa23"
},
"ci": {
"cryptoEnabled": true,
"cryptoObject": "http://localhost:8765/systemdata/crypto-objects/4543592e-5cca-45be-9c06-cd51c8f7fa23"
},
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/holding-cryptos/f721ee7f-2173-4391-ae36-1f219fa438ba"
},
"http://identifiers.emc.com/update": {
"href": "http://localhost:8765/systemdata/holding-cryptos/f721ee7f-2173-4391-ae36-1f219fa438ba"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/holding-cryptos/f721ee7f-2173-4391-ae36-1f219fa438ba"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8765/systemdata/applications/cbb9de50-161f-403b-b725-6f20471d121c"
},
"http://identifiers.emc.com/ci-crypto-object": {
"href": "http://localhost:8765/systemdata/crypto-objects/4543592e-5cca-45be-9c06-cd51c8f7fa23"
},
"http://identifiers.emc.com/pdi-crypto-object": {
"href": "http://localhost:8765/systemdata/crypto-objects/4543592e-5cca-45be-9c06-cd51c8f7fa23"
},
"http://identifiers.emc.com/sip-crypto-object": {
"href": "http://localhost:8765/systemdata/crypto-objects/4543592e-5cca-45be-9c06-cd51c8f7fa23"
},
"http://identifiers.emc.com/holding": {
"href": "http://localhost:8765/systemdata/holdings/870cae03-ecea-4ae8-a42b-7e5da89f636f"
}
}
}
You may preserve the link to “self” relation to use it in holding-crypto
configuration.
In addition to the “name”, it is required that you pass a file that contains the
information about indexes and partitioning keys to be encrypted. We are not

OpenText InfoArchive 21.2 Page 288 of 331


talking about the pdi-crypto.xml file content. Instead, we are focusing on the
POST request structure.
It is required that you find the href’s value for the
http://identifiers.emc.com/contents link relation, as marked by yellow on the
above response.
And now, it is required to issue a POST on the found URI with multipart form-
data type.
The example is below:

curl -X POST -H ‘Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept:


application/hal+json’ -H ‘Content-Type: multipart/form-data’ -F ‘file=@pdi-
crypto.xml’ -F ‘content={"format":"xml"};type=application/json’
localhost:8765/systemdata/pdi-cryptos/9a8eb07f-fe33-4e88-a418-
b2c321d851c0/contents
It worth considering that we setup a “Content-Type” header to “multipart/form-
data” and passing the file “pdi.xml” within the request. At the same time, we are
passing the json parameter “content”, which has “Content-Type” of
“application/json”. That particular content-type is applied directly to the
parameter.
In case of successful request, the response should be 201 CREATED.
20.7 Table Application crypto-object
For a table application, the following link relations are available from the
application root:

Application
(Table)

Database-
cryptos

structured- unstructured-
crypto-object crypto-object

20.7.1 Creating a Database-crypto


Creating a database-crypto is similar to the database object, described in section
11.3.2.3.
At first, obtain the link to the collection of the database crypto objects by issuing a
GET on the href’s value for the link relation http://identifiers.emc.com/database-
cryptos from the application root:

OpenText InfoArchive 21.2 Page 289 of 331


curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept:
application/hal+json' localhost:8765/systemdata/applications/e5e5ac7f-15a2-
4480-b09f-b6ef45441f82/database-cryptos
In no database crypto objects are defined for the application, the response
should look like:
{
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/applications/e5e5ac7f-15a2-4480-b09f-b6ef45441f82/database-cryptos"
},
"http://identifiers.emc.com/add": {
"href": "http://localhost:8765/systemdata/applications/e5e5ac7f-15a2-4480-b09f-b6ef45441f82/database-cryptos"
}
}, "page": {
"size": 10,
"totalElements": 0,
"totalPages": 0,
"number": 0
}
}
The second thing is to issue a POST request to the URI rooted from the
database-crypto’s collection level. In other words, it is required to find out the
href’s value for the link relation http://identifiers.emc.com/add from the database
–crypto’s root and perform a POST.
The database -crypto object has following properties.
• name
• cryptoEncoding
• database: The URI to the main database
• structured: Complex parameter that contains the URI to the crypto-object
• unstructured: The complex parameter that contains the URI to the crypto-
object
The POST request is quite simple:

curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer


eyJhbGciOiJIUzI1NiJ9..’ -H 'Accept: application/hal+json' -d '{ "name":
"Baseball-sql-db-crypto", "cryptoEncoding": "base64", "database":
"http://localhost:8765/systemdata/databases/1acf8af3-9700-4b4f-ac95-
fbc8b0afd545", "structured": { "cryptoEnabled": true, "cryptoObject":
"http://localhost:8765/systemdata/crypto-objects/26dfa823-616e-4f04-a5c2-
bda3689c3bc1" }, "unstructured": { "cryptoEnabled": true, "cryptoObject":
"http://localhost:8765/systemdata/crypto-objects/5a8e2fc2-3151-4f5d-8145-
e9697c6048ec" } }' localhost:8765/systemdata/applications/e5e5ac7f-15a2-4480-
b09f-b6ef45441f82/database-cryptos
The response should be 201 CREATED:

OpenText InfoArchive 21.2 Page 290 of 331


{
"id": "9741c5fa-e8eb-4a13-b090-1589b047ee1e",
"createdBy": "[email protected]",
"createdDate": "2017-04-21T15:01:27.405+03:00",
"lastModifiedBy": "[email protected]",
"lastModifiedDate": "2017-04-21T15:01:27.405+03:00",
"version": 1,
"name": "Baseball-sql-db-crypto",
"application": "http://localhost:8765/systemdata/applications/e5e5ac7f-15a2-4480-b09f-b6ef45441f82",
"cryptoEncoding": "base64",
"database": "http://localhost:8765/systemdata/databases/1acf8af3-9700-4b4f-ac95-fbc8b0afd545",
"structured": {
"cryptoEnabled": true,
"cryptoObject": "http://localhost:8765/systemdata/crypto-objects/26dfa823-616e-4f04-a5c2-bda3689c3bc1"
},
"unstructured": {
"cryptoEnabled": true,
"cryptoObject": "http://localhost:8765/systemdata/crypto-objects/5a8e2fc2-3151-4f5d-8145-e9697c6048ec"
},
"_links": {
"self": {
"href": "http://localhost:8765/systemdata/database-cryptos/9741c5fa-e8eb-4a13-b090-1589b047ee1e"
},
"http://identifiers.emc.com/update": {
"href": "http://localhost:8765/systemdata/database-cryptos/9741c5fa-e8eb-4a13-b090-1589b047ee1e"
},
"http://identifiers.emc.com/delete": {
"href": "http://localhost:8765/systemdata/database-cryptos/9741c5fa-e8eb-4a13-b090-1589b047ee1e"
},
"http://identifiers.emc.com/application": {
"href": "http://localhost:8765/systemdata/applications/e5e5ac7f-15a2-4480-b09f-b6ef45441f82"
},
"http://identifiers.emc.com/structured-crypto-object": {
"href": "http://localhost:8765/systemdata/crypto-objects/26dfa823-616e-4f04-a5c2-bda3689c3bc1"
},
"http://identifiers.emc.com/unstructured-crypto-object": {
"href": "http://localhost:8765/systemdata/crypto-objects/5a8e2fc2-3151-4f5d-8145-e9697c6048ec"
},
"http://identifiers.emc.com/database": {
"href": "http://localhost:8765/systemdata/databases/1acf8af3-9700-4b4f-ac95-fbc8b0afd545"
}
}
}
You may preserve the link to the “self” relation to use it in the holding-crypto
configuration.
In addition to the “name”, it is required to pass a file that contains the information
about indexes and partitioning keys to be encrypted. We are not talking here
about the pdi-crypto.xml file content. Instead, we are focusing on the POST
request structure.
It is required to find the href’s value for the http://identifiers.emc.com/contents link
relation, as marked by yellow on the above response.
And now it is required to issue a POST on the found URI with multipart form-data
type.
The example is below:

OpenText InfoArchive 21.2 Page 291 of 331


curl -X POST -H ‘Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept:
application/hal+json’ -H ‘Content-Type: multipart/form-data’ -F ‘file=@pdi-
crypto.xml’ -F ‘content={"format":"xml"};type=application/json’
localhost:8765/systemdata/pdi-cryptos/9a8eb07f-fe33-4e88-a418-
b2c321d851c0/contents
It is worth considering that we setup a “Content-Type” header to “multipart/form-
data” and pass the file “pdi.xml” within the request. At the same time, we are
pass the json parameter “content”, which has “Content-Type” of
“application/json”. That particular content-type is applied directly to the
parameter.
In case of successful request, the response should be 201 CREATED.

21.0 Background Tasks (Order Items)

21.1 Overview
Users can do operations that may take a long time to execute. For that purpose,
there is an API to get information about order items that the user initiated.

Typically, background tasks are automatically cleaned up after a day.

Order items can have the following states:

State Previous Value Description

IN_QUEUE DORMANT Item has been queued

IN_PROGRESS STARTED The task is running

COMPLETE TERMINATED The task has completed


successfully

EXCEPTION ERROR The task did not


complete successfully

WAITING The task is waiting on


some event (for
example, restore
request from Glacier)

CANCELED The task was cancelled.

OpenText InfoArchive 21.2 Page 292 of 331


21.2 Getting Information about Order Items

21.2.1 Roles/Permission Getting Order Items

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

21.2.2 Getting My Order Items


The request to get order items supports the following optional parameters:

Parameter Supported Values Notes

name string Exact name of the order


item
SEARCH,
type EXPORT, Type of order item
RENDITION,
APPLY_HOLD,
REMOVE_HOLD,
CACHE_IN,
CACHE_OUT,
BACKUP,
RECOVERY,
APPLICATION_DATA_DELETION
APPLY_XDB_LIBRARY_POLICY

(this list is not


exhaustive)

showHidden True or false (default) Shows items that have


been deleted (assuming
the job has not deleted
them)

SpEL expressions are not supported.

OpenText InfoArchive 21.2 Page 293 of 331


From the tenant link, follow the http://identifiers.emc.com/my-orders-items
link relation.

curl -H ‘Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept:


application/hal+json’ -H ‘Content-Type: multipart/form-data’
localhost:8765/systemdata/order-items

Here is sample of a response, assuming the user has done a background search
against the Audits:

OpenText InfoArchive 21.2 Page 294 of 331


{
"_embedded" : {
"orderItems" : [ {
"id" : "6edaed80-702b-4931-ace9-9cfef212ba3b",
"createdBy" : "[email protected]",
"createdDate" : "2017-06-27T16:29:01.966-04:00",
"lastModifiedBy" : null,
"lastModifiedDate" : "2017-06-27T16:29:09.073-04:00",
"version" : 6,
"name" : "Application Audit_20170627162859",
"type" : "SEARCH",
"application" : "http://localhost:8765/systemdata/applications/800c33e2-c88e-4bf9-9d9e-d8e7e72b7edd",
"…
"priority" : 1,
"eligibilityDate" : "2017-06-27T16:29:01.782-04:00",
"state" : "COMPLETE",
"userName" : "[email protected]",

"startDate" : "2017-06-27T16:29:08.683-04:00",
"endDate" : "2017-06-27T16:29:08.893-04:00",
"duration" : 210,
"retentionDate" : "2017-06-28T16:29:01.784-04:00",
"hidden" : false,
"suspended" : false,
..
"applicationName" : "Audit",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/order-items/6edaed80-702b-4931-ace9-9cfef212ba3b"
},

},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/order-items/6edaed80-702b-4931-ace9-9cfef212ba3b"
},
"http://identifiers.emc.com/hide" : {
"href" : "http://localhost:8765/systemdata/order-items/6edaed80-702b-4931-ace9-9cfef212ba3b/hide"
},
"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8765/systemdata/order-items/6edaed80-702b-4931-ace9-9cfef212ba3b/log"
},


}
}]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/tenants/f94634e5-5012-4fac-bf01-8471b9a94a39/order-items?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}

The example has removed some of the information in the return for more clarity.
In this case, because the request was done so quickly, the request was
complete.

OpenText InfoArchive 21.2 Page 295 of 331


There are some interesting things that require explaining in the response:
- The hide link is deprecated and the delete link should be used instead.
- Similarly, if the order item was deleted, a restore link will change the
hidden status.
- The log link relation allows support to see what happened when that order
item was executed.
- If the item was deleted (hidden) the restore link can be used
- If the items was on the queue, a cancel link can be used to cancel the
request.
- If the order item was for a background search, additional convenience
links may be returned that can view, export, or download the content.
- If the order item was running, there is a link relation to suspend the
operation. Similarly, if the order item was suspended, there will be a link
relation to resume.

Here is an example of looking at the logs for an order item:

curl -H ‘Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..’ -H ‘Accept:


application/hal+json’ -H ‘Content-Type: multipart/form-data’
localhost:8765/systemdata/order-items/b31fc220-fb36-4289-9b17-
796e7028fbdf/log
Here is a response:
{
"id" : "79c7ae61-75b7-4513-9db8-85eaf4e1b4e0",
"contextId" : "b31fc220-fb36-4289-9b17-796e7028fbdf",
"contextType" : "SEARCH OrderItem",
"contextTypeId" : "Date_Operator_20170627171406",
"mdc" : {
"context" : "b31fc220-fb36-4289-9b17-796e7028fbdf",
"context-id" : "b31fc220-fb36-4289-9b17-796e7028fbdf",
"context-type" : "orderItem",
"user" : "[email protected]"
},
"logMessages" : [ ]
}

In this case, there were no log messages and, again, this can be influenced by
the server’s logging level.

OpenText InfoArchive 21.2 Page 296 of 331


22.0 Proxy between client and server
22.1.1 HTTP Access control and browsers (CORS)
Browsers often sandbox dynamic HTML applications and implement various
ways to protect users from many security threats. One example of that is
browsers protecting users from cross-origin requests. Here is a graphical
representation of the typical situation:

In the above scenario, HTML5 application is deployed on the host. HTML5


applications typically produce HTML pages consisting of many fragments that
browsers fetch independently (i.e. images, widgets, etc.). In the above scenario,
browser fetches initial page (green request) which automatically defines such
host as being the origin. Browser can further keep requesting additional HTML
elements from that same host (blue request) which is perfectly allowed. However,
if there is a page element that needs to be accessed from a different host (which
could be different host or often same host but a different server running on a
different port) such requests are typically seen as potential security threats and
are typically disallowed.

OpenText InfoArchive 21.2 Page 297 of 331


This scenario can be fixed in a number of ways, and since it is a common
problem we will describe one approach that can be applied that makes this
problem go away – with the use of Proxy server.
Illustration below shows typical deployment using a proxy as a middle man,
isolating requests origin host into one, common entity:

As it can be seen above, from browser’s perspective, all requests are always
going to the same host (of origin) – proxy. It is proxy’s job to dispatch them from
there, but since browser is not aware of the dispatching, no security issues will
arise.
There are many different types of proxies that can be utilized for this, ranging
from very simple ones that only do request forwarding, to much more
sophisticated that are also capable of updating response payloads for the
purpose of patching links.
I’ll describe in more detail example of a setup with a very simple, request
forwarding proxy.
22.1.2 Our setup
We’ll setup a very simple scenario:
• Tomcat running on port 7070 hosting our proxy. This instance can also be
used to host our client application
• IA Server running on port 8765

Our middle man will be Apache Tomcat (for purpose of cross verifying
configurations, we’re using Tomcat version 7.0.59.
Our Tomcat is hosting both: our sample application as well as proxy. We’ve
configured our Tomcat to run on port 7070. Our InfoArchive Server runs
separately, in a different container, on port 8765.

OpenText InfoArchive 21.2 Page 298 of 331


Here is a snippet of its server.xml configuration file:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">

<Context path="/iademo" docBase="[path to root of your app]" />
<Context path="" docBase="proxyApp" debug="0" reloadable="true" />
</Host>
In the example above, our sample app (“iademo”) is located outside of the
Tomcat’s folder structure so we provide full path.
Our “proxyApp” is deployed within our Tomcat instance.
ProxyApp is a simple servlet in our case, that accepts only one parameter,
please see below relevant section of its web.xml file:
<init-param>
<param-name>targetUri</param-name>
<param-value>http://localhost:8765</param-value>
</init-param>
<servlet-mapping>
<servlet-name>proxyServlet</servlet-name>
<url-pattern>/iarest/*</url-pattern>
</servlet-mapping>
We provided value for “targetUri” (which is a one argument our servlet expects)
of the host+port that our proxy will be using for forwarding.
The way it works is as follows:
1. Any request coming to our Tomcat’s instance with Uri pattern /iarest/ will
be used for request forwarding. Tomcat will direct all such request to our
proxy and our proxy will re-write host+base portion of our request,
forwarding it to the newly assembled URI.
So, for example, if we specify request in our browser as follows:
http://localhost:7070/iarest/services this request will be passed to our proxy,
which will re-write it as follows: http://localhost:8765/services and forward it
there. Our client (Javascript in this case) will receive the response, never
realizing that it came from a different server than one it sent its initial request
to.
So, in essence, from browser’s perspective we’ll be always contacting local
Tomcat running on port 7070 and some request will go to URI path /iademo/ (as
that is where all our application’s resources are) while others will go to URI path
/iarest/ and those requests will be forwarded to IA Server to interact with IA
REST resources.

OpenText InfoArchive 21.2 Page 299 of 331


Note that in our case we’re running proxy and our app on the same instance. We
could separate these two into different instances but that would involve running
at least three separate application server instances, even though logically it
would be doing the same thing. So, for simplicity, we’re combining two servers
into one.
So, at this point we’re almost home free – this actually works fine for one request.
The problem is that since our proxy does a very simple job (it only forwards
requests) payloads that come back may still have links pointing directly to the IA
Server. Let’s say we issue GET request to IA Home resource:

curl -H 'Content-Type: application/hal+json' -H 'Authorization: Bearer


Y9pK3S4oM6OrKhnw' -H 'Accept: application/hal+json'
http://localhost:7070/iarest/services
Based on our examples, this request goes to our proxy and is forwarded to IA
Server, which responds as follows (partial response for clarity):
{
"name": "InfoArchive Home Resource",
"_links": {
"self": {
"href": "http://localhost:8765/services"
},
"http://identifiers.emc.com/product-info": {
"href": "http://localhost:8765/product-info"
},
"http://identifiers.emc.com/tenants": {
"href": "http://localhost:8765/systemdata/tenants"
},
"http://identifiers.emc.com/tenant": {
"href": "http://localhost:8765/systemdata/tenants/0907eba3-d931-
496a-8ed6-68b2a2341b9d"
},
"http://identifiers.emc.com/managed-items-restore": {
"href": "http://localhost:8765/systemdata/managed-items/restore"
}
}
}

As you can see, even though our request went through the proxy/middle man
(port 7070), the response links are still pointing back directly to IA Server
(running on port 8765). That is pretty much expected as we did not do anything
to patch the links from response’s payload but if client acts directly on any of
these links, it will run immediately into the CORS issue. This can be remedied in
two ways:
1. We use more sophisticated proxy that will patch those links automatically

OpenText InfoArchive 21.2 Page 300 of 331


2. Our client (Javascript) is aware of the links bypassing proxy, and will patch
those internally in the Javascript before making given REST call.
If we go with option 2, we could use code snippet like that to patch links in our
code as follows:

function replaceBaseUrlForProxy(url) {
var parser = document.createElement('a');
parser.href = url;
return ‘http://localhost:7070/iarest’ + parser.pathname + parser.search;
}
Calling replaceBaseUrlForProxy() for each of the unpatched links will point them
to the proxy avoiding CORS issues.
22.1.3 Testing it out
First, let’s test IA Server to ensure it is running. We can issue a GET request to
http://localhost:8765/services and we should get back OK 200 response with
JSON payload of Home resource
Next we can test our proxy. We can issue a GET request to
http://localhost:7070/iarest/services and we should get back OK 200 response
with JSON payload of Home resource.
Yes, both of these URIs, from client’s perspective, should return exactly same
thing, since the 2nd request hits our proxy and gets forwarded to the URI from 1st
test.
If the request to IA Server is not working, obviously we have an issue running IA
Server so this should be sorted out first, until we get successful response.
Only once IA Server is working fine, we can consider testing our proxy. If the
proxy doesn’t respond as expected, we’ll have to debug it. This is done typically
following these generic points:
• Ensure Tomcat instance on port 7070 is running.
• Once we know Tomcat is running, check the status of the proxy. You’ll
need to confirm that your proxy has been setup correctly and is actually
running. Depending on your proxy you can probably check Tomcat’s logs
and perhaps log of the proxy itself to determine the issue.

OpenText InfoArchive 21.2 Page 301 of 331


23.0 Jobs
Here is an architecture diagram for job definitions and job instances

Job Job
Definitions Instances

Job Job
Definition Instance

Job Order
Instances Items

Job definitions indicate which jobs can be done. Job Instances represent a run
of the job. Job instances can be scoped to the system, tenant, or application.

When accessing via rest, the resources are accessed directly of the home
resource.
23.1 Role Permission

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

Only administrators and developers can work with jobs.


Only administrators can copy or edit job definitions.
23.2 Viewing job definitions

Job definitions can be viewed from following the job-definitions link relation off
the home resource:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/job-definitions

OpenText InfoArchive 21.2 Page 302 of 331


{
"_embedded" : {
"jobDefinitions" : [ {
"id" : "2bdc6ccd-ef2a-4626-8150-12694ca7b60d",
"createdBy" : "system",
"createdDate" : "2017-09-25T10:04:31.767-04:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-09-25T10:04:31.767-04:00",
"version" : 1,
"name" : "Commit",
"handlerName" : "CommitJob",
"description" : "Commits packages in waiting commit",
"inactive" : false,
"readOnly" : false,
"internal" : false,
"manualRetryEnabled" : false,
"applicationScoped" : true,
"tenantScoped" : true,
"systemScoped" : true,
"cronExpression" : null,
"interval" : 0,
"maxAttempts" : 1,
"expirationInterval" : 60000,
"rescheduleInterval" : 60000,
"applications" : [ ],
"tenants" : [ ],
"roles" : null,
"groups" : null,
"properties" : {
"logLevel" : ""
},
"logLevel" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-definitions/2bdc6ccd-ef2a-4626-8150-
12694ca7b60d"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-definitions/2bdc6ccd-ef2a-4626-8150-
12694ca7b60d"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/job-definitions/2bdc6ccd-ef2a-4626-8150-
12694ca7b60d"
},
"http://identifiers.emc.com/activate" : {
"href" : "http://localhost:8765/systemdata/job-definitions/2bdc6ccd-ef2a-4626-8150-
12694ca7b60d/activate"
},
"http://identifiers.emc.com/inactivate" : {
"href" : "http://localhost:8765/systemdata/job-definitions/2bdc6ccd-ef2a-4626-8150-
12694ca7b60d/inactivate"
},
"http://identifiers.emc.com/job-instances" : {
"href" : "http://localhost:8765/systemdata/job-definitions/2bdc6ccd-ef2a-4626-8150-
12694ca7b60d/job-instances"
},
"http://identifiers.emc.com/job-instances-filtered" : {
"href" : "http://localhost:8765/systemdata/job-definitions/2bdc6ccd-ef2a-4626-8150-
12694ca7b60d/job-instances/filter"
},

}
} ]
},
"_links" : {

},
"http://identifiers.emc.com/add" : {
"href" : "http://localhost:8765/systemdata/job-definitions"
}
},
"page" : {
"size" : 1,
"totalElements" : 20,
"totalPages" : 20,
"number" : 0
}
}

So, for this example, we see the Commit job. There is a link relation to show the
job instances associated with this job.

Activating or inactivating stops the schedule for jobs running on a schedule. If the

OpenText InfoArchive 21.2 Page 303 of 331


job definition does not have an interval or a cron expression define, inactivate
prevents new job instances from being run (they can be created, and the status
is set to skipped)

Because this job is expected to be run manually, the interval is 0 and the cron
expression is null.

23.3 View job instances


If the job has been run, there will be job instance created for each run.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/job-definitions/439d7eeb-f662-4d4e-b1c8-
f8a3d0c09e91/job-instances

Here is a sample output (assuming the job had run)

OpenText InfoArchive 21.2 Page 304 of 331


{
"_embedded" : {
"jobInstances" : [ {
"id" : "264583f7-898f-4d6e-b0bf-888b50add155",
"jobDefinition" : "http://localhost:8765/systemdata/job-definitions/bc37dc50-e956-45db-
a4bb-ec118c3a84bf",
"application" : "http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-831d-
b7110a8303d4",
"parent" : null,
"tenant" : null,
"log" : null,
"inactive" : false,
"scheduledAt" : 1506624669203,
"scheduledBy" : "[email protected]",
"scheduledAtString" : "2017-09-28T18:51:09.203Z",
"startTime" : "2017-09-28T14:51:09.691-04:00",
"endTime" : "2017-09-28T14:51:57.049-04:00",
"attempt" : 1,
"expirationTime" : 1506625269221,
"firstTime" : true,
"status" : "SUCCESS",
"properties" : null,
"roles" : null,
"groups" : null,
"creatorId" : null,
"successorId" : null,
"result" : "SUCCESS_CONTINUE",
"logLevel" : null,
"manualRetryCount" : 1,
"logger" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-instances/264583f7-898f-4d6e-b0bf-
888b50add155"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-instances/264583f7-898f-4d6e-b0bf-
888b50add155"
},
"http://identifiers.emc.com/unskip" : {
"href" : "http://localhost:8765/systemdata/job-instances/264583f7-898f-4d6e-b0bf-
888b50add155/unskip"
},
"http://identifiers.emc.com/skip" : {
"href" : "http://localhost:8765/systemdata/job-instances/264583f7-898f-4d6e-b0bf-
888b50add155/skip"
},
"http://identifiers.emc.com/job-children" : {
"href" : "http://localhost:8765/systemdata/job-instances/264583f7-898f-4d6e-b0bf-
888b50add155/job-children"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-831d-
b7110a8303d4"
},

"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8765/systemdata/job-instances/264583f7-898f-4d6e-b0bf-
888b50add155/log"
},
"http://identifiers.emc.com/order-items" : {
"href" : "http://localhost:8765/systemdata/context/264583f7-898f-4d6e-b0bf-
888b50add155/order-items"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8765/systemdata/job-definitions/bc37dc50-e956-45db-a4bb-
ec118c3a84bf/job-instances?page=0&size=1"
},

"http://identifiers.emc.com/add" : {
"href" : "http://localhost:8765/systemdata/job-definitions/bc37dc50-e956-45db-a4bb-
ec118c3a84bf/job-instances"
}
},
"page" : {
"size" : 1,
"totalElements" : 14,

OpenText InfoArchive 21.2 Page 305 of 331


So, in this example, we picked a job which was scoped to an application, and this
job used order items.

We can see when it was scheduled (this job was run ad hoc) and its status.
For some jobs, there can be a restart linkrel if the job supports retry. To do a
restart, POST with no payload.

There is also a link relation for getting the logs.

One point that might be surprising is that job instance didn’t define any
properties. Often the properties are specified on the job definition.
23.4 Running or scheduling a job
To run or schedule a job, a post is done to the job instances on the job definition
you are running. The expectation is that the job definition is not suspended.

Here is an example if you want the job to run now:


curl -X POST -H 'Content-Type: application/hal+json' -H 'Authorization: Bearer …' -H 'Accept: applica-
tion/hal+json' -d '{now:true}' http://localhost:8765/systemdata/job-definitions/bc37dc50-e956-45db-
a4bb-ec118c3a84bf/job-instances
The response should be a 201 (CREATED)

OpenText InfoArchive 21.2 Page 306 of 331


{{
"id" : "c648ca12-c009-4576-809b-9b2928855889",
"jobDefinition" : "http://localhost:8765/systemdata/job-definitions/bc37dc50-e956-
45db-a4bb-ec118c3a84bf",
"application" : null,
"parent" : null,
"tenant" : null,
"log" : null,
"inactive" : false,
"scheduledAt" : 1506700937318,
"scheduledBy" : "[email protected]",
"scheduledAtString" : "2017-09-29T16:02:17.318Z",
"startTime" : null,
"endTime" : null,
"attempt" : 1,
"expirationTime" : 1506701537318,
"firstTime" : true,
"status" : "SCHEDULED",
"properties" : null,
"roles" : null,
"groups" : null,
"creatorId" : null,
"successorId" : null,
"result" : null,
"logLevel" : null,
"manualRetryCount" : 0,
"logger" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-instances/c648ca12-c009-4576-
809b-9b2928855889"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-instances/c648ca12-c009-4576-
809b-9b2928855889"
},
"http://identifiers.emc.com/unskip" : {
"href" : "http://localhost:8765/systemdata/job-instances/c648ca12-c009-4576-
809b-9b2928855889/unskip"
},
"http://identifiers.emc.com/skip" : {
"href" : "http://localhost:8765/systemdata/job-instances/c648ca12-c009-4576-
809b-9b2928855889/skip"
},
"http://identifiers.emc.com/job-children" : {
"href" : "http://localhost:8765/systemdata/job-instances/c648ca12-c009-4576-
809b-9b2928855889/job-children"
},
"http://identifiers.emc.com/job-definition" : {
"href" : "http://localhost:8765/systemdata/job-definitions/bc37dc50-e956-45db-
a4bb-ec118c3a84bf"
}
}
}

Note that it possible to only delete the job instance if hasn’t started or has
finished running. Note that job-children will only return items if the job spawned
other jobs.

If you wanted to instead schedule the job, change the “now” parameter to false.
23.5 Viewing job instance information for jobs that use batch
This is very similar to viewing information about batch items for order items.
To speed this up, we will use the GUI to run the apply hold via the rule job. This
screenshot shows how to configure the job:

OpenText InfoArchive 21.2 Page 307 of 331


Note that the search set must be “Set 1” (the space is needed).
We will wait for the job to finish:

This command gets all job instances, we could have followed the link relation on
the job definition.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/job-instances

Here is a sample output (assuming the job had finished with success)

OpenText InfoArchive 21.2 Page 308 of 331


{
"id" : "973ef5b8-9164-4ae5-90b7-721790a86831",
"jobDefinition" : "http://localhost:8765/systemdata/job-definitions/fb404b74-
0316-45c2-8ece-01f48af87cfc",
"application" : "http://localhost:8765/systemdata/applications/14e259ef-df86-
41d3-a723-964f5aba5b61",
"parent" : null,
"tenant" : null,
"log" : null,
"inactive" : false,
"scheduledAt" : 1507840433315,
"scheduledBy" : "[email protected]",
"scheduledAtString" : "2017-10-12T20:33:53.315Z",
"startTime" : "2017-10-12T16:33:53.369-04:00",
"endTime" : "2017-10-12T16:34:18.502-04:00",
"attempt" : 1,
"expirationTime" : 1507841033316,
"firstTime" : true,
"status" : "SUCCESS",
"properties" : null,
"roles" : null,
"groups" : null,
"creatorId" : null,
"successorId" : null,
"result" : "SUCCESS_CONTINUE",
"logLevel" : "INFO",
"manualRetryCount" : 1,
"logger" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/job-instances/973ef5b8-9164-4ae5-
90b7-721790a86831"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/job-instances/973ef5b8-9164-4ae5-
90b7-721790a86831"
},
"http://identifiers.emc.com/unskip" : {
"href" : "http://localhost:8765/systemdata/job-instances/973ef5b8-9164-4ae5-
90b7-721790a86831/unskip"
},
"http://identifiers.emc.com/skip" : {
"href" : "http://localhost:8765/systemdata/job-instances/973ef5b8-9164-4ae5-
90b7-721790a86831/skip"
},
"http://identifiers.emc.com/job-children" : {
"href" : "http://localhost:8765/systemdata/job-instances/973ef5b8-9164-4ae5-
90b7-721790a86831/job-children"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-
a723-964f5aba5b61"
},
"http://identifiers.emc.com/job-definition" : {
"href" : "http://localhost:8765/systemdata/job-definitions/fb404b74-0316-
45c2-8ece-01f48af87cfc"
},
"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8765/systemdata/job-instances/973ef5b8-9164-4ae5-
90b7-721790a86831/log"
},
"http://identifiers.emc.com/order-items" : {
"href" : "http://localhost:8765/systemdata/context/973ef5b8-9164-4ae5-90b7-
721790a86831/order-items"
}
}
} ]

If that job instance had failed, -the restart link relation would be available.

OpenText InfoArchive 21.2 Page 309 of 331


Let’s follow the link relation for the order items

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/context/973ef5b8-9164-4ae5-90b7-
721790a86831/order-items

Here is a sample output (assuming the job had finished with success)

OpenText InfoArchive 21.2 Page 310 of 331


{
"_embedded" : {
"orderItems" : [ {
"id" : "dfd6b6ca-836a-4961-9a8d-c123b2265e00",
"createdBy" : "system",
"createdDate" : "2017-10-12T16:33:54.139-04:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-10-12T16:34:16.381-04:00",
"version" : 11,
"name" : "Apply Hold Rule_2017-10-12T16:33:54.139-04:00",
"type" : "APPLY_HOLD_RULES",
"application" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61",

"log" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61/contents/b43e5ecd-4cca-429c-bb10-07d1ce5fbce3",
"holdOperation" : null,
"items" : null,
"payload" : null,
"priority" : 0,
"eligibilityDate" : "2017-10-12T16:34:06.675-04:00",
"state" : "COMPLETE",
"userName" : "system",
"consumerContext" : null,
"dipCount" : 0,
"dipCrypto" : false,
"startDate" : "2017-10-12T16:33:55.998-04:00",
"endDate" : "2017-10-12T16:34:16.271-04:00",
"duration" : 20273,
"retentionDate" : "2017-10-13T16:33:54.139-04:00",
"hidden" : false,
"suspended" : false,
"returnMessage" : "",
"exportSettings" : null,
"stateDescription" : "1 batch has completed",
"restorePolicy" : null,
"logLevel" : null,
"permission" : {
"groups" : [ ]
},
"applicationName" : "PhoneCallsGranular",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/order-items/dfd6b6ca-836a-4961-9a8d-
c123b2265e00"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61"
},
"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8765/systemdata/order-items/dfd6b6ca-836a-4961-9a8d-
c123b2265e00/log"
},
"http://identifiers.emc.com/download-execution-log" : {
"href" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61/contents/b43e5ecd-4cca-429c-bb10-
07d1ce5fbce3/download?filename=Apply%20Hold%20Rule_2017-10-12T16:33:54.139-04:00.log.gz"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/order-items/dfd6b6ca-836a-4961-9a8d-
c123b2265e00"
},
"http://identifiers.emc.com/batches" : {
"href" : "http://localhost:8765/systemdata/order-items/dfd6b6ca-836a-4961-9a8d-
c123b2265e00/batches"
},
"http://identifiers.emc.com/context" : {
"href" : "http://localhost:8765/systemdata/order-items/dfd6b6ca-836a-4961-9a8d-
c123b2265e00/context"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/order-items/dfd6b6ca-836a-4961-9a8d-
c123b2265e00/groups"
}
}
} ]
},
"_links" : {
"self" : {

So, this will look similar to later on when we show an order item for a background
task.

OpenText InfoArchive 21.2 Page 311 of 331


Of interest in the response is the type of order item (APPLY_HOLD_RULES) and
we call also see how long the order item took to prcoess. The order item will
generally create the batches and then wait for them to complete.

Logs are available for both the order item and the batches.
Finally, for clarity, let’s follow that context link relation
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-
Type: application/hal+json' http://localhost:8765/systemdata/order-items/dfd6b6ca-836a-4961-9a8d-
c123b2265e00/context
Here is a sample output

{
"id" : "66253064-5be1-46a2-a9c5-3a6c9dd921b5",
"createdBy" : "system",
"createdDate" : "2017-10-12T16:33:54.14-04:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-10-12T16:34:16.1-04:00",
"version" : 4,
"contextId" : "973ef5b8-9164-4ae5-90b7-721790a86831",
"totalSize" : 38,
"batchSize" : 1000,
"timeOut" : 0,
"done" : true,
"retriedAfterLockNotGranted" : false,
"retryable" : true,
"batchCount" : 1,
"totalExecutionTime" : 4166,
"completedCount" : 1,
"failedCount" : 0,
"inProgressCount" : 0,
"inQueueCount" : 0,
"waitingCount" : 0,
"orderItem" : "http://localhost:8765/systemdata/order-items/dfd6b6ca-836a-4961-9a8d-
c123b2265e00",
"searchResult" : "http://localhost:8765/systemdata/search-results/4d0f3841-f967-
41cf-a269-343462d28405",
"searchComposition" : null,
"searchCriteria" : null,
"spelExpression" : null,
"items" : [ ],
"parameters" : {
"developerMode" : "false",
"tenantId" : "83d23361-99a9-44c4-bb31-6857a5f02cf5",
"ruleName" : "",
"applicationId" : "14e259ef-df86-41d3-a723-964f5aba5b61"
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/order-items/66253064-5be1-46a2-a9c5-
3a6c9dd921b5/context"
},
"http://identifiers.emc.com/order-item" : {
"href" : "http://localhost:8765/systemdata/order-items/dfd6b6ca-836a-4961-9a8d-
c123b2265e00"
}
}
}

So, the context for the order is interesting. The totalSize and batchSize should be
clear on how many items needed to be processed.

OpenText InfoArchive 21.2 Page 312 of 331


The set of counts represents the counts for the batch items (as they can be in
various states).

The retriedAfterLockNotGranted normally isn’t set for an order item but could be
set for the context for a batch and basically is meant to avoid contention when
multiple batches are running concurrently.

OpenText InfoArchive 21.2 Page 313 of 331


24.0 Rules
Here is an architecture diagram for rules. Rules are associated with an
application.

Tenants

Applications

Rules

Rules can be used to apply retention, apply holds, and trigger events.
Rules are usually acted on by running the associated job.
24.1 Role Permission

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

Only administrators and developers can work with rules.


Retention managers can view rules.
24.2 Listing rules
Rules are provided with the PhoneCallsGranular and Patent sample applications.

Find the link relation for rules for that application and do a GET.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-831d-
b7110a830d4/rules

Here is a sample output (assuming this was for the PhoneCallsGranular


application)

The example has omitted one of the 3 rules that would have been returned.

OpenText InfoArchive 21.2 Page 314 of 331


{
"_embedded" : {
"rules" : [ {
"id" : "867d0b81-02e2-4c92-9b4b-704e6940cc76",
"createdBy" : "[email protected]",
"createdDate" : "2017-09-25T14:59:12.568-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-09-28T13:30:35.26-04:00",
"version" : 4,
"name" : "apply-retention-rule",
"application" : "http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-831d-
b7110a8303d4",
"drl" : "http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-831d-
b7110a8303d4/contents/fe242101-2369-4b10-87b5-5d5cb4da3671",
"type" : "APPLY_RETENTION",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/rules/867d0b81-02e2-4c92-9b4b-704e6940cc76"
},
"http://identifiers.emc.com/contents" : {
"href" : "http://localhost:8765/systemdata/rules/867d0b81-02e2-4c92-9b4b-
704e6940cc76/contents"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/rules/867d0b81-02e2-4c92-9b4b-704e6940cc76"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/rules/867d0b81-02e2-4c92-9b4b-704e6940cc76"
}
}
}, {
"id" : "bb085cd4-582c-48f8-bcf3-72d668d5c49f",
"createdBy" : "[email protected]",
"createdDate" : "2017-09-25T14:59:13.019-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-09-25T14:59:13.243-04:00",
"version" : 2,
"name" : "trigger-event-rule",
"application" : "http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-831d-
b7110a8303d4",
"drl" : "http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-831d-
b7110a8303d4/contents/1c261de7-62ed-4bc2-8b36-95da3145ac96",
"type" : "TRIGGER_EVENT",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/rules/bb085cd4-582c-48f8-bcf3-72d668d5c49f"
},
"http://identifiers.emc.com/contents" : {
"href" : "http://localhost:8765/systemdata/rules/bb085cd4-582c-48f8-bcf3-
72d668d5c49f/contents"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/rules/bb085cd4-582c-48f8-bcf3-72d668d5c49f"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/rules/bb085cd4-582c-48f8-bcf3-72d668d5c49f"
}
}

},
"page" : {
"size" : 20,
"totalElements" : 3,
"totalPages" : 1,
"number" : 0
}
}

So, you can see the type of rule (APPLY_RETENTION, APPLY_HOLD,


TRIGGER_EVENT) as well as the name.

OpenText InfoArchive 21.2 Page 315 of 331


Supported parameters:

Parameter Example Description

name ?name='MyRule' Returns a list of rules that


match the name within an
application

spel ?spel=type=='APPLY_RETENTION' Returns a list that matches


the spEL expression. Note
that calculated fields are
not available.

24.3 Creating new rules

Posting to the collection allows you to create a new rule.

Supported parameters:

Parameter Example Description

storeName ?storeName='file_store_01' The name of the


store to store the
content file. If not
specified a default
will be used.
Content-Disposition: form-
file data; name="file"; Multipart file that
filename="demo.drl" Content- contains the name of
Type: text/plain the file to upload

The body of the request on the post includes the name and type (both are
mandatory). Type is one of APPLY_RETENTION, APPLY_HOLD,
TRIGGER_EVENT.So how to do this is practice, first create the rule:
curl -X POST -H 'Content-Type: application/hal+json' -H 'Authorization: Bearer …' -H
'Accept: application/hal+json' -d '{"name":"test", "type" : "APPLY_RETENTION"}'
http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-831d-
b7110a8303d4/rules

This is the expected output:

OpenText InfoArchive 21.2 Page 316 of 331


{
"id" : "3653ae46-b047-4169-bb82-a7d3326af942",
"createdBy" : "[email protected]",
"createdDate" : "2017-09-29T15:21:22.673-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-09-29T15:21:22.673-04:00",
"version" : 1,
"name" : "test",
"application" : "http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-
831d-b7110a8303d4",
"drl" : null,
"type" : "APPLY_RETENTION",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/rules/3653ae46-b047-4169-bb82-
a7d3326af942"
},
"http://identifiers.emc.com/contents" : {
"href" : "http://localhost:8765/systemdata/rules/3653ae46-b047-4169-bb82-
a7d3326af942/contents"
},
"http://identifiers.emc.com/update" : {
"href" : "http://localhost:8765/systemdata/rules/3653ae46-b047-4169-bb82-
a7d3326af942"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/rules/3653ae46-b047-4169-bb82-
a7d3326af942"
}
}
}

The next step is to update the contents for the rule

You will be posting to the link from the contents link where you pass the file store
and file information.

curl -X POST -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…." -H "Content-Type:


multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F
"[email protected]" "http://localhost:8765/systemdata/rules/3653ae46-b047-4169-
bb82-a7d3326af942/contents?storeName=file_store_01"

This is the output:

OpenText InfoArchive 21.2 Page 317 of 331


{
"id" : "401e5c64-6644-4fba-b625-f7d8425445ba",
"createdBy" : "[email protected]",
"createdDate" : "2017-09-29T16:21:58.473-04:00",
"lastModifiedBy" : "[email protected]",
"lastModifiedDate" : "2017-09-29T16:21:58.479-04:00",
"version" : 2,
"parentId" : "3653ae46-b047-4169-bb82-a7d3326af942",
"parentType" : "",
"store" : "http://localhost:8765/systemdata/stores/ed4c2832-45cc-4c26-b05b-
7d7943b002ad",
"application" : "http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-
831d-b7110a8303d4",
"format" : "drl",
"size" : 5,
"path" : "36/53/ae/46-b047-4169-bb82-a7d3326af942.drl.401e5c64-6644-4fba-b625-
f7d8425445ba",
"modifier" : "00000000000000000",
"checksum" : "a42f875cd0ddb8c30f9c02b4a4e260f358e03f96",
"orphan" : false,
"mimeType" : null,
"last" : 0,
"metadata" : { },
"properties" : { },
"blob" : null,
"options" : [ ],
"externalRefs" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-831d-
b7110a8303d4/contents/401e5c64-6644-4fba-b625-f7d8425445ba"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-831d-
b7110a8303d4/contents/401e5c64-6644-4fba-b625-f7d8425445ba"
},
"http://identifiers.emc.com/store" : {
"href" : "http://localhost:8765/systemdata/stores/ed4c2832-45cc-4c26-b05b-
7d7943b002ad"
},
"http://identifiers.emc.com/content-download" : {
"href" : "http://localhost:8765/systemdata/applications/07a0cf07-5dca-4d5c-831d-
b7110a8303d4/contents/401e5c64-6644-4fba-b625-f7d8425445ba/download"
}
}
}

So, the size is how many characters (this value is in bytes) that were in the file
that was uploaded, and you can follow the content-download linkrel to ensure
that the rule was uploaded correctly.

OpenText InfoArchive 21.2 Page 318 of 331


25.0 Background tasks

In InfoArchive, tasks can potentially take a large amount of time. An order item
tracks a particular operation and can indicate the status (completed, in progress,
queued, …)
Some tasks may act on a large collection of resources, and batching can be used
for scalability
Here is an architecture diagram for order items

System Order
Tenants
Items

Tenant

Order Items

Batch items

Jobs also may cause order items to be created, and these order items can be
viewed either from the system order items or from the job instance that created
the order item.

OpenText InfoArchive 21.2 Page 319 of 331


25.1 Background tasks permissions

Business Retention Ediscovery


Administrator Developer End User
Owner Manager Administrator

Order items can be seen by any user that can do an operation that uses
background processing.

Operations that can cause this include:


• Background search
• Applying a hold
• Deleting application data
By default, a user can only see the background tasks (order items) that were
created by them. Background tasks created via jobs are owned by the system.

25.2 Viewing your own background tasks

For our examples, we can use the PhoneCallsGranular application. For brevity,
we will assume that the background search was already done from the IAWA
GUI.

Do a GET on the link relation my-order-items from the tenant.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8080/systemdata/tenants/83d23361-99a9-44c4-bb31-
6857a5f02cf5/order-items

This is the output assuming we had done a background search.

OpenText InfoArchive 21.2 Page 320 of 331


{
"_embedded" : {
"orderItems" : [ {
"id" : "7fc4c6b9-5999-44a5-9fa1-ea03c1a6cec4",
"createdBy" : "[email protected]",
"createdDate" : "2017-10-12T15:29:43.673-04:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-10-12T15:29:49.49-04:00",
"version" : 6,
"name" : "Date_Operator_20171012152942",
"type" : "SEARCH",
"application" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61",
"search" : "http://localhost:8765/systemdata/searches/14bdd1a6-fb32-43dd-ac4c-
2c95d3efa13b",
"searchComposition" : "http://localhost:8765/systemdata/search-compositions/9a6fd1ae-be4c-
4724-808c-c53f43788fb7",
"searchResult" : "http://localhost:8765/systemdata/search-results/7088ef5c-f2b4-4878-a27d-
83e08adb0e49",

"log" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61/contents/4732f571-48c2-4679-bffd-35a0f5092a16",

"items" : null,
"payload" : "<da-
ta><criterion><name>CallStartDate</name><operator>EQUAL</operator><value></value></criterion></da
ta>",
"priority" : 1,
"eligibilityDate" : "2017-10-12T15:29:43.659-04:00",
"state" : "COMPLETE",
"userName" : "[email protected]",
"consumerContext" : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<data>\n <Call-
StartDate operator=\"\"/></data>",
"dipCount" : 38,
"dipCrypto" : false,
"startDate" : "2017-10-12T15:29:48.866-04:00",
"endDate" : "2017-10-12T15:29:49.412-04:00",
"duration" : 546,
"retentionDate" : "2017-10-13T15:29:43.664-04:00",
"hidden" : false,
"suspended" : false,
"returnMessage" : null,

"applicationName" : "PhoneCallsGranular",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/order-items/7fc4c6b9-5999-44a5-9fa1-
ea03c1a6cec4"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61"
},
"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8765/systemdata/order-items/7fc4c6b9-5999-44a5-9fa1-
ea03c1a6cec4/log"
},
"http://identifiers.emc.com/download-execution-log" : {
"href" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61/contents/4732f571-48c2-4679-bffd-
35a0f5092a16/download?filename=Date_Operator_20171012152942.log.gz"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/order-items/7fc4c6b9-5999-44a5-9fa1-
ea03c1a6cec4"
},

}
}
} ]
},

OpenText InfoArchive 21.2 Page 321 of 331


Some of the more interesting fields (some of the output has been removed for
brevity/clarity)
The state indicates the state of the order item (one of IN_QUEUE,
IN_PROGRESS, COMPLETE, EXCEPTION, or WAITING).
In this case our search was done, so it was in the COMPLETE state. If that
search would have required a request to Glacier to get the content, we might see
the order item in the WAITING state.

The search result indicates where the search results can be found. Note that the
search result will not remain forever and when the background task is cleaned
up, the search result would also be cleaned.

The payload includes what the search criteria was.


The hidden flag indicates if the order item should be returned. Deleting an order
item actually hides the order item.
This rest call supports a parameter showHidden that if passed will show hidden
order items (default is false).

It should be noted that depending on the order item, a link relation may be
available to restart the order item. Currently only a few operations support this
(such as applying hold), and this operation is only available if the operation failed
(EXCEPTION state).
25.3 Viewing batches associated with order items
Certain operations such applying holds use the batch framework and in this
section we will explore actually getting more information.

For this example, we will assume that someone used the GUI to apply a hold to
the search results in our previous background query.

Do a get on the link relation my-order-items from the tenant. This is the same
call as before.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8080/systemdata/tenants/83d23361-99a9-44c4-bb31-
6857a5f02cf5/order-items

OpenText InfoArchive 21.2 Page 322 of 331


This is the output and we will only show the information for the apply hold (the
search would also be returned).

{
"_embedded" : {
"orderItems" : [ {
"id" : "aacc76a7-c00b-4817-bce4-0e5e7fd34cff",
"createdBy" : "[email protected]",
"createdDate" : "2017-10-12T15:56:44.75-04:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-10-12T15:57:13.044-04:00",
"version" : 11,
"name" : "Test_2017-10-12T15:56:44.745-04:00",
"type" : "APPLY_HOLD",
"application" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61",
"search" : null,
"searchComposition" : null,
"searchResult" : null,
"collection" : null,
"matter" : null,
"aip" : null,
"table" : null,
"holding" : null,
"xdbLibrary" : null,
"store" : null,
"purgeCandidateList" : null,
"log" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61/contents/a45af160-1f41-4c8c-89ac-adf718919c04",
"holdOperation" : null,
"items" : null,
"payload" : null,
"priority" : 0,
"eligibilityDate" : "2017-10-12T15:57:02.77-04:00",
"state" : "COMPLETE",
"userName" : "[email protected]",
"consumerContext" : null,
"dipCount" : 0,
"dipCrypto" : false,
"startDate" : "2017-10-12T15:56:52.077-04:00",
"endDate" : "2017-10-12T15:57:12.451-04:00",
"duration" : 20374,
"retentionDate" : "2017-10-13T15:56:44.745-04:00",
…,
"stateDescription" : "1 batch has completed",

"applicationName" : "PhoneCallsGranular",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/order-items/aacc76a7-c00b-4817-bce4-
0e5e7fd34cff"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61"
},
"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8765/systemdata/order-items/aacc76a7-c00b-4817-bce4-
0e5e7fd34cff/log"
},
"http://identifiers.emc.com/download-execution-log" : {
"href" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61/contents/a45af160-1f41-4c8c-89ac-adf718919c04/download?filename=Test_2017-10-
12T15:56:44.745-04:00.log.gz"
},
"http://identifiers.emc.com/delete" : {
"href" : "http://localhost:8765/systemdata/order-items/aacc76a7-c00b-4817-bce4-
0e5e7fd34cff"
},
"http://identifiers.emc.com/batches" : {
"href" : "http://localhost:8765/systemdata/order-items/aacc76a7-c00b-4817-bce4-
0e5e7fd34cff/batches"
},
"http://identifiers.emc.com/context" : {
"href" : "http://localhost:8765/systemdata/order-items/aacc76a7-c00b-4817-bce4-
0e5e7fd34cff/context"
},
"http://identifiers.emc.com/groups" : {
"href" : "http://localhost:8765/systemdata/order-items/aacc76a7-c00b-4817-bce4-
0e5e7fd34cff/groups"
}
}
},

OpenText InfoArchive 21.2 Page 323 of 331


So, there are some noticeable differences from the search order item, namely the
type is now APPLY_HOLD and the search fields are null for this operation.

One thing that is worth mentioning is that the holdOperation field is null. In
previous versions, this would have contained information about the operation, if
the operation was batched, that information can now be found by following the
context link relation.

The state description indicates the overall status for the operation, in this case
only one batch was created (the batch size was 1000 and the example only
applied to 36 records).

So, if we wanted to view the logs for the order item, we could follow the link
relation for logs (or if we wanted to view the diagnostic logs, we could follow the
download-execution-logs link rel, doing a get).

We will now view the batches by following the link rel for batches:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8080/systemdata/orderitems/aacc76a7-c00b-4817-bce4-
0e5e7fd34cff/batches

Here is the output:

OpenText InfoArchive 21.2 Page 324 of 331


{
"_embedded" : {
"batchItems" : [ {
"id" : "50048d07-574a-414a-9e48-4de24b865dc9",
"createdBy" : "[email protected]",
"createdDate" : "2017-10-12T15:56:52.795-04:00",
"lastModifiedBy" : "system",
"lastModifiedDate" : "2017-10-12T15:57:06.537-04:00",
"version" : 4,
"name" : "Test_2017-10-12T15:56:44.745-04:00 (batch 1)",
"type" : "APPLY_HOLD",
"application" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61",

"log" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61/contents/7eb3fce8-5999-4414-8099-97b4eabbec38",
"holdOperation" : null,
"items" : null,
"payload" : null,
"priority" : 0,
"eligibilityDate" : "2017-10-12T15:56:52.561-04:00",
"state" : "COMPLETE",
"userName" : "[email protected]",
"consumerContext" : null,
"dipCount" : 0,
"dipCrypto" : false,
"startDate" : "2017-10-12T15:57:01.379-04:00",
"endDate" : "2017-10-12T15:57:06.443-04:00",
"duration" : 5064,
"retentionDate" : null,
"hidden" : false,
"suspended" : false,
"returnMessage" : null,
"exportSettings" : null,
"stateDescription" : "",
"restorePolicy" : null,
"logLevel" : null,
"permission" : {
"groups" : [ ]
},
"orderItem" : "http://localhost:8765/systemdata/order-items/aacc76a7-c00b-4817-bce4-
0e5e7fd34cff",
"seqNo" : 1,
"size" : 38,
"applicationName" : "PhoneCallsGranular",
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/batch-items/50048d07-574a-414a-9e48-
4de24b865dc9"
},
"http://identifiers.emc.com/application" : {
"href" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61"
},
"http://identifiers.emc.com/log" : {
"href" : "http://localhost:8765/systemdata/batch-items/50048d07-574a-414a-9e48-
4de24b865dc9/log"
},
"http://identifiers.emc.com/download-execution-log" : {
"href" : "http://localhost:8765/systemdata/applications/14e259ef-df86-41d3-a723-
964f5aba5b61/contents/7eb3fce8-5999-4414-8099-97b4eabbec38/download?filename=Test_2017-10-
12T15:56:44.745-04:00%20(batch%201).log.gz"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8765/systemdata/order-items/aacc76a7-c00b-4817-bce4-
0e5e7fd34cff/batches?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}

Looking at the output, we can see that this was the first batch and see the size of
items (by default the batches have a maximum size of 1000)

OpenText InfoArchive 21.2 Page 325 of 331


We can look at the logs for this batch by doing a GET on the log link relation.

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9….' -H 'Accept: application/hal+json' -H 'Content-


Type: application/hal+json' http://localhost:8080/systemdata/batch-items/50048d07-574a-414a-9e48-
4de24b865dc9/log

Here is the output:


{
"id" : "09c9ad29-eb45-4cc2-930a-ec358def1f03",
"contextId" : "50048d07-574a-414a-9e48-4de24b865dc9",
"contextType" : "APPLY_HOLD OrderItem",
"contextTypeId" : "Test_2017-10-12T15:56:44.745-04:00 (batch 1)",
"mdc" : {
"apply-context-sifting" : "true",
"loglevel.threshold" : "DEBUG",
"context" : null,
"context-id" : "50048d07-574a-414a-9e48-4de24b865dc9",
"context-type" : "orderItem",
"user" : "[email protected]"
},
"logMessages" : [ {
"time" : 1507838221379,
"level" : "INFO",
"message" : "Starting APPLY_HOLD order item Test_2017-10-12T15:56:44.745-04:00
(batch 1) on behalf of [email protected]",
"stacktrace" : null
}, {
"time" : 1507838221457,
"level" : "INFO",
"message" : "Executing batch operation Test_2017-10-12T15:56:44.745-04:00, batch 1
of 1",
"stacktrace" : null
}, {
"time" : 1507838221519,
"level" : "DEBUG",
"message" : "Handle batch 0",
"stacktrace" : null
}, {
"time" : 1507838221535,
"level" : "DEBUG",
"message" : "Setting hold Set on Apply Operation",
"stacktrace" : null
}, {
"time" : 1507838223822,
"level" : "DEBUG",
"message" : "Apply hold with operation items : 38",
"stacktrace" : null
}, {
"time" : 1507838226427,
"level" : "DEBUG",
"message" : "Applied hold to 38 items.",
"stacktrace" : null
}, {
"time" : 1507838226427,
"level" : "INFO",
"message" : "Order item has completed successfully",
"stacktrace" : null
} ]
}

OpenText InfoArchive 21.2 Page 326 of 331


26.0 Appendix - Examples
26.1 xQuery Example
declare namespace table="urn:x-emc:ia:schema:table";
declare variable $page external;
declare variable $size external;
declare variable $firstName external := "";
declare variable $lastName external := "";
declare variable $sortDirection external := "ascending";
declare variable $columnName external := "NAMEFIRST";

declare function local:getResultsPage($rows, $page, $size) {


let $offset := $page * $size
let $total := count($rows)
return <results total="{ $total }"> {
for $row in subsequence($rows, $offset + 1, $size)
return $row
} </results>
};

declare function local:addClause($whereClause as xs:string, $var as xs:string*, $expr as xs:string) as xs:string


{
if (empty($var) or $var = "")
then $whereClause
else if ($whereClause = "") then $expr else concat($whereClause, " and ", $expr)
};

let $whereClause := local:addClause("", $firstName, concat("$elem/NAMEFIRST = &apos;", $firstName, "&apos;"))


let $whereClause := local:addClause($whereClause, $lastName, concat("$elem/NAMELAST = &apos;", $lastName, "&apos;"))
let $whereClause := if ($whereClause != "") then concat("where ", $whereClause) else $whereClause

let $query-str := concat("for $elem in /BASEBALL/MASTER/ROW ", $whereClause, " return $elem")

let $main-query := xhive:evaluate($query-str)

let $rows :=
for $elem in $main-query
let $fname := $elem/NAMEFIRST/text()
let $lname := $elem/NAMELAST/text()
let $bmonth := $elem/BIRTHMONTH/text()
let $bday := $elem/BIRTHDAY/text()
let $height := $elem/HEIGHT/text()
let $weight := $elem/WEIGHT/text()
let $debut := $elem/DEBUT/text()
let $finalGame := $elem/FINALGAME/text()

return
<row id="{string($elem/@table:id)}">
<column name="lastName">{ $lname }</column>
<column name="firstName">{ $fname }</column>
<column name="birthYear">{ $elem/BIRTHYEAR/text() }</column>
<column name="birthMonth">{ $bmonth }</column>
<column name="birthDay">{ $bday }</column>
<column name="height">{ $height }</column>
<column name="weight">{ $weight }</column>
<column name="debut">{ $debut }</column>
<column name="finalGame">{ $finalGame }</column>
</row>

return local:getResultsPage($rows, $page, $size)

OpenText InfoArchive 21.2 Page 327 of 331


26.2 xForm Example
<?xml version="1.0" encoding="UTF-8"?>
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xhtml:head>
<xforms:model>
<xforms:instance>
<data>
<lastName />
</data>
</xforms:instance>
<xforms:instance id="labels">
<labels>
<lastName>Last Name</lastName>
</labels>
</xforms:instance>
<xforms:instance id="hints">
<hints>
<lastName>Enter Last Name</lastName>
</hints>
</xforms:instance>
<xforms:instance id="prompts">
<prompts>
<lastName>Miller, Ortiz,Smith, Zimmer</lastName>
</prompts>
</xforms:instance>
<xforms:instance id="alerts">
<alerts>
<lastName />
</alerts>
</xforms:instance>
<xforms:instance id="range-messages">
<rangemessages>
<lastName />
</rangemessages>
</xforms:instance>
<xforms:instance id="pattern-messages">
<patternmessages>
<lastName />
</patternmessages>
</xforms:instance>
<xforms:submission id="playerSearchSubmission" method="post"
serialization="application/xml" />
<xsd:schema targetNamespace="http://www.w3.org/2002/xforms"
elementFormDefault="qualified"></xsd:schema>
<bind xmlns="http://www.w3.org/2002/xforms" ref="/data/lastName" />
</xforms:model>
</xhtml:head>
<xhtml:body>
<input xmlns="http://www.w3.org/2002/xforms" ref="lastName">
<label ref="instance('labels')/lastName" />
<hint ref="instance('hints')/lastName" />
<hint appearance="minimal" ref="instance('prompts')/lastName" />
<alert ref="instance('alerts')/lastName" />
<message class="range" ref="instance('range-messages')/lastName" />
<message class="pattern" ref="instance('pattern-messages')/lastName" />
</input>
</xhtml:body>
</xhtml:html>

OpenText InfoArchive 21.2 Page 328 of 331


26.3 Result-master Example
{
"panels": [{
"name": "Main Panel",
"title": null,
"description": null,
"tabs": [{
"name": "_ia_Default_Main_tab_",
"title": null,
"description": null,
"columns": [{
"name": "firstName",
"label": "First Name",
"cellLabel": null,
"xdbElementName": "NAMEFIRST",
"hidden": false,
"encrypt": false,
"masked": false,
"exportable": true,
"showIcon": false,
"rowIdentifier": false,
"dataType": "STRING",
"type": "XQUERY_REFERENCE",
"order": 0,
"sortable": false,
"defaultSort": "NONE",
"nestedSearch": null,
"url": null,
"parameterMapping": null,
"groupName": null,
"groupPath": null,
"path": null,
"mediaType": null,
"mediaTypeProvider": null,
"mediaTypeProviderName": null,
"viewer": null,
"printable": true,
"downloadable": true,
"_links": {},
"nestedSearchName": null
}],
"exportEnabled": false,
"createCollectionEnabled": false,
"exportConfigurations": null,
"customPresentationConfiguration": null,
"customPresentation": null,
"exportConfigs": null
}]
}]
}

OpenText InfoArchive 21.2 Page 329 of 331


26.4 Example of a Customized application-CLIENTS.yml file
CLIENTS:
clients:
-
clientId: "infoarchive.gateway"
authorizedGrantTypes:
- "client_credentials"
- "implicit"
authorities:
- "ROLE_ADMINISTRATOR"
scopes:
- "administration"
accessTokenValiditySeconds: 2147483647
refreshTokenValiditySeconds: 2147483647
-
clientId: "infoarchive.iawa"
authorizedGrantTypes:
- "password"
- "refresh_token"
- "implicit"
authorities:
- "ROLE_TRUSTED_CLIENT"
scopes:
- "search"
- "compliance"
- "administration"
accessTokenValiditySeconds: 1800
refreshTokenValiditySeconds: 1860
-
clientId: "infoarchive.jdbc"
authorizedGrantTypes:
- "password"
- "refresh_token"
- "implicit"
authorities:
- "ROLE_TRUSTED_CLIENT"
clientSecret: 47e250a4-ccd3-49d1-8114-3ee20cdebe3c
scopes:
- "search"
accessTokenValiditySeconds: 60
refreshTokenValiditySeconds: 6000
-
clientId: "infoarchive.cli"
authorizedGrantTypes:
- "password"
- "refresh_token"
- "implicit"
authorities:
- "ROLE_TRUSTED_CLIENT"
clientSecret: aa1402c1-340d-4d29-900a-fd682e74e87c
scopes:
- "search"
- "compliance"
- "administration"
accessTokenValiditySeconds: 2147483647
refreshTokenValiditySeconds: 2147483647
-
clientId: "infoarchive.custom"
authorizedGrantTypes:
- "password"
- "refresh_token"
- "implicit"
authorities:
- "ROLE_TRUSTED_CLIENT"
clientSecret: mysecret
scopes:
- "search"
- "compliance"
- "administration"
accessTokenValiditySeconds: 2147483647
refreshTokenValiditySeconds: 2147483647

OpenText InfoArchive 21.2 Page 330 of 331


About OpenText
OpenText enables the digital world, creating a better way for organizations to
work with information,
on-premises or in the cloud. For more information about OpenText
(NASDAQ/TSX: OTEX),
visit opentext.com.

Connect with us:


OpenText CEO Mark Barrenechea’s blog
Twitter | LinkedIn

OpenText InfoArchive 21.2 Page 331 of 331

You might also like