HPE Software Products: SDK / API Support
Share |

How to check permissions about a recordOpen in a New Window

I would like to use the .NET SDK to query the permissions (ACL) for a user to determine if they have access to view the record and also what properties they can access.

I found that even though a user may access a record, there are some properties (i.e. Container) that they may not be able to access.


HP ERM 8.3 and Active Directory & SecurityOpen in a New Window

Hi All,
I was looking at the documentation & installation steps for the HP ERM 8.3 solution and from my limited reading I understand that it relies on Active Directory to provide security.

My question was if I try to access an HP ERM8.3 from another machine (using the SDK) what kind of user will I need to be ? Also how does the overall security work in Record Manager system when we use SDK ? Finally is it possible to impersonate different users during execution ?

Any links or references will be really helpful.


Rohan W.


Question on Titling in HPE Records Manager 8.3Open in a New Window

I have a question on certain built-in properties and what they are used for (intended purpose).

What are the Title, Title (Free text), and Title (structured) used for?

I am working with our organization to help them build a custom web app to interface with an existing HP RM that was built prior to the folks here who manage it.

Right now they do not use Title or Title (Free Text) for anything. The Title (structured) property is used in conjunction with Classification.

They also have an additional field named "Name" which they use as a name for the record. But what I have read in the manuals and SDK it looks like Title should be used for that. This has become an issue as we are trying to search for information in the additonal field "Name" and many searches come back empty even though something exists in the Name field. They also have the box clicked for excluding the "Free Text Title" when creating records.

Not sure what the recommended practice is with HP RM about these items. I would appreciate any insight into how the recommended approach is to inputting data and using those fields.


Searching for record typesOpen in a New Window

I would like to search for record types that match on one or the other.
Basically I want to formulate an "or" clause in the SQL statement.

I am using the following code:

TrimMainObjectSearch objSearch = new TrimMainObjectSearch(db, BaseObjectTypes.Record);
queryString would be something like "recNumber:xxxx"

I want to add a filter or another search criteria that specifies to only return records that match on one of 2 record types

I tried something like objSearch.SetFilterString("type:\"recordtype1\" or type:\"recordtype2\"");

But it doesn't like the or. I also tried using the objSearch.AddFilterClause() and objSearch.Or() but was unsuccessful.

Any suggestions?


Generating a record in HPRM from a document URL path (Blob Storage)Open in a New Window


We are wondering if it is possible to create a new record in HPRM using the service api and trim client by posting a document that is stored in cloud storage, so azure blob storage for instance.  So where you are setting up your request to post to the HPRMServiceApi, where you would put your normal document file path, could you use the url of the file stored in blob storage.  

We have seen in the trim client documentation there is the following option "void PostAsync<TResponse>(string relativeOrAbsoluteUrl, object request, Action<TResponse> onSuccess, Action<TResponse, Exception> onError);"  does anyone know if this 'relativeOrAbsoluteUrl' string, could be the URL of a document in the cloud?

I hope this makes some sense to someone out there.



SDK Docs updated for 9.1Open in a New Window

The online SDK docs for 9.1 are now available.  They are updated to reflect changes made in 9.1 along with a new page documenting purpose filtering.


HP Record manager & Content Manager systems SDKOpen in a New Window

Hi All,

This is the first time i'm exposed to HPE systems so please excuse me if my question sound totally ignorant or stupid.

I have been trying to find resources related to HP Record Manager (8.3) and time and again I see this term HPE RM or Content manager. First off just wanted to know if these products are same or there is a difference. I tried to go through various products on hpe.com but didn't get a appropriate answer for this.

I also read that the HP Record manager has a .net SDK associated which can be used to integrate/access data from the systems in a .net environment. But the only reference I find of this is the Content manager SDK, so again my question is are they the same product ? And secondly is there any location where i can find the documentation for these SDK's ? 

Apologies in case i'm posting this question a wrong thread/forum.


Sorting and filteringOpen in a New Window

I have a question on sorting and filtering using TrimMainObjectSearch.

I am able to use this for standard properties, but can't figure out the syntax for user defined properties.

Specifically, I need to sort by a user defined property and ensure that it is not null.



Security with .NET SDKOpen in a New Window

How can I implement security in a search form using the .NET SDK that will prevent the logged in user from seeing a record they are not authorized to see (i.e. there is some caveat associated with the record)?

This works in the Web Drawer (using the Service API).

I was able to get my search form working (many thanks to Matt and David!), but I can search on any record. I would like to lock that down to only records my account allows me to see.

I am looking at just using Windows accounts (Windows authentication).




Query records example using .NET SDKOpen in a New Window

I would like to build a custom search page (using MVC/Razor) that uses the .NET SDK to search for records.

I have a basic template that works, but the query is much slower than the Service API (in the Web Drawer). Are there any helper methods, etc. in the SDK that can assist in making a more efficient/faster query:

It would be something like:

MainTrimObjectSearch records = new MainTrimObjectSearch(database, BaseObjectTypes.Record);
records.SetSearchString("uri:123456"); //Search criteria supplied by search form

var results = from r in records
select r.Skip(15).Take(15);


This performs slow when querying 100s/1000s of records.


Linking records to containers with value 0Open in a New Window


Our organisation has created a "project" record type with  a container value of 0.
They link folders from other sections into this projects container that relate to a common project.

I would like to write some code that will allow them via  a webpage to link folders and files into this project container. Unfortunately the error message I get is

"A record of type 'Project' cannot be used as a container - it has a container level of 0."

Can someone tell me how I might go about fixing this.

My test code so far is below, sorry about the formatting

protected void btnDocumentCreate()
txtSubFolder = "title:Bills test project";
  String txtDocumentNewRec = "ScheduleDocument_" + DateTime.Now;
  String IdNumber=""

      //string username = fnUserIdentity();
      using (Database objDB = new Database())

            objDB.Id = DataSetId;
            objDB.WorkgroupServerName = ServerName;
            objDB.TrustedUser = "Bill Sigar";

            TrimMainObjectSearch objSearch = new TrimMainObjectSearch(objDB, BaseObjectTypes.Record);


             foreach (Record thisObjRec in objSearch)

                IdNumber = thisObjRec.Number;

        if (!(String.IsNullOrEmpty(IdNumber)))

            RecordType objRecType = new RecordType(objDB, "Document");
            Record objRec = new Record(objDB, objRecType);
            Record objContainer = new Record(objDB, IdNumber);
            objRec.TypedTitle = txtDocumentNewRec;

            objRec.SetContainer(objContainer, true);




catch (Exception ex)
   txtError.Text = ex.Message;


AuditingOpen in a New Window

I am extracting all documents in a container record using ServiceAPI 8.2 and caching them in my application.  Every document is audited as a Document Extracted.  Is there any way I can add any information to the audit log? I want to indicate that the file was extracted by my app. 


ServiceAPI allowing me to add records to closed partsOpen in a New Window

With HPRM 8.2 I am using the ServiceAPI to add new records to a container record.  My container record has a record type which allows parts and I have created an extra part in the record.  I have the system setting "When placing record in a closed container" set to Deny.  The ServiceAPI allows me to run as a normal user and add new records to the closed part.  If I use the HPRM windows client as the same user it tells me that it is a closed part and prompts me to add to the latest part.   Why does ServiceAPI allow me to add to the closed part? 

I cannot see any information in the EnabledCommandIds to indicate that I shouldn't be adding to the record.  Is there a description of what the different EnabledCommandIds mean?  The ServiceAPI help does not describe what each CommandId represents.  Is there an EnabledCommandId that will tell me if it is ok for the user to add a record to a specific container?


Adding multiple contacts to a recordOpen in a New Window


I have been trying to get my integration to add multiple 'Other' contacts to a record when I create the record with the ServiceApi.  This is roughly what I am doing...

Record rec = new Record();
rec.Uri = 9000000001;
rec.ActionsToCall = new List<IMainObjectActionRequest>();

foreach (var contact in Contacts) 
rec.ActionsToCall.Add(new AttachContact() { AsContactType = ContactType.Other, ContactLocation = new LocationRef() { Uri = contact.Uri} }); } RecordsResponse response = _trimClient.PostFileWithRequest<RecordsResponse>(f, rec);

// Where f is FileInfo for attaching the file to the record in HPRM.

The response  is being returned as null, does anyone know how I can deal with this, or what I am doing wrong?

At the moment to get around it I am doing a trimClient.Post(rec) first to create the record, and then I am using the uri from that response to attach the file to the record with trimClient.PostFileWithRequest(f, rec2), surely this is not the best way around it?

RecordsResponse response1 = _trimClient.Post<RecordsResponse>(doc);
Record record = new Record() { Uri = response1.Results[0].Uri };
RecordsResponse response11 = _trimClient.PostFileWithRequest<RecordsResponse>(f, record);


ServiceAPI Bulk Container UpdateOpen in a New Window


Is anyone able to point me in the right direction for performing a bulk update of container (record) metadata in HP Content Manager using the ServiceAPI?

We are unable to make use of the SDK and it is not obvious from the documentation provided how this might be achieved.




Trim 6.2 how to export audit Trail informationOpen in a New Window

I am trying to export audit trail information from TRIM 6.2.

What is the best way to do it?

TRIM Port does not export this information, is there any other way I can get that information out?

Any suggestions to get this information out would be helpful.


Service API error not returned as HTTP errorOpen in a New Window

I retrieve files through the service API using HTTP GET on version 8.2 of HPRM.  Sometimes the retrieval fails, but the status returned from the server is 200 indicating a success.  The reponse is a HTML file with embedded JSON error information.  My file download code cannot easily distinguish this error so is treating it as the content of the requested file.  Is there a reason a HTTP error status is not being returned?  


The response is as follows:

HTTP/1.1 200 OK
Cache-Control: private,no-cache
Content-Type: text/html
Server: Microsoft-IIS/7.5
X-Powered-By: ServiceStack/3.958 Win32NT/.NET
X-AspNet-Version: 4.0.30319
Persistent-Auth: true
X-Powered-By: ASP.NET
Date: Mon, 21 Nov 2016 14:24:47 GMT
Content-Length: 1470

<!doctype html>



<link href="/HPRMServiceAPI/scripts/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="/HPRMServiceAPI/css/webdrawer.css" type="text/css" rel="stylesheet" />
<link rel="shortcut icon" href="/HPRMServiceAPI/images/favIcon.ico" />

<meta name="google" content="notranslate" />

<div id="banner">
<div id="inner-banner"><div id="banner-img"></div>
<div id="back-link"><a href="/HPRMServiceAPI/help/index">RETURN TO INDEX</a></div>



<div id="body">


<div id="content">
<pre>{"ResponseStatus":{"ErrorCode":"TrimException","Message":"Error connecting to the HP Records Manager dataset '45' on HP Records Manager Workgroup Server 'local'. Connection to dataset 'Active(45)' for 'ADMINISTRATOR' failed. Login validation failed. Login timeout expired","Errors":[]}}</pre>

ErrorCode: TrimException <br/>
Message: Error connecting to the HP Records Manager dataset &#39;45&#39; on HP Records Manager Workgroup Server &#39;local&#39;. Connection to dataset &#39;Active(45)&#39; for &#39;ADMINISTRATOR&#39; failed. Login validation failed. Login timeout expired <br/>






Monitoring automation of large number of workgroup serversOpen in a New Window

  1. We think an automated reap of the Event and Workgroup logs followed by mining/filtering as the way ahead but would appreciate your thoughts?
  2. We might be able to use API calls but see no Enterprise Studio API calls.  So apart from logs, is there any other opportunity to discover the status of an event on a server programmatically?
  3. Is the TSEVENTDAT table any use here?  It used to be but I understand that the tables is now tidied up automatically so can’t guarantee historic/runtime information to monitor – am I right?  Any other ideas?


Error when trying to mark a record as InactiveOpen in a New Window

ERROR ServiceStack.ServiceHost.DtoUtils - ServiceBase<TRequest>::Service Exception
ServiceStack.Common.Web.HttpError: Date Inactive cannot be set to a date in the future. ---> ServiceStack.Common.Web.HttpError: Date Inactive cannot be set to a date in the future.
--- End of inner exception stack trace ---
at HP.HPTRIM.Service.TrimObjectUpdater`1.update(T request, IRequestContext requestContext, Action`1 action)
at HP.HPTRIM.Service.RecordDocumentServiceBase.DoPost(Record request)
at HP.HPTRIM.Service.RecordDocumentService.Post(Record request)
at ServiceStack.ServiceHost.ServiceRunner`1.Execute(IRequestContext requestContext, Object instance, TRequest request)

The client is sending it's current time as the NewInactiveTime on the MakeInactiveAction, but the server rejects it because it's time is different.

Is there a way to handle this, as the client doesn't know what the server's time is ?



Create TR5 file using WebService APIOpen in a New Window


Is there a service call to create a TR5 file of a record in RM 8.3 WebService API?



Contact Us

Vivit Worldwide
P.O. Box 18510
Boulder, CO 80308

Email: info@vivit-worldwide.org


Vivit's mission is to serve
the Hewlett Packard
Enterprise User
Community through
Advocacy, Community,
and Education.