Skip to main content

This is necessary in order for a third-party service to be able to connect to K2 and manipulate data in K2 (Create Edit Read List methods)

 

 

 

Hi,

 

Please have a look at this document:
Using SmartObjects to integrate with other systems and technologies

 

Kind Regards

Prineel


This is a little different.
I don't need to work with a third party service in K2.
I need to open access to some kind of SmartObject in K2.
And a third-party service connected to the published K2 SmartObject and worked with them.

There is a “SmartObject OData API”, but only List.
And I still need to create, update, read


Hi, 

Please have a look at this:
 

SmartObject OData API

The SmartObject OData API lets you retrieve and interact with SmartObject data through the K2 OData feed in JSON format. The SmartObject OData v3 API supports a single List method. The SmartObject OData v4 API supports all SmartObject methods.

 Before you can use this API, enable it in the K2 Management site. See the following topics in the User Guide for more information:

 

Pay attention to the considerations for using the SmartObject OData API.

For sample code that illustrates how to interact with the OData v3 API, see the topics Using the SmartObject OData v3 API in C# and Using the SmartObject OData v3 API in JavaScript. These samples use Basic authorization, but you can also use OAuth by setting the header up correctly and confirming that AAD Consent has been granted.

For examples of OData v4 endpoints see the topic SmartObject OData API v4 endpoints and for sample code that illustrates how to interact with the OData v4 API, see the topic Using the SmartObject OData API v4 in C#.

ClosedUsing OAuth instead of Basic Authentication

Tips

  • Use the K2 Management interface to refresh the OData service. You can also refresh the K2 OData service in code by calling the following endpoint: https://nk2_site_name]/api/odata/op/refresh
  • To see which SmartObjects are exposed via the OData API, just pass in the base URL to your OData feed in your code, for example https://cK2site]/api/odata/v3.
  • The endpoint is based the SmartObject System Name, not the SmartObject's Display Name.

 

Kind Regards
Prineel


Hi, Prineel
OData v4 API is only for K2 Cloud version or also for K2 Five 5.4?


Hi @US,

 

Apologies fot the late reply. It is also for K2 Five 5.4. Please find the attached PDF documents which contain information on the OData API found in K2 Five 5.4 Developer Referece document.

 

Kind Regards

Prineel


Hi, Prineel
I tryed refresh the K2 OData service

I have no way to select V4 version in the settings.
Maybe you still need to do something?
 

 


Hi @US ,

 

That seems to be the case when I also tired. Im not sure if something needs to be done first, or if it is not supported. If it is not supported then im not sure why it is in the 5.4 documentation. I recommend opening a support ticket to enquire about this.

 

Kind Regards

Prineel


Reply