pem.getSubscription

This method is supported by Operations starting from version 2.6.1

The pem.getSubscription allows to retrieve information about specific Operations Subscriptions.

The method has the following input parameters:

Name

Type

Short Description

subscription_id

int

Subscription ID

get_resources

boolean

If method should return Subscription resources along with general information.

This method has the following output parameters:

Name

Type

Short Description

subscription_id

int

Subscription ID

name

string

Subscription Name

c_date string Creation Date

st_id

int

Service Template ID

st_version

int

Service Template Version

owner_id

int

ID of account that own the Subscription

is_active

boolean

Is Subscription active

[resource_types]

array of structs

 

  • name

string

Name of Resource Type

  • resource_type_id

int

ID of the Resource Type

  • parent_resource_type_id

int

ID of parent Resource Type (-1 is used if Resource Type has not parent Resource Type)

  • measurement_unit

string

Unit that used for measurement of resource quantity

  • limit

bigint

Limit set for specific Resource Type

  • usage

bigint

Amount of consumed resources of specific Resource Type

  • resclass_name

string

Name of Resource Class

The resource_types output parameter will be present only if get_resources input parameter is set to 1 (true).

Note: Operations resource types are organizing tree-like structure. The pem.getSubscription method returns plain list of resource types in a sake of simplicity. However, the actual resource type tree can be reproduced using parent_resource_type_id member.