steampipe plugin install openapi

Table: openapi_info - Query OpenAPI Information using SQL

OpenAPI is a specification for machine-readable interface files for describing, producing, consuming, and visualizing RESTful web services. The OpenAPI Information resource provides details about the OpenAPI specification, including its version, title, description, and terms of service. This information is useful for understanding the specifics of the RESTful web service described by the OpenAPI specification.

Table Usage Guide

The openapi_info table provides insights into the OpenAPI specification of a RESTful web service. As a software developer or a DevOps engineer, explore specification-specific details through this table, including the version, title, description, and terms of service of the OpenAPI specification. Utilize it to uncover information about the specification, such as its title and description, and the version and terms of service associated with it.

Examples

Basic info

Explore the general information of an OpenAPI specification to gain insights into its title, description, version, contact details, and paths. This can be useful for understanding the overall structure and details of the API at a glance.

select
title,
description,
version,
contact,
path
from
openapi_info;
select
title,
description,
version,
contact,
path
from
openapi_info;

Get the maintainer's contact information

Explore the contact information of the maintainer to ensure effective communication and collaboration. This could be particularly beneficial for troubleshooting, seeking clarifications, or discussing potential enhancements.

select
title,
version,
contact ->> 'name' as maintainer_name,
contact ->> 'email' as maintainer_email,
path
from
openapi_info;
select
title,
version,
json_extract(contact, '$.name') as maintainer_name,
json_extract(contact, '$.email') as maintainer_email,
path
from
openapi_info;

List API specifications not using any license

Explore which API specifications are not currently using any license. This can help identify potential compliance issues or areas where licensing needs to be updated or added.

select
title,
version,
contact ->> 'name' as maintainer_name,
contact ->> 'email' as maintainer_email,
path
from
openapi_info
where
license is null;
select
title,
version,
json_extract(contact, '$.name') as maintainer_name,
json_extract(contact, '$.email') as maintainer_email,
path
from
openapi_info
where
license is null;

Schema for openapi_info

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
contactjsonbThe contact information for the exposed API.
descriptiontextA description of the API.
licensejsonbThe license information for the exposed API.
pathtext=Path to the file.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
specification_versiontextThe version of the OpenAPI specification.
terms_of_servicetextA URL to the Terms of Service for the API.
titletextThe title of the API.
versiontextThe version of the OpenAPI document.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- openapi

You can pass the configuration to the command with the --config argument:

steampipe_export_openapi --config '<your_config>' openapi_info