Contact Us 1-800-596-4880

Generating API Documentation With Einstein Generative AI

Use generative AI to generate API documentation for REST, SOAP, AsyncAPI, and GraphQL in Exchange, streamlining how your organization manages APIs. AI simplifies your processes by creating consistent, accurate, and current content, which frees you to focus on strategic tasks and enhances developer satisfaction.

You can create documentation for API assets that don’t have any documentation. From the asset details page in Exchange, generate the documentation, then manually edit and improve the documentation. After that, publish it to make it available to everyone in your organization.

This release supports:

  • REST APIs

  • SOAP APIs

  • AsyncAPI

  • GraphQL API

Generate documentation for these APIs whether they are created using a single specification file or multiple specification files. Fragments aren’t supported.

Documentation Structure

AI-generated documentation in Anypoint Exchange standardizes API documentation, addressing inconsistency and incompleteness. The structure and format of the generated documentation is standardized across each API including fonts, headers, text size.

Generated documentation includes:

  • Overview and purpose of the API

  • Authentication requirements and security details

  • Base URL and environments

  • Detailed endpoint documentation including:

    • Request and response examples

    • Query parameters

    • Path parameters

    • Request body schemas

    • Response codes and examples

  • Error handling and status codes

  • Best practices for implementation

  • Sample code snippets

Before You Begin

Before generating API documentation with Einstein, you must have these:

Generate API Documentation with Generative AI

Generate documentation for API assets that don’t have any documentation. You can edit and save a draft as many times as you like before publishing.

Drafts aren’t visible to others until they’re published. You must publish the documentation for it to be available to your organization.
  1. Select the API from the catalog and click Generate documentation from the asset details page.

    Generate documentation button on asset details page

  2. Review the generated documentation in draft mode.

  3. To edit the AI-generated documentation, click Edit in draft mode, make your changes, and save the draft.

  4. Click Publish to make the documentation visible to everyone in your organization.

    AI-generated documentation in draft mode with Edit documentation option

For more information about editing asset documentation, see to-describe-an-asset.adoc#edit-asset-documentation.