HPE Software Products: SDK / API Support
Share |

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

Hi,

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

Hi,

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.

Thanks,

Mike

 

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>

 

<html>
<head>
<title>Error</title>

<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" />
</head>
<body>

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

</div>

 

<div id="body">

 

<div id="content">
<p>
<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/>
</p>
</div>

 

</div>


</body>
</html>

 

 

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 ?

Peter

 

Create TR5 file using WebService APIOpen in a New Window

Hello,

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

Thanks

Shameer

 

Data Port - Export - Files and Documents - Search CriteriaOpen in a New Window

Hi there

 I'm trying to export a list of files and the corresponding documents.Not sure of the search criteria that I should use for the 'saved search' which I can point for the Export operation through DataPort.

Another question, is there a way where I can ask Dataport to create a folder for each of the file it exports.
We have Records Manager 8.1.1(7898).Any help is appreciated.
Thanks.

 

Application data path (local settings) could not be located on calling ConnectOpen in a New Window

Hello,

Sorry if this is a duplicate but I made a post a few minutes earlier and it then did not appear in the forum (it was my first ever post) and there were no posts in my profile.

Anyway, on the Database object, on called the .Connect() method, it successfully logs in (if I use an invalid user I get an appropriate fail message back) I get the following error:

Accessing Temporary Folder: Application data path (local settings) could not be located.

I tried adding the logged on user to the d:\program files\hewlett-packard\hp records manager folder tree, and to the %appdata%\local\hewlett-packard and %appdata%\roaming\hewlett-packard but it was still the same. I also made the user a local admin

 

HPRM Error: Application data path (local settings) could not be locatedOpen in a New Window

Hello,

When I call on a new Database - db.Connect() using valid credentials (I know it's working because with invalid credentials I get an login fail error), it is raising an exception as follows:

Accessing Temporary Folder: Application data path (local settings) could not be located.

This is with API 8.x of HPRM

It is working in my test environment, but not in my production, which has the exact same installation of the client I believe.

thanks.

 

 

External Document StoreOpen in a New Window

Is there any documentation on what is involved in developing an External Document Store?

Under Administration -> Document Stores -> New document store -> External

 

ServiceAPI / .NET - Can you upload a file from a byte[] array?Open in a New Window

Hi all,

I'm wondering whether there's a way to create a new record and upload a file to it using the .NET ServiceAPI interface, but where the file content is contained in a byte[] array rather than an existing file on disk?

It looks like the only option is to write the content to a file and then pass a filename through to the API, which is a bit wasteful when you already have the data available in memory.

Does anyone know whether you can pass this content over to the ServiceAPI via the .NET interface, without needing to write it to a temporary file?

Many thanks!

 

How to determine the ownerOpen in a New Window

Hi

I am creating a webapp that creates a new records in HPRM8.3.
I've been able to create the record just fine however to make this happen the user must enter their business unit which I then assign as the owner. I think this is expected because the  application pool uses a services account which does not have a Orgamisation/Business value but I was wondering if anyone has a code example that determines the correct value of the owner given the username.

Our setup is that users have positions and positions are associated with Organisation/Business Units and the Organisation/Business name becomes the owner. Maybe this is incorrect and the owner is recorded somewher else

Cheers

Laurie

 

Change record container using Service API from .NET clientOpen in a New Window

Hi ,

How can I change the container of a record and add some notes using Service API from a .NET exe? Kindly advise.

Thanks

Shameer

 

 

 

URI Maximum limitOpen in a New Window

Hi,

What is the maximum limit of URI? Should it be treated as Int32 or Int64 in C#?

Thank's

 

TRIM 7.3 SDK Search with "[" characterOpen in a New Window

I need to search some records from TRIM using the typedTitle search method. Currently doing as follows; 

RecordType type = _db.GetRecordType("Document");

int typeUri = type.Uri;

 // Construct a new search object
 RecordSearch objSearch = _db.NewRecordSearch();

//Generate search string.
objSearch.QueryString = string.Format(@"typedTitle:Some title type:{0}", typeUri);

Records seachedRecords = objSearch.GetRecords();

But when the title contains [ or ] character this throws an exception. For example if the search is like below an exception is thrown "You have specified an unknown search method 'Intelligence'. Refer to HPE Records Manager documentation for a list of valid search methods."

objSearch.QueryString = string.Format(@"typedTitle:A maintenance application for Business Intelligence\[1\].doc type:{0}", typeUri);

Is there a way to search with [ or ] characters in the search string?

Thanks.

 

ServiceAPI .NET bindings - how to retrieve a Record's RecordType URI?Open in a New Window

Hi all,

I'm new to the .NET ServiceAPI bindings so please forgive this basic question!

I am retrieving a record, but I would like to find out what type of record it is, as if it is a certain record type then it will contain child records so I'll have to issue another request to retrieve the child records.

It seems straightforward to indicate which properties/fields you wish to retrieve, at least until you want to ask for the Record Type.

Records rqRecords = new Records() {
	q = "container:" + res.Results[0].Uri,
	Properties = new PropertyList(
		PropertyIds.Uri,
		PropertyIds.RecordTitle,
		PropertyIds.RecordTypeLevel
	),
};

Here, PropertyIds does not appear to have a value for the record type's Uri, nor a value for the whole record type like you would get if you used the string "RecordType" in the GET request.  If I use the RecordTypeLevel property, then later when I go to use it, it hasn't retrieved any data:

RecordsResponse rres = this.trim.Get<RecordsResponse>(req);
foreach (Record r in rres.Results) {
	Debug.Print(r.RecordType.Title); // ok
	Debug.Print(r.RecordType.Level.ToString()); // fail: r.RecordType is null
	Debug.Print(r.RecordType.Uri.ToString()); // fail: r.RecordType is null
}

The RecordType member is null, even though I asked for one of its values in the search.

However, if I ask for the whole record type as a string in the original request instead:

Properties = new PropertyList(
	PropertyIds.Uri,
	PropertyIds.RecordTitle,
	"RecordType"
),

Then it retrieves a valid RecordType object with the Uri so I can use this as needed:

Debug.Print(r.RecordType.Uri.ToString()); // all good now

I am a little confused about the disconnect between the PropertyIds not having an option for RecordType (or the RecordType's Uri), yet the options it does have for the RecordType don't actually return any data.  That and using a string instead to ask for the RecordType actually works.

Am I doing something wrong?

 

Where are the .NET bindings to the ServiceAPI?Open in a New Window

I've recently used the HPRM ServiceAPI (the REST/JSON interface) from a Linux C++ application and it worked very well.  Now I need to perform a similar task from within a C# .NET app, however although it looks like there are .NET bindings for the ServiceAPI, I can't seem to find where they are!

The ServiceAPI documentation says this:

Using the .Net Client Libraries

The .Net client libraries are installed in the folder DotNetClient, to use them:

  1. copy them to your client machine,
  2. reference them from a .Net Solution
  3. from the class in which you will call the ServiceAPI add the following using statements:
    • using HP.HPTRIM.Service.Client
    • using HP.HPTRIM.ServiceModel;

Ensure that all five DLLs are referenced:

  • HP.HPTRIM.Service.Client.dll
  • HP.HPTRIM.ServiceModel.dll
  • ServiceStack.Common.dll
  • ServiceStack.Interfaces.dll
  • ServiceStack.Text.dll

But I can't find those DLLs.  They aren't included in any of the installation files I have, and they aren't installed on a machine with HPRM Desktop installed.  I can't see a "DotNetClient" folder anywhere.

Whereabouts do you obtain these DLLs from?

I am hoping using these will work better than the .NET SDK as from what I read this will be slowly phased out, and it's not as easy to work with either (e.g. you need HPRM installed on the machine running the .NET app, which is not so great for a server-side program, and you can't easily specify which user to connect to in the event that the service account running your app does not have HPRM access.)

For this reason I'd like to stick with the REST/JSON ServiceAPI interface, however before I go down the path of issuing raw HTTP GET/POST commands and deserialising the JSON myself, I'd like to investigate the above .NET library as it looks like it handles all this already.

Any pointers to where you can obtain this will be much appreciated!

Contact Us

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

Email: info@vivit-worldwide.org

Mission

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