Design APIs with OCI Code Editor

August 17, 2022 | 4 minute read
Shyam Suchak
Senior Product Manager
Text Size 100%:

We’re pleased to announce that the newly released Oracle Cloud Infrastructure (OCI) Code Editor enables API developers to create, edit, and get instant live previews (powered by Redocly) of API descriptions written in OpenAPI 2.x or 3.x. With Cloud Editor, developers can share and collaborate on API specifications seamlessly alongside the rest of their code projects.

OCI Code Editor

OCI Code Editor provides a rich, in-console editing environment that enables you to edit code and update service workflows and scripts without switching between the Oracle Cloud Console and your local development environment. Code Editor provides a convenient way to perform common code updates for various services, such as creating and deploying Functions, editing Terraform configurations used with Resource Manager stacks, or creating and editing an API.

Code Editor includes the following features:

  • Create and edit code files in 15 languages, including Java, Python, Docker, JSON, YAML, and Terraform.

  • Out-of-the-box managed plugins for OCI services enable a seamless code editing experience

  • Git integration

  • Persists state across user sessions

  • Direct access to Cloud Shell and its 30+ cloud-based tools

  • Workspace and user management

  • Personalized user experience through multiple color themes, language localization, customizable keyboard shortcuts, customizable screen layouts, and more

How to use Code Editor to design APIs

Use the following steps to get started with using Code Editor to define APIs:

  1. From the Oracle Cloud Console, launch the Code Editor.

    A screenshot of the Gateways page with the icon for Code Editor outlined in red.

  2. For API definition, you have the following options:

    • Create a new file from scratch by navigating to the File menu.

      A screenshot of the Code Editor showing how to create an API definition.

      Write the API specification, and save it back to the home directory. Alternatively, you can close the Code Editor and reopen it to confirm file changes.

    • Clone a remote Git repository. Open the command palette with F1, ⇧⌘P, or CTRL⇧P, type and select Git Clone, and paste the Git repository’s URL.

      A screenshot of the Code Editorm showing how to link with a Git repository.

      You can make edits to the code. Observe auto-completion and syntax highlighting. Log out and log back in to pick up where you left off. The Code Editor preserves file states across sessions.

  3. To preview your API specification, use the command palette and type OpenAPI: View.

    A screenshot of the preview API documentation.

    A new tab opens, showing a preview of your API reference docs generated from your API’s definition.

  4. If you want to deploy your API, use the command line interface (CLI) to create a new API resource and then use the console to create an API Deployment from an API Resource.

    A screenshot of Code Editor with the View menu expanded showing the options to open Cloud Shell.

    A screenshot of using Cloud Shell with Code Editor.

For details on Cloud Shell for API specifications, refer to Using the CLI section in Creating an API Resource with an API Description and Using the Console to Create an API Deployment from an API Resource section in Deploying an API on an API Gateway User Guide.


OCI API Gateway service allows API developers to deploy and manage their own APIs. As part of the service, you can also store and view API definition files. With OCI Code Editor, API developers can now connect their code repository and generate a preview of an API documentation using Redoc by Redocly without having to switch between the Console and their local development environment.

We look forward to hearing your feedback.

Learn more about building APIs and generating software developer kits through the following resources:

Shyam Suchak

Senior Product Manager

Previous Post

How to create Linked Server from Microsoft SQL Server to an Oracle Autonomous Database

Ramesh Babu Donti | 4 min read

Next Post

Oracle Linux 9 cloud-ready platform images now available in OCI

Julie Wong | 5 min read