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 statefrom oci_apigateway_api;
select id, display_name, time_created, lifecycle_state as statefrom 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 statefrom oci_apigateway_apiwhere lifecycle_state = 'ACTIVE';
select id, display_name, time_created, lifecycle_state as statefrom oci_apigateway_apiwhere 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_createdfrom oci_apigateway_apiwhere time_created <= (current_date - interval '90' day)order by time_created;
select id, lifecycle_state, time_createdfrom oci_apigateway_apiwhere time_created <= date('now', '-90 day')order by time_created;
Schema for oci_apigateway_api
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
compartment_id | text | = | The OCID of the compartment in Tenant in which the resource is located. |
defined_tags | jsonb | Defined 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_name | text | = | A user-friendly name. Does not have to be unique, and it's changeable. |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
id | text | = | The OCID of the resource. |
lifecycle_details | text | A message describing the current lifecycleState. | |
lifecycle_state | text | = | The current state of the API. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
specification_type | text | Type of API Specification file. | |
tags | jsonb | A map of tags for the resource. | |
tenant_id | text | =, !=, ~~, ~~*, !~~, !~~* | The OCID of the Tenant in which the resource is located. |
tenant_name | text | The name of the Tenant in which the resource is located. | |
time_created | timestamp with time zone | The time this resource was created. | |
time_updated | timestamp with time zone | The time this resource was last updated. | |
title | text | Title of the resource. | |
validation_results | jsonb | Status 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