steampipe plugin install oci

Table: oci_apigateway_api - Query OCI API Gateway APIs using SQL

The OCI API Gateway service provides developers with a solution to create, manage, and deploy APIs to expose OCI services or other HTTP backends. It enables the secure and efficient handling of HTTP-based API requests and responses. The service offers features such as request and response transformation, API versioning, and request validation.

Table Usage Guide

The oci_apigateway_api table provides insights into APIs within OCI API Gateway service. As a developer, you can explore API-specific details through this table, including the API's deployment status, lifecycle state, and associated metadata. Utilize it to uncover information about APIs, such as their configurations, the routes they expose, and their overall performance and health.

Examples

Basic info

Explore the basic information of your API Gateway in Oracle Cloud Infrastructure to understand its creation time and current lifecycle state. This can be useful in assessing the overall status and management of your APIs.

select
id,
display_name,
time_created,
lifecycle_state as state
from
oci_apigateway_api;
select
id,
display_name,
time_created,
lifecycle_state as state
from
oci_apigateway_api;

List active APIs

Explore which APIs are currently active in your environment. This is beneficial in managing resources and ensuring system efficiency.

select
id,
display_name,
time_created,
lifecycle_state as state
from
oci_apigateway_api
where
lifecycle_state = 'ACTIVE';
select
id,
display_name,
time_created,
lifecycle_state as state
from
oci_apigateway_api
where
lifecycle_state = 'ACTIVE';

List APIs older than 90 days

Explore which APIs have been created more than 90 days ago. This can be useful for maintaining the health of your system by identifying and potentially updating or removing outdated APIs.

select
id,
lifecycle_state,
time_created
from
oci_apigateway_api
where
time_created <= (current_date - interval '90' day)
order by
time_created;
select
id,
lifecycle_state,
time_created
from
oci_apigateway_api
where
time_created <= date('now', '-90 day')
order by
time_created;

Schema for oci_apigateway_api

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
defined_tagsjsonbDefined tags for resource. Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources.
display_nametext=A user-friendly name. Does not have to be unique, and it's changeable.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the resource.
lifecycle_detailstextA message describing the current lifecycleState.
lifecycle_statetext=The current state of the API.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
specification_typetextType of API Specification file.
tagsjsonbA map of tags for the resource.
tenant_idtext=, !=, ~~, ~~*, !~~, !~~*The OCID of the Tenant in which the resource is located.
tenant_nametextThe name of the Tenant in which the resource is located.
time_createdtimestamp with time zoneThe time this resource was created.
time_updatedtimestamp with time zoneThe time this resource was last updated.
titletextTitle of the resource.
validation_resultsjsonbStatus of each feature available from the API.

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)" -- oci

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

steampipe_export_oci --config '<your_config>' oci_apigateway_api