1

I'm currently on a project that involves OpenText Content Server 10.5 SP1 Update 2015-03.

I'm trying to find out if is possible to get all categories from the System Category Volume with one call using Java SOAP web services or REST.

On the web services side I found a couple of methods exposed by the DocumentManagement WSDL GetCategoryDefinition and GetCategoryDefinitions which require categoryIDs as argument.

On the REST side I managed to obtain access to categories but after a quite long trip:

  1. call to otcs/cs.exe?func=search.GetCategoryVolume gives as a response an URL for the subsequent call
  2. call to otcs/cs.exe?func=ll&ObjID=2005&objAction=XMLExport&scope=1 gives the id of the system category volume along with category IDs
  3. call to otcs/cs.exe?func=ll&ObjID=21361&objAction=XMLExport&scope=1 gives the required info about the category.

I would like to have a single call returning all information about categories I need.

Is it possible to achieve that?

abarisone
  • 3,707
  • 11
  • 35
  • 54

2 Answers2

2

It's possible.

What you need to do:

1.) Find all IDs of the Categories, you want the definitions for

2.) call DocumentManagementWS.getCategoryDefinitions(IDs)

example

In my project we store all Categories in Folders, and not in the CategoryVolume of Content server.

// INFO: variable dm is an instance of the documentManagement-Webservice

// 1.) read the folder of the Categories
Node categoryRoot = dm.getNodeByPath(configRoot.getID(), Arrays.asList("Categories"));

// 2.) find all Ids of the categories
List<Node> categories = dm.listNodes(categoryRoot.getID(), false);

if (categories != null) {
    for (Node category : categories) {
        if (category.getType().equals("Category")) {
            categoryIds.add(category.getID());
        }
    }
}

// 3.) Read all defintitions of the categories
List<AttributeGroupDefinition> categoryDefinitions = dm.getCategoryDefinitions(categoryIds);
duffy356
  • 3,678
  • 3
  • 32
  • 47
  • Thanks for the snippet. We store categories in folders too. Could you explain me how I can get the configRoot object? – abarisone Oct 02 '15 at 05:43
  • our configRoot - this Node gets read before - is the node, which holds all configurations. It has a nickname, so we read it by its nickname before. just call dm.getNodeByNickname("theNickname") – duffy356 Oct 02 '15 at 13:09
1

Maybe not exactly program oriented but you know about the handler "cs.exe?func=attributes.dump" ? This is the UI version of what you are asking.