subscriptions
Creates, updates, deletes, gets or lists a subscriptions
resource.
Overview
Name | subscriptions |
Type | Resource |
Id | google.apigee.subscriptions |
Fields
The following fields are returned by SELECT
queries:
- organizations_developers_subscriptions_get
- organizations_developers_subscriptions_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Name of the API product subscription. |
apiproduct | string | Name of the API product for which the developer is purchasing a subscription. |
createdAt | string (int64) | Output only. Time when the API product subscription was created in milliseconds since epoch. |
endTime | string (int64) | Time when the API product subscription ends in milliseconds since epoch. |
lastModifiedAt | string (int64) | Output only. Time when the API product subscription was last modified in milliseconds since epoch. |
startTime | string (int64) | Time when the API product subscription starts in milliseconds since epoch. |
Successful response
Name | Datatype | Description |
---|---|---|
developerSubscriptions | array | List of all subscriptions. |
nextStartKey | string | Value that can be sent as startKey to retrieve the next page of content. If this field is omitted, there are no subsequent pages. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
organizations_developers_subscriptions_get | select | organizationsId , developersId , subscriptionsId | Gets details for an API product subscription. | |
organizations_developers_subscriptions_list | select | organizationsId , developersId | startKey , count | Lists all API product subscriptions for a developer. |
organizations_developers_subscriptions_create | insert | organizationsId , developersId | Creates a subscription to an API product. | |
organizations_developers_subscriptions_expire | exec | organizationsId , developersId , subscriptionsId | Expires an API product subscription immediately. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
developersId | string | |
organizationsId | string | |
subscriptionsId | string | |
count | integer (int32) | |
startKey | string |
SELECT
examples
- organizations_developers_subscriptions_get
- organizations_developers_subscriptions_list
Gets details for an API product subscription.
SELECT
name,
apiproduct,
createdAt,
endTime,
lastModifiedAt,
startTime
FROM google.apigee.subscriptions
WHERE organizationsId = '{{ organizationsId }}' -- required
AND developersId = '{{ developersId }}' -- required
AND subscriptionsId = '{{ subscriptionsId }}' -- required;
Lists all API product subscriptions for a developer.
SELECT
developerSubscriptions,
nextStartKey
FROM google.apigee.subscriptions
WHERE organizationsId = '{{ organizationsId }}' -- required
AND developersId = '{{ developersId }}' -- required
AND startKey = '{{ startKey }}'
AND count = '{{ count }}';
INSERT
examples
- organizations_developers_subscriptions_create
- Manifest
Creates a subscription to an API product.
INSERT INTO google.apigee.subscriptions (
data__apiproduct,
data__startTime,
data__endTime,
organizationsId,
developersId
)
SELECT
'{{ apiproduct }}',
'{{ startTime }}',
'{{ endTime }}',
'{{ organizationsId }}',
'{{ developersId }}'
RETURNING
name,
apiproduct,
createdAt,
endTime,
lastModifiedAt,
startTime
;
# Description fields are for documentation purposes
- name: subscriptions
props:
- name: organizationsId
value: string
description: Required parameter for the subscriptions resource.
- name: developersId
value: string
description: Required parameter for the subscriptions resource.
- name: apiproduct
value: string
description: >
Name of the API product for which the developer is purchasing a subscription.
- name: startTime
value: string
description: >
Time when the API product subscription starts in milliseconds since epoch.
- name: endTime
value: string
description: >
Time when the API product subscription ends in milliseconds since epoch.
Lifecycle Methods
- organizations_developers_subscriptions_expire
Expires an API product subscription immediately.
EXEC google.apigee.subscriptions.organizations_developers_subscriptions_expire
@organizationsId='{{ organizationsId }}' --required,
@developersId='{{ developersId }}' --required,
@subscriptionsId='{{ subscriptionsId }}' --required;