Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Headers: Content-Type = application/json OR application/xml Accept = application/json OR application/xml

Response: 200 OK; 400 BAD REQUEST; 404 NOT FOUND, 500 INTERNAL SERVER ERROR

Request: http://localhost:9091/updates/models.json OR http://localhost:9091/updates/models

JSON Request

Code Block
languagephp
themeConfluence
{
  "id": "test",
  "description": "description update"
}

...

{"firmwareVersions":["PR150BN_2.1p5s2_VBN_HYBse","PXD01ANI_2.1p10s1_PROD_sdy"]}


FirmwareRuleTemplate


Retrieve filtered templates


GET http://<host>:<port>/firmwareruletemplate/filtered?name=MAC_RULE&key=someKey

Headers: Accept = application/json, Content-Type = application/json

Request params:

  1. Without params:
    Retrieve all firmware rule templates.
  2. 'name': 
    To filter templates by name.
  3. 'key':
    To filter by rule key
  4. 'value':
    to filter by rule value

Parameters could be combined: 

'?name=someName&value=testValue'


Import firmware rule templates


POST http://<host>:<port>/firmwareruletemplate/importAll

Headers: Accept = application/json

Content-Type = application/json


Request body is list of firmware rule templates:


Code Block
languagephp
themeConfluence
[
    {
        "id": "a1",
        "rule": {
            "negated": false,
            "condition": {
                "freeArg": {
                    "type": "STRING",
                    "name": "ipAddress"
                },
                "operation": "IS",
                "fixedArg": {
                    "bean": {
                        "value": {
                            "java.lang.String": ""
                        }
                    }
                }
            },
            "compoundParts": []
        },
        "applicableAction": {
            "type": ".RuleAction",
            "ttlMap": {},
            "actionType": "RULE_TEMPLATE",
            "active": true,
            "firmwareCheckRequired": false,
            "rebootImmediately": false
        },
        "priority": 15,
        "requiredFields": [],
        "byPassFilters": [],
        "editable": true
    }
]


Return list of firmware rule templates' ids which were imported or not:

Response body:

Code Block
languagephp
themeConfluence
{
    "NOT_IMPORTED": [],
    "IMPORTED": []
}

Response codes: 200, 400, 404, 409


FirmwareRule


Retrieve all firmware rules


GET http://<host>:<port>/firmwarerule Headers: Accept = application/json

Response body

Code Block
languagephp
themeConfluence
[
  {
    "id": "7bc69543-c33a-42c5-97dc-7c21ecf06cdb",
    "name": "testName",
    "rule": {
      "negated": false,
      "condition": {
        "freeArg": {
          "type": "STRING",
          "name": "eStbMac"
        },
        "operation": "IN_LIST",
        "fixedArg": {
          "bean": {
            "value": {
              "java.lang.String": "mac list"
            }
          }
        }
      }
    },
    "applicableAction": {
      "type": ".DefinePropertiesAction",
      "ttlMap": {},
      "actionType": "DEFINE_PROPERTIES",
      "properties": {
        "rebootImmediately": "true"
      },
      "byPassFilters": [],
      "activationFirmwareVersions": {}
    },
    "type": "RI_MACLIST",
    "active": true,
    "applicationType": "stb"
  }
]


Retrieve filtered firmware rules

GET http://<host>:<port>/firmwarerule/filtered?tepmlateId=TEST_ID&key=firmwareVersion

Headers: Accept = application/json, Content-Type = application/json

Request params:

'applicationType' param is required.

  1. 'name: 
     'name=someName'
    To filter templates by name.
  2. 'key':
    'key=someKey'
    To filter by rule key
  3. 'value':
    'value=someValue'
    to filter by rule value
  4. 'firmwareVersion':
    'firmwareVersion=testFirmwareVersion'
    to filter by firmware version
  5. 'templateId':
    'templateId=testTemplate'
    to filter by template
  6. 'applicationType':
    'applicationType=stb'
    to filter by application type

Parameters could be combined: 

'?applicationType=stb&value=someValue'


Import firmware rule

POST http://<host>:<port>/firmwarerule/importAll

Headers: Accept = application/json Content-Type = application/json

Request body is list of firmware rules:

Code Block
languagephp
themeConfluence