Skip to content

Latest commit

 

History

History
190 lines (107 loc) · 6.09 KB

subscriptions.rst

File metadata and controls

190 lines (107 loc) · 6.09 KB

Subscriptions

Statuses

Every subscription has a status associated with it:

  • active: A subscription that is currently being used, either because the current time is between its start or end date or because it was the subscription for depletable resources (traffic) that is currently being used.
  • inactive: A subscription that is not currently being used, either because its not active yet or because there is another depletable resource (traffic) subscription being used.
  • expired: A subscription that has either expired or that has been depleted.

Listing

Gets the list of subscriptions of the user.

param status

filters only subscriptions in that status. Can be one of active <subscriptions-active> , inactive <subscriptions-inactive>, expired <subscriptions-expired>, all, notexpired. Default is all.

param resource

a list (comma separated) of resources. One or more of: dssd, cpu, mem, tx, ip, vlan.

statuscode 200

no error

Example request:

dumps/request_subscription_list

Example response:

dumps/response_subscription_list

Subscription duration

There are three parameters that determine the subscription's duration. All times are in UTC. Not all combinations are valid:

  • start_time: In ISO 8601 format. Defaults to the current time.
  • end_time: In ISO 8601 format.
  • period: Free form text describing the period. Ex: '2 months 1 week'.
Inputs Result
start_time end_time period
========== ======== ========= ======
True True True Error: Ambiguous.
True True False Between start_time and end_time.
True False True Period from start_time.
True False False Error: Not specific enough.
False True True Period until end_time.
False True False From now until end_time.
False False True Period from now.
False False False Error: Not specific enough.

Creating

Example request:

request_subscription_create.json

Example response:

response_subscription_create.json

Extending

Autorenewing

Schema

dumps/response_subscription_schema

Grouped subscriptions

Calculator