Iron Mountain InSight Core Data Vault (CDV) APIs

Contents

Introduction

The Core Data Vault (CDV) APIs are used to define and query metadata fields as well as to upload, edit and export documents.   

The high level architecture diagram below shows the REST CDV APIs.  This API documentation provides instructions for an IRM partner or customer to access these APIs.

Access to an environment for testing the APIs requires approval to get the necessary security tokens.   Access by partners is only given to specific data when requested and agreed upon by an InSight customer.



The services below marked with * are  for Q1 2020 (not yet released).

Document & Attribute Values APIs

Service Name

API Contracts

Note

Permissions Required

Service Name

API Contracts

Note

Permissions Required

Create Asset Document & Attribute Values

POST /companies/{companyId}/documents

Request Body: AssetDocument

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 { "documentTypeId":"00000000-0000-0000-0000-000000000001", "fileName":"test.pdf", "mlPipeline": "ml1", "barcode": "20011234567890", "attributeValues":[ { "name": "departmentId", "value": "2222" }, { "name": "divisionId", "value": "1111" }, { "name": "majorDescription", "value": "test 3" }, { "name": "count", "value": "20" } ] } Or remote storage for the document: { "documentTypeId":"00000000-0000-0000-0000-000000000001", "fileName":"test.pdf", "mlPipeline": "ml1", "barcode": "20011234567890", "remoteStorage":true, "connectorConfigId":"ca1885e4-4207-474e-8cdf-3eabd70cafe2", "externalDocumentId":"https://s3.amazonaws.com/bill-test-dit2/Insight/600163.pdf", "attributeValues":[ { "name": "departmentId", "value": "2222" }, { "name": "divisionId", "value": "1111" }, { "name": "majorDescription", "value": "test 3" }, { "name": "count", "value": "20" } ] }

Response: AssetDocument

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 { "createdDate": "2018-07-30T17:49:10.042+00:00", "createdUserId": "gateway", "companyId": 2001, "documentGUID": "c29d43fe-06a4-400e-9166-eb15f865d3b5", "documentTypeId": "00000000-0000-0000-0000-000000000001", "size": 0, "state": "METADATA_UPLOADED", "fileName": "test.pdf", "fileStorageId": "00000000-0000-0000-0000-000000000001", "deleted": false, "lastAccessDate": "2018-07-30T17:49:10.042+00:00", "lastAccessUserId": "gateway", "mlPipeline": "ml1", "pageCount": 0, "barcode": "20011122334455", "attributeValues": [ { "attributeValueId": "39056acf-0810-4b7a-bb29-039aee57efbd", "type": "long", "value": "1111", "name": "departmentId" }, { "attributeValueId": "83d0d652-670a-4d92-afcf-cdc3d098b57b", "type": "long", "value": "1111", "name": "divisionId" }, { "attributeValueId": "7c6b05de-2258-4ce9-84e1-bd8f89bccab7", "type": "String", "value": "test 6", "name": "majorDescription" }, { "attributeValueId": "aa95ca28-8a2f-4b99-bd6d-23d32fd4aefb", "type": "long", "value": "1", "name": "count" } ], "remoteStorage": false, "imageURL": "https://storage.cloud.google.com/rmaas-us-dit1/company/2001/...", "imageDownloadURL": "https://storage.googleapis.com/rmaas-us-dit1/company/2001/...", "imageUploadURL": "https://storage.googleapis.com/rmaas-us-dit1/company/2001/...", "imageContentType": "application/pdf" }





  • Basic data fields documentTypeId and fileName are required. See below for the requirement of fileName.

  • Basic data fields mlPipeline, barcode, facility are optional.

  • name and value are required for each attributeValue.

  • Available documentTypeId is defined in rmaas_document_type table and attribute names are defined in rmaas_attribute table.

  • If the value is invalid for the attribute type defined for the attribute name, the API returns an exception. For a Date type, the value must be in the format of defined patterns.

  • fileName and size will be updated once the image file is uploaded via the Upload/Update an Image API.

  • The server can accept a documentGUID generated by the client

  • To enable the remote storage, please specify remoteStorage, connectorConfigId and externalDocumentId (as Global URL)

  • retentionCalculationStatus=null







  • An authenticated user with the following permissions:

    • assets.use

Update Asset Document & Attribute Values *

PUT /companies/{companyId}/documents/{documentGUID}

Request Body: AssetDocument

  1. Update basic data fields and attribute values in a Document

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 { "state": "METADATA_UPLOADED", "fileName": "test.pdf", "mlPipeline": "ml1", "facility": "test", "barcode": "20011122334455", "attributeValues":[ { "name": "departmentId", "value": "2222" }, { "name": "divisionId", "value": "1111" }, { "name": "majorDescription", "value": "updated description" }, { "name": "count", "value": "1" } ] }
  1. Update basic fields only

1 2 3 4 5 6 7 { "state": "METADATA_UPLOADED", "fileName": "test.pdf", "mlPipeline": "ml1", "facility": "test", "barcode": "20011122334455" }



Response: AssetDocument

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 { "createdDate": "2018-07-30T17:49:10.042+00:00", "createdUserId": "gateway", "companyId": 2001, "documentGUID": "c29d43fe-06a4-400e-9166-eb15f865d3b5", "documentTypeId": "00000000-0000-0000-0000-000000000001", "size": 400, "state": "METADATA_UPLOADED", "facility": "test", "fileName": "test.pdf", "filePath": "/", "fileStorageId": "00000000-0000-0000-0000-000000000001", "deleted": false, "lastAccessDate": "2018-07-30T18:19:22.219+00:00", "lastAccessUserId": "gateway", "mlPipeline": "ml1", "pageCount": 1, "barcode": "20011122334455", "attributeValues": [ { "attributeValueId": "39056acf-0810-4b7a-bb29-039aee57efbd", "type": "long", "value": "2222", "name": "departmentId" }, { "attributeValueId": "83d0d652-670a-4d92-afcf-cdc3d098b57b", "type": "long", "value": "1111", "name": "divisionId" }, { "attributeValueId": "7c6b05de-2258-4ce9-84e1-bd8f89bccab7", "type": "String", "value": "updated description", "name": "majorDescription" }, { "attributeValueId": "aa95ca28-8a2f-4b99-bd6d-23d32fd4aefb", "type": "long", "value": "1", "name": "count" } ], "imageURL": "https://storage.cloud.google.com/rmaas-us-dit1/company/2001/...", "imageDownloadURL": "https://storage.googleapis.com/rmaas-us-dit1/company/2001/...", "imageUploadURL": "https://storage.googleapis.com/rmaas-us-dit1/company/2001/...", "imageContentType": "application/pdf" }



  • Basic data fields state, fileName are required. fileName can be either the old name or a new one, but it must be non-blank. See below for the requirement of fileName.

  • Basic data fields mlPipeline, barcode, facility are optional.

  • name and value are required for each attributeValue.

  • Available attribute names are defined in rmaas_attribute table.

  • If the value is invalid for the attribute type defined for the attribute name, the API returns an exception. For a Date type, the value must be in the format of defined patterns.

  • The image file will be moved to the new name fileName. If the file with fileName is present in GCS, it will be override.

  • The name of an attributeValue should be already defined in the document type linked to the document.

  • If the name of an attributeValue is the trigger attribute name of the document type's retention rule, the document's retentionCalculationStatus is reset to RECALCULATE so that the backend calculation task to start the calculation.



  • An authenticated user with the following permissions:

    • assets.use

Update a document Attribute Values Only *

PUT /companies/{companyId}/documents/{documentGUID}/attributes

Request Body: List<AssetAttributeValue>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 [ { "documentTypeId": "00000000-0000-0000-0000-000000000001", "name": "departmentId", "value": "3333" }, { "documentTypeId": "00000000-0000-0000-0000-000000000001", "name": "divisionId", "value": "1111" }, { "documentTypeId": "00000000-0000-0000-0000-000000000001", "name": "majorDescription", "value": "updated description 2" }, { "documentTypeId": "00000000-0000-0000-0000-000000000001", "name": "count", "value": "1" } ]

Response: List<AssetAttributeValue>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "data": [ { "attributeValueId": "39056acf-0810-4b7a-bb29-039aee57efbd", "documentTypeId": "00000000-0000-0000-0000-000000000001", "type": "long", "value": "3333", "name": "departmentId" }, { "attributeValueId": "83d0d652-670a-4d92-afcf-cdc3d098b57b", "documentTypeId": "00000000-0000-0000-0000-000000000001", "type": "long", "value": "1111", "name": "divisionId" }, { "attributeValueId": "7c6b05de-2258-4ce9-84e1-bd8f89bccab7", "documentTypeId": "00000000-0000-0000-0000-000000000001", "type": "String", "value": "updated description 2", "name": "majorDescription" }, { "attributeValueId": "aa95ca28-8a2f-4b99-bd6d-23d32fd4aefb", "documentTypeId": "00000000-0000-0000-0000-000000000001", "type": "long", "value": "1", "name": "count" } ], "count": 4 }



  • This API updates the values for the attributes already defined in the document type with the documentTypeId.

  • documentTypeId, name and value are required.

  • documentTypeId should be the same for all attribute values, and it must be the same one linked to the document.

  • Available documentTypeId is defined in rmaas_document_type table and attribute names are defined in rmaas_attribute table. For each company, a document type "DEFAULT" is pre-created.

  • If the value is invalid for the attribute type defined for the attribute name, the API returns an exception. For a Date type, the value must be in the format of defined patterns.

  • If the name of an attributeValue is the trigger attribute name of the document type's retention rule, the document's retentionCalculationStatus is reset to RECALCULATE so that the backend calculation task to start the calculation.





  • An authenticated user with the following permissions:

    • assets.use

Update Asset Document State Only

PUT /companies/{companyId}/documents/{documentGUID}/fields/state/{state}

Request Examples:

companies/2001/documents/c29d43fe-06a4-400e-9166-eb15f865d3b5/fields/state/DOCUMENT_UPLOADED

companies/2001/documents/c29d43fe-06a4-400e-9166-eb15f865d3b5/fields/state/METADATA_UPLOADED

Response: AssetDocument

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 { "createdDate": "2018-07-30T17:49:10.042+00:00", "createdUserId": "gateway", "companyId": 2001, "documentGUID": "c29d43fe-06a4-400e-9166-eb15f865d3b5", "documentTypeId": "00000000-0000-0000-0000-000000000001", "size": 400, "state": "METADATA_UPLOADED", "facility": "test", "fileName": "test.pdf", "filePath": "/", "fileStorageId": "00000000-0000-0000-0000-000000000001", "deleted": false, "lastAccessDate": "2018-07-30T18:19:22.219+00:00", "lastAccessUserId": "gateway", "mlPipeline": "ml1", "pageCount": 1, "barcode": "20011122334455", "attributeValues": [ { "attributeValueId": "39056acf-0810-4b7a-bb29-039aee57efbd", "type": "long", "value": "2222", "name": "departmentId" }, { "attributeValueId": "83d0d652-670a-4d92-afcf-cdc3d098b57b", "type": "long", "value": "1111", "name": "divisionId" }, { "attributeValueId": "7c6b05de-2258-4ce9-84e1-bd8f89bccab7", "type": "String", "value": "updated description", "name": "majorDescription" }, { "attributeValueId": "aa95ca28-8a2f-4b99-bd6d-23d32fd4aefb", "type": "long", "value": "1", "name": "count" } ], "imageURL": "https://storage.cloud.google.com/rmaas-us-dit1/company/2001/...", "imageDownloadURL": "https://storage.googleapis.com/rmaas-us-dit1/company/2001/...", "imageUploadURL": "https://storage.googleapis.com/rmaas-us-dit1/company/2001/...", "imageContentType": "application/pdf" }



This API updates the document state only. The new state is passed in the URL. Available states are

  • METADATA_UPLOADED

  • DOCUMENT_UPLOADED

  • PROCESSED

  • INDEXED

  • REPROCESS

  • An authenticated user with the following permissions:

    • assets.use

Get Asset Document *

GET /companies/{companyId}/documents/{documentGUID}

Response: AssetDocument

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 { "createdDate": "2018-07-30T17:49:10.042+00:00", "createdUserId": "gateway", "companyId": 2001, "documentGUID": "c29d43fe-06a4-400e-9166-eb15f865d3b5", "documentTypeId": "00000000-0000-0000-0000-000000000001", "size": 400, "state": "METADATA_UPLOADED", "facility": "test", "fileName": "test.pdf", "filePath": "/", "fileStorageId": "00000000-0000-0000-0000-000000000001", "deleted": false, "lastAccessDate": "2018-07-30T18:19:22.219+00:00", "lastAccessUserId": "gateway", "mlPipeline": "ml1", "pageCount": 1, "barcode": "20011122334455", "attributeValues": [ { "attributeValueId": "39056acf-0810-4b7a-bb29-039aee57efbd", "type": "long", "value": "3333", "name": "departmentId" }, { "attributeValueId": "7c6b05de-2258-4ce9-84e1-bd8f89bccab7", "type": "String", "value": "updated description 3", "name": "majorDescription" }, { "attributeValueId": "83d0d652-670a-4d92-afcf-cdc3d098b57b", "type": "long", "value": "2222", "name": "divisionId" }, { "attributeValueId": "aa95ca28-8a2f-4b99-bd6d-23d32fd4aefb", "type": "long", "value": "1", "name": "count" } ], "imageURL": "https://storage.cloud.google.com/rmaas-us-dit1/company/2001/...", "imageDownloadURL": "https://storage.googleapis.com/rmaas-us-dit1/company/2001/...", "imageUploadURL": "https://storage.googleapis.com/rmaas-us-dit1/company/2001/...", "imageContentType": "application/pdf" }



  • The following data fields are also returned as attribute values if retention destruction eilibility date is calculated.

    • DestructionEligibilityDate

    • RetentionTriggerDate

    • Jurisdiction

    • RetentionRecordClass

    • RetentionPeriod

    • RetentionPeriodUnits

    • RetentionTriggerField



  • An authenticated user with the following permissions:

    • assets.view

Delete Asset Document

DELETE /companies/{companyId}/documents/{documentGUID}?

Query Parameter: permanent is optional (true or false), requestId is optional (any string). if permanent=true, the document and its related data will be deleted permanently immediately.

Response: 1

document and attribute values are deleted

  • An authenticated user with the following permissions:

    • assets.manage

Restore/Undo-Delete Asset Document

PATCH /companies/{companyId}/documents/{documentGUID}

Response: AssetDocument



  • An authenticated user with the following permissions:

    • assets.manage

Query All documents *

GET /companies/{companyId}/documents

Query Parameter: deletedOnly is optional. Only soft-deleted documents returned if deletedOnly=true

Support Query Pagination, Sorting and Filtering

  • If companyId=0, then apply to all companies

  • The following data fields are also returned as attribute values if retention destruction eilibility date is calculated.

    • DestructionEligibilityDate

    • RetentionTriggerDate

    • Jurisdiction

    • RetentionRecordClass

    • RetentionPeriod

    • RetentionPeriodUnits

    • RetentionTriggerField

  • An authenticated user with the following permissions:

    • assets.view

Get attribute value histories for a Document

GET /companies/{companyId}/documents/{documentGUID}/histories

Response: List<AssetAttributeValueHist>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 { "count": 34, "data": [ { "createdDate": "2018-08-23T22:20:37.879+00:00", "createdUserId": "demoUploaderNew", "attributeValueHistId": "e88b2094-c630-4a07-8aa0-165db88060bb", "attributeValueId": "c7a89135-e207-4d59-a02a-7a94e0ffd74c", "attributeValue": "TT-N", "attributeValueBefore": "TT", "companyId": 100, "attributeName": "alphaTo", "documentGUID": "975970c7-e013-4b45-9da0-64f172458659" }, ....... { "createdDate": "2018-08-23T22:20:11.887+00:00", "createdUserId": "demoUploaderNew", "attributeValueHistId": "b9c70b88-6732-4c72-9d5d-a913cf87fb37", "attributeValue": "975970c7-e013-4b45-9da0-64f172458659", "companyId": 100, "attributeName": "documentGUID", "documentGUID": "975970c7-e013-4b45-9da0-64f172458659" } ] }







Get attribute value histories for a company

GET /companies/{companyId}/documents/histories

Response: List<AssetAttributeValueHist>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 { "count": 64, "data": [ { "createdDate": "2018-08-23T22:20:37.879+00:00", "createdUserId": "demoUploaderNew", "attributeValueHistId": "e88b2094-c630-4a07-8aa0-165db88060bb", "attributeValueId": "c7a89135-e207-4d59-a02a-7a94e0ffd74c", "attributeValue": "TT-N", "attributeValueBefore": "TT", "companyId": 100, "attributeName": "alphaTo", "documentGUID": "975970c7-e013-4b45-9da0-64f172458659" }, { "createdDate": "2018-08-23T21:51:19.725+00:00", "createdUserId": "gateway", "attributeValueHistId": "d50dc2b8-9c71-48db-926e-807f57e1d583", "attributeValueId": "b7961749-6f33-4dc7-9b4e-d0f72c606bbd", "attributeValue": "description 3", "companyId": 100, "attributeName": "description3", "documentGUID": "b6562d18-61a6-46eb-8c12-e8f698223e22" }, { "createdDate": "2018-08-23T21:51:19.626+00:00", "createdUserId": "gateway", "attributeValueHistId": "1852470c-1be7-4b9b-9277-dd64f105e478", "attributeValueId": "d2d0459e-75ec-452c-86ef-efd29ddb582d", "attributeValue": "description 2", "companyId": 100, "attributeName": "description2", "documentGUID": "b6562d18-61a6-46eb-8c12-e8f698223e22" }, ...... { "createdDate": "2018-08-23T21:50:43.090+00:00", "createdUserId": "gateway", "attributeValueHistId": "2aaafbaa-08ec-4a05-bf05-802dab99e5d3", "attributeValue": "b6562d18-61a6-46eb-8c12-e8f698223e22", "companyId": 100, "attributeName": "documentGUID", "documentGUID": "b6562d18-61a6-46eb-8c12-e8f698223e22" } ] }







Download the media File for a document

GET /companies/{companyId}/documents/{documentGUID}/media

Response: A file content



  • An authenticated user with the following permissions:

    • assets.view

Update document metadata in Batch mode

PUT companies/{companyId}/documents?state=<30 or 40>

Request: See document_batch_metadata_esMetaData.json

Response:



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "count": 3, "total": 3, "status": "PASSED", "data": { "companyId": 25274, "updatedDocumentIds": [ "0000c353-5340-4e85-ae28-529e5e5e28f9", "000119e8-9738-462d-9a87-c29c48565674", "003d5de4-892d-4f40-9d99-fe1ab7f6d3fe" ], "errorDocumentIds": [ ], "skipDocumentIds": [ ] } }



Internal Use only



Trigger A Destruction Process for Documents, their attribute values and image/support files

DELETE: /companies/{companyId}/documents?requestId=<request id>

Request Body: List<String> documentGUIDs, List<String> emailTos.

1 2 3 4 5 6 7 8 9 10 { "documentGUIDs": [ "0000c353-5340-4e85-ae28-529e5e5e28f9", "003d5de4-892d-4f40-9d99-fe1ab7f6d3fe" ], "emailTos": [ "huabei.yin@ironmountain.com" ] }



Response: 1, process is started successfully; 0 otherwise.

  • requestId can be any free text currently. The validation rule is TBD.

  • documentGUIDs is required and should at least include one documentGUID.

  • emailTos is optional. If it includes an email address, the destruction report will be sent to it as an attachment.

  • Documents, their attribute values and image/support files will be deleted immediately.

  • An authenticated user with the following permissions:

  • assets.manage

Download the Destruction Report for a request

GET: /companies/{companyId}/documents/destructionReport

Request Param: emailTos (optional), requestId (optional), fromDate (optional) - ISO date format, toDate (optional) - ISO date format

Response: a csv file

  • requestId can be any free text currently. The validation rule is TBD.

  • 0 or multiple emailTos can be sent in the request, for example:

    emailTos=email1,email2,email3



Calculate the Retention Destruction Eligibility Date for a Document *

Internal Use Only

PATCH: /companies/{companyId}/documents/{documentGUID}/retention/calculation

Response: AssetDocument with retention attribute values

  • Calculation is started for a document with retentionCalculationStatus=RECALCULATE or it is null (null pointer, not "NULL" status).

  • An authenticated user with the following permissions:

  • assets.manage

Trigger a Task to Calculate the Retention Destruction Eligibility Date for all Documents of a Company *

Internal Use Only

PATCH: /companies/{companyId}/documents/retention/calculation

Response: 1, the task is started successfully; 0 otherwise.



  • An authenticated user with the following permissions:

    • assets.manage

Trigger a Task to Calculate the Retention Destruction Eligibility Date for all Documents of a Document Type *

Internal Use Only

PATCH: /companies/{companyId}/documentTypes/{docTypeId}/documents/retention/calculation

Response: 1, the task is started successfully; 0 otherwise.

  • docTypeId is a valid document type id

  • An authenticated user with the following permissions:

    • assets.manage

Trigger a Task to Reset the Retention Calculation Status for all Documents of a Company *

PATCH: /companies/{companyId}/documents/retention/status

Response: 1, the task is started successfully; 0 otherwise.



  • An authenticated user with the following permissions:

  • assets.manage

Trigger a Task to Reset the Retention Calculation Status for all Documents of a Document Type *

PATCH: /companies/{companyId}/documentTypes/{docTypeId}/documents/retention/status

Response: 1, the task is started successfully; 0 otherwise.

  • docTypeId is a valid document type id

  • An authenticated user with the following permissions:

  • assets.manage



Example image URLs:

1 2 3 "imageURL": "https://storage.cloud.google.com/rmaas-us-dit1/company/2001/c29d43fe-06a4-400e-9166-eb15f865d3b5/image/test.pdf", "imageDownloadURL": "https://storage.googleapis.com/rmaas-us-dit1/company/2001/c29d43fe-06a4-400e-9166-eb15f865d3b5/image/test.pdf?GoogleAccessId=ramaas-sa-data-level-dit-1@rmaas-dit-1.iam.gserviceaccount.com&Expires=1533059353&Signature=ClBvtz2iCqOMYO%2BcO0%2BWNm18j69WWbEz%2BD7KxfeesU%2BGJca6OoFL1LlzcNGqltsqInrc7GFj%2FvYwl2JX0ZNkPhV3lZlVzX5WhK%2Bx%2BaAe%2BXPHRl8POZqxqVPntVpF4YkvBAvzO5pxfP5Sq2dJB%2BMQn1lojVN0K16TjthKWGN6RQnGp9MZ7YdsVA5dJKtfqP5lO%2FSxqah2O4Iu1HXnXuecJg8pafBYuZ1tCKwvulL5Ojzvp0C1VAnZAFqIBpoRbLk611SFhrwERUykIFinQQILnmuiTUMT3uGn6nAOt%2BtWrCJl1sp0N8kNhXFLsafO9rB9J%2BHbjyLuvYxgT7qJF%2FPDQg%3D%3D", "imageUploadURL": "https://storage.googleapis.com/rmaas-us-dit1/company/2001/c29d43fe-06a4-400e-9166-eb15f865d3b5/image/test.pdf?GoogleAccessId=ramaas-sa-data-level-dit-1@rmaas-dit-1.iam.gserviceaccount.com&Expires=1533059353&Signature=OuFx%2BI81fOVHL%2BAPXh1P0tGnaIFhOTC4Eke3zj4WPv9Njsw8frI1F94MNz3fPWzzxHxeYM46wEQoxaqzJhFWszp9mIwvbwzcAoJ%2FMb0usu9KOfq1%2FLhtsHDQEL3OEhA5SgbHvImD0gym4oeKETcWM8k4gFMENw2pFYJ174%2FPeJwoyhph2VT9HY0MCLIURANF70SQvIOSCf9hqjyqrzL5vOdK1quD67raaRrNFS03JDAP3YBXl7YEAu9TZMcGMUwX30p4lMAhqgK7BbrAnxNdh7UIl6oSyEl1TWm2D4VoP0llOMZUFxkMhdSdz%2FTHnHfzveRe4mQkPwwUu9%2B7nyfDvA%3D%3D",


Document State Mappings

State Text in Request/Response

State Value

State Text in Request/Response

State Value

METADATA_UPLOADED

10

DOCUMENT_UPLOADED

20

PROCESSED

30

INDEXED

40

REPROCESS

50

Retention Calculation Status 

Retention Calculation Status



Retention Calculation Status



RECALCULATE

ready for calculation

CALCULATING

in the process of calculation

DONE

calculation is finished with RetentionErrorCode (see below table).

Retention Error Code

Retention error code



Retention error code



SUCCESS

Retention eligibility date is calculated successfully.

RETENTION_PERIOD_MISSING

There is no retention period.

RETENTION_PERIOD_UNIT_MISSING

There is no retention period unit. Usually it is years, months, days for PCS retention rules.

RETENTION_PERIOD_UNIT_INVALID

The retention period unit is not either of years, months, days.

DOCUMENT_TYPE_MISSING

There is no document type id for the document.

RULE_MISSING

There is no retention rule for the document type of the document.

RETENTION_TRIGGER_ATTRIBUTE_MISSING

There is no retention trigger attribute id (name) for the retention rule of the document type of the document.

RETENTION_TRIGGER_DATE_MISSING

There is no attribute value for the document for the retention trigger attribute.

RETENTION_TRIGGER_DATE_INVALID_TYPE

The attribute value is not a "Date" type.

RETENTION_TRIGGER_DATE_INVALID

The attribute value (string presentation) cannot be parsed as a Date.

NO_RETENTION_TYPE

The company is neither CUSTOMER nor PCS retention type.

EXCEPTION

Runtime exception(s) occur during the calculation.

Document Images / Files APIs

ES stands for ElasticSearch

Service Name

API Contracts

Note

Permissions Required

Service Name

API Contracts

Note

Permissions Required

Update ES metadata only

PUT /companies/{companyId}/documents/{documentGUID}/es

Request Body: text



  • An authenticated user with the following permissions:

    • assets.use

Get ES metadata

GET /companies/{companyId}/documents/{documentGUID}/es

Response : text



  • An authenticated user with the following permissions:

    • assets.view

Upload/Update an Image

POST /companies/{companyId}/documents/{documentGUID}/image

Request Body: multipart/form-data (file & fileName)

  • file and fileName (or filename) are required. The field fileName (or filename) is the name of the uploaded file in the GCS folder. It can be different from the name of the file. See below for the requirements of fileName and filename.

  • An authenticated user with the following permissions:

    • assets.use

Upload/Update an Image by resource

PUT /companies/{companyId}/documents/{documentGUID}/image

Request Body: ResourceUploadInfo

1 2 3 4 5 6 7 { "resourceLocation": "gs://rmaas-dit2-us/company/...", "md5": null, "size": 0, "connectorType": "GCS", "connectorConfigId": "b6562d18-61a6-46eb-8c12-e8f698223e11" }



  • connectorType is required. It must be one of the connector types listed on the Connector Config APIs page.

  • resourceLocation is required.

  • An authenticated user with the following permissions:

    • assets.use

Download an Image

GET /companies/{companyId}/documents/{documentGUID}/image

Response: URL



  • An authenticated user with the following permissions:

    • assets.view

Upload/Update a Support File

POST /companies/{companyId}/documents/{documentGUID}/files

Request Body: multipart/form-data (file & fileName)

  • file and fileName (or filename) are required. The field fileName (or filename) is the name of the uploaded file in the GCS folder. It can be different from the name of the file. See below for the requirements of fileName and filename.

  • An authenticated user with the following permissions:

    • assets.use

Download a Support File

GET /companies/{companyId}/documents/{documentGUID}/files/{fileName}

Response: URL



  • An authenticated user with the following permissions:

    • assets.view

Delete a Support File

DELETE /companies/{companyId}/documents/{documentGUID}/files/{fileName}



  • An authenticated user with the following permissions:

    • assets.manage

Delete all of Support Files

DELETE /companies/{companyId}/documents/{documentGUID}/files



  • An authenticated user with the following permissions:

    • assets.manage

List all of Support Files

GET /companies/{companyId}/documents/{documentGUID}/files
Response: a list of support file names.



  • An authenticated user with the following permissions:

    • assets.view

Requirements for a file name

fileName and filename must be less than 950 characters. They can not contain the following characters. 

1 2 3 4 #, [, ], *, ?, Carriage Return (\r) Line Feed characters (\n) control characters that are illegal in XML 1.0 (#x7F–#x84 and #x86–#x9F)

 

Attributes / Metadata Fields APIs

Service Name

API Contracts

Note

Permissions Required

Service Name

API Contracts

Note

Permissions Required

Get metadata fields Data Type Mapping

GET /companies/{companyId}/attributes/dataTypes

Response : AssetMetadataTypeListResponse

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 { "count":5, "total":5, "status":"PASSED", "data":[ { "type":"boolean", "searchIndexFields":[ "common.boolean" ], "companyId":25274 }, { "type":"String", "searchIndexFields":[ "common.String" ], "companyId":25274 }, { "type":"int", "searchIndexFields":[ "common.int" ], "companyId":25274 }, { "type":"long", "searchIndexFields":[ "common.long" ], "companyId":25274 }, { "type":"Date", "searchIndexFields":[ "common.Date" ], "companyId":25274 } ] }







Get Asset Attribute

GET /companies/{companyId}/attributes/{attributeId}

Request Body: None

Response : AssetAttribute

1 2 3 4 5 6 7 8 9 10 11 12 { "createdDate": "2019-08-28T12:25:54.254-04:00", "createdUserId": "IRMUSER_SUPPORT", "attributeId": "137d8d38-d7e3-4195-9b68-127b992d6a7a", "type": "String", "name": "SingleAttribute", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false, "companyId": 715224 }





An authenticated user with the following permissions:

  • classification_doc_types.manage

OR

  • classification_doc_types.view

Query Asset Attributes

GET /companies/{companyId}/attributes

Support Query Pagination, Sorting and Filtering



Response: List<AssetAttribute>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 { "count":4, "total":0, "status":"PASSED", "data":[ { "createdDate":"2019-03-07T10:24:07.007Z", "createdUserId":"gateway", "documentTypeId":"0b250d28-6750-4319-ac10-1c3215813c3f", "documentTypeIds":[ "0b250d28-6750-4319-ac10-1c3215813c3f" ], "attributeId":"016bbd04-07f1-4d6d-88c9-042913da4e96", "type":"String", "name":"attr1", "category":"Custom Metadata", "label":"attr1", "searchIndexField":"irm.attr1", "displayable":true, "mandatory":false, "searchable":true, "validationRegex":"null", "encrypted":false, "companyId":25274 }, { "createdDate":"2019-03-07T10:24:07.073Z", "createdUserId":"gateway", "documentTypeId":"0b250d28-6750-4319-ac10-1c3215813c3f", "documentTypeIds":[ "0b250d28-6750-4319-ac10-1c3215813c3f" ], "attributeId":"09693336-6dbb-4568-91e4-0c18c21992c4", "type":"long", "name":"attr3", "category":"Custom Metadata", "label":"attr3", "searchIndexField":"irm.attr3", "displayable":true, "mandatory":false, "searchable":true, "encrypted":false, "companyId":25274 }, { "createdDate":"2019-03-07T10:24:07.041Z", "createdUserId":"gateway", "documentTypeId":"0b250d28-6750-4319-ac10-1c3215813c3f", "documentTypeIds":[ "0b250d28-6750-4319-ac10-1c3215813c3f" ], "attributeId":"65d60b92-86e4-4857-bba3-422df48576d2", "type":"int", "name":"attr2", "category":"Custom Metadata", "label":"attr2", "searchIndexField":"irm.attr2", "displayable":true, "mandatory":true, "searchable":true, "encrypted":false, "companyId":25274 }, { "createdDate":"2019-03-07T10:24:07.105Z", "createdUserId":"gateway", "documentTypeId":"0b250d28-6750-4319-ac10-1c3215813c3f", "documentTypeIds":[ "0b250d28-6750-4319-ac10-1c3215813c3f" ], "attributeId":"9e2f2034-f262-4cef-b308-65012bb0eb5f", "type":"Date", "name":"attr4", "category":"Custom Metadata", "label":"attr4", "searchIndexField":"irm.attr4", "displayable":true, "mandatory":false, "searchable":true, "encrypted":false, "companyId":25274 } ] }



1 2 3 4 5 Find all attributes with documentTypeIds contains 9e2f2034-f262-4cef-b308-65012bb0eb5f companies/25274/attributes?filter=documentTypeIds:CONTAINS:0b250d28-6750-4319-ac10-1c3215813c3f Find all attributes with documentTypeIds contains 9e2f2034-f262-4cef-b308-65012bb0eb5f or 0e1052c3-f7e9-4670-b62b-e7262a56ec2a companies/25274/attributes?filter=documentTypeIds:CONTAINS_ANY:0b250d28-6750-4319-ac10-1c3215813c3f;0e1052c3-f7e9-4670-b62b-e7262a56ec2a"









Create Attribute

POST /companies/{companyId}/attributes

Request Body: List<AssetAttribute>

1 2 3 4 5 6 7 8 9 10 11 12 13 [ { "name": "SingleAttribute", "type": "String", "category": "Custom Metadata", "displayable": true, "mandatory": false, "searchable": true, "label": "Owners", "name": "SingleAttribute", "validationRegex": null } ]

Response: AssetAttribute

1 2 3 4 5 6 7 8 9 10 11 12 { "createdDate": "2019-08-28T12:25:54.254-04:00", "createdUserId": "IRMUSER_SUPPORT", "attributeId": "137d8d38-d7e3-4195-9b68-127b992d6a7a", "type": "String", "name": "SingleAttribute", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false, "companyId": 715224 }



  • name, type, displayable, mandatory, searchable, and encrypted are required for each attribute. validationRegex is optional.

  • For each attribute, type must be one of "String", "Date", "int", "long", and "boolean". For "String" type, "validationRegex" must follow Java regex Pattern definitions. For "Date" type, "validationRegex" must follow pattern definitions on Java SimpleDateFormat.

An authenticated user with the following permissions:

  • classification_doc_types.manage

Update Asset Attribute

PUT /companies/{companyId}/attributes/{attributeId}

Request Body: AssetAttribute

1 2 3 4 5 6 { "displayable": true, "mandatory": false, "searchable": true, "validationRegex": null }

Response : AssetAttribute

1 2 3 4 5 6 7 8 9 10 11 12 { "createdDate": "2019-08-28T12:25:54.254-04:00", "createdUserId": "IRMUSER_SUPPORT", "attributeId": "137d8d38-d7e3-4195-9b68-127b992d6a7a", "type": "String", "name": "SingleAttribute", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false, "companyId": 715224 }





An authenticated user with the following permissions:

  • classification_doc_types.manage

Update Asset Attributes

PUT /companies/{companyId}/attributes

Request Body: List<AssetAttribute>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [ { "attributeId": "962ebde2-27e0-4cb8-a624-07081059660c", "displayable": true, "mandatory": false, "searchable": true, "validationRegex": null }, { "attributeId": "84a00e36-c4d9-437a-84f7-eef5d08bcacf", "displayable": true, "mandatory": false, "searchable": true, "validationRegex": null } ]

Response: AssetAttributeListResponse

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 { "count": 2, "total": 0, "status": "PASSED", "data": [ { "createdDate": "2019-08-28T12:48:31.679-04:00", "createdUserId": "IRMUSER_SUPPORT", "attributeId": "1992d955-a78e-40c5-9735-44c45292456c", "type": "String", "name": "ListTest1", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false, "companyId": 715224 }, { "createdDate": "2019-08-28T12:48:31.874-04:00", "createdUserId": "IRMUSER_SUPPORT", "attributeId": "960e84dd-2626-43ea-b7a2-0a40b6c9a81b", "type": "int", "name": "ListTest2", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false, "companyId": 715224 } ] }





An authenticated user with the following permissions:

  • classification_doc_types.manage

Delete Asset Attribute

DELETE /companies/{companyId}/attributes/{attributeId}

Request Body: None

Response : ServiceResponse<Integer>

1 2 3 4 5 { "count": 1, "total": 1, "status": "PASSED" }





An authenticated user with the following permissions:

  • classification_doc_types.manage

Delete Asset Attributes

DELETE /companies/{companyId}/attributes

Request Body: List<String> - a list of attributeId's

1 ["962ebde2-27e0-4cb8-a624-07081059660c", "84a00e36-c4d9-437a-84f7-eef5d08bcacf"]

Response : ServiceResponse<Integer>

1 2 3 4 5 { "count": 2, "total": 2, "status": "PASSED" }





An authenticated user with the following permissions:

  • classification_doc_types.manage

Assign/Unassign/Override an attribute Id to document type ids *

PUT /companies/{companyId}/attributes/{attributeId}/documentTypes?action=<ASSIGN,UNASSIGN or OVERRIDE>

Request Body: documentTypeIds

1 2 3 4 5 6 7 { "documentTypeIds": [ "deb5a437-b4a1-4e7e-a288-3c0883d4d16a", "4874d344-d6f6-48a5-81b4-b492e9dcab9e" ] }

Response: AssetAttribute

  • 1 documentTypeIds

    is not empty to assign/unassign to an attribute. But it can be empty array/list to override document type ids, in this case, the current document type ids will be totally cleared. Each item must be a valid company document type id.

  • A RmaasPreconditionException is returned if action=UNASSIGN and the attribute is the retention trigger attribute of the document type.

An authenticated user with the following permissions:

  • classification_doc_types.manage

Assign/Unassign/Override attribute Ids to document type ids *

PUT /companies/{companyId}/attributes/documentTypes?action=<ASSIGN,UNASSIGN or OVERRIDE>

Request Body: attributeIds and documentTypeIds

1 2 3 4 5 6 7 8 9 10 { "attributeIds":[ "0044bedf-e85c-45f8-bdd4-67e094f792e3" ], "documentTypeIds": [ "deb5a437-b4a1-4e7e-a288-3c0883d4d16a", "4874d344-d6f6-48a5-81b4-b492e9dcab9e" ] }

Response:  List<AssetAttribute>

  • 1 attributeIds

    must be non empty and each item has to be valid attribute id of the company.

  • 1 documentTypeIds

    is not empty to assign/unassign to attributes. But it can be empty array/list to override document type ids, in this case, the current document type ids will be totally cleared. Each item must be a valid company document type id.

  • A RmaasPreconditionException is returned if action=UNASSIGN and one of attributes is the retention trigger attribute of either document type.

An authenticated user with the following permissions:

  • classification_doc_types.manage

Supported attribute data types

Attribute Type

Attribute Value

Attribute Type

Attribute Value

int

A string represents an integer, for example, "123"

long

A string represents a big integer, for example "1298381"

Date

A string represents a date or date and time in the following format patterns which are defined in Java 8 SimpleDateFormat

1 2 3 4 5 6 7 8 9 10 11 12 yyyy-MM-dd'T'HH:mm:ss.SSS yyyy-MM-dd'T'HH:mm:ss yyyy-MM-dd'T'HH:mm:ss.SSSXXX yyyy-MM-dd'T'HH:mm:ss.SSSZ yyyy-MM-dd'T'HH:mm:ssXXX yyyy-MM-dd'T'HH:mm:ssZ MM/dd/yyyy MM/dd/yyyy hh:mm:ss a MM-dd-yyyy yyyy-MM-dd



String

A plain text string

boolean

A string of "true" or "false"

double

A string represents a double, for example "1.0", or "1"

Coordinates

A string represents a coordinates point in format of "Numeric, Numeric[, Numeric]", for example "40.112312, -71.192291"



Document Type APIs

Service Name

API Contracts

Note

Permissions Required

Service Name

API Contracts

Note

Permissions Required

Create a Document Type

POST /companies/{companyId}/documentTypes

Request Body: AssetDocumentType

1 2 3 4 5 6 { "name": "ESBasic", "description": "basic", "minConfidence": 0.78, "pcsDocumentTypeId": null }

Response: AssetDocumentType

1 2 3 4 5 6 7 8 9 10 { "createdDate": "2018-08-07T17:39:23.607+00:00", "createdUserId": "gateway", "documentTypeId": "9a038628-c748-44ec-905d-39d7abe258d5", "name": "ESBasic", "description": "basic", "minConfidence": "0.78", "companyId": 0, "attributes": [] }



  • companyId=0 for all IRM defined document types

  • name and description are required. pcsDocumentTypeId is set to null if it is not present in the request body; otherwise, it is set to the value in the request (either null, blank, or a string). minConfidence is set to default value 0.85 if it is not present or it is 0.0, -0.0, null; the API returns a 400 error message if it is negative (<0.0) or > 1.0; otherwise, it is set to the value.

  • attributes are created independently.

  • An authenticated user with the following permissions:

    • classification_doc_types.manage

ASSIGN/UNASSIGN/OVERRIDE Attributes for a Document Type *

PUT /companies/{companyId}/documentTypes/{docTypeId}/attributes

Query Parameter: action=ASSIGN/UNASSIGN/OVERRIDE, default is OVERRIDE

Request: attributeIds

1 2 3 4 5 6 { "attributeIds":[ "0044bedf-e85c-45f8-bdd4-67e094f792e3" ] }



Response: AssetDocumentType with updated attributes



  • A RmaasPreconditionException is returned if action=UNASSIGN and one attribute is the retention trigger attribute of the document type.

  • An authenticated user with the following permissions:

    • classification_doc_types.manage

ASSIGN/UNASSIGN/OVERRIDE Attributes for Document Types *

PUT /companies/{companyId}/documentTypes/attributes

Query Parameter: action=ASSIGN/UNASSIGN/OVERRIDE, default is OVERRIDE

Request: attributeIds and documentTypeIds

1 2 3 4 5 6 7 8 9 10 { "attributeIds":[ "0044bedf-e85c-45f8-bdd4-67e094f792e3" ], "documentTypeIds": [ "deb5a437-b4a1-4e7e-a288-3c0883d4d16a", "4874d344-d6f6-48a5-81b4-b492e9dcab9e" ] }



Response: List<AssetDocumentType> with updated attributes

  • A RmaasPreconditionException is returned if action=UNASSIGN and one attribute is the retention trigger attribute of one document type.

  • An authenticated user with the following permissions:

  • classification_doc_types.manage

Query Document Types & Attributes by a company

GET /companies/{companyId}/documentTypes

Support Query Pagination, Sorting and Filtering

Response: List<AssetDocumentType>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 { "count": 13, "total": 13, "data": [ { "createdDate": "2018-10-24T16:11:53.160+00:00", "createdUserId": "gateway", "documentTypeId": "25463ed8-a6c6-4e21-b8f2-845528018a25", "name": "G-type", "companyId": 134357, "attributes": [ { "attributeId": "0483339c-4905-4f9c-9cd9-525512026813", "type": "String", "name": "Services", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, ... ... { "attributeId": "efe6512f-2c60-456a-bc1f-f2016a7e3977", "type": "String", "name": "Title", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false } ], "minConfidence": 0.92, "description": "DIT2-G doc type", "pcsDocumentTypeId": "897fb420-df63-f36f-d962-cd8841ccf7f5", "governanceRules": { "retention": [ { "governanceRuleId": "06f146e8-3597-59eb-2a75-44365d469cfc", "docTypeId": "897fb420-df63-f36f-d962-cd8841ccf7f5", "docTypeExtId": null, "docTypeName": "State Withholding Form", "docTypeDescription": "", "businessProcessId": "", "businessProcessName": "", "recordClassId": "4e758b18-f044-0a97-5fc4-5f1afe656266", "recordClassName": "Unemployment / Withholding Tax Filings", "recordClassDescription": "Records related to ...", "ruleId": null, "ruleName": "Unemployment / Withholding Tax Filings", "jurisdiction": "US: United States", "retentionTriggerId": "5789647f-1d59-bdc2-72a0-b3dfb6d44ea8", "retentionTrigger": "CREATE_DATE", "retentionTriggerDescription": "The date that the record is created.", "minRetentionPeriod": 7, "minRetentionPeriodUnits": "years", "maxRetentionPeriod": null, "maxRetentionPeriodUnits": "years", "recordClassCd": "WCB-1120", "ruleCd": "US-WCB-1120" } ], "privacy": [ ] } }, ... ... { "createdDate": "2018-10-24T16:12:17.471+00:00", "createdUserId": "gateway", "documentTypeId": "2c5c8060-13c6-463d-a9d0-b46e3d08b902", "name": "D-type", "companyId": 134357, "attributes": [ { "attributeId": "141becb1-7c6f-474f-94a9-3ceac91f4def", "type": "String", "name": "Services", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, ... ... { "attributeId": "e8115673-6561-4efb-88d0-3d3f85325463", "type": "String", "name": "AssetType", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false } ], "minConfidence": 0.91, "description": "DIT2 doc type", "pcsDocumentTypeId": "abb14fd7-82cd-d2e7-acc8-6350db3f5c99", "governanceRules": { "retention": [ { "governanceRuleId": "e8bf316d-4687-2003-3b52-3238a21acf18", "docTypeId": "abb14fd7-82cd-d2e7-acc8-6350db3f5c99", "docTypeExtId": null, "docTypeName": "Beneficiary Designation Records", "docTypeDescription": "", "businessProcessId": "", "businessProcessName": "", "recordClassId": "c742708b-ef8b-30ef-0f5a-f2b8348316e7", "recordClassName": "Benefit Enrollment and Participation", "recordClassDescription": "Records related to ...", "ruleId": null, "ruleName": "Benefit Enrollment and Participation", "jurisdiction": "US: United States", "retentionTriggerId": "79759ccb-6eb2-dd4d-ef1c-3c05df92e703", "retentionTrigger": "EMP_TERMINATION_DATE", "retentionTriggerDescription": "The date that the employee terminates.", "minRetentionPeriod": 6, "minRetentionPeriodUnits": "years", "maxRetentionPeriod": null, "maxRetentionPeriodUnits": "years", "recordClassCd": "WKM-1000", "ruleCd": "US-WKM-1000" } ], "privacy": [ ] } } ] }  





  • An authenticated user with the following permissions:

    • classification_doc_types.view

Update a Document Type

PUT /companies/{companyId}/documentTypes/{docTypeId}

Request Body: AssetDocumentType without attributes



1 2 3 4 5 6 7 8 { "name": "ESBasicUpdate", "description": "update", "minConfidence": 0.77 }  

Response: AssetDocumentType without attributes

1 2 3 4 5 6 7 8 9 10 11 12 { "createdDate": "2018-08-07T17:39:23.607+00:00", "createdUserId": "gateway", "documentTypeId": "9a038628-c748-44ec-905d-39d7abe258d5", "name": "ESBasicUpdate", "description": "update", "minConfidence": 0.77, "pcsDocumentTypeId": "f35cbd63-6f8a-49bf-ac79-651d5c002611", "companyId": 0 }



  • name and description are required. It can be the current value or the new one. minConfidence is set to default value 0.85 if it is not present or it is 0.0; the API returns a 400 error message if it is negative (<0.0) or >1.0; otherwise, it is set to the value.

  • An authenticated user with the following permissions:

    • classification_doc_types.manage

Update PCS Document Type Id *

PUT /companies/{companyId}/documentTypes/{docTypeId}/pcsDocumentTypeId/{pcsDocTypeId}

Response: AssetDocumentType without Retention Rules

  • pcsDocTypeId is a valid PCS document type id in the rmaas_retention_rule table for the company. If it is a string "null" or "NULL", the service unlinks a PCS document type for the given document type.

  • If a document type is already associated with a PCS document type, calling this API with another PCS document type id will return a RmaasPreconditionException.

  • The jurisdiction of the retention rules of the PCS document type must match company's jurisdiction.

  • After linking a PCS document type id to a document type, a Policy Manager should start a task to reset the retention calculation status for all impacted documents.

  • An authenticated user with the following permissions:

    • classification_doc_types.manage

Update Retention Trigger Attribute for a Retention Rule of a Document Type *

PUT /companies/{companyId}/documentTypes/{docTypeId}/rules/retention/{ruleId}/attribute/{attributeId}

Response: AssetDocumentType

  • attributeId is a valid attribute id of the company. This API assigns the attribute to the document type if it is not done so yet. If it is a string "null" or "NULL", the service removes it from the retention rule.

  • After linking a PCS document type id to a document type, a Policy Manager should start a task to reset the retention calculation status for all impacted documents.

  • An authenticated user with the following permissions:

    • classification_doc_types.manage

Update Retention Trigger Attribute for all Retention Rules of a Document Type *

PUT /companies/{companyId}/documentTypes/{docTypeId}/rules/retention/attribute/{attributeId}

Response: AssetDocumentType

  • attributeId is a valid attribute id of the company.This API assigns the attribute to the document type if it is not done so yet. If it is a string "null" or "NULL", the service removes it from the retention rule.

  • After linking a PCS document type id to a document type, a Policy Manager should start a task to reset the retention calculation status for all impacted documents.

  • An authenticated user with the following permissions:

    • classification_doc_types.manage

Get a Document Type *

GET /companies/{companyId}/documentTypes/{docTypeId}

Response: AssetDocumentType



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 { "createdDate": "2018-10-24T16:11:05.375+00:00", "createdUserId": "gateway", "documentTypeId": "194bcb49-26af-4cdb-a193-35bc423f9ae8", "name": "DIT2", "companyId": 134357, "attributes": [ { "attributeId": "1073bc0a-a8a3-4e17-a9f7-3b12b62de194", "type": "Date", "name": "UpdatedDate", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "10a4529f-4f9a-4c6e-a082-ca5b31d817fc", "type": "String", "name": "RelatedPages", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "29993ba6-2a36-466b-8c1f-00dc9e26f954", "type": "String", "name": "Title", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "2c24be94-16a3-4469-bdd2-b8a97f375bdb", "type": "String", "name": "GPS-US-NL", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "384a4ba5-e383-4e52-8547-884c2286026b", "type": "String", "name": "CompanySize", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "5dc6a827-fe73-4988-8685-8f5451cc2958", "type": "String", "name": "ResourceAccess", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "778c62ea-852e-44b7-b074-c4d3e7a1698f", "type": "String", "name": "AssetType", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "8741f77f-b707-490d-955f-9c80552a3a30", "type": "String", "name": "Industries", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "af565f6d-b79c-4bd8-98db-f0fba9fb3ff8", "type": "Date", "name": "ArticleDate", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "c6bd9d3f-1e5e-417d-ac5f-ce05d4d4d3e1", "type": "String", "name": "DocumentType", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "c7da5a89-26d7-4711-8c94-cb4195fe2877", "type": "String", "name": "FileName", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "cc51dac4-0207-467a-9194-39044f173844", "type": "String", "name": "Personas", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "cefbc2d3-454f-4b34-a18a-1b196986b18a", "type": "String", "name": "Services", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "e5661904-5a09-4c8e-bc93-2a0f5bd4c759", "type": "String", "name": "PageURL", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false }, { "attributeId": "f5f55420-bc72-4d74-9819-ebeadc8456e8", "type": "String", "name": "Country", "displayable": true, "mandatory": false, "searchable": true, "encrypted": false } ], "minConfidence": 0.91, "description": "DIT2 doc type", "pcsDocumentTypeId": "807818a8-ec18-efc5-25f0-f52fac37b3fd", "governanceRules": { "retention": [ { "governanceRuleId": "b221ce5d-f818-6f49-0ac3-c84766c61dd5", "docTypeId": "807818a8-ec18-efc5-25f0-f52fac37b3fd", "docTypeExtId": null, "docTypeName": "Compensation Plan – Annual ", "docTypeDescription": "", "businessProcessId": "", "businessProcessName": "", "recordClassId": "a00845fb-5e1c-d571-8bd4-2be6ffb4a404", "recordClassName": "Compensation Planning", "recordClassDescription": "Records related ...", "ruleId": null, "ruleName": "Compensation Planning", "jurisdiction": "US: United States", "retentionTriggerId": "5789647f-1d59-bdc2-72a0-b3dfb6d44ea8", "retentionTrigger": "CREATE_DATE", "retentionTriggerDescription": "The date that the record is created.", "minRetentionPeriod": 6, "minRetentionPeriodUnits": "years", "maxRetentionPeriod": null, "maxRetentionPeriodUnits": "years", "recordClassCd": "WCB-1020", "ruleCd": "US-WCB-1020" } ], "privacy": [ ] } }



  •  If the document type is associated with a PCS document type id, governanceRules is returned.

  • An authenticated user with the following permissions:

    • classification_doc_types.view

Get a list of Document Types by ids

PUT /companies/{companyId}/documentTypes

Query Parameters: details - include attributes in the response or not, default is true

Request Body: documentTypeIds

Response: List<DocumentType>



1 2 3 4 5 6 { "documentTypeIds": [ "030291be-f0bc-4058-9bde-90c84bfa483d", "030291be-f0bc-4058-9bde-90c84bfa483d" ] }





  • An authenticated user with the following permissions:

  • classification_doc_types.view

Delete a Document Type

DELETE /companies/{companyId}/documentTypes/{docTypeId}

Response: 1

Delete the document type in the spanner rmaas_document_type table if no documents is linked to this document type.

  • An authenticated user with the following permissions:

    • classification_doc_types.manage



Retention Status 

Each document type has a retention status indicating the availability of the retention rules and their retention information. If a company is NONE retention type, all document types of the company should have retentionStatus=NONE. 

Retention status



Retention status



NONE

The document type should not have a retention rule.

REQUESTED

PCS document type is requested, but there are no retention rules are created on the PCS yet.

(TBD for a document type with CUSTOMER retention type)

RETENTION_PERIOD_MISSING 

Retention rules are available, but retention period is missing

RETENTION_TRIGGER_ATTRIBUTE_MISSING 

The retention trigger attribute id(name) is not assigned yet.

RETENTION_PERIOD_TRIGGER_ATTRIBUTE_MISSING 

Neither retention period nor trigger attribute is available.

READY 

Retention rule includes retention period and trigger attribute. And it is ready for calculating the destruction eligibility date.

 

URL Structure 

https://cdvapi.<environment name>.com

Using a REST Client

  • Use a REST client such as the Google Rest Client 

  • You will need to get an authorization token from the InSight Team

  • Include the token in the header when calling the service.  See example below: