Skip to main content

Hi All,

 

I have a requirement from a client to implement rest services so that external applications can interact with K2. In K2 4.7 this was done using K2 SmartObject REST services and was really easy to implement and make available to other units within an organization. 

 

To my utter and total dismay it seems that K2 has deprecated this functionality in K2 Five. There is no mention of what replaces this functionality at all:

14740i3392ADFB3B8F7A63.png

 

The OData services documentation makes no mention of being able to use CRUD operations although thats what OData is supposed to leverage, the K2 documentation also only states retrieving lists.

 

How am I supposed to expose SmartObjects ? 

 

Can anyone please shed some light on this for me, I have to either recommend that we drop K2 or come up with a solution to the problem real quick.

 

Kind regards,

Helgard Wagener

Hi Helgard;


 


Not certain of which doc specifically you went through, however could you please dive into this doc  regarding the OData service broker(http://help.k2.com/onlinehelp/K2Five/UserGuide/5.3/default.htm#ServiceBrokers/OData/K2ODataServiceBroker.htm%3FTocPath%3DAdminister%7CK2%2520Management%7CIntegration%7CService%2520Types%7CGeneric%252FEndPoints%2520Service%2520Types%7COData%7C_____0), there's listed supported methods as shown on the attachment.


 


Additionally for Endpoints REST Service Type please dive into the considerations as refferenced below:


(http://help.k2.com/onlinehelp/K2Five/UserGuide/5.3/default.htm#ServiceBrokers/EndPoints/REST_Endpoint.htm)


 


Kind regards;


Widson.




Hi Widson,

 

The articles you have linked to refer to the Service Brokers for REST and OData, this is not what I am asking about, in 4.7 K2 had the ability to expose SmartObjects through REST or WCF services:

https://help.k2.com/onlinetraining/tutorials/default.htm#Resources/Projects/SmartObjectRuntimeAPI/SmORestService.htm

 

Meaning that you could access a SmartObject created in K2 designer via the SmartObjectServices URL:

https://k2.denallix.com:8888/SmartObjectServices/endpoints/endpoints.xml

 

The above service would allow you to execute CRUD functionality on SmartObjects from external applications.

This facility has been removed or set as a legacy service.

 

K2 has replaced this with the OData functionality 

Configuring the SmartObject OData API

 

This OData API does not allow me to execute CRUD functionality. I can retrieve lists and use those lists in Excel or PowerBI but thats not my requirement, we have external systems that need to be able to interact with K2 via REST, and this is no longer supported.

 

Kind regards,

Helgard Wagener


Hi Hello123


 


Thanks for the post on the community, After reviewing the configuration on a K2 5 environment, it seems that this legacy functionality is still working as expected but only if you upgrade from 4.7 to 5 , on an Out of the box K2 5 installation this functionality is deprecated.


 


Here is my configuration in the K2HostServer.config.exe


<smoServices enableEndpoints="true" enableEvents="true" enableCrossDomainPolicy="false" specialCharacterReplacement="_" scheme="http" server="dlx.denallix.com" serviceRoot="SmartObjectServices" port="8888">


   <wcf binding="wsHttpBinding" bindingConfiguration="wsHttpBinding+Windows" />


   <rest binding="webHttpBinding" bindingConfiguration="webHttpBinding+Windows" />


   <managedEndpoints>


     <static>


       <endpoints />


     </static>


     <excluded all="false" />


   </managedEndpoints>


</smoServices>


Hi Heinrich,

 

Thanks for the reply, this is a clean 5.2 install. 

 

I understand that the functionality has been deprecated but can someone please tell me what has replaced it and how do I expose smart objects to external applications without writing custom services (ASP.NET WebAPI) to expose smart objects?

 

All the smart objects are SmartBox smart objects and short of writing a web api or some other serivce there is no way to interact with the smart object.

 

I understand its been deprecated, and OData has been put in its place but the OData documentation is so far from adequate that it makes no mention of whether it supports CRUD functionality, I have tried using the OData services to expose smart objects and execute a "create" (POST) method but no dice. 

 

The customer doesn't want a custom code implementation (ASP.Net WebAPI etc) in their environment the whole reason they went with K2 is because they don't have to write code in order  to have advanced funcationality. 


Reply