Creating an API plan
Configure an API plan to package a list of APIs to expose for access. Unless you add the API to a pland, the API is not exposed for access.
About this task
Attention: Because the synchronization interval is 1 second, do not use the local cache
first to enforce the rate limit with a 1-second interval. With this configuration, each peer can use
all available tokens during the interval. For example, a configuration of 10 tokens per second with
3 peers results in a condition where each peer can use 10 tokens.
To configure an API plan, provide the following settings.
- The name of the plan.
- The ID, name, version, and title of the product that the API plan belongs to. A product makes a set of APIs and plans into one offering to make available to API developers. For more information, see the API Connect information about products.
- The ID and name of the space that the product belongs to. When space is enabled for a catalog, the catalog can be partitioned to multiple spaces. Each space is used by a different API provider development team and has its own set of management capabilities that pertain specifically to the APIs in that space. Spaces enable each team to manage their APIs independently. For more information, see the API Connect information about spaces.
- The APIs to package into the plan.
- The operations to exclude. When an operation is excluded from the plan, API requests cannot access the API operation through the plan.
- The rate limit schemes that are specific to certain operations. When an operation-specific rate limit scheme is defined, this scheme is enforced instead of the rate scheme in the plan.
- The scope to apply the rate limit schemes to. You can apply the rate limit schemes per
application or per client ID. For example, an application has client IDs
client1andclient2. The rate limit is 10 calls per hour.- When the rate limit is per application, the limit is 10 calls to the API per hour from either
client1orclient2. - When the rate limit is per client ID, the limit is 10 calls to the API per hour from
client1and fromclient2.
- When the rate limit is per application, the limit is 10 calls to the API per hour from either
- GraphQL schema options that specify lists of GraphQL schema elements to remove during validation and introspection. The options apply only to the API specified in the GraphQL schema options configuration. For more information, see Configuring GraphQL schema options.
- Whether to use a rate limit definition group or named rate limit and burst limit schemes to
enforce preflow limits.
- When rate limit definition group is enabled, named preflow limit schemes are not available. Specify a group. For more information, see Configuring a rate limit definition group.
- When rate limit definition group is disabled, define preflow limit schemes.Burst limit schemes help prevent usage spikes that might damage infrastructure. The burst limit takes higher priority than the rate limit. When a message arrives within an interval, the message is first checked against the burst limit scheme.
- When the burst limit is exceeded, the message is rejected.
- When the burst limit is not exceeded, the API gateway proceeds to check the message against the rate limit scheme.
When and whether the burst limits and rate limits are applied depends on whether the API collection enforces pre-assembly limits. For more information, see API rate limits.
- The assembly rate limits to enforce when added to a rate limit assembly action. Specify whether
to use rate limit definitions or define limits in the plan. You can add one or more types of rate
limit schemes.
- The assembly rate limit schemes to enforce.
- The assembly burst limit schemes to enforce. The burst limit prevents usage spikes that might
damage the infrastructure. The burst limit takes priority over the rate limit. When a message
arrives within an interval, the message is first checked against the burst limit schemes and then
against the rate limit schemes.
- When the burst limit is exceeded, the message is rejected.
- When the burst limit is not exceeded, the API gateway checks the message against the rate limit schemes.
- The assembly count limit schemes to enforce. The count limit restricts the number of requests in progress for subsequent actions. When the count limit is exceeded, an error is generated.