pem.getServiceTemplate

This method is supported by Operations starting from version 2.6.1

This method allows retrieving information about specific service template.

The method has the following input parameters:

Name

Type

Short Description

st_id

int

Service Template ID.

get_resources

boolean

If method should return the service template's resources along with general information.

[get_full_info]

boolean

If one specifies get_full_info together with get_resources parameters and set them to 1 (true), then additional information about resource types that included into the service template would be returned. Namely, provisioning attributes and activation parameters (both resource type and service template specific).

Important: pem.getServiceTemplate being called with get_full_info parameter may consume significantly more time to be executed because of lot of loop calls. It should be rarely called this way. Only if someone actually needs comprehensive information about service template contents.

This method has the following output parameters:

Name

Type

Short Description

st_id

int

Service template ID.

version

int

Service template version.

name

string

Service template's name.

owner_id

int

ID of account that owns the service template.

is_active

boolean

Is the service template active (can be subscribed).

autoprovidable

boolean

Is the subscription based on this Service Template can be auto-provided?

[resource_types]

array of structs

 

  • name

string

Name of the resource type.

  • resclass_name

string

Name of the resource class.

  • resource_type_id

int

ID of the resource type.

  • [parent_resource_type_id]

int

ID of the parent resource type (if any).

  • measurement_unit

string

Unit that is used for measurement of resource quantity.

  • measurement_type

string

Type of resource measurement. There are the following options:

  • A – stands for "Additive" resource measurement. Resource usage is accounted and statistics are accumulated. Every next day the actual usage is added to already used amount. At the end of month a person pays for total amount used during this month. This is applicable to internet traffic for example
  • N – stands for "Not Additive" resource measurement. Resource usage is accounted every day, but not accumulated. At the end of month the daily usage is summed up and averaged. A person pays for average amount used. This is applicable to disk space for example.
  • limit

bigint

Limit set for the specific resource type.

  • [usage]

bigint

Current usage of the resource type.

  • [attributes]

array of strings

Provisioning attributes attached to this resource type.

  • [act_params]

array of structs

Activation parameters of this resource type.

  • var_name

string

Name of the activation parameter.

  • var_value

string

Activation parameter value.

  • [st_act_params]

array of structs

The service template's activation parameters.

  • var_name

string

Name of the service template's activation parameter.

  • var_value

string

Value of the service template's activation parameter.

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

Note: Operations resource types are organizing tree-like structure. The pem.getServiceTemplate 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.