What is the Arazzo Specification?

What is the Arazzo Specification?

What is the Arazzo Specification?

The short version

The Arazzo Specification is an add-on to the OpenAPI Specification. The Open API Specification deals with description of rest endpoints, whereas the Arazzo Specification deals with describing a sequence of calls to these endpoints to reach certain outcomes. For example:

While an OpenAPI Spec can describe rest API endpoints like LoginUser and GetUserProfileData, an Arazzo Spec can describe a sequence of steps to be able to get an authentication token from the LoginUser endpoint and send it in the header of a request to the GetUserProfileData endpoint to get User Profile Data.


Introduction

The OpenAPI Initiative website calls Arazzo the first “additional” specification from OpenAPI. It is only the second specification released by them after the original and popular OpenAPI Specification.

What is an Arazzo Specification?

We already know that an OpenAPI Specification is used to describe HTTP endpoints in a human as well as machine readable standardized format. Building on top of this foundation, an Arazzo Specification can describe Workflows i.e. a sequence of calls to these endpoints to reach one or many desired outcome.

What is the purpose of Arazzo?

With the introduction of OpenAPI Specifications, it has been possible to describe HTTP endpoints in great detail. We can describe the expected parameters, examples, expected outputs, rest operation, response codes and much more for an endpoint. While this standardization has been extremely useful when looking at endpoints individually, it has not been possible to describe how these endpoints work in tandem with one another. This is where the Arazzo framework comes in.

Now, developers and technical writers will be able to describe human & machine readable endpoint “workflows” in a standardized format.

Example of an Arazzo workflow

Let’s say there is a service that can tell you the current temperature in any city around the world. In order to use this service, a user first has to retrieve an authorization token by logging in.

An Arazzo specification can illustrate the above requirement in a structured workflow. Below is a stripped down illustrative version of the Arazzo Specification “Steps” for a workflow where a user intends to fetch the current temperature in Mumbai. Descriptive comments have been added to the YAML to make it easy to understand.

steps:
  - stepId: stepToLoginUser # A unique identifier for this step
    description: Login user into the system
    operationId: userLogin # This is an operationId from within a referred OpenAPI spec
    parameters: # The params that will go with the request to the endpoint described by the above operationId
      - name: username
        in: query
        value: $inputs.username # $inputs is a runtime expression which refers to a
												        # JSON passed to the Workflow that containes this step
      - name: password
        in: query
        value: $inputs.password
    successCriteria:
      - condition: $statusCode == 200
    outputs: # outputs from this step
        tokenExpires: $response.header.X-Expires-After
        authorizationToken: $response.body # This is referred in the next step under parameters
  - stepId: getTemperatureOfCity # A unique identifier for this step
    description: Fetch city temperature from GET endpoint
    operationPath: '{$sourceDescriptions.weatherDataOpenAPISpec.url}#/paths/~1getCityTemperature/get'
    # Similar to operationId present in the previous step, operationPath also refers to a specific endpoint from
    #  within a referred OpenAPI spec
    parameters: # The params that will go with the request to the endpoint described by the above operationPath
      - name: country
        in: query
        value: 'India'
      - name: city
        in: query
        value: 'Mumbai'
      - name: Authorization
        in: header
        value: $steps.userLogin.outputs.authorizationToken # This is received from the previous step viz. "stepToLoginUser"
    successCriteria:
      - condition: $statusCode == 200
    outputs:
        currentTemperature: $response.body.temperature # output from this step


Here is a diagram to visually explain the workflow:

(Interestingly, the above diagram could have been auto-generated by a tool that can parse an Arazzo Spec)

Why is something like the Arazzo Specification needed?

Before Arazzo there was no standardized method of describing API call sequences to reach a particular set of outcomes. If you maintain API services, till now the only way to describe how to use these services in tandem has been to manually write examples in end user documentation. Additionally, any changes to endpoints within your services makes it necessary to go and edit these documents manually.

With the advent of the Arazzo Specification the following will become possible,

  • Interactive user interfaces that document these workflows
  • Automated documentation generation
  • Tools that give developers the ability to describe workflows within code
  • Automated test generation for workflows
  • Client Code generation for workflows
  • AI Agents/LLMS deterministically using APIs without prior training on the API

For more information, check out the detailed Arazzo Specification here

Written by Ronil Mehta

Written by Ronil Mehta

Jun Mon 2024

More Blogs like this

An Arazzo Specification can refer to multiple OpenAPI Specs as well as other Arazzo Specs.

The existing Open API Specification deals with description of rest endpoints, while the Arazzo Specification deals with describing a sequence of calls to these endpoints to reach certain outcomes.

Number of products

(In Standard plan, Portle provides its users an option to create API documentations for up to 2 products, making it easier for you to manage your product’s documentations with just one account.)

Fully Customisable Branding feature

Portle’s users have the option to customise:

  • logo
  • Navbar,
  • dynamic link manager (customisable entirely)
  • version management border
  • Favicon
    All these can be customised with different colours & combinations.

Number of products

(In Standard plan, Portle provides its users an option to create API documentations for up to 2 products, making it easier for you to manage your product’s documentations with just one account.)

Provides API References

If you upload an OpenAPI spec based file, Portle will create the API reference doc for you! You can even directly create a spec based doc in minutes using Portle’s Lite-UI.

Published versions

Portle has no limitations for its users to publish versions of their documentations

Number of products

In free plan, Portle provides its users an option to create API documentations for one product

Support

(Portle provides its customers with premium plan a dedicated support representative, providing resolutions to your queries in no time.)

Support

Portle provides its customers with free plan access to priority slack channels - Customer care priority, feature request priority along with traditional mode of support.

Fully Customisable Branding feature

Our custom branding feature helps you create user-facing documentation that looks like an extension to your brand’s identity.

WYSIWYG Workspace

What you see is what your customers are going to see. Your Portle workspace and final output look the same, reducing back and forth between editing and previewing your docs.

Includes free Premium trial

Portle Provides free 14 days premium trial, no credit cards required

Manually edit API References

Portle allows the user to manually edit their API references , you can also use our “lite view” feature to easily add/edit your API references

Release notes

Portle's release notes feature provides a detailed log of updates and changes to your software, keeping your users informed.

Provides API References

If you upload an OpenAPI spec based file, Portle will create the API reference doc for you! You can even directly create a spec based doc in minutes using Portle’s Lite-UI.

Number of products

In premium plan, Portle provides its users an option to create API documentations for up to 4 products, making it easier for you to manage multiple product documentations with just one account.

Amazing Support

Portle provides its customers with premium plan a dedicated support representative, providing resolutions to your queries in no time.

Fully Customisable Branding feature

Our custom branding feature helps you create user-facing documentation that looks like an extension to your brand’s identity.

Includes free Premium trial

Portle Provides free 14 days premium trial for its first time users, no credit cards required.

WYSIWYG Workspace

What you see is what your customers are going to see. Your Portle workspace and final output looks the same, reducing back and forth between editing and previewing your docs.

Mobile supported versions for end user documentation

Portle provides mobile support for its end user documentation with a good looking & easy to navigate through user interface.

Allow both Open API Spec & Custom Spec

Portle provides support for both Open API Spec & Custom Spec.

Release notes

Portle provides its users with “Release notes” feature that helps in keeping logs & communicate about the technical changes to their products.

Validate API Documentations

With Portle, users can easily validate their API documentations directly through

Custom Domain Feature

Portle provides you with the option to add your own custom domain to your documentation making it an extension to your product.

Provides API References

If you upload an OpenAPI spec based file, Portle will create the API reference doc for you! You can even directly create a spec based doc in minutes using Portle’s lite-UI.

We use Cookies for essential website functions and to better understand how you use our site, so we can create the best possible experience for you.