Hello All,
I'm trying to get the attribute region name (attr_#_#) from the category and attribute name but i don't find the any function.
There any Webservice to this ?
Thanks.
Duarte
I’d recommend using the Search API for that:
https://knowledge.opentext.com/knowledge/cs.dll/Open/16579994
Specifically, you’d be interested in the search.getCategory call.
Regards,
Kyle
Hello Kelly,
The method getCategory doesn't exist on Search Service (Web Services SDK) and the method Document Mamager.GetCategoryDefinition doesn't return the attribute region name (<attr_#_#>)
Kelly=Kyle. Sorry
Kyle probably meant this API
https://knowledge.opentext.com/knowledge/cs.dll?func=ll&objId=16579994&objAction=browse&viewType=1
From: eLink Entry: Content Web Services Forum [mailto:otdncontentwebservices971forum@elinkkc.opentext.com] Sent: Monday, March 11, 2013 11:48 AMTo: eLink RecipientSubject: [EXTERNAL]RE Get Region Name
RE Get Region Name
Posted by doliveira@glintt.com (Oliveira, Duarte) On 03-11-2013 12:29
[To post a comment, use the normal reply function]
Topic:
Get Region Name
Forum:
Content Web Services Forum
Content Server:
Knowledge Center
You posted the same URL as Kyle.
The API is different when using WebServices SDK.
From: eLink Entry: Content Web Services Forum [mailto:otdncontentwebservices971forum@elinkkc.opentext.com]Sent: Monday, March 11, 2013 11:48 AMTo: eLink RecipientSubject: [EXTERNAL]RE Get Region Name
That is correct.
We strongly recommend using the Search API that I linked to as opposed to the web services offering.
All dev efforts are going into that Search API and no further features are being added to the SearchService web services API.
OpenText advise the use of search API instead of WebServices ? WebServices is a standard for integration between heterogeneous systems.
Search API is suitable for external aplications to archive and retreive objects from Content Server (i don't find any authentication function on search api) ?
We start our development based on web services SDK and it's very critical now to change all code to search api. So there anyway to get the region name via WS ?
thanks
Hi Duarte,
The code below is my brute force approach. I don't know how reliable it is because it hasn't received a lot of testing but see how you go.
Sorry, lost the indenting on the cut-and-paste.
Cheers
Rob
private static string GetAttributeRegionId(DocumentManagement. DocumentManagementClient dc, ref DocumentManagement. OTAuthentication dmOTAuth, string CategoryName, string AttributeName)
{
// Obtain the region id (e.g. attr_123345_6) for category and attribute. Required for searches
string retVal = "" ;
DocumentManagement. Node [] categories = dc.ListNodes( ref dmOTAuth, 2004, true );
for ( int i = 0; i < (categories.Length); i++)
DocumentManagement. Node category = categories[i];
//Console.WriteLine(category.Name);
if (category.Name.ToUpper() == CategoryName.ToUpper())
DocumentManagement. AttributeGroupDefinition attributes = dc.GetCategoryDefinition( ref dmOTAuth, category.ID);
foreach (DocumentManagement. Attribute attribute in attributes.Attributes)
//Console.WriteLine(attribute.DisplayName + ", " + attribute.ID + ", " + attribute.Key + ", " + attribute.Type);
//Console.WriteLine(" region id: Attr_" + category.ID + "_" + attribute.ID);
if (attribute.DisplayName.ToUpper() == AttributeName.ToUpper())
//Console.WriteLine(" Found Attr_" + category.ID + "_" + attribute.ID);
retVal = "Attr_" + category.ID + "_" + attribute.ID;
}
return retVal;
The features of the SearchService API are still supported, however, no new features will be added to the SearchService to extend what’s already shipping.
I was suggesting that any new development should use the Search API if you’d like to take advantage of any new features being added to product (e.g., the getCategory function).
The SearchService web service, as you have probably noticed, is not easy to use.
Parsing the response correctly without having an example, such as the one I posted, is difficult to do.
Customers and partners have noted that the Search API is easier to comprehend and provides a much richer set of features.
If you’re already using the Web Services APIs, that’s fine. However, you will be unable to take advantage of some of these other features only available to the Search API without calling it separately.
Rob’s example posted here is a good approximation to how the region names are generated (Attr_CATID_ATTRID), however, it should probably be extended to only return region names for attributes marked as “Show in Search”.
Attributes with that checkbox disabled are not searchable.
Hi Rob,
You code is fine for my needs.
Thanks a lot.
Kyle,
I just don't understand how to pass the authentication with the search API. I didn't find information on API documentation.
Can you give me some sample how to access to search API from an external application ?
If you’re using standard Content Server authentication in the web service, the authentication token you get back from AuthenticateUser can be used as the value for the “LLCookie” cookie.
This cookie, when passed in with a Search API request, will allow you to pass in an authenticated request.
Hello Kyle
I'm trying to connect from a remote sever to ontent server but when i treid to get the category list xml (func=ll&ObjID=2004&objAction=XMLExport&scope=1) i get this error:
"Your request originated from a website that Content Server identified as potentially unsafe."
I'm passing the LLCookie with authentication token but doesn't work.
This is the c# code i'm using:
That message is the result of a security mechanism. See https://knowledge.opentext.com/knowledge/cs.dll/Open/14582189 for details.
To resolve your issue you'll want to include a referer header in your request that satisfies the system's security configuration.
Hope this helps,
-chris
Kyle/Jason
Could you enlighten me why putting the Authentication Token in a piece of C#/.NEt/java code to call the searchAPI
apparently to stop livelink asking for creds is a good idea? The idea of setting a cookie to livelink's URL header
is in my mind akin to hardcoding a userid/password in the request URL first to get a cookie
something like this is what I had in mind.The nextURL would take me to the searchApi
http://llappu971vm:8080/livelink/livelink.exe?func=ll.login&username=livelinkuser&password=livelinkpassword&nextURL=/livelink/livelink.exe?func=ll&objId=670175&objAction=browse&viewType=1
if HTTPS was not active in my livelink webserver involved would not the first authentication call to livelink's webservice to get a token be sending the
userid/password in clear text.I am just not understanding why putting the cookie returned from the webservice
into a livelink URL is in a way safer than justs ending the login creds in the URL.