Using the GetCategories Web Method
3 min
returns the list of available categories for the service catalog request syntax publicfrsheatgetcategoriesresponse getcategories(string sessionkey, string tenantid) parameters sessionkey the session key from the connect web method tenantid the tenant for which the session key is authenticated return value frsheatgetcategoriesresponse object, defined as follows public classfrsheatgetcategoriesresponse { public string status { get; set; } public string exceptionreason { get; set; } public list\<frsheatservicereqcategory> srcategories { get; set; } } the frsheatintegrationfindboresponse class has the following fields status provides a status about the state of the connection the table below contains a full description of the available status values exceptionreason contains exception information, if the application throws an exception when running this web method srcategories contains a list of frsheatservicereqcategory objects, each of which represents the category value in the service catalog the frsheatservicereqcategory class is defined as follows public class frsheatservicereqcategory { public string strrecid; public string strname; public string strdescription; } the frsheatservicereqcategory class has the following fields strrecid the recid corresponding to the category value strname the name of the category strdescription the description for the category the following table lists the available status values and describes how to interpret them \<font color="#ffffff">status\</font>\<font color="#ffffff">explanation\</font> success successfully retrieved the list of categories in the service catalog this list is available in the srcategories field error an error was encountered during the execution of this web method inspect the corresponding exceptionreason field to determine why the web method has failed example frsheatgetcategoriesresponse getcategoriesresponse = frsvc getcategories(authsessionkey, tenantid); if (getcategoriesresponse status == "success") { foreach (frsheatservicereqcategory srcategory in getcategoriesresponse srcategories) { console writeline("category ", srcategory strname); } }
