Subscription Management¶
List Subscriptions¶
Description | Endpoint |
---|---|
Find All Subscriptions | GET /api/admin/subscriptions |
Filter By User or Status | GET /api/admin/(users/{user_id})/subscriptions/(filter/{filter}) |
filter can be one of: active
, inactive
.
Schema
subscriptions
: Arrayid
: Integerlabel
: Stringexternal_id
: Stringactive
: Booleanuser
: Objectid
: Integerfull_name
: Stringemail
: Stringexternal_id
: Stringlabels
: Object
View Subscription¶
GET /api/admin/subscription/{id}
Schema
subscription
: Objectid
: Integerlabel
: Stringexternal_id
: Stringactive
: Booleanrun_rate
: Decimalsubscription_products
: Arrayid
: Integerexternal_id
: Stringactive
: Booleanstart_on
: DateTimephase_type
: Stringcreated_at
: DateTimeupdated_at
: DateTimeproduct
: Objectid
: Integerlabel
: Stringresource_kind
: Stringunit
: Stringunit_type
: Stringexternal_id
: Stringcreated_at
: DateTimeupdated_at
: DateTimepackage
: Objectid
: Integercpu
: Decimalmemory
: Integerstorage
: Integerbandwidth
: Integerlocal_disk
: Integermemory_swap
: Integermemory_swappiness
: Integerbackup
: Integer
billing_resource
: Objectid
: Integerbilling_plan_id
: Integerexternal_id
: String
container
: Objectid
: Integername
: Stringreq_state
: Stringcurrent_state
: Stringstats
: Objectlocal_ip
: Stringpublic_ip
: Stringproject_id
: Integercontainer_service_id
project_id
: Integercreated_at
: DateTimeupdated_at
: DateTimelinks
: Objectcontainer_service
: Stringlogs
: Stringproject
: String
region
: Objectid
: Integername
: String
node
: Objectid
: Integerlabel
: Stringhostname
: Stringprimary_ip
: Stringpublic_ip
: String
user
: Objectid
: Integeremail
: Stringexternal_id
: Stringlabels
: Object
Update Subscription¶
PATCH /api/admin/subscriptions/:id
Use this to upgrade or downgrade an existing service.
Will return a HTTP 200
if was successful, otherwise you will have a HTTP 40x
code and a {"errors": []}
response.
Schema
container_service
: Objectproduct_id
: The new product idqty
: The total amount of containers you want. For example, if you have 1 container and you want 2, you would set this value to 2.
Upgrade a product
{
"container_service": {
"product_id": Integer
}
}
Scale a service up or down
{
"container_service": {
"qty": Integer
}
}
Suspension¶
For integrations that rely on the subscription as their internal reference, we offer a helper api endpoint to suspend a user via their subscription.
This will suspend the user, not just the subscription.
Suspend¶
POST /api/admin/subscriptions/{subscription_id}/suspension
Unsuspend¶
DELETE /api/admin/subscriptions/{subscription_id}/suspension
Last update: 2021-12-23