Application Packaging Standard

Last updated 18-Mar-2019

InitWizardConfig

If implemented by the core APS type of an APS application and, consequantly, by the APS application instance, the InitWizardConfig APS type allows the latter to communicate with the platform during the product deployment. The considered APS type declares some methods that the platform can call to create a set of resources types, a service template, a service plan, and other related billing objects.

Schema

The considered APS type (download) extends the Resource APS type(s) and looks as follows:

{
  "name": "InitWizardConfig",
  "id": "http://odin.com/init-wizard/config/1.0",
  "apsVersion": "2.0",
  "implements": [
    "http://aps-standard.org/types/core/resource/1.0"
  ],
  "operations": {
    "getInitWizardConfig": {
      "path": "/getInitWizardConfig",
      "verb": "GET",
      "response": {
        "type": "Config"
      },
      "errorResponse": {
        "type": "object"
      }
    },
    "testConnection": {
      "path": "/testConnection",
      "verb": "GET",
      "errorResponse": {
        "type": "object"
      }
    },
    "validateInitWizardData": {
      "path": "/validateInitWizardData",
      "verb": "POST",
      "response": {
        "type": "object"
      },
      "errorResponse": {
        "type": "object"
      }
    }
  },
  "structures": {
    "InitWizardDefaults": {
      "type": "object",
      "properties": {
        "apsResources": {
          "type": "array",
          "items": {
            "type": "Resource"
          }
        },
        "resourceTypes": {
          "type": "array",
          "items": {
            "type": "ResourceType"
          }
        },
        "serviceTemplate": {
          "type": "ServiceTemplate"
        },
        "billingConfig": {
          "type": "BillingConfig"
        },
        "servicePlans": {
          "type": "array",
          "items": {
            "type": "ServicePlanConfig"
          }
        }
      }
    },
    "Resource": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "apsType": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "fields": {
          "type": "object"
        },
        "relations": {
          "type": "object"
        }
      }
    },
    "ResourceType": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "resClass": {
          "type": "string"
        },
        "required": {
          "type": "boolean"
        },
        "actParams": {
          "type": "object"
        }
      }
    },
    "ServiceTemplate": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "existingSTID": {
          "type": "integer"
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "ResourceTypeLimit"
          }
        },
        "active": {
          "type": "boolean"
        },
        "ownerAccount": {
          "type": "GetOwnerAccount"
        },
        "uuid": {
          "type": "string"
        }
      }
    },
    "ResourceTypeLimit": {
      "type": "object",
      "properties": {
        "rtID": {
          "type": "integer"
        },
        "limit": {
          "type": "integer"
        },
        "unlimited": {
          "type": "boolean"
        }
      }
    },
    "GetOwnerAccount": {
      "type": "object",
      "properties": {
        "accountId": {
          "type": "integer"
        },
        "accountUUID": {
          "type": "string"
        },
        "accountName": {
          "type": "string"
        },
        "accountLevel": {
          "type": "integer"
        },
        "countryCode": {
          "type": "string"
        },
        "billingCustomAttributes": {
          "type": "array",
          "items": {
            "type": "GetBillingCustomAttribute"
          }
        }
      }
    },
    "GetBillingCustomAttribute": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "BillingConfig": {
      "type": "object",
      "properties": {
        "planCategory": {
          "type": "PlanCategory"
        },
        "salesCategory": {
          "type": "SalesCategory"
        },
        "resourceCategory": {
          "type": "ResourceCategory"
        }
      }
    },
    "PlanCategory": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "taxCategoryId": {
          "type": "string"
        }
      }
    },
    "SalesCategory": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "inCCP": {
          "type": "boolean"
        },
        "expand": {
          "type": "boolean"
        }
      }
    },
    "ResourceCategory": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "taxCatId": {
          "type": "string"
        },
        "displayType": {
          "type": "string"
        },
        "sortNumber": {
          "type": "string"
        },
        "optional": {
          "type": "boolean"
        }
      }
    },
    "ServicePlanConfig": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "shortDescription": {
          "type": "string"
        },
        "longDescription": {
          "type": "string"
        },
        "nameML": {
          "type": "object"
        },
        "shortDescriptionML": {
          "type": "object"
        },
        "longDescriptionML": {
          "type": "object"
        },
        "stId": {
          "type": "integer"
        },
        "planBillingPeriod": {
          "type": "integer"
        },
        "renewOrderInterval": {
          "type": "integer"
        },
        "renewPointDays": {
          "type": "integer"
        },
        "billingModel": {
          "type": "string"
        },
        "planCategoryId": {
          "type": "integer"
        },
        "storeCategoryId": {
          "type": "integer"
        },
        "subscrPeriodType": {
          "type": "integer"
        },
        "subscrRefundType": {
          "type": "integer"
        },
        "subscrPeriod": {
          "type": "integer"
        },
        "subscrRenewalFee": {
          "type": "number"
        },
        "subscrRecurringFee": {
          "type": "number"
        },
        "subscrDepositFee": {
          "type": "number"
        },
        "subscrTrial": {
          "type": "boolean"
        },
        "subscrSetupFee": {
          "type": "number"
        },
        "subscrTransferFee": {
          "type": "number"
        },
        "subscriptionPeriods": {
          "type": "array",
          "items": {
            "type": "SubscriptionPeriod"
          }
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "ResourceRate"
          }
        }
      }
    },
    "SubscriptionPeriod": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "externalId": {
          "type": "integer"
        },
        "trial": {
          "type": "boolean"
        },
        "periodType": {
          "type": "integer"
        },
        "refundType": {
          "type": "integer"
        },
        "period": {
          "type": "integer"
        },
        "renewalFee": {
          "type": "number"
        },
        "recurringFee": {
          "type": "number"
        },
        "depositFee": {
          "type": "number"
        },
        "setupFee": {
          "type": "number"
        },
        "transferFee": {
          "type": "number"
        },
        "msrpSetupFee": {
          "type": "number"
        },
        "msrpRecurringFee": {
          "type": "number"
        },
        "msrpRenewalFee": {
          "type": "number"
        },
        "msrpTransferFee": {
          "type": "number"
        }
      }
    },
    "ResourceRate": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "object"
        },
        "composite": {
          "type": "boolean"
        },
        "createPlanRatePeriods": {
          "type": "boolean"
        },
        "unitOfMeasure": {
          "type": "string"
        },
        "inCP": {
          "type": "boolean"
        },
        "setupFee": {
          "type": "number"
        },
        "overFee": {
          "type": "number"
        },
        "rtID": {
          "type": "integer"
        },
        "billingResourceID": {
          "type": "integer"
        },
        "max": {
          "type": "number"
        },
        "min": {
          "type": "number"
        },
        "measurable": {
          "type": "boolean"
        },
        "rFeePerUnit": {
          "type": "boolean"
        },
        "sFeePerUnit": {
          "type": "boolean"
        },
        "instore": {
          "type": "boolean"
        },
        "recFee": {
          "type": "number"
        },
        "incl": {
          "type": "number"
        },
        "resourceCategoryId": {
          "type": "integer"
        },
        "periods": {
          "type": "array",
          "items": {
            "type": "ResourceRatePeriod"
          }
        },
        "msrpSetupFee": {
          "type": "number"
        },
        "msrpRecurringFee": {
          "type": "number"
        },
        "msrpOveruseFee": {
          "type": "number"
        }
      }
    },
    "ResourceRatePeriod": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "externalId": {
          "type": "integer"
        },
        "periodType": {
          "type": "integer"
        },
        "period": {
          "type": "integer"
        },
        "setupFee": {
          "type": "number"
        },
        "overFee": {
          "type": "number"
        },
        "recFee": {
          "type": "number"
        },
        "msrpSetupFee": {
          "type": "number"
        },
        "msrpRecurringFee": {
          "type": "number"
        },
        "msrpOveruseFee": {
          "type": "number"
        }
      }
    },
    "Config": {
      "type": "object",
      "properties": {
        "configurableProperties": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "defaults": {
          "type": "InitWizardDefaults"
        }
      }
    }
  }
}

Custom Operations

OPERATION VERB PATH RETURNS Description
getInitWizardConfig GET /getInitWizardConfig Config Return the default product configuration.
testConnection GET /testConnection If successful, this method returns the 200 OK standard status code. Test if the APS application instance has a connection to the original application service. Application instance should confirm readiness for provision by returning the 200 OK status.
validateInitWizardData POST /validateInitWizardData If successful, this method returns the 200 OK standard status code. Check if the product configuration is correct. Application instance should confirm the correctness by returning the 200 OK status.

getInitWizardConfig

HTTP Request

GET /aps/2/resources/{aps-id}/getInitWizardConfig

Description

Return the default product configuration.

Returns

Config

testConnection

HTTP Request

GET /aps/2/resources/{aps-id}/testConnection

Description

Test if the APS application instance has a connection to the original application service. Application instance should confirm readiness for provision by returning the 200 OK status.

Returns

If successful, this method returns the 200 OK standard status code.

validateInitWizardData

HTTP Request

POST /aps/2/resources/{aps-id}/validateInitWizardData

Description

Check if the product configuration is correct. Application instance should confirm the correctness by returning the 200 OK status.

Returns

If successful, this method returns the 200 OK standard status code.

Structures

BillingConfig

Contains the billing categories that service plans require.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
planCategory PlanCategory Not Required   Plan category.
resourceCategory ResourceCategory Not Required   Resource category.
salesCategory SalesCategory Not Required   Sales category.

Config

The InitWizardConfig method returns this structure. The structure contains two other structures, a list of configurable global properties and the main structure with the default product configuration.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
configurableProperties String array Not Required   A list of global properties that can be configured by the provider in the product deployment wizard.
defaults InitWizardDefaults Not Required   TBD

GetBillingCustomAttribute

Custom attribute attached to a billing object, i.e. to an account

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
id String Not Required    
value String Not Required    

GetOwnerAccount

Describes account owning the service template

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
accountId Integer Not Required    
accountLevel Integer Not Required    
accountName String Not Required    
accountUUID String Not Required    
billingCustomAttributes GetBillingCustomAttribute array Not Required    
countryCode String Not Required    

InitWizardDefaults

The main structure in the Init Wizard configuration that defines the default product deployment.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
apsResources Resource array Not Required   APS resource list.
billingConfig BillingConfig Not Required   Billing configuration containing necessary billing categories.
resourceTypes ResourceType array Not Required   A list of resource types.
servicePlans ServicePlanConfig array Not Required   A list of service plans.
serviceTemplate ServiceTemplate Not Required   A service template configuration.

PlanCategory

Every service plan must be bound to a plan category.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
description String Not Required   Description.
id Integer Not Required   Plan category ID in the platform.
name String Not Required   Name.
taxCategoryId String Not Required   Tax category.

Resource

Declares the properties of the APS reference resources to be used for creating resource types.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
apsType String Not Required   The ID of the APS type the resource is based on.
fields key-value pairs of custom values Not Required   A set of properties with the values to be assgined in the new resource.
id String Not Required   APS ID of the resource.
relations key-value pairs of String Not Required   Relationship with other APS types.
type String Not Required   The APS type the reference resource is based on.

ResourceCategory

Resource categories are used to configure resource rates in service plans.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
description String Not Required   Description.
displayType String Not Required   Defines one of the ways a customer can choose resources in this category, either by selecting check-boxes (default) or by selecting a radio-button (radio).
id Integer Not Required   A digital ID unique in scope of the present wizard data. For the sake of reliability, assign a negative digit to avoid confusion with an ID of a category existing in the platform. When creating the resource category, the platform will assign a unique ID to that category.
name String Not Required   Name.
optional Boolean Not Required   Defines if resources of this category are optional for customers.
sortNumber String Not Required   Sort number.
taxCatId String Not Required   Tax category ID the resource category is bound to.

ResourceRate

A resource rate in a service plan is used to present a resource with the price that usually depends on the resource amount. This allows the customers to purchase the amount of the resource they actually need.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
billingResourceID Integer Not Required   The ID of the billing resource the resource rate must represent.
composite Boolean Not Required   Is resource must be a composite.
createPlanRatePeriods Boolean Not Required   If {@code true}, then plan rate periods will be created.
id Integer Not Required   Resource rate id.
inCP Boolean Not Required   Defines if the resource rate must be available in the customer control panel (CCP).
incl Real Not Required   Included resource amount.
instore Boolean Not Required   Defines if the resource rate is available in the online store.
max Real Not Required   The upper limit of the resource usage.
measurable Boolean Not Required   Defines if the resource is measurable, that is the BSS will account the current resource use and detect the resource overuse.
min Real Not Required   The lower limit of the resource usage.
msrpOveruseFee Real Not Required   MSRP overuse (cost for additional) fee.
msrpRecurringFee Real Not Required   MSRP recurring fee.
msrpSetupFee Real Not Required   MSRP setup fee.
name key-value pairs of String Not Required   Name.
overFee Real Not Required   The fee for the overused amount per resource unit.
periods ResourceRatePeriod array Not Required   A list of ResourceRatePeriod objects.
rFeePerUnit Boolean Not Required   Specifies if the recurring fee is accounted per resource unit.
recFee Real Not Required   Recurring fee (paid once per billing period) assigned per the whole resource or the resoure unit as specified by the {@link #rFeePerUnit} property.
resourceCategoryId Integer Not Required   Resource category id
rtID Integer Not Required   The ID of the oss resource the resource rate must represent.
sFeePerUnit Boolean Not Required   Specifies if the setup fee is accounted per resource unit.
setupFee Real Not Required   The one-time price for the resource setup.
unitOfMeasure String Not Required   Unit of Measure

ResourceRatePeriod

Resource rate period.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
externalId Integer Not Required    
id Integer Not Required   Resource rate period ID.
msrpOveruseFee Real Not Required   MSRP overuse (cost for additional) fee.
msrpRecurringFee Real Not Required   MSRP recurring fee.
msrpSetupFee Real Not Required   MSRP setup fee.
overFee Real Not Required   The fee for the overused amount per resource unit.
period Integer Not Required   Resource rate period length measured in the units defined by {@link #periodType}.
periodType Integer Not Required   Defines a digital code of the unit to measure the resource rate period length, either 2 (months) or 3 (years).
recFee Real Not Required   Recurring fee (paid once per billing period) assigned per the whole resource or the resource unit as specified by the {@link ResourceRate#getRFeePerUnit()}.
setupFee Real Not Required   The one-time price for the resource setup.

ResourceType

This APS type is used to create resource types in the platform.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
actParams key-value pairs of String Not Required   Contains two activiation parameters, the service_id referring to the respective application service and the autoprovide_service that requires auto-provisioning of the resource type (1) or not (0). Typically, auto-provisioning is required for the singular resource representing an account as a tenant in a multitenant application.
description String Not Required   Description.
id Integer Not Required   A digital ID unique in scope of the present wizard data. For the sake of reliability, assign a negative digit to avoid confusion with an ID of a resource type existing in the platform. The platform will assign a unique ID when creating the required resource type.
name String Not Required   Name.
required Boolean Not Required   Specifies if the resource type is a required resource in a service template.
resClass String Not Required   The internal code of the platform built-in resource class that the resource type is based on. For example, for a reference resource, it must be rc.saas.service.link.

ResourceTypeLimit

This APS type is used to include a resource type into a service template.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
limit Integer Not Required   The upper limit on the resource.
rtID Integer Not Required   The ID of the resource type to be included into the service template.
unlimited Boolean Not Required   If true, the resource consumption is unlimited, that is the limit is invalid.

SalesCategory

To make a service plan available for sale, it must be added to a sales category.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
description String Not Required   Description.
expand Boolean Not Required   If true, the sales category will be opened to show all its service plans. Otherwise, the user must click it to see the included service plans.
id Integer Not Required   A unique ID of the sales category. For the sake of reliability, assign a negative digit to avoid confusion with an ID of a category existing in the platform. The platform will assign a unique ID to the new category.
inCCP Boolean Not Required   Specifies if the sales category along with its service plans is available in the customer control panel (CCP).
name String Not Required   Name.

ServicePlanConfig

Service plans are the main products used to sell application services.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
billingModel BillingModel Not Required   Billing model.
id Integer Not Required   A digital ID unique in scope of the wizard data. For the sake of reliability, assign a negative digit to avoid confusion with an ID of a service plan existing in the platform. The platform will assign a unique ID when creating the required service plan.
longDescription String Not Required   Long description.
longDescriptionML key-value pairs of String Not Required   Multilang long description.
name String Not Required   Name.
nameML key-value pairs of String Not Required   Multilang name.
planBillingPeriod Integer Not Required   Defines the number of months in the billing period of the service plan.
planCategoryId Integer Not Required   Plan Category Id.
renewOrderInterval Integer Not Required   Defines a digital code of the renewal order interval, either 0 (auto-renewal is disabled), 5 (the renewal order is generated on the last statement day), or 15 (the renewal order is generated before the subscription expiration date).
renewPointDays Integer Not Required   Specifies a number of days before the subscription expiration date when a renewal order must be generated. This is valid when {@link #renewOrderInterval} is 15.
resources ResourceRate array Not Required   A list of ResourceRate objects.
shortDescription String Not Required   Short description.
shortDescriptionML key-value pairs of String Not Required   Multilang short description.
stId Integer Not Required   The ID of the service template the service plan is based on.
storeCategoryId Integer Not Required   Store category Id.
subscrDepositFee Real Not Required   Subscription deposit fee.
subscrPeriod Integer Not Required   Subscription period length measured in the units defined by {@link #subscrPeriodType}.
subscrPeriodType Integer Not Required   Defines a digital code of the unit to measure the subscription period length, either 2 (months) or 3 (years).
subscrRecurringFee Real Not Required   Subscription recurring fee, that is the price per billing period.
subscrRefundType Integer Not Required   Defines a digital code of the subscription refund type.
subscrRenewalFee Real Not Required   Subscription renewal fee.
subscrSetupFee Real Not Required   Subscription setup fee.
subscrTransferFee Real Not Required   Subscription transfer fee.
subscrTrial Boolean Not Required   Defines if the subscriptions based on the service plan will be trial.
subscriptionPeriods SubscriptionPeriod array Not Required   Subscription periods.

ServiceTemplate

The structure of the service template inside the default deployment configuration structure.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
active Boolean Not Required    
existingSTID Integer Not Required   Existing service template ID.
id Integer Not Required   A digital ID unique in scope of the present wizard data. For the sake of reliability, assign a negative digit to avoid confusion with an ID of a service template existing in the platform. The platform will assign a unique ID when creating the required service template.
name String Not Required   Name.
ownerAccount GetOwnerAccount Not Required    
resources ResourceTypeLimit array Not Required   A list of resource types to add to the service template.
uuid String Not Required    

SubscriptionPeriod

Service plan subscription period.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
depositFee Real Not Required   Subscription deposit fee.
externalId Integer Not Required    
id Integer Not Required   Subscription period id.
msrpRecurringFee Real Not Required   MSRP recurring (subscription) fee.
msrpRenewalFee Real Not Required   MSRP renewal fee.
msrpSetupFee Real Not Required   MSRP setup fee.
msrpTransferFee Real Not Required   MSRP transfer fee.
period Integer Not Required   Subscription period length measured in the units defined by {@link #periodType}.
periodType Integer Not Required   Defines a digital code of the unit to measure the subscription period length, either 2 (months) or 3 (years).
recurringFee Real Not Required   Subscription recurring fee, that is the price per billing period.
refundType Integer Not Required   Defines a digital code of the subscription refund type.
renewalFee Real Not Required   Subscription renewal fee.
setupFee Real Not Required   Subscription setup fee.
transferFee Real Not Required   Subscription transfer fee.
trial Boolean Not Required   Defines if the subscriptions based on the service plan will be trial.

Examples

Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.