1. Introduction

The Content Manager OnDemand REST Services are an out of the box set of REST-based services that perform fundamental Content Manager OnDemand operations over HTTP/HTTPS.

This guide is aimed at developers looking to integrate Content Manager OnDemand into existing or new applications using REST APIs.

1.1. Usage of HTTP Verbs

The following table describes how the Content Manager OnDemand REST API interprets the HTTP verbs.

Table 1. HTTP Verbs
HTTP Verb Usage

GET

GET is used to retrieve information - except in the case of search.

POST

POST is used to store and search for documents.

DELETE

DELETE is used to delete hits.

PUT

PUT is used to update existing hits.

PATCH

PATCH is not used at this time.

Usage of POST

Because of the potential complexity of search criteria and the fact that some tools don’t allow for GET requests with a body, POST was chosen as the method for performing searches.

2. Authentication

REST Request Authorization

All requests to the Content Manager OnDemand REST Services API must be authorized. Authorizing a request is done by using the CMODSharedKey authorization scheme along with an access ID and signature if signing requests. Because an access ID is tied to a connection pool, which in turn is tied to a Content Manager OnDemand user, for security reasons a given request may not return all data present on the Content Manager OnDemand server.

Example 1. Authorization header

Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:UYLvg6pjA58OXVglgN50xajG+IHog/AKhBIY=

Date header

All requests must include the Coordinated Universal Time (UTC) timestamp in the request. This can be done by either specifying the usi-date header or by using the standard HTTP/HTTPS Date header. If both headers are included, the value of the usi-date is used as the requests creation time. The date header is also used in the signing of authorized requests.

Authorization header

The Content Manager OnDemand REST API uses the standard HTTP Authorization header for passing authentication information. Any attempt to access a service requiring authorization, without the appropriate header, will be denied with a return code of 401 Unauthorized.

The authorization header for signing requests has the following format:

Example 2. Authorization header format

Authorization: CMODSharedKey AccessID:Signature

In example 2, CMODSharedKey is the custom authorization scheme, AccessID is the name of the account making the request, and Signature is a Hash-based Message Authentication Code (HMAC) constructed from the request. The HMAC is computed using the SHA-256 hash algorithm and then encoded using Base64 encoding. The signature portion is only required if requests are being signed.

Signature string construction

The signature portion of the Authorization header is constructed from select elements from a given request. The elements, provided in order, separated by a newline (\n) are:

HTTP-Verb [Get|Post|Put|Delete]
usi-date or Date
API Endpoint
Resource URI
AccessID

The resource URI should not include query parameters.

The following is pseudocode that shows the construction of the Authorization request header:

String Authorization = “CMODSharedKey” +” “ + AccessID + “:” + Signature;

Signature = Base64( (Hmac-SHA256 ( SecretKey, UTF-8-Enoded (StringToSign) );

StringToSign  = Verb + “\n” +
		Date + “\n” +
		URL + “\n” +
		Resource + “\n” +
		AccessID;

Example 3 shows the data that would be used to sign a GET request to retrieve data. The ODWEK document ID is shortened for clarity.

Example 3. Exampe of retrieve API signature data

GET
2020-02-03T23:31:04Z
http://localhost:9080
/cmod-rest/v1/hits/Ledger Reports/Y2BN9Y/iiqZRQKNZZ7xgk5t4+…​
externpool1-P0mFoCU5H83lN9uQcRUA

Do not encode any portion of the data being signed. When validating the signature, the REST services will have already decoded the incoming data. Encoding and then signing will cause the signature calculation to fail resulting in a 401 UNAUTHORIZED response code.

3. Services

The following are the services available for the Content Manager OnDemand REST API for V10.5.0.0. The examples all use /cmod-rest as the context-root. This was configured during deployment of the REST services.

3.1. Ping

Provides system information for the deployed REST services.

sample request
GET /cmod-rest/v1/ping HTTP/1.1
usi-date: 2020-02-25T00:31:28Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:rGXIwlRAd7WAAH+zsKTRujB0mpCessKIJ3p4XsIF1G0=
Host: localhost
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
X-Content-Type-Options: nosniff
Content-Security-Policy: default-src 'self'
Content-Type: application/json
Date: Tue, 25 Feb 2020 00:31:28 GMT
Correlation-Id: b824e4c5-8013-4df5-8b48-2d917c969400
Content-Language: en-US
Content-Length: 671

{
  "Java Vendor" : "Oracle Corporation",
  "Java Version" : "1.8.0_231",
  "Java VM Specifcication Vendor" : "Oracle Corporation",
  "Java Runtime Version" : "1.8.0_231-b11",
  "Java home" : "C:\\Program Files\\Java\\jdk1.8.0_231\\jre",
  "Java VM Vendor" : "Oracle Corporation",
  "Java Runtime Name" : "Java(TM) SE Runtime Environment",
  "OS Architecture" : "amd64",
  "OS Name" : "Windows 10",
  "OS Version" : "10.0",
  "Status" : "Content Manager OnDemand REST Services online",
  "Rest configuration directory (restcfgdir)" : "C:\\restcfg\\1050",
  "ODWEK Version" : "10.5.0.0",
  "OnDemand Server Version" : "10.5.0.0",
  "Max connections" : 10
}

3.2. Folder

Operations available for Content Manager OnDemand folders

3.2.1. Folder list

Retrieve the folder names and descriptions of all folders available to the requestor.

sample request
GET /cmod-rest/v1/folders HTTP/1.1
usi-date: 2020-02-25T00:31:27Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:1rpUZDKWulgpdDmoRtTpW+gApCHFAtnYzWRcY8TAuhc=
Host: localhost
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
X-Content-Type-Options: nosniff
Content-Type: application/json
Date: Tue, 25 Feb 2020 00:31:27 GMT
Correlation-Id: e95768aa-9ef0-421d-9328-8b5493c51521
Content-Language: en-US
Content-Length: 263

{
  "folders" : [ {
    "description" : "Baxter Bay Bank",
    "name" : "Baxter Bay CC Statements"
  }, {
    "description" : "",
    "name" : "Ledger Reports"
  }, {
    "description" : "OnDemand System Log Facility",
    "name" : "System Log"
  } ]
}

3.2.2. Folder details

Retrieve the details for a given Content Manager OnDemand folder. This information is used when building the payload used for the Search API.

sample request
GET /cmod-rest/v1/folders/Baxter%20Bay%20CC%20Statements HTTP/1.1
usi-date: 2020-02-25T00:31:24Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:yfJ6r+TUQsuBQj+LuHxQTTF9wUScZxC9ARZJZ59uh90=
Host: localhost
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
X-Content-Type-Options: nosniff
Content-Type: application/json
Date: Tue, 25 Feb 2020 00:31:27 GMT
Correlation-Id: c24826ba-9cec-4157-9c86-712a060d42a3
Content-Language: en-US
Content-Length: 1776

{
  "criteria" : [ {
    "defaultOperator" : "Like",
    "defaultValues" : [ "%", "" ],
    "fieldName" : "Account",
    "fieldSubType" : "String",
    "fieldType" : "Normal",
    "required" : false,
    "validOperators" : [ "Equals", "Not Equal", "In", "Not In", "Like", "Between", "Not Between" ]
  }, {
    "defaultOperator" : "Like",
    "defaultValues" : [ "", "" ],
    "fieldName" : "Account Name",
    "fieldSubType" : "String",
    "fieldType" : "Normal",
    "required" : false,
    "validOperators" : [ "Equals", "Like" ]
  }, {
    "defaultOperator" : "Equals",
    "defaultValues" : [ "", "" ],
    "fieldName" : "Account Balance",
    "fieldSubType" : "Decimal",
    "fieldType" : "Normal",
    "required" : false,
    "validOperators" : [ "Equals", "Not Equal", "Less Than", "Less Than or Equal", "Greater Than", "Greater Than or Equal", "In", "Not In", "Between", "Not Between" ]
  }, {
    "defaultFormat" : "%m/%d/%y",
    "defaultOperator" : "Between",
    "defaultValues" : [ "01/01/94", "06/01/96" ],
    "fieldName" : "Date",
    "fieldSubType" : "Small Int",
    "fieldType" : "Normal",
    "required" : false,
    "validOperators" : [ "Equals", "Between" ]
  }, {
    "defaultOperator" : "Equals",
    "defaultValues" : [ "", "" ],
    "fieldName" : "Search String",
    "fieldSubType" : "Text Search",
    "fieldType" : "TextSearch",
    "required" : false,
    "validOperators" : [ "Equals" ]
  }, {
    "defaultOperator" : "Equals",
    "defaultValues" : [ "", "" ],
    "fieldName" : "Annotation Search",
    "fieldType" : "NoteTextSearch",
    "required" : false,
    "validOperators" : [ "Equals" ]
  } ],
  "folderDescription" : "Baxter Bay Bank",
  "folderName" : "Baxter Bay CC Statements"
}

3.3. Application Group

Operations available for Content Manager OnDemand Application Groups

3.3.1. Application Group list

Retrieve the application group names and descriptions of all application groups available to the requestor.

sample request
GET /cmod-rest/v1/appgroup HTTP/1.1
usi-date: 2020-02-25T00:31:27Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:qbF+0DLiFuH2+jb0039GUPFANXOzR2ASsCaaOEgjffI=
Host: localhost
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
X-Content-Type-Options: nosniff
Content-Type: application/json
Date: Tue, 25 Feb 2020 00:31:27 GMT
Correlation-Id: 090c4b97-95cb-4b92-9d47-9a2e302ae9a8
Content-Language: en-US
Content-Length: 327

{
  "appGroups" : [ {
    "appGroupDescription" : "Baxter Bay Credit",
    "appGroupName" : "Baxter Bay Credit"
  }, {
    "appGroupDescription" : "Ledger Report AG",
    "appGroupName" : "LedgerTextReports"
  }, {
    "appGroupDescription" : "OnDemand System Log Facility",
    "appGroupName" : "System Log"
  } ]
}

3.3.2. Application Group details

Retrieve the definition for a single Application Group. This information is useful when building the payload for the Store API as well as the Search with SQL API.

sample request
GET /cmod-rest/v1/appgroup/Baxter%20Bay%20Credit HTTP/1.1
usi-date: 2020-02-25T00:31:27Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:BI7RK0pyeoqRuHvcIz6GEWVvYe592crVg5J3L+yJmjY=
Host: localhost
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
X-Content-Type-Options: nosniff
Content-Type: application/json
Date: Tue, 25 Feb 2020 00:31:27 GMT
Correlation-Id: fe0b25a7-1c4a-4829-bfd9-f30fa9557259
Content-Language: en-US
Content-Length: 452

{
  "AGDescription": "Ledger Report AG",
  "AGName": "LedgerTextReports",
  "appList": [
    {
      "appDataType": "User Defined",
      "appDescription": "",
      "appName": "LedgerTextReports"
    }
  ],
  "fieldList": [
    {
      "fieldName": "accountNum",
      "fieldType": "String",
      "updateable": "true"
    },
    {
      "fieldName": "accountName",
      "fieldType": "String",
      "updateable": "true"
    },
    {
      "fieldName": "rptDate",
      "fieldType": "Date",
      "updateable": "true"
    },
    {
      "fieldName": "fileName",
      "fieldType": "String",
      "updateable": "true"
    }
  ],
  "pages": false
}

3.4. Transforms

The transorm API lists transforms defined for a given document type. The following table shows the currently supported document types along with their native MIME type. Unless a transform is specified, the MIME type defined here will be set as the content-type for returned data.

Table 2. Data Types
Data Type ODFileType Character MIME type

AFP

A

application/afp

BMP

B

image/bmp

SCS Extended

C

application/afp

Global DJDE

D

application/line

JFIF (JPEG)

F

image/jpeg

GIF

G

image/gif

LINE

L

application/line

METACODE

M

application/unkown

PDF

P

application/pdf

PNG

Q

image/png

SCS

S

application/line

TIFF

T

image/tiff

User Defined

U

application/unkown

PCX

X

image/pcx

XML

Z

application/xml

3.4.1. Transform list

Retrieve the transforms defined for a given file type

sample request
GET /cmod-rest/v1/transform?docType=L HTTP/1.1
usi-date: 2020-02-25T00:31:27Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:18M0s+FJSEAoH+yaXYH/RXCA+RcO/CwjBz/jk0Mkegw=
Host: localhost
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
X-Content-Type-Options: nosniff
Content-Type: application/json
Date: Tue, 25 Feb 2020 00:31:27 GMT
Correlation-Id: 28bb5f56-c979-478c-b449-1c0ad48c9992
Content-Language: en-US
Content-Length: 358

{
  "transforms" : [ {
    "transformDescr" : "ARSXLINE Line Data Transform for OnDemand",
    "transformName" : "OD_LINE2PDF"
  }, {
    "transformDescr" : "ARSXLINE Line Data Transform for OnDemand",
    "transformName" : "OD_LINE2UTF8"
  }, {
    "transformDescr" : "Default Line2PDF transform",
    "transformName" : "line2pdf-default"
  } ]
}

3.5. Search

Use the information obtained from the Folder details API to build the search criteria for a given folder.

3.5.1. Search

INPUT PARAMETERS
{
  "criteria": [
    {
      "fieldName": "string",
      "operator": "string",
      "values": [
        "string"
      ]
    }
  ]
}

criteria List (min_length=1,max_length=# of folder fields) List of Criteria to search.
fieldName OnDemand folder field name.
operator One of the valid folder search operators
values List of (String(min_length=1,max_length=2)) List of values to support search operator.

sample request
POST /cmod-rest/v1/hits/Ledger%20Reports HTTP/1.1
usi-date: 2020-02-25T00:31:30Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:5au9U9epefygVH22mKfR8yGkS+XiA0D8CDmcOvZrt58=
Content-Type: application/json; charset=UTF-8
Host: localhost
Content-Length: 231

{
  "criteria" : [ {
    "fieldName" : "Account Number",
    "operator" : "Like",
    "values" : [ "123456789" ]
  }, {
    "fieldName" : "Account Name",
    "operator" : "Equals",
    "values" : [ "Endo Biking" ]
  } ]
}
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
X-Content-Type-Options: nosniff
Content-Type: application/json
Date: Tue, 25 Feb 2020 00:31:29 GMT
Correlation-Id: 4e2c40bc-cd31-4cbf-83c4-1f269865f87f
Content-Language: en-US
Content-Length: 795

{
  "folderName" : "Ledger Reports",
  "hitList" : [ {
    "docID" : "Y2JKhFE0ChJjHb/dWRe9j3Mk5+cLryWFUOIqmNsQKGCnDOspAPYswMjcigoAt8nWa8fLI04yd83IdZ61VANHa/tq1EetSYOVWc+oU+lFIVTN4RE5ZvR5szeLmhzok0joRnX9F+jtWjzhoEHHq/MyVJLvaUaJILflirb/4Qen6Y/1w=",
    "docType" : "U",
    "folderFields" : {
      "Account Name" : "ENDO BIKING",
      "File Name" : "MONTHEND.TXT",
      "Account Number" : "123456789",
      "Report Date" : "2020-02-03"
    },
    "link" : "http://localhost:9080/cmod-rest/v1/hits/Ledger%20Reports/Y2JKhFE0ChJjHb%2FdWRe9j3Mk5%2BcLryWFUOIqmNsQKGCnDOspAPYswMjcigoAt8nWa8fLI04yd83IdZ61VANHa%2Ftq1EetSYOVWc%2BoU%2BlFIVTN4RE5ZvR5szeLmhzok0joRnX9F%2BjtWjzhoEHHq%2FMyVJLvaUaJILflirb%2F4Qen6Y%2F1w%3D",
    "mimeType" : "application/unknown"
  } ],
  "totalHits" : "1"
}

3.5.2. Search with SQL

When using search with SQL, it is imperative you include a segment start and stop date when available. The format of the start/stop dates is %Y-%m-%d. Failure to include a segment feild will result in a search across all application group data tables severly impacting system performance.

Optionally, you can include a single Content Manager OnDemand application group to search. If no applicatio group field is provided all application groups associated with the OnDemand folder will be searched.

INPUT PARAMETERS
{
  "query": "string",
  "startdate": "string",
  "stopdate": "string",
  "folder": "string",
  "applicationgroup": "string"
}

query SQL query used to search the folder. OnDemand does not validate the sql string.
startdate (format="%Y-%m-%d") Use to specify the segment start date. This field is optional.
stopdate (format="%Y-%m-%d") Use to specify the segment stop date. This field is optional.
folder The OnDemand folder name.
applicationgroup Name of an application group to be used during a search with SQL. This field is optional.

sample request
POST /cmod-rest/v1/hits/ HTTP/1.1
usi-date: 2020-02-25T00:31:30Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:5au9U9epefygVH22mKfR8yGkS+XiA0D8CDmcOvZrt58=
Content-Type: application/json; charset=UTF-8
Host: localhost
Content-Length: 191

{
  "startdate" : "1993-01-01",
  "stopdate" : "2020-02-11",
  "query" : "where name like 'VILL%'",
  "folder" : "Baxter Bay CC Statements",
  "applicationgroup" : "Baxter Bay Credit"
}
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
X-Content-Type-Options: nosniff
Content-Type: application/json
Date: Tue, 25 Feb 2020 00:31:30 GMT
Correlation-Id: dfffb545-77e0-47e3-aed2-0a124335c46f
Content-Language: en-US
Transfer-Encoding: chunked
Content-Length: 49308

{
  "folderName" : "Baxter Bay CC Statements",
  "hitList" : [ {
    "docID" : "Y2cltoWcelWX8OrRF/4bQfbudj878DPW/CDF5qcZZ0HuDEqZb0SHZ24yx47Q7so4hCOLzOLfaFQkK2wwbbGb7IPNn1GfF7ac33lXEpgNBsBVYXLlwUGoGfrNj+ximpr3xI6FtSKYMi/E+sicE3qcocw+a2gBKP6Njj1SPG9YQtdUw=",
    "docType" : "A",
    "folderFields" : {
      "Search String" : "",
      "Date" : "03/03/95",
      "Account Name" : "VILLAGE CYCLE SHOP  ",
      "Annotation Search" : "",
      "Account Balance" : "680.01",
      "Account" : "000-000-032"
    },
    "link" : "http://localhost:9080/cmod-rest/v1/hits//Y2cltoWcelWX8OrRF%2F4bQfbudj878DPW%2FCDF5qcZZ0HuDEqZb0SHZ24yx47Q7so4hCOLzOLfaFQkK2wwbbGb7IPNn1GfF7ac33lXEpgNBsBVYXLlwUGoGfrNj%2Bximpr3xI6FtSKYMi%2FE%2BsicE3qcocw%2Ba2gBKP6Njj1SPG9YQtdUw%3D",
    "mimeType" : "application/afp"
  }, {
    "docID" : "Y2VH93jWYzq/aDyxeULkv/m3Uq9J5+53czNcdUtmdU/96z9tOSQHcNw3rOOWUnvq1568zHB98cA6S/OpmdelZQFX7ckCr3br2K1pDDTb/gFvQCWw0rY00EpaI08GBnNYqa+Hp5BmaMKFVbM6fzvyQtPvGoAsS7/WfU+uB5Wfn5+TI=",
    "docType" : "A",
    "folderFields" : {
      "Search String" : "",
      "Date" : "03/03/95",
      "Account Name" : "VILLAGE BIKE SHOPS  ",
      "Annotation Search" : "",
      "Account Balance" : "1064.48",
      "Account" : "000-000-075"
    },
    "link" : "http://localhost:9080/cmod-rest/v1/hits//Y2VH93jWYzq%2FaDyxeULkv%2Fm3Uq9J5%2B53czNcdUtmdU%2F96z9tOSQHcNw3rOOWUnvq1568zHB98cA6S%2FOpmdelZQFX7ckCr3br2K1pDDTb%2FgFvQCWw0rY00EpaI08GBnNYqa%2BHp5BmaMKFVbM6fzvyQtPvGoAsS7%2FWfU%2BuB5Wfn5%2BTI%3D",
    "mimeType" : "application/afp"
  }],
  "totalHits" : "2"
}

3.6. Retrieve

Retrieve data by using an ODWEK docID returned by a previously performed search and its corresponding Content Manager OnDemand folder name.

Example 6. Retrieve format (native)

cmod-rest/v1/hits/<folder name>/docid

Example 7. Retrieve format (transform)

cmod-rest/v1/hits/<folder name>/docid?viewerName=<transform>

By default, the Retrieve API will return data in its natively stored format. Refer to the Data Types table for details on native formats.

The input to retrieve content is a folder name and an ODWEK document ID (docID). When passing special characters with HTTP/HTTPS, you must ensure they are URL-encoded. Be sure the framework you are using doesn’t do this automatically or you could end up double encoding which will cause the retrieve call to fail.

3.6.1. Retrieve - Native

sample request
GET /cmod-rest/v1/hits/Ledger%20Reports/Y26Puw1GjYQa8ZrHbzkJNNxbxIjTxDxU1eFf0UatoCXsBtjFPkUryVUQ8ue8zSRwUYhEcVuza8zBVV7R9Q4nr0QiWwy9hhFhMRDi9W0uXwrBgNkODQzFjAXQuI7%2FVgtrCvaEDUaaJ%2BJ%2F4%2FxAJWFLD%2BKK9E%2Fe4EDwmXO5wHWycpFD4%3D HTTP/1.1
usi-date: 2020-02-25T00:31:30Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:egTpof3v1oePcd9YwAqozuZ1qSI1R8vAWkZXgGor8Lw=
Host: localhost
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
Content-Type: application/unknown
Content-Disposition: attachment;filename=ousUSZKHlck2JU.TXT
Date: Tue, 25 Feb 2020 00:31:29 GMT
Correlation-Id: 15dbb3c6-f5c7-48f2-a4bb-fabf0381e98c
Content-Language: en-US
Content-Length: 1417

BAXTER BAY INFORMATION SYSTEM             TRANSACTION DATE :15/07/2020                   			  PROCESSING DATE 01/08/2020
 MZSB32/3    LISTING OF CIS ENQUIRY TRANSACTIONS                                                                 PAGE          1

 BANK              : BAXTER BAY CREDIT

 DEPARTMENT/BRANCH : 1234 TEST CO ACCOUNT SERVICES

 PRODUCT TYPE     PRODUCT REFERENCE               BOT    TIME     USER ID  OPER TYPE  USER  SYS   DATA TYPE
                                                                                      ORG   ID
    0010          07027403793                     1006  12:23:37  test-id   CLERK     2003  S1    PRODUCT INFORMATION
    0020          40200200097                     1006  09:01:30  test-id   CLERK     2003  S1    PRODUCT INFORMATION
    0020          40200200097                     1006  09:14:41  test-id   CLERK     2003  S1    PRODUCT INFORMATION
    0020          40200200097                     1006  09:30:48  test-id   CLERK     2003  S1    PRODUCT INFORMATION
    0020          40200200097                     1006  09:44:44  test-id   CLERK     2003  S1    PRODUCT INFORMATION

3.6.2. Retrieve - Using transform

Parameter Description

viewerName

The transform to use

sample request
GET /cmod-rest/v1/hits/Ledger%20Reports/Y26Puw1GjYQa8ZrHbzkJNNxbxIjTxDxU1eFf0UatoCXsBtjFPkUryVUQ8ue8zSRwUYhEcVuza8zBVV7R9Q4nr0QiWwy9hhFhMRDi9W0uXwrBgNkODQzFjAXQuI7%2FVgtrCvaEDUaaJ%2BJ%2F4%2FxAJWFLD%2BKK9E%2Fe4EDwmXO5wHWycpFD4%3D?viewerName=OD_LINE2PDF HTTP/1.1
usi-date: 2020-02-25T00:31:30Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:egTpof3v1oePcd9YwAqozuZ1qSI1R8vAWkZXgGor8Lw=
Host: localhost
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
Content-Type: application/pdf
Content-Disposition: attachment;filename=ery2YQaN3aEmCv.pdf
Date: Tue, 25 Feb 2020 00:31:29 GMT
Correlation-Id: 5cb9e01f-1182-499f-85d6-ade213aae112
Content-Language: en-US
Content-Length: 1094

%PDF-1.3
%·¾­ª
1 0 obj
<<
/Type /Catalog
/Pages 2 0 R

3.7. Store

Stores one or more documents to a Content Manager OnDemand server. While a request can contain more than one document, you can only store to a single application/application group combination at a time.

3.7.1. Store documents

INPUT PARAMETERS
{
  "applicationGroupName": "string",
  "applicationName": "string",
  "documents": [
    {
      "fileName": "string",
      "pages": 0,
      "fieldList": [
        {
          "fieldName": "string",
          "fieldValue": "string"
        }
      ],
      "base64bytes": "string"
    }
  ]
}

applicationGroupName OnDemand application group name.
applicationName OnDemand application name.
documents List of documents to store.
fileName A name associated with the doucment to be loaded. This field is optional.
pages The number of pages in the document. This field is optional.
fieldList List (min_length=1,max_length=# of application group fields) of applicaiton group fields.
fieldName Application group field name.
fieldValue Application group Value to store.
base64bytes Bytes encoded into a base64 string.

sample request
POST /cmod-rest/v1/document HTTP/1.1
usi-date: 2020-02-25T00:31:28Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:z3f/9nTi+mKrHGn9JXD3prgcd+FkfsOeej/x6wXMmhk=
Content-Type: application/json; charset=UTF-8
Host: localhost
Content-Length: 2433

{
  "applicationGroupName" : "LedgerTextReports",
  "applicationName" : "LedgerTextReports",
  "documents" : [ {
    "fileName" : "MonthEnd.txt",
    "pages" : 0,
    "fieldList" : [ {
      "fieldName" : "accountName",
      "fieldValue" : "Baxter Bay"
    }, {
      "fieldName" : "accountNum",
      "fieldValue" : "123456789"
    }, {
      "fieldName" : "rptDate",
      "fieldValue" : "2020-02-03"
    }, {
      "fieldName" : "fileName",
      "fieldValue" : "MonthEnd.txt"
    } ],
    "base64bytes" : "QkFYVEVSIEJBWSBJTkZPUk1BVElPTiBTWVNURU0gICAgICAgICAgICAgVFJBTlNBQ1RJT04gREFURSA6MTUvMDcvMjAyMCAgICAgICAgICAgICAgICAgICAJCQkgIFBST0NFU1NJTkcgREFURSAwMS8wOC8yMDIwDQogTVpTQjMyLzMgICAgTElTVElORyBPRiBDSVMgRU5RVUlSWSBUUkFOU0FDVElPTlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBBR0UgICAgICAgICAgMQ0KDQogQkFOSyAgICAgICAgICAgICAgOiBCQVhURVIgQkFZIENSRURJVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KDQogREVQQVJUTUVOVC9CUkFOQ0ggOiAxMjM0IFRFU1QgQ08gQUNDT1VOVCBTRVJWSUNFUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICANCg0KIFBST0RVQ1QgVFlQRSAgICAgUFJPRFVDVCBSRUZFUkVOQ0UgICAgICAgICAgICAgICBCT1QgICAgVElNRSAgICAgVVNFUiBJRCAgT1BFUiBUWVBFICBVU0VSICBTWVMgICBEQVRBIFRZUEUgICAgICAgICAgICAgICAgICAgICAgICAgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9SRyAgIElEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICANCiAgICAwMDEwICAgICAgICAgIDA3MDI3NDAzNzkzICAgICAgICAgICAgICAgICAgICAgMTAwNiAgMTI6MjM6MzcgIHRlc3QtaWQgICBDTEVSSyAgICAgMjAwMyAgUzEgICAgUFJPRFVDVCBJTkZPUk1BVElPTiAgICAgDQogICAgMDAyMCAgICAgICAgICA0MDIwMDIwMDA5NyAgICAgICAgICAgICAgICAgICAgIDEwMDYgIDA5OjAxOjMwICB0ZXN0LWlkICAgQ0xFUksgICAgIDIwMDMgIFMxICAgIFBST0RVQ1QgSU5GT1JNQVRJT04gICAgIA0KICAgIDAwMjAgICAgICAgICAgNDAyMDAyMDAwOTcgICAgICAgICAgICAgICAgICAgICAxMDA2ICAwOToxNDo0MSAgdGVzdC1pZCAgIENMRVJLICAgICAyMDAzICBTMSAgICBQUk9EVUNUIElORk9STUFUSU9OICAgICANCiAgICAwMDIwICAgICAgICAgIDQwMjAwMjAwMDk3ICAgICAgICAgICAgICAgICAgICAgMTAwNiAgMDk6MzA6NDggIHRlc3QtaWQgICBDTEVSSyAgICAgMjAwMyAgUzEgICAgUFJPRFVDVCBJTkZPUk1BVElPTiAgICAgDQogICAgMDAyMCAgICAgICAgICA0MDIwMDIwMDA5NyAgICAgICAgICAgICAgICAgICAgIDEwMDYgIDA5OjQ0OjQ0ICB0ZXN0LWlkICAgQ0xFUksgICAgIDIwMDMgIFMxICAgIFBST0RVQ1QgSU5GT1JNQVRJT04gICAgIA=="
  } ]
}
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
Content-Type: application/json
Date: Tue, 25 Feb 2020 00:31:29 GMT
Correlation-Id: e6b08e53-9a15-4583-9d10-5b22504ba52d
Content-Language: en-US
Content-Length: 567

{
  "applicationGroupName" : "LedgerTextReports",
  "applicationName" : "LedgerTextReports",
  "documents" : [ {
    "fieldList" : [ {
      "fieldName" : "accountName",
      "fieldValue" : "Baxter Bay"
    }, {
      "fieldName" : "accountNum",
      "fieldValue" : "123456789"
    }, {
      "fieldName" : "rptDate",
      "fieldValue" : "2020-02-03"
    }, {
      "fieldName" : "fileName",
      "fieldValue" : "MonthEnd.txt"
    } ],
    "fileName" : "MonthEnd.txt",
    "pages" : 0,
    "status" : "Loaded"
  } ],
  "status" : "Success"
}

3.8. Update

Operation related to updating hits

3.8.1. Update hits

Update one or more hits from a single Content Manager OnDemand folder with each call.

INPUT PARAMETERS
{
  "documents": [
    {
      "docID": "string",
      "fields": [
        {
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ]
}

documents List of documents to update.
docID ODWEK docID of document to updated.
fields List (min_length=1,max_length=# of folder fields) of folder fields.
fieldName Folder field name.
fieldValue Folder field value.

OUTPUT
{
  "failed": "string",
  "succeeded": "string",
  "folderName": "string",
  "hitList": [
    {
      "docID": "string",
      "docType": "U",
      "folderFields": {
        "field name": "field value"
      },
      "link": "string",
      "status": "string"
    }
  ]
}

failed Total number of successful updates.
succeeded Total number of failed updates.
folderName OnDemand folder updated.
hitList List (min_length=0,max_length=# of attempted updates) of attempted updates.
docID ODWEK docID. If success, returns the new docID otherwise retuns docID submitted.
docType Character indicating OnDemand document type.
folderFields Map (min_length=0, max_length=# of folder fields) of folder fields.
link If success, link to new document.
status Status of individual update.

sample request
PUT /cmod-rest/v1/hits/Ledger%20Reports HTTP/1.1
usi-date: 2020-02-25T00:31:30Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:tQopwVf0Ou/Kqizu0EW8STBAmT/0xR2fTiQiDAuX3CQ=
Content-Type: application/json; charset=UTF-8
Host: localhost
Content-Length: 327

{
  "documents" : [ {
    "docID" : "Y26Puw1GjYQa8ZrHbzkJNNxbxIjTxDxU1eFf0UatoCXsBtjFPkUryVUQ8ue8zSRwUYhEcVuza8zBVV7R9Q4nr0QiWwy9hhFhMRDi9W0uXwrBgNkODQzFjAXQuI7/VgtrCvaEDUaaJ+J/4/xAJWFLD+KK9E/e4EDwmXO5wHWycpFD4=",
    "fields" : [ {
      "fieldName" : "Account Name",
      "fieldValue" : "Endo Biking"
    } ]
  } ]
}
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
X-Content-Type-Options: nosniff
Content-Type: application/json
Date: Tue, 25 Feb 2020 00:31:29 GMT
Correlation-Id: f938b9ff-f5e3-4a4a-8a73-d031761fc0fb
Content-Language: en-US
Content-Length: 800

{
  "failed" : "0",
  "folderName" : "Ledger Reports",
  "hitList" : [ {
    "docID" : "Y2JKhFE0ChJjHb/dWRe9j3Mk5+cLryWFUOIqmNsQKGCnDOspAPYswMjcigoAt8nWa8fLI04yd83IdZ61VANHa/tq1EetSYOVWc+oU+lFIVTN4RE5ZvR5szeLmhzok0joRnX9F+jtWjzhoEHHq/MyVJLvaUaJILflirb/4Qen6Y/1w=",
    "docType" : "U",
    "folderFields" : {
      "Account Name" : "Endo Biking",
      "File Name" : "MONTHEND.TXT",
      "Account Number" : "123456789",
      "Report Date" : "2020-02-03"
    },
    "link" : "http://localhost:9080/cmod-rest/v1/hits/Ledger%20Reports/Y2JKhFE0ChJjHb%2FdWRe9j3Mk5%2BcLryWFUOIqmNsQKGCnDOspAPYswMjcigoAt8nWa8fLI04yd83IdZ61VANHa%2Ftq1EetSYOVWc%2BoU%2BlFIVTN4RE5ZvR5szeLmhzok0joRnX9F%2BjtWjzhoEHHq%2FMyVJLvaUaJILflirb%2F4Qen6Y%2F1w%3D",
    "status" : "Success"
  } ],
  "succeeded" : "1"
}

3.9. Delete

Operation related to deleting hits

3.9.1. Delete hits

Delete one or more hits from a single Content Manager OnDemand folder with each call.

INPUT PARAMETERS
{
  "docIDs": [
    {
      "docID": "string"
    }
  ]
}

docIDs List of ODWEK docIDs to delete.
docID ODWEK docID of document to delete.

sample request
DELETE /cmod-rest/v1/hits/Ledger%20Reports HTTP/1.1
usi-date: 2020-02-25T00:31:30Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:TeU4j6U0CZ+x6ogwWVPgnuLbxYbAQYO2XlqiEjdcBno=
Content-Type: application/json; charset=UTF-8
Host: localhost
Content-Length: 221

{
  "docIDs" : [ {
    "docID" : "Y2JKhFE0ChJjHb/dWRe9j3Mk5+cLryWFUOIqmNsQKGCnDOspAPYswMjcigoAt8nWa8fLI04yd83IdZ61VANHa/tq1EetSYOVWc+oU+lFIVTN4RE5ZvR5szeLmhzok0joRnX9F+jtWjzhoEHHq/MyVJLvaUaJILflirb/4Qen6Y/1w="
  } ]
}
sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
X-Content-Type-Options: nosniff
Content-Type: application/json
Date: Tue, 25 Feb 2020 00:31:30 GMT
Correlation-Id: 5482da77-dbc8-4972-934b-390a1b81b2dc
Content-Language: en-US
Content-Length: 289

{
  "docIDs" : [ {
    "docID" : "Y2JKhFE0ChJjHb/dWRe9j3Mk5+cLryWFUOIqmNsQKGCnDOspAPYswMjcigoAt8nWa8fLI04yd83IdZ61VANHa/tq1EetSYOVWc+oU+lFIVTN4RE5ZvR5szeLmhzok0joRnX9F+jtWjzhoEHHq/MyVJLvaUaJILflirb/4Qen6Y/1w=",
    "status" : "Success"
  } ],
  "failed" : "0",
  "succeeded" : "1"
}

Appendix A: Search operators


The valid operators for the search API are:

"Equals"
"Not Equal"
"Less Than"
"Less Than or Equal"
"Greater Than"
"Greater Than or Equal"
"In"
"Not In"
"Like"
"Not Like"
"Between"
"Not Between"