注意:此产品的某些方面处于 Beta 版阶段。Hybrid 安装选项是 GA。要加入 Beta 版计划,请与您的 Apigee 代表联系。

REST Resource: organizations.apiproducts

Resource: ApiProduct

JSON representation
{
  "name": string,
  "displayName": string,
  "approvalType": string,
  "attributes": [
    {
      object (Attribute)
    }
  ],
  "description": string,
  "apiResources": [
    string
  ],
  "environments": [
    string
  ],
  "proxies": [
    string
  ],
  "quota": string,
  "quotaInterval": string,
  "quotaTimeUnit": string,
  "scopes": [
    string
  ],
  "createdAt": string,
  "lastModifiedAt": string,
  "operationGroup": {
    object (OperationGroup)
  }
}
Fields
name

string

Internal name of the API product. Characters you can use in the name are restricted to: A-Z0-9._\-$ %.

Note: The internal name cannot be edited when updating the API product.

displayName

string

Name displayed in the UI or developer portal to developers registering for API access.

approvalType

string

Flag that specifies how API keys are approved to access the APIs defined by the API product.

If set to manual, the consumer key is generated and returned in "pending" state. In this case, the API keys won't work until they have been explicitly approved.

If set to auto, the consumer key is generated and returned in "approved" state and can be used immediately.

Note: Typically, auto is used to provide access to free or trial API products that provide limited quota or capabilities.

attributes[]

object (Attribute)

Array of attributes that may be used to extend the default API product profile with customer-specific metadata. You can specify a maximum of 18 attributes.

Use this property to specify the access level of the API product as either public, private, or internal.

Only products marked public are available to developers in the Apigee developer portal. For example, you can set a product to internal while it is in development and then change access to public when it is ready to release on the portal.

API products marked as private do not appear on the portal, but can be accessed by external developers.

description

string

Description of the API product. Include key information about the API product that is not captured by other fields. Comma-separated list of API resources to be bundled in the API product.

By default, the resource paths are mapped from the proxy.pathsuffix variable.

The proxy path suffix is defined as the URI fragment following the ProxyEndpoint base path. For example, if the apiResources element is defined to be /forecastrss and the base path defined for the API proxy is /weather, then only requests to /weather/forecastrss are permitted by the API product.

You can select a specific path, or you can select all subpaths with the following wildcard:

  • /**: Indicates that all sub-URIs are included.
  • /* : Indicates that only URIs one level down are included.

By default, / supports the same resources as /** as well as the base path defined by the API proxy.

For example, if the base path of the API proxy is /v1/weatherapikey, then the API product supports requests to /v1/weatherapikey and to any sub-URIs, such as /v1/weatherapikey/forecastrss, /v1/weatherapikey/region/CA, and so on. For more information, see Managing API products.

apiResources[]

string

environments[]

string

Comma-separated list of environment names to which the API product is bound. Requests to environments that are not listed are rejected.

By specifying one or more environments, you can bind the resources listed in the API product to a specific environment, preventing developers from accessing those resources through API proxies deployed in another environment.

This setting is used, for example, to prevent resources associated with API proxies in prod from being accessed by API proxies deployed in test.

proxies[]

string

Comma-separated list of API proxy names to which this API product is bound. By specifying API proxies, you can associate resources in the API product with specific API proxies, preventing developers from accessing those resources through other API proxies.

Apigee rejects requests to API proxies that are not listed.

Note: The API proxy names must already exist in the specified environment as they will be validated upon creation.

quota

string

Number of request messages permitted per app by this API product for the specified quotaInterval and quotaTimeUnit.

For example, a quota of 50, for a quotaInterval of 12 and a quotaTimeUnit of hours means 50 requests are allowed every 12 hours.

quotaInterval

string

Time interval over which the number of request messages is calculated.

quotaTimeUnit

string

Time unit defined for the quotaInterval. Valid values include minute, hour, day, or month.

scopes[]

string

Comma-separated list of OAuth scopes that are validated at runtime. Apigee validates that the scopes in any access token presented match the scopes defined in the OAuth policy associated with the API product.

createdAt

string (int64 format)

Response only. Creation time of this environment as milliseconds since epoch.

lastModifiedAt

string (int64 format)

Response only. Modified time of this environment as milliseconds since epoch.

operationGroup

object (OperationGroup)

Configuration used to group Apigee proxies or remote services with resources, method types, and quotas. The resource refers to the resource URI (excluding the base path). With this grouping, the API product creator is able to fine-tune and give precise control over which REST methods have access to specific resources and how many calls can be made (using the quota setting).

Note: The apiResources setting cannot be specified for both the API product and operation group; otherwise the call will fail.

OperationGroup

List of operation configuration details associated with Apigee API proxies or remote services. Remote services are non-Apigee proxies, such as Istio-Envoy.

JSON representation
{
  "operationConfigs": [
    {
      object (OperationConfig)
    }
  ],
  "operationConfigType": string
}
Fields
operationConfigs[]

object (OperationConfig)

Required. List of operation configurations for either Apigee API proxies or other remote services that are associated with this API product.

operationConfigType

string

Flag that specifes whether the configuration is for Apigee API proxy or a remote service. Valid values are proxy or remoteservice. Defaults to proxy. Set to proxy when Apigee API proxies are associated with the API product. Set to remoteservice when non-Apigee proxies like Istio-Envoy are associated with the API product.

OperationConfig

OperationConfig binds the resources in a proxy or remote service with the allowed REST methods and its associated quota enforcement.

JSON representation
{
  "apiSource": string,
  "operations": [
    {
      object (Operation)
    }
  ],
  "quota": {
    object (Quota)
  },
  "attributes": [
    {
      object (Attribute)
    }
  ]
}
Fields
apiSource

string

Required. API proxy or remote service name with which the resources, methods, and quota are associated.

operations[]

object (Operation)

List of resource/method pairs for the proxy/remote service, upon which quota will applied.

Note: Currently, you can specify only a single resource/method pair. The call will fail if more than one resource/method pair is provided.

quota

object (Quota)

Quota parameters to be enforced for the resources, methods, apiSource combination. If none are specified, quota enforcement will not be done.

attributes[]

object (Attribute)

Custom attributes associated with the operation.

Operation

Operation represents the pairing of REST resource path and the actions (verbs) allowed on the resource path.

JSON representation
{
  "resource": string,
  "methods": [
    string
  ]
}
Fields
resource

string

Required. resource represents REST resource path associated with the proxy/remote service.

methods[]

string

methods refers to the REST verbs as in https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html. When none specified, all verb types are allowed.

Quota

Quota contains the essential parameters needed that can be applied on a proxy/remote service, resources and methods combination associated with this API product. While setting of Quota is optional, setting it prevents requests from exceeding the provisioned parameters.

JSON representation
{
  "limit": string,
  "interval": string,
  "timeUnit": string
}
Fields
limit

string

Required. Upper limit allowed for the time interval and time unit specified. Requests exceeding this limit will be rejected.

interval

string

Required. Time interval over which the number of request messages is calculated.

timeUnit

string

Time unit defined for the interval. Valid values include minute, hour, day, or month. If limit and interval are valid, the default value is hour; otherwise, the default is null.

Methods

attributes

Updates or creates API product attributes.

create

Creates an API product in an organization.

delete

Deletes an API product from an organization.

get

Gets configuration details for an API product.

list

Lists all API product names for an organization.

update

Updates an existing API product.