Listing Subscribers
Find out how to list existing subscribers with the API Gateway service.
Having created subscribers, you might need to list the existing subscribers. For example, you might want to see which subscribers are currently active.
To list the subscribers in a compartment using the CLI:
- Configure your client environment to use the CLI (Configuring Your Client Environment to use the CLI for API Gateway Development).
-
To list all the subscribers in a compartment, open a command prompt and run
oci api-gateway subscriber list
to list the subscribers:oci api-gateway subscriber list --compartment-id <compartment-ocid>
where:
<compartment-ocid>
is the OCID of the compartment containing the subscribers.
For example:
oci api-gateway subscriber list --compartment-id ocid1.compartment.oc1..aaaaaaaa7______ysq
If you want to list just those subscribers with a status of Active, include the
--lifecycle-state ACTIVE
parameter in the request. For example:oci api-gateway subscriber 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 ListSubscribers operation to list subscribers.