Application Packaging Standard

Last updated 18-Mar-2019

Resource Structure

In accordance with APS type definition, each APS resource when retrieved through API has a meta-section called aps in addition to all properties and links defined in the corresponding APS type. Resource structure example:

{
   "aps": {
      "id": "083ed7e9-935e-48a3-8894-185dbd4617b9",            // Resource identifier
      "type": "http://aps-standard.org/samples/suwizard1p/vps/1.0", // Type
      "status": "aps:ready",                                   // Resource status
      "revision": 4,                                           // Resource revision
      "modified": "2015-10-28T12:35:34Z",       // Date and time of last modification
      "subscription": "2996055a-ae6e-4337-a698-3f6fd6eba268",  // Subscription APS ID
      "schema": "/aps/2/types/140",             // APS type internal ID
      "package": {
         "id": "04f1adfb-d668-4263-ac2d-15f6833b86ce",   // Package APS ID
         "href": "/aps/2/packages/04f1adfb-d668-4263-ac2d-15f6833b86ce" // Package URI
      }
   },

   // resource properties and links
}

Depending on API request, a resource has the following properties in the aps section:

Property Type Description
aps.id string Unique identifier of the resource - each resource could be uniquely identified by its UUID within a single APSC instance.
aps.type string Unique ID of the APS type used for instantiating the resource.
aps.status string Status of the resource.
aps.revision integer A number that is auto-incremented each time the resource is updated. The property is modified along with the aps.modified property.
aps.modified string Date and time in the ISO 8601 format (ISO-8601). It indicates the UTC date-time of the latest resource modification. The property is modified along with the aps.revision property.
aps.subscription string APS ID of the subscription the resource belongs to. When a resource is created in a subscription, the latter along with the respective account obtains the owner role over the resource.
aps.schema string Reference to the APS type (resource schema) used for instantiating the resource.
aps.x509 object Application certificates, which are only provided during the application deployment process.
aps.package object The APS package of the resource application, which can be used to locate static content associated with resources of the application.

This is an example of a VPS (virtual private server) resource:

GET /aps/2/resources/083ed7e9-935e-48a3-8894-185dbd4617b9

{
   "aps":
   {
      "type": "http://aps-standard.org/samples/suwizard1p/vps/1.0",
      "id": "083ed7e9-935e-48a3-8894-185dbd4617b9",
      "status": "aps:ready",
      "revision": 4,
      "modified": "2015-10-28T12:35:34Z",
      "subscription": "2996055a-ae6e-4337-a698-3f6fd6eba268",
      "schema": "/aps/2/types/140",
      "package":
      {
         "id": "04f1adfb-d668-4263-ac2d-15f6833b86ce",
         "href": "/aps/2/packages/04f1adfb-d668-4263-ac2d-15f6833b86ce"
      }
   },
   "description": "Description",
   "hardware":
   {
      "CPU":
      {
         "number": 2
      },
      "diskspace": 16,
      "memory": 512
   },
   "name": "Host Name 1",
   "platform":
   {
      "OS":
      {
         "name": "centos6"
      }
   },
   "state": "Stopped",
   "userName": "Kelly Keppler",
   "offer":
   {
      "aps":
      {
         "link": "strong",
         "href": "/aps/2/resources/8a02848e-ffae-4705-8367-0431368ef443",
         "id": "8a02848e-ffae-4705-8367-0431368ef443"
      }
   },
   "user":
   {
      "aps":
      {
         "link": "strong",
         "href": "/aps/2/resources/905ab740-e316-4377-9817-6ab9a444e092",
         "id": "905ab740-e316-4377-9817-6ab9a444e092",
         "subscription": "2996055a-ae6e-4337-a698-3f6fd6eba268"
      }
   },
   "context":
   {
      "aps":
      {
         "link": "strong",
         "href": "/aps/2/resources/2c1945eb-ba40-4a8d-824a-fc8284687a22",
         "id": "2c1945eb-ba40-4a8d-824a-fc8284687a22",
         "subscription": "fcc7f50a-37d7-4499-9a25-4c7a66c0d3a6"
      }
   }
}

Some of the properties can be used in Resource Query Language statements:

  • “aps.id”
  • “aps.type”
  • “aps.status”
  • “aps.revision”
  • “aps.modified”
  • “aps.subscription”

For example, get a list of VPSes created in the specified subscription and show VPS names:

GET /aps/2/resources?implementing(http://aps-standard.org/samples/suwizard1p/vps/1.0),aps.subscription=eq=2996055a-ae6e-4337-a698-3f6fd6eba268,select(name)

[
   {
      "aps":
      {
         "type": "http://aps-standard.org/samples/suwizard1p/vps/1.0",
         "id": "0c5f216f-140c-4a96-9c7c-50874e186357",
         "status": "aps:ready",
         "revision": 4,
         "modified": "2015-10-27T08:36:23Z",
         "subscription": "2996055a-ae6e-4337-a698-3f6fd6eba268"
      },
      "name": "v1"
   },
   {
      "aps":
      {
         "type": "http://aps-standard.org/samples/suwizard1p/vps/1.0",
         "id": "469ec9a4-49e7-472e-b063-9453a837d8c9",
         "status": "aps:ready",
         "revision": 4,
         "modified": "2015-10-28T12:14:21Z",
         "subscription": "2996055a-ae6e-4337-a698-3f6fd6eba268"
      },
      "name": "Host Name 1"
   },
   ...
]