Listing Usage Plans

Find out how to list existing usage plans with the API Gateway service.

Having created usage plans, you might need to list the existing usage plans. For example, you might want to see which usage plans are currently active.

    1. Open the navigation menu  and select Developer Services. Under API Management, select Gateways.
    2. Select Usage plans.

      The Usage plans list page opens. All usage plans in the selected compartment are displayed in a table.

    3. To view the usage plans in a different compartment, use the Compartment filter to switch compartments.

      You must have permission to work in a compartment to see the resources in it. If you're not sure which compartment to use, contact an administrator. For more information, see Understanding Compartments.

    4. To see more detail about an individual usage plan, select the name of the usage plan on the Usage plans list page to show the Usage plan details page.
  • To list the usage plans in a compartment using the CLI:

    1. Configure your client environment to use the CLI (Configuring Your Client Environment to use the CLI for API Gateway Development).
    2. To list all the usage plans in a compartment, open a command prompt and run oci api-gateway usage-plan list to list the usage plans:

      oci api-gateway usage-plan list --compartment-id <compartment-ocid>

      where:

      • <compartment-ocid> is the OCID of the compartment containing the usage plans.

      For example:

      oci api-gateway usage-plan list --compartment-id ocid1.compartment.oc1..aaaaaaaa7______ysq

      If you want to list just those usage plans with a status of Active, include the --lifecycle-state ACTIVE parameter in the request. For example:

      oci api-gateway usage-plan list --compartment-id ocid1.compartment.oc1..aaaaaaaa7______ysq --lifecycle-state ACTIVE

    For more information about using the CLI, see Command Line Interface (CLI). For a complete list of flags and options available for CLI commands, see CLI Help.

  • Run the ListUsagePlans operation to list usage plans.