Skip to main content

We've Moved!

Product Documentation has moved to docs.hitachivantara.com
Hitachi Vantara Knowledge

Retention class resources


Retention class resources let you create, retrieve information about, modify, and delete retention classes. The table below provides information about these resources.

Data type

Method

Use

Access

Notes

.../tenants/tenant-name/namespaces/namespace-name/retentionClasses

retentionClass

PUT

Create a retention class for a namespace

For an HCP namespace, tenant-level user account with the compliance role

For the default namespace, system-level user account with the compliance role

 

List

GET

Retrieve a list of the retention classes defined for a namespace

For an HCP namespace, tenant-level user account with the monitor, administrator, or compliance role

For the default namespace, system-level user account with the monitor, administrator, or compliance role

The listed retention classes are identified by retention class name.

In XML, the element that identifies each retention class is name. The root element for the list of retention classes is retentionClasses.

In JSON, the name in the name/value pair that lists the retention classes is name.

.../tenants/tenant-name/namespaces/namespace-name/retentionClasses/
retention-class-name

retentionClass

GET

Retrieve information about a retention class

For an HCP namespace, tenant-level user account with the monitor, administrator, or compliance role

For the default namespace, system-level user account with the monitor, administrator, or compliance role

 

N/A

HEAD

Check for the existence of a retention class

For an HCP namespace, tenant-level user account with the monitor, administrator, or compliance role

For the default namespace, system-level user account with the monitor, administrator, or compliance role

 

retentionClass

POST

Modify a retention class

For an HCP namespace, tenant-level user account with the compliance role

For the default namespace, system-level user account with the compliance role

 

N/A

DELETE

Delete a retention class

For an HCP namespace, tenant-level user account with the compliance role

For the default namespace, system-level user account with the compliance role

You can delete a retention class only if the namespace is in enterprise mode.

© 2015, 2019 Hitachi Vantara Corporation. All rights reserved.

Example: Creating a retention class


Here’s a sample PUT request that creates a retention class named FN-Std-42 for the Accounts-Receivable namespace. The retention class is defined in an XML file named RC-FN-Std-42.xml. The request is made using a tenant-level user account that includes the compliance role.

Request body in XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<retentionClass>
    <name>FN-Std-42</name>
    <description>Implements Finance department standard #42 - keep for 10
         years.</description>
    <value>A+10y</value>
    <allowDisposition>true</allowDisposition>
</retentionClass>

Request with cURL command line

curl -k -iT RC-FN-Std-42.xml -H "Content-Type: application/xml"
    -H "Authorization: HCP bXdoaXRl:ad49ce36d0cec9634ef63b24151be0fb"
    "https://finance.hcp.example.com:9090...ce/namespaces/
         accounts-receivable/retentionClasses"

Request in Python using PycURL

import pycurl
import os
filehandle = open("RC-FN-Std-42.xml", 'rb')
curl = pycurl.Curl()
curl.setopt(pycurl.HTTPHEADER, ["Content-Type: application/xml",
  "Authorization: HCP \
  bXdoaXRl:ad49ce36d0cec9634ef63b24151be0fb"])
curl.setopt(pycurl.URL,
  "https://finance.hcp.example.com:9090...nants/finance/" +
  "namespaces/accounts-receivable/retentionClasses")
curl.setopt(pycurl.SSL_VERIFYPEER, 0)
curl.setopt(pycurl.SSL_VERIFYHOST, 0)
curl.setopt(pycurl.UPLOAD, 1)
curl.setopt(pycurl.INFILESIZE, os.path.getsize("RC-FN-Std-42.xml"))
curl.setopt(pycurl.READFUNCTION, filehandle.read)
curl.perform()
print curl.getinfo(pycurl.RESPONSE_CODE)
curl.close()
filehandle.close()

Request headers

PUT /mapi/tenants/finance/namespaces/accounts-receivable/retentionClasses
    HTTP/1.1
Host: finance.hcp.example.com:9090
Authorization: HCP bXdoaXRl:ad49ce36d0cec9634ef63b24151be0fb
Content-Type: application/xml
Content-Length: 275

Response headers

HTTP/1.1 200 OK
X-HCP-SoftwareVersion: 8.2.0.2
Content-Length: 0

© 2015, 2019 Hitachi Vantara Corporation. All rights reserved.

Example: Retrieving a list of retention classes


Here’s a sample GET request that retrieves a list of the retention classes defined for the Accounts-Receivable namespace. The request writes the list of retention classes to a file named AR-retclasses.xml. The request is made using a tenant-level user account that includes the compliance role.

Request with cURL command line

curl -k -H "Accept: application/xml"
    -H "Authorization: HCP bXdoaXRl:ad49ce36d0cec9634ef63b24151be0fb"
    "https://finance.hcp.example.com:9090...ce/namespaces/
         accounts-receivable/retentionClasses?prettyprint" > AR-retclasses.xml

Request in Python using PycURL

import pycurl
filehandle = open("AR-retclasses.xml", 'wb')
curl = pycurl.Curl()
curl.setopt(pycurl.HTTPHEADER, ["Accept: application/xml",
  "Authorization: HCP \
  bXdoaXRl:ad49ce36d0cec9634ef63b24151be0fb"])
curl.setopt(pycurl.URL,
  "https://finance.hcp.example.com:9090...nants/finance/" +
  "namespaces/accounts-receivable/retentionClasses?prettyprint")
curl.setopt(pycurl.SSL_VERIFYPEER, 0)
curl.setopt(pycurl.SSL_VERIFYHOST, 0)
curl.setopt(pycurl.WRITEFUNCTION, filehandle.write)
curl.perform()
print curl.getinfo(pycurl.RESPONSE_CODE)
curl.close()
filehandle.close()

Request headers

GET /mapi/tenants/finance/namespaces/accounts-receivable/retentionClasses
    ?prettyprint HTTP/1.1
Host: finance.hcp.example.com:9090
Authorization: HCP bXdoaXRl:ad49ce36d0cec9634ef63b24151be0fb
Accept: application/xml

Response headers

HTTP/1.1 200 OK
Content-Type: application/xml
X-HCP-SoftwareVersion: 8.2.0.2
Content-Length: 136

Response body in XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<retentionClasses>
    <name>FN-Std-37</name>
    <name>FN-Std-42</name>
</retentionClasses>

© 2015, 2019 Hitachi Vantara Corporation. All rights reserved.

 

  • Was this article helpful?