Global Storage Forum

Global Storage Forum

Connect, collaborate, and stay informed with insights from across Storage

 View Only

Vibe Coding Infrastructure Intelligence: Codex + OpenAPI + IBM Storage Insights

By Randhir Singh posted 22 hours ago

  

Introduction


IBM Storage Insights continuously collects configuration, capacity, and performance telemetry from storage systems across your enterprise and exposes it through a rich, versioned OpenAPI specification. This spec defines every service, endpoint, schema, and workflow — from discovering storage arrays and volumes, to querying latency trends or capacity forecasts.

In the realm of large-language-model driven automation, protocols such as Model Context Protocol (MCP) have emerged to help LLMs discover and call services — but do we really need yet another layer when existing standards like OpenAPI already serve the job.

That’s where vibe coding comes in. It can be seen as another tool in developer's arsenal — alongside AI-assisted coding, automated documentation, and other intelligent workflows. This approach is especially useful in scenarios where we care less about the generated code itself and more about the results it produces. Instead of treating the OpenAPI spec as a static contract to be parsed by generators, imagine using it as shared context between you and an AI coding partner. With Codex, you can simply describe your intent — “Fetch the top storage pools by latency,” or “Show configuration drift across systems in the last 24 hours.” Codex interprets the Storage Insights OpenAPI spec, scaffolds authentication, generates the necessary API calls, and even formats results for quick visualization.

In this article we’ll explore how we can bring together Codex + OpenAPI + the IBM Storage Insights API to create a workflow where infrastructure intelligence becomes accessible through ‘vibe coding’ — where you speak, the AI codes, and IBM Storage Insights responds with clarity.

Prerequisites

  1. First, we need to create a public GitHub repo where Codex-generated code will live. This allows us to version, review, and evolve the scripts, and utilities that interact with Storage Insights. Treat this repository as your experimentation workspace — Codex will generate, modify, and commit code directly into it.

  2. Install Codex and run it at least once to get authentication out of the way
    # In your local GitHub project folder
    npm install -g @openai/codex
    export OPENAI_API_KEY="<your-key>"
    
    # Then simply run
    codex
    

    That starts an interactive session.
  3. IBM Storage Insights API Key for Your Tenant. Log in to your Storage Insights portal and generate an API key under your tenant’s account. This key authenticates your Codex-generated API calls against the Storage Insights OpenAPI endpoints.

Use Case: List of Block Storage Devices

Now, we're ready to tackle our original problem of building the application to get information about storage devices from IBM Storage Insights. First of all, provide full access by typing /approvals and selecting the mode where it has freedom to do whatever it pleases:

Next, unleash the full power of Codex models at our problem. We give it the full problem statement:
The IBM Storage Insights OpenAPI documentation is available at https://dev.insights.ibm.com/restapi/docs. I want you to download the OpenAPI spec, commit it to the repo,  and pay attention to the authentication scheme required to call its APIs. The tenant id and the API Key to be used are available in the file named creds - git ignore this file. Using the token endpoint, get a valid token, use the token to fetch the list of block storage systems. Use the token for each call until it expires. When it expires, get a new token by calling the token endpoint.
Codex will accept the task, break it down into a plan, and have a go at it.
Here's the plan you might see :
It was able to read the credentials, download the OpenAPI spec and generate token using the API Key. It used the token to call the appropriate API from the OpenAPI spec and returned a list of 108 block storage devices.

Eventually the model proceeds to push the generated code to the GitHub repository.
We can improve the visualization by asking it to format the results in a human readable form. With a prompt:
Output the result in a tabular form. Include name of the device, last probe and performance times and its status.
it will produce results in a tabular form for easy readability.

The code, entirely vibe coded using Codex, is available on my GitHub.

Summary

It took Codex a few attempts to figure out the authentication scheme to be used and use it to call the APIs discovered from the OpenAPI spec. Then it returned to Python for creating the script to check the token validity and regenerate it if it expires before using it. This example provides a practical blueprint for working with real-world OpenAPI spec to fetch information about storage systems from IBM Storage Insights.

In this walkthrough, we showed how to connect OpenAI's Codex to IBM Storage Insights via its OpenAPI spec, enabling it to

  • Understand user queries and identify APIs to invoke to fulfill the query
  • Use the API's security mechanism to invoke the API 
  • Fetch the information and format it for readability
  • Generate Python code for repeatability

0 comments
23 views

Permalink