Skip to content

Frames

Service Id: platform6.frames

1. Get JSON List of Frame Service Items

Header key Description Value
platform6.request.action The action to perform (required) list

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value JSON List

Example

def cm = [ headers: [ 'platform6.request.action': 'list' ] ]

print p6.service.request('platform6.frames', cm).headers['platform6.response.value']

The response will be:

[
   {
      "name": "Chevron Like Test",
      "appKey": "",
      "description": { "EN": "Chevron Like Test" },
      "enabled": false,
      "contentMode": "NONE",
      "lastModifiedBy": "admin@amalto.com",
      "lastModifiedDate": 1530267164272,
      "revisionId": "288ee9e6905c89f664cad5a3967868b9",
      "url": "https://dev.portal.amalto.com/static/applications/master/pages/template.html"
   },
   {
      "name": "Home page",
      "appKey": "",
      "description": {
         "EN": "Home page",
         "FR": "Page d'accueil"
      },
      "enabled": false,
      "contentMode": "NONE",
      "lastModifiedBy": "admin@amalto.com",
      "lastModifiedDate": 1530267164141,
      "revisionId": "d7a8391f163edbc5e9f4e44723bbcf35",
      "url": "https://dev.portal.amalto.com/static/applications/master/pages/template.html"
   }
]

2. Get Frame Item (FrameItem) as JSON

Header key Description Value
platform6.request.action The action to perform (required) get
id Service item id (required)

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value JSON Item (FrameItem)

Example

def cm = [
    headers: [
        'platform6.request.action': 'get',
        'id': 'Chevron Like Test'
    ]
]

print p6.service.request('platform6.frames', cm).headers['platform6.response.value']

If it exists it returns the item (see below), otherwise, it returns null.

{
   "name": "Chevron Like Test",
   "appKey": "",
   "description": { "EN": "Chevron Like Test" },
   "enabled": false,
   "contentMode": "NONE",
   "lastModifiedBy": "admin@amalto.com",
   "lastModifiedDate": 1530267164272,
   "revisionId": "288ee9e6905c89f664cad5a3967868b9",
   "url": "https://dev.portal.amalto.com/static/applications/master/pages/template.html"
}