Skip to main content
Nintex Community Menu Bar

How to call a rest api to make an instance for me ?

  • February 13, 2020
  • 5 replies
  • 799 views
  • Translate

I am new in the K2 5 environement and current i am facing this issue so kinldy can you guys help me out.

Kindly can you guys let me know the step by step procedure of calling a REST api to make an instance for me in my k2 I have tried doing it but cant understand it so please ellaborate step by step.

It will be highly appreciated.! 

Did this topic help you find an answer to your question?

Forum|alt.badge.img+7

hello  @rubab 


 


You can also watch the following video on how to create a rest service instance and smartObject


Translate

  • February 19, 2020

Hi @HulisaniN ,

Thanks for responding. I think my question was not very clear. What I am trying to do is calling K2 REST API to start a workflow instance. We are following this part of documentation for this purpose. https://help.k2.com/onlinehelp/k2five/DevRef/current/default.htm#Runtime/WF-REST-API/WF-REST-API.htm%3FTocPath%3DRuntime%2520APIs%2520and%2520Services%7CWorkflow%7CWorkflow%2520REST%2520API%7C_____0

Our eventual goal is to create K2 workflow instances from an external web application, but for now we are trying to call this service using POSTMAN. I am having issue passing values for Smart Object in ItemReferences, the documentation provided at https://help.k2.com/onlinehelp/k2five/DevRef/current/default.htm#Runtime/WF-REST-API/Workflow-REST-API-Item-References.htm%3FTocPath%3DRuntime%2520APIs%2520and%2520Services%7CWorkflow%7CWorkflow%2520REST%2520API%7CWorkflow%2520REST%2520API%2520Samples%7C_____4  tells me to pass an ID to the smart object, but I don't know how to get that id. 

Right now, an object is created in result of my API call from postman, but data is not being populated there. And clicking on that form shows error for the data object. I am attaching screenshots for the error message as well as REST API call from POSTMAN. Please let me know if anything else is needed to look into this?

 

Regards,



Translate


  • February 20, 2020

@HulisaniN 

Thanks for responding. We have already seen those articles but they are of little help because they are not starting workflow using API. In our case, process workflow works fine when we do it manually, but gives error when calling via REST API. We are using K2 FIVE 5.3 version. If there are any examples for how to fix this error while calling from API, will highly appreciate that help.

 

Regards,

Rubab Fatima


@HulisaniN&nbsp;wrote:<br><p>Good day&nbsp; <user-mention data-id="30181">@rubab&nbsp;</user-mention></p><p>&nbsp;</p><p>Thanks for the description of your problem, I did some research on the error you got when <span>clicking on that form&nbsp;</span>and found a link that may be helpful:</p><p><a href="https://community.k2.com/t5/K2-Appit-Articles/item-SmartObject-property-ID-is-a-required-property-Value-must/ta-p/82688" target="_blank" rel="noopener">https://community.k2.com/t5/K2-Appit-Articles/item-SmartObject-property-ID-is-a-required-property-Value-must/ta-p/82688</a></p><p>&nbsp;</p><p>I also found some similar problems :</p><p>1.&nbsp;<a href="https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/SmartObject-property-ID-is-a-required-property-for-selected/td-p/98544" target="_blank" rel="noopener">https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/SmartObject-property-ID-is-a-required-property-for-selected/td-p/98544</a></p><p>2.&nbsp;<a href="https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/smartobject-property-ID-is-required-property-for-selected-method/td-p/90926" target="_blank" rel="noopener">https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/smartobject-property-ID-is-required-property-for-selected-method/td-p/90926</a>&nbsp;</p><p>&nbsp;</p><p>Regards&nbsp;</p><p>Hulisani</p><hr>

Good day  @rubab&nbsp;

 

Thanks for the description of your problem, I did some research on the error you got when clicking on that form and found a link that may be helpful:

https://community.k2.com/t5/K2-Appit-Articles/item-SmartObject-property-ID-is-a-required-property-Value-must/ta-p/82688

 

I also found some similar problems :

1. https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/SmartObject-property-ID-is-a-required-property-for-selected/td-p/98544

2. https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/smartobject-property-ID-is-required-property-for-selected-method/td-p/90926 

 

Regards 

Hulisani


 

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings