How to get the User list on content server using CWS API

Hi,

Is there any way to list all the users in Content Server using CWS API.
OR
Is there any way to fetch direct user name who created the File/Folder/Collection etc, instead user id.

Thanks,
Thiru

Tagged:

Comments

  • There is a way, by using the MemberService's SearchForMembers function.

    // set to an empty string to match everything
    string searchString = "";

    // Create the search options to find all members
    MemberSearchOptions searchOptions = new MemberSearchOptions();
    searchOptions.Scope = SearchScope.SYSTEM;
    searchOptions.Filter = SearchFilter.USER;
    searchOptions.Column = SearchColumn.NAME;
    searchOptions.Matching = SearchMatching.CONTAINS;
    searchOptions.Search = searchString;
    searchOptions.PageSize = pageSize;

    // Get the initial page handle for our search results PageHandle
    pageHandle = MemberServiceInstance.SearchForMembers(ref fOTAuth, searchOptions);

    MemberSearchResults results = MemberServiceInstance.GetSearchResults(ref fOTAuth, pageHandle);

  • Thanks for your response,

    I am just going through the CWS API Getting started guide, and I could not find MemberService's .
    Do we need to import wsdl for MemberService as well, if yes where can I find the wsdl location of this service.

    Thanks,
    Thiru

  • The MemberService should be under the same directory as the other ones (ex. {CS install dir}\webservices\dotnet\cws).

    https://knowledge.opentext.com/knowledge/cs.dll?func=ll&objId=45500683&objAction=browse&viewType=1

    Under the 'Getting Started (C#)' section > "Add a Service Reference" > step 5.

  • In the future please direct all CWS related questions to the forum located on the knowledge center. Developer.opentext.com is intended to provide support for REST API specific questions.