Goo day VJay
I have seen a similar issue before. If you take the link and execute it in a browser does the result come back as expected or is there metadata with it? If so you can follow this article to solve it which involves wrapping the metadata in an additional object.
Article:
https://help.k2.com/onlinehelp/k2five/userguide/5.1/default.htm#ServiceBrokers/EndPoints/REST_SwaggerFileReferenceFormat.htm%3FTocPath%3DCreate%7CSmartObjects%7CIntegrating%2520with%2520other%2520systems%7CGeneric%252FEndPoints%2520Service%2520Types%7CREST%7C_____1.
I would also like to mention that K2 only supports some aspects of the swagger V2 format which can also cause a problem like this. To view that swagger version you have open the .JSON file and on the top you will see the word swagger with a version number at the back. For more information view the article listed below:
Hope this helps. If this does solve your problem or lead you to a correct answer please remember to mark this post as a Solution or Kudo To show other people with similar problems that this information is viable. Thank you
Best regards
Jacques.
Hello Jacques,
Thanks for the reference links provided.
Actually i'm using the Swagger file that is provided by Default from K2 Management --> API tab and just updating the OAuth2 URL in it and using it in creation of Custom Connector in Microsoft Flow.
I'm able to connect to K2 but the unable to perform the operation there which is giving me 401 error.
Regards,
Vijay.