This APS type is used to create and manage service templates in the platform. A service template contains resource types linked through the resources
relationship collection.
In this document:
The considered APS type (download
)
extends the Resource APS type(s) and looks as follows:
{
"name": "PAServiceTemplate",
"id": "http://parallels.com/aps/types/pa/serviceTemplate/1.2",
"apsVersion": "2.0",
"implements": [
"http://aps-standard.org/types/core/resource/1.0"
],
"relations": {
"account": {
"type": "http://aps-standard.org/types/core/account/1.0",
"required": true
},
"resources": {
"type": "http://aps-standard.org/types/core/resource/1.0",
"collection": true
}
},
"properties": {
"serviceTemplateId": {
"type": "integer",
"required": true
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"autoprovisioning": {
"type": "boolean"
},
"appIDs": {
"type": "array",
"items": {
"type": "string"
}
}
},
"operations": {
"limits": {
"path": "/limits",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "ResourceLimit"
}
},
"errorResponse": {
"type": "object"
}
},
"addLimit": {
"path": "/limits",
"verb": "POST",
"response": {
"type": "ResourceLimit"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"limit": {
"kind": "body",
"type": "ResourceLimit",
"required": true
}
}
},
"changeLimit": {
"path": "/limits/{rtId}",
"verb": "PUT",
"response": {
"type": "ResourceLimit"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"rtId": {
"kind": "path",
"type": "integer",
"required": true
},
"limit": {
"kind": "body",
"type": "ResourceLimit",
"required": true
}
}
},
"deleteLimit": {
"path": "/limits/{rtId}",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"rtId": {
"kind": "path",
"type": "integer",
"required": true
}
}
},
"getProvisioningCustomization": {
"path": "/provisioningCustomization",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "ServiceTemplateProvisioningCustomization"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"accountId": {
"kind": "query",
"type": "string"
},
"internalAccountId": {
"kind": "query",
"type": "string"
}
}
},
"customizeProvisioning": {
"path": "/provisioningCustomization",
"verb": "POST",
"errorResponse": {
"type": "object"
},
"access": {
"referrer": true
},
"parameters": {
"provisioningCustomization": {
"kind": "body",
"type": "array",
"required": true
}
}
}
},
"structures": {
"ResourceLimit": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"required": true
},
"title": {
"type": "string"
},
"apsId": {
"type": "string"
},
"apsType": {
"type": "string"
},
"applicationId": {
"type": "string"
},
"property": {
"type": "string"
},
"autoprovisioning": {
"type": "boolean"
},
"unit": {
"type": "string",
"required": true,
"pattern": "unit|b|kb|mb|gb|.*"
},
"limit": {
"type": "integer"
}
}
},
"ServiceTemplateProvisioningCustomization": {
"type": "object",
"properties": {
"apsType": {
"type": "string",
"required": true
},
"json": {
"type": "string",
"required": true
}
}
}
}
}
The APS type is used to manage a collection of APS resources. To get a list of resources from that collection, use the following API call:
GET /aps/2/collections/pa-service-templates?<RQL-filter>
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
serviceTemplateId |
Integer |
Required |
Identifier in the platform. |
|
name |
String |
Not Required |
Service template name in the platform. |
|
description |
String |
Not Required |
Service template description in the platform. |
|
autoprovisioning |
Boolean |
Not Required |
Specifies if autoprovisioning of its resources is allowed in the platform. |
|
appIDs |
Array of String |
Not Required |
IDs (in the URL format) of the APS applications whose resources are in the service template. |
NAME |
TYPE |
REQUIRED |
DESCRIPTION |
---|---|---|---|
account |
Yes |
The account (the provider or a reseller) related to this service template, that is the service template owner. |
|
resources |
Collection of Resource |
No |
Resources included into this service template. |
OPERATION |
VERB |
PATH |
RETURNS |
Description |
---|---|---|---|---|
GET |
/limits |
If successful, this method returns a list of ResourceLimit objects in the response body. |
Get resource limits for all resources included into the specified service template. |
|
POST |
/limits |
If successful, this method returns the added ResourceLimit object in the response body. |
Add the specified ResourceLimit into the service template. |
|
PUT |
/limits/{rtId} |
If successful, this method returns the changed ResourceLimit object in the response body |
Change the specified resource limit. |
|
DELETE |
/limits/{rtId} |
If successful, this method returns the 200 OK standard status code |
Delete the specified resource limit object from the service template. |
|
GET |
/provisioningCustomization |
Get an array of ServiceTemplateProvisioningCustomization objects used to customize resource provisioning for the current reseller. |
||
POST |
/provisioningCustomization |
If successful, this method returns a 200 OK standard status code |
Override the customizable provisioning parameters for the current reseller. |
HTTP Request
GET /aps/2/resources/{aps-id}/limits
Description
Get resource limits for all resources included into the specified service template.
Returns
If successful, this method returns a list of ResourceLimit objects in the response body.
HTTP Request
POST /aps/2/resources/{aps-id}/limits
Description
Add the specified ResourceLimit into the service template.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
limit |
New ResourceLimit |
Returns
If successful, this method returns the added ResourceLimit object in the response body.
HTTP Request
PUT /aps/2/resources/{aps-id}/limits/{rtId}
Description
Change the specified resource limit.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
rtId |
Integer |
ID of the resource type in the platform |
limit |
Updated ResourceLimit |
Returns
If successful, this method returns the changed ResourceLimit object in the response body
HTTP Request
DELETE /aps/2/resources/{aps-id}/limits/{rtId}
Description
Delete the specified resource limit object from the service template.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
rtId |
Integer |
ID of the resource type in the platform. |
Returns
If successful, this method returns the 200 OK standard status code
HTTP Request
GET /aps/2/resources/{aps-id}/provisioningCustomization
Description
Get an array of ServiceTemplateProvisioningCustomization objects used to customize resource provisioning for the current reseller.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
accountId |
String |
|
internalAccountId |
String |
Returns
HTTP Request
POST /aps/2/resources/{aps-id}/provisioningCustomization
Description
Override the customizable provisioning parameters for the current reseller.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
provisioningCustomization |
Array |
Returns
If successful, this method returns a 200 OK standard status code
The ResourceLimit structure is used to present the platform resources contained in a service template.
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
id |
Integer |
Required |
Identifier of the resource type (RT) in the platform, for example, 1000276. |
|
title |
String |
Not Required |
Resource title assigned in the APS type the resource is based on. |
|
apsId |
String |
Not Required |
The resource APS ID, such as “a3d2ab13-9acc-449e-831f-d111601bea23”. |
|
apsType |
String |
Not Required |
APS type of the resource, for example, “http://aps-standard.org/samples/basicApp/vps/1.0”. |
|
applicationId |
String |
Not Required |
Application ID, such as “http://aps-standard.org/samples/basicApp”. |
|
property |
String |
Not Required |
The resource property that the APS counter processes. |
|
autoprovisioning |
Boolean |
Not Required |
Specifies if autoprovisioning of the resource is allowed in the platform. |
|
unit |
String |
Required |
Units to measure limits and usage of a resource, such as |
|
limit |
Integer |
Not Required |
Limit on the resource as specified in the service template. Absence of the property means that the resource has no limit (unlimited). |
Defines the structure of provisioning parameters customized per reseller as explained in the Customization for Sales Channels concepts.
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
apsType |
String |
Required |
The ID of the APS type that defines the customizable provisioning parameters. This APS type must implement the Reseller Profile standard APS type. |
|
json |
String |
Required |
A string in the form of JSON with actual customizable provisioning parameters. |
Please find general description of create-read-update-delete (CRUD) operations with resources, properties, and structures respectively at:
Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.