{"id":13505,"date":"2023-04-10T09:53:45","date_gmt":"2023-04-10T16:53:45","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/?p=13505"},"modified":"2023-04-10T09:56:18","modified_gmt":"2023-04-10T16:56:18","slug":"you-can-now-use-microsoft-kiota-within-visual-studio-code","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/you-can-now-use-microsoft-kiota-within-visual-studio-code\/","title":{"rendered":"You can now use Microsoft Kiota within Visual Studio Code"},"content":{"rendered":"<p>We are happy to announce that <a href=\"https:\/\/learn.microsoft.com\/en-us\/openapi\/kiota\/\">Microsoft Kiota<\/a>, our code generator for REST HTTP APIs described by OpenAPI, is now available on <a href=\"https:\/\/code.visualstudio.com\/\">Visual Studio Code<\/a> as an extension.<\/p>\n<p>Kiota is a client generator for HTTP REST APIs described by OpenAPI. The experience is available as a <a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.OpenApi.Kiota\">command-line tool<\/a> and as a <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-graph.kiota\">Visual Studio Code extension<\/a>. Kiota helps eliminate the need to take a dependency on a different API client for every API that you need to call, as well as limiting the generation to the exact API surface area you\u2019re interested in, thanks to a filtering capability.<\/p>\n<p>In a matter of seconds, you can use Kiota for the following:<\/p>\n<ul>\n<li>Search for API descriptions<\/li>\n<li>Filter and select the API endpoints you need<\/li>\n<li>Generate models and a chained method API surface in the language of your choice<\/li>\n<li>Call the API with the new client<\/li>\n<\/ul>\n<h2>Microsoft Kiota extension for Visual Studio Code<\/h2>\n<p>This Visual Studio Code extension adds a rich UI for the Kiota experience. The features include all Kiota capabilities such as search for API descriptions, filtering and generating API clients and more.<\/p>\n<h3>Getting started with the extension<\/h3>\n<p>Once the extension is installed, you will to see the commands available to you.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-1.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-13511\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-1.png\" alt=\"\u2022 Once the extension is installed, you will be able to see the commands available to you.\" width=\"903\" height=\"198\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-1.png 903w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-1-300x66.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-1-768x168.png 768w\" sizes=\"(max-width: 903px) 100vw, 903px\" \/><\/a><\/p>\n<p>Search for an API description using a keyword.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-2.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-13510\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-2.png\" alt=\"Search for an API description using a keyword.\" width=\"903\" height=\"173\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-2.png 903w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-2-300x57.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-2-768x147.png 768w\" sizes=\"(max-width: 903px) 100vw, 903px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-3.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-13509\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-3.png\" alt=\"Search results from keywords\" width=\"903\" height=\"511\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-3.png 903w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-3-300x170.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-3-768x435.png 768w\" sizes=\"(max-width: 903px) 100vw, 903px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Select the OpenAPI description you are interested in, and you will be presented with the Kiota OpenAPI Explorer containing all the available endpoints.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-4.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-13508\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-4.png\" alt=\"\u2022 Select the OpenAPI description you are interested in, and you will be presented with the Kiota OpenAPI Explorer containing all the available endpoints.\" width=\"378\" height=\"913\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-4.png 378w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-4-124x300.png 124w\" sizes=\"(max-width: 378px) 100vw, 378px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Select the endpoints to include in your API client.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-5.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-13507\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-5.png\" alt=\"Select the endpoints to include in your API client.\" width=\"450\" height=\"565\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-5.png 450w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-5-239x300.png 239w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Finally, you can generate the API client. You will be prompted to provide some parameters for your client such as the class and namespace names. You also need to select the language for the generated client.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-6.png\"><img decoding=\"async\" class=\"aligncenter wp-image-13506 size-full\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-6.png\" alt=\"Kiota generation of the GitHub API client.\" width=\"697\" height=\"226\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-6.png 697w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/04\/Kiota-VS-Code_image-6-300x97.png 300w\" sizes=\"(max-width: 697px) 100vw, 697px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Try out the extension!<\/h3>\n<p>We\u2019re excited to bring the Kiota experience to Visual Studio Code and can\u2019t wait for you to try it out. We look forward to <a href=\"https:\/\/github.com\/microsoft\/kiota\">hearing your feedback<\/a> about how we can continue to make Kiota even better.<\/p>\n<p>For more information, visit <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\">Microsoft Graph Dev Center.<\/a> Follow us on <a href=\"https:\/\/twitter.com\/Microsoft365Dev\">Microsoft 365 Developer (@Microsoft365Dev) \/ Twitter<\/a> for the latest news.<\/p>\n<p>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are happy to announce that Microsoft Kiota, our code generator for REST HTTP APIs described by OpenAPI, is now available on Visual Studio Code as an extension.<\/p>\n","protected":false},"author":95006,"featured_media":13554,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[174],"class_list":["post-13505","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph","tag-kiota"],"acf":[],"blog_post_summary":"<p>We are happy to announce that Microsoft Kiota, our code generator for REST HTTP APIs described by OpenAPI, is now available on Visual Studio Code as an extension.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/13505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/95006"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=13505"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/13505\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/13554"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=13505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=13505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=13505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}