Main differences between java and go implementations

 ApplicationType

In any application aware endpoint, applicationType is a mandatory query parameter.

  • BAD REQUEST (400) with error message is thrown if applicationType query parameter. is missing.
  • If applicationType specified in an associated json-input-data differs from the query parameter value, then 409 (Conflict) error message is returned.
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Id field in json for create operations

id need not be specified in the json-input. The system generates one and the same is returned as part of the response

Firmware Config

Retrieve a list of firmware configs

GET http://<host>:<port>/queries/firmwares?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json


applicationType is a mandatory parameter

Response: 200 OK OR 400 BAD REQUEST

JSON response:
[    
	{
        "id": "6e56b056-18dc-475d-b77c-db46c8e4ae9f",
        "updated": 1682695879622,
        "description": "Test description",
        "supportedModelIds": [
            "MODELID"
        ],
        "firmwareFilename": "firmware-file-name-signed.bin",
        "firmwareVersion": "FIRMWARE_VERSION",
        "applicationType": "stb",
        "firmwareDownloadProtocol": "tftp",
        "rebootImmediately": false
    }
]

NEW CHANGES:

  1. applicationType parameter is required.
  2. New fields added: updated, applicationType, firmwareDownloadProtocol, rebootImmediately.
  3. Error changed to following json structure:
JSON response
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "Model: ABC does not exist"
}

Retrieve a single firmware config by id

GET http://<host>:<port>/queries/firmwares/{firmware config id}?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType is a mandatory parameter

Response: 200 OK


JSON response
{
    "id": "6e56b056-18dc-475d-b77c-db46c8e4ae9f",
    "updated": 1682695879622,
    "description": "Test description",
    "supportedModelIds": [
       "MODELID"
    ],
    "firmwareFilename": "firmware-file-name-signed.bin",
    "firmwareVersion": "FIRMWARE_VERSION",
    "applicationType": "stb",
	"firmwareDownloadProtocol": "tftp",
	"rebootImmediately": false
}


NEW CHANGES:

  1. applicationType parameter is required.
  2. New fields added: updated, applicationType, firmwareDownloadProtocol, rebootImmediately.
  3. Error changed to following json structure:
JSON response
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "Entity with id: 6e56b056-18dc-475d-b77c-db46c8e4ae9 does not exist"
}

 

Retrieve firmware configs by modelId 

GET http://<host>:<port>/queries/firmwares/model/{modelId}?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

 applicationType is a mandatory parameter

Response: 200 OK, 400 BAD REQUEST, 404 NOT FOUND.

JSON response
[
	{
        "id": "93296dfd-68a9-40c7-87d0-ec9c2fe9fde4",
        "description": "Test description",
        "supportedModelIds": [
            "MODEL1",
            "MODEL2",
            "MODEL3"
        ],
        "firmwareFilename": "firmware-file-name-signed.bin",
        "firmwareVersion": "FIRMWARE_VERSION"
    }
]


NEW CHANGES:

  1. applicationType parameter is required.
  2. Error changed to following json structure:
JSON response
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "Entity with id: 6e56b056-18dc-475d-b77c-db46c8e4ae9 does not exist"
}

Create/update a firmware config

For creates, use POST method and don't specify id in the input json. Generated id is returned in the response.
For updates, use PUT method and id is a mandatory field in the input json.

POST http://<host>:<port>/updates/firmwares?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType is a mandatory parameter

Response: 200 OK(for successful updates), 201 CREATED (for successful creates), 400 BAD REQUEST, 409 CONFLICT

Restrictions: Description, firmwareFilename, firmwareVersion, supportedModelIds should be not empty;

JSON request
{
    "description": "new firmware config",
    "supportedModelIds": [
        "MODEL1"
    ],
    "firmwareFilename": "firmware-file-name.bin",
    "firmwareVersion": "TEST_FIRMWARE_VERSION_AAA"
}

Response

JSON response
{
    "id": "a646defa-e3eb-472a-96c4-396358419e99",
    "updated": 1688075477160,
    "description": "new firmware config",
    "supportedModelIds": [
        "ABC"
    ],
    "firmwareFilename": "firmware-file-name.bin",
    "firmwareVersion": "TEST_FIRMWARE_VERSION_AAA",
    "applicationType": "stb",
    "firmwareDownloadProtocol": "tftp",
    "rebootImmediately": false
}


NEW CHANGES:

  1. applicationType parameter is required.
  2. New response fields added: updated, applicationType, firmwareDownloadProtocol (by default tftp), rebootImmediately (by default false)
  3. Error changed to following json structure:
JSON response
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "Entity with id: 6e56b056-18dc-475d-b77c-db46c8e4ae9 does not exist"
}

Delete a firmware config by id

DELETE http://<host>:<port>/delete/firmwares/{firmware config id}?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType is a mandatory parameter

Response: 204 NO CONTENT, 404 NOT FOUND.


NEW CHANGES:

  1. applicationType parameter is required.
  2. Error changed to following json structure:
JSON response
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "\"FirmwareConfig with id does not exist\""
}

IP rules

Retrieve an ip rule list

GET http://<host>:<port>/queries/rules/ips?applicationType={type}
Headers:
Accept = application/json 
Content-Type = application/json

applicationType parameter is required.

Response: 200 OK, 400 BAD REQUEST.


JSON response
[   {
    "id": "7c68118c-5a3b-4fad-8868-aeb7ccf1430b",
    "name": "IP RULE",
    "ipAddressGroup": {
        "id": "All_Warehouse",
        "name": "All_Warehouse",
        "ipAddresses": [
            "10.10.10.10"
        ]
    },
    "environmentId": "DEV",
    "modelId": "MODEL1",
    "expression": {
        "targetedModelIds": [],
        "environmentId": "DEV",
        "modelId": "MODEL1",
        "ipAddressGroup": {
            "id": "All_Warehouse",
            "name": "All_Warehouse",
            "ipAddresses": [
                "10.10.10.10"
            ]
        }
    },
    "noop": true
} ]


NEW CHANGES:

  1. applicationType parameter is required.
  2. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Retrieve an ip rule by name

GET http://<host>:<port>/queries/rules/ips/{ipRuleName}?applicationType={type}
Headers:
Accept = application/json 
Content-Type = application/json

applicationType parameter is required.

Response: 200 OK, 400 BAD REQUEST.

JSON response
{
    "id": "7c68118c-5a3b-4fad-8868-aeb7ccf1430b",
    "name": "IP RULE",
    "ipAddressGroup": {
        "id": "All_Warehouse",
        "name": "All_Warehouse",
        "ipAddresses": [
            "10.10.10.10"
        ]
    },
    "environmentId": "DEV",
    "modelId": "MODEL1",
    "expression": {
        "targetedModelIds": [],
        "environmentId": "DEV",
        "modelId": "MODEL1",
        "ipAddressGroup": {
            "id": "All_Warehouse",
            "name": "All_Warehouse",
            "ipAddresses": [
                "10.10.10.10"
            ]
        }
    },
    "noop": true
}

NEW CHANGES:

  1. applicationType parameter is required.
  2. version=3 parameter is not working. If version=3 is specified in request java implementation returns 404 status and string error message,  webconfigadmin (golang) returns 200 status without error message.
  3. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}


Create/update an ip rule

For creates, use POST method and don't specify id in the input json. Generated id is returned in the response.
For updates, use PUT method and id is a mandatory field in the input json.

POST http://<host>:<port>/updates/rules/ips?applicationType={type}
Headers:
Accept = application/json 
Content-Type = application/json

Response:  200 OK(for successful updates), 201 CREATED (for successful creates) 400 BAD REQUEST, 409 CONFLICT

Restrictions:

Name, environmentId, modelId, ipAddressGroup should be specified.

JSON request
{
    "name": "IP RULE GOLANG API",
    "ipAddressGroup": {
        "id": "IP_RULE",
        "name": "IP_RULE",
        "ipAddresses": [
            "10.10.10.10"
        ]
    },
    "environmentId": "DEVTEST",
    "modelId": "MODEL1",
    "expression": {
        "targetedModelIds": [],
        "environmentId": "DEVTEST",
        "modelId": "MODEL1",
        "ipAddressGroup": {
            "id": "IP_RULE",
            "name": "IP_RULE",
            "ipAddresses": [
                "10.10.10.10"
            ]
        }
    },
    "noop": true
}

Response

JSON response
{
  "id": "8cbbfeb8-5fd3-4bba-ab87-5250abb54caf",
  "firmwareConfig": null,
  "name": "IP RULE GOLANG API",
  "ipAddressGroup": {
    "id": "IP_RULE",
    "name": "IP_RULE",
    "ipAddresses": [
      "10.10.10.10"
    ]
  },
  "environmentId": "DEVTEST",
  "modelId": "MODEL1",
  "expression": {
    "targetedModelIds": [],
    "environmentId": "DEVTEST",
    "modelId": "MODEL1",
    "ipAddressGroup": {
      "id": "IP_RULE",
      "name": "IP_RULE",
      "ipAddresses": [
        "10.10.10.10"
      ]
    }
  },
  "noop": true
}

NEW CHANGES:

  1. applicationType parameter is required.
  2. New fields added: firmwareConfig. Null value is returned if not specified.
  3. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Delete an ip rule

DELETE http://<host>:<port>/delete/rules/ips/{ipRuleName}?applicationType={type}
Headers:
Accept = application/json 
Content-Type = application/json

applicationType parameter is required.

Response: 204 NO CONTENT, 400 BAD REQUEST.

NEW CHANGES:

  1. applicationType parameter is required.
  2. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Location filter

Retrieve a location filter list

GET http://<host>:<port>/queries/filters/locations?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType parameter is required.


Response: 200 OK, 400 BAD REQUEST.

JSON response
[
    {
        "ipAddressGroup": {
            "id": "All_Warehouse",
            "name": "All_Warehouse",
            "ipAddresses": [
                "111.111.111.111/28",
                "111.111.111.111/27",
                "111.111.111.111/28",
            ]
        },
        "environments": null,
        "models": null,
        "httpLocation": "changed-test.com",
        "forceHttp": true,
        "id": "2456ec78-3986-4c4d-95aa-1f8d96e9c831",
        "name": "location filter go ui"
    }
]

NEW CHANGES:

  1. applicationType is a required parameter.
  2. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Retrieve a location filter by name

GET http://<host>:<port>/queries/filters/locations/{locationFilterName}?applicationType={type}
or legacy endpoint
GET http://<host>:<port>/queries/filters/locations/byName/{locationFilterName}?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Response: 200 OK, 400 BAD REQUEST.

JSON response
{
    "ipAddressGroup": {
        "id": "All_Warehouse",
        "name": "All_Warehouse",
        "ipAddresses": [                             
				"111.111.111.111/28",
                "111.111.111.111/27",
                "111.111.111.111/28",                      
						]
    },
    "environments": null,
    "models": null,
    "httpLocation": "changed-test.com",
    "forceHttp": true,
    "id": "2456ec78-3986-4c4d-95aa-1f8d96e9c831",
    "name": "location filter go ui"
}

NEW CHANGES:

  1. applicationType is a required parameter.
  2. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}


Create/update location filter

For creates, use POST method and don't specify id in the input json. Generated id is returned in the response.
For updates, use PUT method and id is a mandatory field in the input json.

POST http://<host>:<port>/updates/filters/locations?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType request parameter is required.

Response: 200 OK(for successful updates), 201 CREATED (for successful creates), 400 BAD REQUEST, 500 INTERNAL SERVER ERROR.

Restrictions:

Condition, models, environments, IPv4, location, any location (HTTP or firmware), IPv4/IPv6 should be valid

JSON request
{
    "ipAddressGroup": {
        "id": "All_Contec_Warehouse",
        "name": "All_Contec_Warehouse",           
		"ipAddresses": [
                "111.111.111.111/28",
                "111.111.111.111/27",
                "111.111.111.111/28",
            ]      
		},
    "httpLocation": "changed-test.com",
    "forceHttp": true,
    "name": "newly created location filter"
}


NEW CHANGES:

  1. applicationType is a required parameter.
  2. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}


Delete location filter by name

DELETE http://<host>:<port>/delete/filters/locations/{locationFilterName}?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType parameter is mandatory.

Response: 204 NO CONTENT, 400 BAD REQUEST


NEW CHANGES:

  1. applicationType is a required parameter.
  2. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Download location filter

Retrieve download location filter

GET http://<host>:<port>/queries/filters/downloadlocation?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType param is required.

Response: 200 OK, 400 BAD REQUEST.

JSON response
{
    "id": "DOWNLOAD_LOCATION_ROUND_ROBIN_FILTER_VALUE",
    "updated": 1682697865183,
    "type": "com.xconf.estbfirmware.DownloadLocationRoundRobinFilterValue",
    "applicationType": "stb",
    "locations": [
        {
            "locationIp": "11.111.110.11",
            "percentage": 100
        }
    ],
    "ipv6locations": [
        {
            "locationIp": "2600:1111:2271:c00:767a:abc0:12bb:ab23",
            "percentage": 100
        }
    ],
    "httpLocation": "http://localhost:8080",
    "httpFullUrlLocation": "http://localhost:8080/cgi-bin/x1-sign-redirect.pl?K=10&F=stb_cdl"
}

NEW CHANGES:

  1. applicationType is a required parameter.
  2. New response fields added: applicationType, updated.
  3. Response fields removed: rogueModels, neverUseHttp, firmwareVersions.
  4. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}


Update download location filter

POST http://<host>:<port>/updates/filters/downloadlocation?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType param is required.

Response: 200 OK, 400 BAD REQUEST, 500 INTERNAL SERVER ERROR.

Restrictions:

Location URL, IPv4/IPv6 should be valid, percentage should be positive and within [0, 100], locations should be not duplicated

JSON request
 {
    "id": "DOWNLOAD_LOCATION_ROUND_ROBIN_FILTER_VALUE",
    "type": "com.xconf.estbfirmware.DownloadLocationRoundRobinFilterValue",
    "locations": [
        {
            "locationIp": "11.11.111.11",
            "percentage": 100
        }
    ],
    "ipv6locations": [
        {
            "locationIp": “1000:abc1:123b:c00:345a:afd0:12bb:aba6",
            "percentage": 100
        }
    ],
    "httpLocation": "http://localhost:8080",
    "httpFullUrlLocation": http://localhost:8080/cgi-bin/x1-sign-redirect.pl?K=10&F=stb_cdl"
}

NEW CHANGES:

  1. applicationType is a required parameter.
  2. New response fields added: applicationType, updated.
  3. Response fields removed: rogueModels, neverUseHttp, firmwareVersions.
  4. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Environment model rules

Retrieve an environment model rule list

GET http://<host>:<port>/queries/rules/envModels?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType param is required.

Response: 200 OK, 400 BAD REQUEST.

JSON response
[
	{
        "id": "57c30790-c8ad-4341-b52f-5cd1f5f6c169",
        "name": "TEST 2",
        "environmentId": "DEV",
        "modelId": "MODEL1"
    },
    {
        "id": "0e714df9-d8a5-4d85-8cd2-cf8198786ae0",
        "name": "GOLANG API TEST",
        "modelId": "MODEL1",
        "firmwareConfig": {
            "id": "28f76243-99c3-4e49-8a25-14b9ac995949",
            "updated": 1688682880943,
            "description": "Test Description",
            "supportedModelIds": [
                "MODEL1",
                "MODEL2",
                "MODEL3"
            ],
            "firmwareFilename": "firmware-file-name.bin",
            "firmwareVersion": "TEST_FIRMWARE_VERSION_AAA",
            "applicationType": "stb",
            "firmwareDownloadProtocol": "tftp",
            "properties": {
                "test key": "test value"
            }
        }
    }
]


NEW CHANGES:

  1. applicationType is a required parameter.
  2. New response fields added: firmwareConfig.properties, firmwareConfig.updated, firmwareConfig.applicationType.
  3. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Retrieve an environment model rule by name

GET http://<host>:<port>/queries/rules/envModels/{envModelRuleName}?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Response: 200 OK, 400 BAD REQUEST.

JSON response
{
    "id": "0e714df9-d8a5-4d85-8cd2-cf8198786ae0",
    "name": "GOLANG API TEST",
    "modelId": "AX013AN",
    "firmwareConfig": {
        "id": "28f76243-99c3-4e49-8a25-14b9ac995949",
        "updated": 1688682880943,
        "description": "TEst Desciprion ",
        "supportedModelIds": [
            "MODEL1",
            "MODEL2",
            "MODEL3"
        ],        
		"firmwareFilename": "firmware-file-name.bin", 
		"firmwareVersion": "TEST_FIRMWARE_VERSION_AAA",         
		"applicationType": "stb",
        "firmwareDownloadProtocol": "tftp",
        "properties": {
            "test key": "test value"
        }
    }
}


NEW CHANGES:

  1. applicationType is a required parameter.
  2. New response fields added: firmwareConfig.properties, firmwareConfig.updated, firmwareConfig.applicationType.
  3. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Create/update environment model rule

For creates, use POST method and don't specify id in the input json. Generated id is returned in the response.
For updates, use PUT method and id is a mandatory field in the input json.

POST http://<host>:<port>/updates/rules/envModels?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType param is required.

Response: 200 OK(for successful updates), 201 CREATED (for successful creates), 400 BAD REQUEST, 500 INTERNAL SERVER ERROR.

Restrictions

Name, environment, model should be not empty, name is used only once, env/model should not overlap each other

JSON request
{
    "id": "3da7412c-c75e-4c40-8c48-d2fa32de5f6b",
    "name": "GOLANG API TEST",
    "modelId": "AX013AN",
    "environmentId": "PROD",
    "firmwareConfig": {
        "id": "28f76243-99c3-4e49-8a25-14b9ac995949",
        "description": "TEst Desciprion",
        "supportedModelIds": [             
			"MODEL1",
            "MODEL2",
            "MODEL3"         ],         
"firmwareFilename": "firmware-file-name.bin", 
"firmwareVersion": "TEST_FIRMWARE_VERSION_AAA",         
"applicationType": "stb",
        "firmwareDownloadProtocol": "tftp",
        "properties": {
            "test key": "test value"
        }
    }
}


NEW CHANGES:

  1. applicationType is a required parameter.
  2. New response fields added: firmwareConfig.properties, firmwareConfig.updated, firmwareConfig.applicationType.
  3. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Delete an environment model rule

DELETE http://<host>:<port>/delete/rules/envModels/{envModelRuleName}?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType param is required

Response: 204 NO CONTENT.


NEW CHANGES:

  1. applicationType is a required parameter.
  2. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

IP filter

Retrieve an IP filter list

GET http://<host>:<port>/queries/filters/ips?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType param is required.

Responce: 200 OK, 400 BAD REQUEST.


JSON response
[
    {
        "id": "6cefae40-b85b-429d-ac6d-d754883e17bc",
        "name": "TEST IP RULE",
        "ipAddressGroup": {
            "id": "All_Lab",
            "name": "All_Lab",
            "ipAddresses": [
                "10.10.10.10"
            ]
        },
        "warehouse": false
    }
]

NEW CHANGES:

  1. applicationType parameter is required.
  2. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Retrieve an ip filter by name

GET http://<host>:<port>/queries/filters/ips/{ipFilterName}?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType param is required.

Response: 200 OK, 400 BAD REQUEST.

JSON response
  {
    "id": "6cefae40-b85b-429d-ac6d-d754883e17bc",
    "name": "TEST IP RULE",
    "ipAddressGroup": {
        "id": "All_Lab",
        "name": "All_Lab",
        "ipAddresses": [
            "10.10.10.10"
        ]
    },
    "warehouse": false
}


NEW CHANGES:

  1. applicationType parameter is required.
  2. In case if rule was not found "null" object is returned. Java implementation does not have any response object.
  3. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}


Create/update an IP filter

For creates, use POST method and don't specify id in the input json. Generated id is returned in the response.
For updates, use PUT method and id is a mandatory field in the input json.

POST http://<host>:<port>/updates/filters/ips?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType param is required.

Response: 200 OK(for successful updates), 201 CREATED (for successful creates),  400 BAD REQUEST, 500 INTERNAL SERVER ERROR.

Restrictions: 

Name, IP address group should be not empty

JSON request
{
    "name": "TEST IP RULE",
    "ipAddressGroup": {
        "id": "All_Lab",
        "name": "All_Lab",
        "ipAddresses": [
            "10.10.10.10"
        ]
    },
    "warehouse": false
}

NEW CHANGES:

  1. applicationType parameter is required.
  2. Error changed to following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "Name is already used"
}


Delete IP filter

Response: 200 OK and message: IpRuleId is empty OR IpFilter successfully deleted

DELETE http://<host>:<port>/delete/filters/ips/{ipFilterName}?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType param is required, default value is stb

Response: 204 NO CONTENT, 400 BAD REQUEST if applicationType is not valid


NEW CHANGES:

  1. applicationType parameter is required.
  2. Error has following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Percent filter

Retrieve percent filter

GET http://<host>:<port>/queries/filters/percent?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType parameter is required

Response: 200 OK, 400 BAD REQUEST if applicationType is not valid

Note

firmwareVersions will be present only if firmwareVersions is set to true, lastKnownGood and intermediateVersion will be set to empty string and empty tag in the JSON and XML response respectively if they are not set in the Percent Filter.



JSON response
{
    "id": "PERCENT_FILTER_VALUE",
    "type": "com.xconf.queries.beans.PercentFilterWrapper",
    "whitelist": {
        "id": "All_Warehouses_00RDATEST",
        "name": "All_Warehouses_00RDATEST",
        "ipAddresses": [
            "11.1.111.111"
        ]
    },
    "percentage": 100,
    "EnvModelPercentages": [         
		{
            "percentage": 79,
            "active": false,
            "firmwareCheckRequired": true,
            "rebootImmediately": false,
            "lastKnownGood": "firmware-file-name.bin",
            "intermediateVersion": "firmware-file-name.bin",
            "whitelist": {
                "id": "All_Test_List",
                "name": "All_Test_List",
                "ipAddresses": [
                    "10.10.10.10"
                ]
            },
            "firmwareVersions": [
                "TEST_FIRMWARE_VERSION_AAA",
                "TEST_FIRMWARE_VERSION_AAA",
                "TEST_FIRMWARE_VERSION_AAA"
            ],
            "name": "Test Percentage Bean"
        }   
	]
}

NEW CHANGES:

  1. applicationType is a mandatory parameter.
  2. Error changed to following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}  

Retrieve percent filter field values

GET http://<host>:<port>/queries/filters/percent?field=fieldName&applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType parameter is required


Response: 200 OK, 400 BAD REQUEST 

JSON response
{
    "firmwareVersions": [
        "VERSION_1",
        "VERSION_2"
	]
}		 

NEW CHANGES:

  1. applicationType is a mandatory parameter.
  2. New fields added : lastKnownGood , intermediateVersion , whitelist, firmwareVersions, optionalConditions, distributions. 
  3. Error changed to following json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
} 

Update percent filter

POST http://<host>:<port>/updates/filters/percent?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType parameter is required

Response: 200 OK, 400 BAD REQUEST if applicationType is not valid

Response: 200 OK and saved object (see get request); 400 BAD REQUEST; 500 INTERNAL SERVER ERROR

Restrictions:

Percentage should be positive and within [0, 100],  

JSON request
{
  "type": "com.xconf.queries.beans.PercentFilterWrapper",
  "id": "PERCENT_FILTER_VALUE",
  "percentage": 99.0,
  "EnvModelPercentages": [
    {
      "percentage": 100.0,
      "active": false,
      "firmwareCheckRequired": false,
      "rebootImmediately": false,
      "firmwareVersions": [
        
      ],
      "name": "test"
    },
    {
      "percentage": 100.0,
      "active": false,
      "firmwareCheckRequired": false,
      "rebootImmediately": false,
      "firmwareVersions": [
        
      ],
      "name": "test"
    }
  ]
}


NEW CHANGES:

  1. applicationType param is required.
  2. Exception style changed to json object:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "Env/Model does not match with existed Env/Model"
}


Retrieve Percentage Bean

GET http://<host>:<port>/queries/percentageBean?applicationType={type}
Headers:
Content-Type = application/json 
Accept = application/json

applicationType parameter is required

Response: 200 OK, 400 BAD REQUEST if applicationType is not valid

JSON response
[{
        "id": "8141de7e-5ef0-4e4e-9c29-cc20bf6f8d8a",
        "name": "Test1",
        "active": true,
        "firmwareCheckRequired": true,
        "rebootImmediately": true,
        "firmwareVersions": [
            "version1",
            "xconftestmodel",
            "version2"
        ],
        "distributions": [
            {
                "configId": "version1",
                "percentage": 15,
                "startPercentRange": 0,
                "endPercentRange": 15
            },
            {
                "configId": "xconftestmodel",
                "percentage": 45,
                "startPercentRange": 15,
                "endPercentRange": 60
            },
            {
                "configId": "version2",
                "percentage": 40,
                "startPercentRange": 60,
                "endPercentRange": 100
            }
        ],
        "applicationType": "stb",
        "environment": "TEST",
        "model": "XCONFTESTMODEL",
        "optionalConditions": {
            "condition": {
                "freeArg": {
                    "type": "STRING",
                    "name": "Test1"
                },
                "operation": "IS",
                "fixedArg": {
                    "bean": {
                        "value": {
                            "java.lang.String": "true"
                        }
                    }
                }
            },
            "negated": false
        },
        "useAccountIdPercentage": true
    }
]

NEW CHANGES:

  1. applicationType param is required.
  2. New fields added: applicationType.
  3. Exception style changed to json object:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "Env/Model does not match with existed Env/Model"
}


Retrieve Percentage Bean by id

GET http://<host>:<port>/queries/percentageBean/id?applicationType={type}
Headers:
Content-Type = application/json 
Accept = application/json

applicationType parameter is required.


Response: 200 OK OR 404 if envModelPercentage is not found

JSON response
{
    "id": "0f111a83-030c-45b1-111e-a06e75aaaaa8b",
    "name": "Test",
    "active": true,
    "firmwareCheckRequired": true,
    "rebootImmediately": true,
    "firmwareVersions": [
        "Model1",
        "Model2"
    ],
    "distributions": [
        {
            "configId": "Model1",
            "percentage": 100,
            "startPercentRange": 0,
            "endPercentRange": 100
        }
    ],
    "applicationType": "stb",
    "environment": "QA",
    "model": "TEST",
    "useAccountIdPercentage": false
}

NEW CHANGES:

  1. applicationType param is required.
  2. New fields added: applicationType.
  3. Exception style changed to json object:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "Env/Model does not match with existed Env/Model"
}

Create Percentage Bean

POST http://<host>:<port>/updates/percentageBean?applicationType={type}
Headers:
Content-Type = application/json 
Accept = application/json 

applicationType parameter is required

Response: 200 OK, 400 BAD REQUEST if applicationType is not valid

Responce: 200 OK(for successful updates), 201 CREATED (for successful creates), 404 NOT FOUND, 409 CONFLICT, 400 BAD REQUEST

Restrictions:

Name should be unique and not blank, environment and model should be not empty, at least one firmware version should be in minCheck list if firmwareCheckRequired=true, percentage within [0, 100], distribution firmware version should be in minCheck list if firmwareCheckRequired=true, total distribution percentage is within [0, 100], last known good is not empty if total distribution percentage < 100, last known good should be selected in minCheck list.

JSON request
{
    "id": "4c2cea9e-c1be-4219-8f2a-70084f1cb648",
    "name": "Percent Test 2",
    "active": false,
    "firmwareCheckRequired": false,
    "rebootImmediately": false,
    "firmwareVersions": [],
    "environment": "envId",
    "model": "modelId",
    "distributions": [
      {
        "configId": "0c176c01-b4cf-4706-9e41-5118e30f68cb",
        "percentage": 100.0
      }
    ]
}

NEW CHANGES:

  1. applicationType param is required.
  2. Exception style changed to json object:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "Env/Model does not match with existed Env/Model"
}


Update Percentage Bean

PUT http://<host>:<port>/updates/percentageBean?applicationType={type}
Headers:
Content-Type = application/json
Accept = application/json
 

applicationType parameter is required.

Response: 200 OK, 404 NOT FOUND, 409 CONFLICT, 400 BAD REQUEST

Restrictions:

Name should be unique and not blank, environment and model should be not empty, at least one firmware version should be in minCheck list if firmwareCheckRequired=true, percentage within [0, 100], distribution firmware version should be in minCheck list if firmwareCheckRequired=true, total distribution percentage is within [0, 100], last known good is not empty if total distribution percentage < 100, last known good should be selected in minCheck list.


JSON request
{
    "id": "4c2cea9e-c1be-4219-8f2a-70084f1cb648",
    "name": "Percent Test 2",
    "active": false,
    "firmwareCheckRequired": false,
    "rebootImmediately": false,
    "firmwareVersions": [],
    "environment": "envId",
    "model": "modelId",
    "distributions": [
      {
        "configId": "0c176c01-b4cf-4706-9e41-5118e30f68cb",
        "percentage": 100.0
      }
    ]
}

NEW CHANGES:

  1. applicationType param is required.
  2. Exception style changed to json object:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "Env/Model does not match with existed Env/Model"
}


Delete Percentage Bean

DELETE http://<host>:<port>/delete/percentageBean/{percentage bean id}?applicationType={type}
Headers:
Content-Type = application/json
Accept = application/json

Response: 204 NO CONTENT OR 404 NOT FOUND


NEW CHANGES:

  1. applicationType param is required.
  2. Exception style changed to json object:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "Env/Model does not match with existed Env/Model"
}

Time filter

Retrieve time filter list

GET http://<host>:<port>/queries/filters/time?applicationType={type}
Headers:
Accept = application/json

NEW CHANGES:

  1. applicationType param is required.


Response: 200 OK, 400 BAD REQUEST


JSON response
[
    {
        "id": "11a905b0-7557-400c-a51d-8eaf2e5b987e",
        "name": "TEST TIME FILTER",
        "ipWhitelist": {
            "id": "IP ADDRESS LIST",
            "name": "IP ADDRESS LIST",
            "ipAddresses": [
                "10.10.10.10"
            ]
        },
        "envModelWhitelist": {
            "environmentId": "PROD",
            "modelId": "MODEL1"
        },
        "neverBlockRebootDecoupled": true,
        "neverBlockHttpDownload": true,
        "startTime": "01:00",
        "endTime": "02:00",
        "localTime": false
    }
]

Retrieve time filter by name

GET http://<host>:<port>/queries/filters/time/{name}?applicationType={type}
Headers:
Accept = application/json
Authorization = {SAT token}

NEW CHANGES:

  1. applicationType param is required.


Response: 200 OK, 400 BAD REQUEST

JSON response
{
    "id": "11a905b0-7557-400c-a51d-8eaf2e5b987e",
    "name": "TEST TIME FILTER",
    "ipWhitelist": {
        "id": "All_Lab",
        "name": "All_Lab",
        "ipAddresses": [
            "10.10.10.10"
        ]
    },
    "envModelWhitelist": {
        "environmentId": "PROD",
        "modelId": "MODEL1"
    },
    "neverBlockRebootDecoupled": true,
    "neverBlockHttpDownload": true,
    "startTime": "01:00",
    "endTime": "02:00",
    "localTime": false
}


Create/update time filter

For creates, use POST method and don't specify id in the input json. Generated id is returned in the response.
For updates, use PUT method and id is a mandatory field in the input json.

POST http://<host>:<port>/updates/filters/time?applicationType={type}
Headers:
Content-Type = application/json
Accept = application/json

NEW CHANGES:

  1. applicationType param is required.
  2. Exception style changed to json object:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "Env/Model does not match with existed Env/Model"
}


Response: 200 OK(for successful updates), 201 CREATED (for successful creates) and saved object (see get request), 400 BAD REQUEST, 500 INTERNAL SERVER ERROR

Restrictions:

  1. Name should be unique.
  2. envModelWhitelist - Percentage Bean id with corresponding environment / model.
JSON request
{
    "id": "11a905b0-7557-400c-a51d-8eaf2e5b987e",
    "name": "TEST TIME FILTER",
    "ipWhitelist": {
        "id": "All_Lab",
        "name": "All_Lab",
        "ipAddresses": [
            "10.10.10.10"
        ]
    },
    "envModelWhitelist": {
        "id": "0543974f-992f-4756-8318-b6ebb2db0fa5",
        "environmentId": "PROD",
        "modelId": "MODEL1"
    },
    "neverBlockRebootDecoupled": true,
    "neverBlockHttpDownload": true,
    "startTime": "01:00",
    "endTime": "02:00",
    "localTime": false
}


Delete time filter by name

DELETE http://<host>:<port>/delete/filters/time/{timeFilterName}?applicationType={type}
Headers:
Accept = application/json

NEW CHANGES:

  1. applicationType param is required.


Response: 204 NO CONTENT and message: Time Filter successfully deleted OR Filter doesn't exist with name: <filterName>

Environment

Retrieve an list of environments

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

NEW CHANGES:

  1. New fields added: updated.

Response: 200 OK

JSON response
[
    {
        "id": "DEVTEST",
        "updated": 1685373577833,
        "description": ""
    },
    {
        "id": "DEV",
        "updated": 1682695104471,
        "description": ""
    }
]

Retrieve environment by id

GET http://<host>:<port>/queries/environments/{id}
Headers:
Accept = application/json
Authorization = {SAT token} 

NEW CHANGES:

  1. New fields added: updated.
  2. Exception style changed to the json object:
JSON response
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "Environment does not exist"
}

Response: 200 OK; 400 BAD REQUEST

JSON response
{
    "id": "DEV",
    "updated": 1682695104471,
    "description": ""
}


Create an environment

POST http://<host>:<port>/updates/environments
Headers:
Content-Type: application/json 
Accept = application/json
 

Response: 200 OK(for successful updates), 201 CREATED (for successful creates), 400 BAD REQUEST, 500 INTERNAL SERVER ERROR


Restrictions:

Environment name should be valid by pattern: ^[a-zA-Z0-9]+$, name should be unique.


JSON request
{
    "id": "AAA",
    "description": "test description"
}

Response: created environment.

JSON request
{
    "id": "AAA",
	"updated": 1689113695550,
    "description": "test description"
}

Delete environment by id

DELETE http://<host>:<port>/delete/environments/<environmentId>
Headers:
Accept = application/json

Response: 204 NO CONTENT; 400 BAD REQUEST: Environment is used: <usage place> 

Restrictions: 

Environment should be not used

Request: http://localhost:9091/delete/environments/DEV

IP Address Group

Retrieve an IP address group list

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


Response: 200 OK.

JSON response
[
    {
        "id": "TEST_IP_LIST",
        "name": "TEST_IP_LIST",
        "ipAddresses": [
            "100.100.100.102"
        ]
    }
]

Retrieve an IP address group by name

GET http://<host>:<port>/queries/ipAddressGroups/byName/{ipAddressGroupName}
Headers:
Accept = application/json
 


Response: 200 OK, 400 BAD REQUEST

IP Address group is returned with corresponding name wrapped by array. Empty array is returned in case if IP Address Group is now found.

JSON response
[
    {
        "id": "TEST_IP_LIST",
        "name": "TEST_IP_LIST",
        "ipAddresses": [
            "100.100.100.102"
        ]
    }
]


Retrieve an IP address group by IP

GET http://<host>:<port>/queries/ipAddressGroups/byIp/{IP address}
Headers:
Accept = application/json


Response: 200 OK; 400 BAD REQUEST.

IP Address group is returned with corresponding IP address wrapped by array. Empty array is returned in case if IP Address Group is now found.

JSON response
[
    {
        "id": "test",
        "name": "test",
        "ipAddresses": [
            "100.100.100.102"
        ]
    }
]


Create an IP address group

POST http://<host>:<port>/updates/ipAddressGroups
Headers:
Content-Type: application/json
Accept = application/json 

Response: 200 OK(for successful updates), 201 CREATED (for successful creates), 400 BAD REQUEST, 500 INTERNAL SERVER ERROR and saved entity in case of successful save.

Restrictions: 

Name should be not empty and unique

JSON request
{
    "id": "TESTONE",
    "name": "TESTONE",
    "ipAddresses": [
        "11.12.12.12"
    ]
}

Add data to IP Address Group

POST http://<host>:<port>/updates/ipAddressGroups/{IP address group name}/addData
Headers:
Content-Type = application/json
Accept = application/json


Restrictions: 

ipAddressGroup with current id should be exist, see restrictions for create operation

JSON request
{
    "list": [
        "11.12.12.21"
    ]
}


Response: 200 OK, 400 BAD REQUEST, 500 INTERNAL SERVER ERROR and updated IP Address Group:

Response
{
    "id": "TESTONE",
    "name": "TESTONE",
    "ipAddresses": [
        "11.12.12.12",
        "11.12.12.21"
    ]
}


Delete data from IP Address Group

POST http://<host>:<port>/updates/ipAddressGroups/{IP address group name}/removeData
Headers:
Content-Type = application/json
Accept = application/json


Restrictions:

List contains IPs, which should be present in current MAClist, MAC list should contain at least one IP address, and restrictions for create operation.

JSON request
{
  "list": [
    "1.1.1.1"
  ]
}


Response: 204 NO CONTENT and ipAddressGroup object (see get request); 400 BAD REQUEST

NEW CHANGES:

  1. No response object is returned in case if IP address successfully removed.
  2. Exception repose object was changed to following json:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "List contains IPs, which are not present in current Namespaced list: [11.12.12.21]"
}


Delete an IP address group by id

DELETE http://<host>:<port>/delete/ipAddressGroups/{IP address group name}
Accept = application/json

Response: 204 NO CONTENT, 400 BAD REQUEST

Restrictions: 

IP address group should be not used

Request: http://localhost:9091/delete/ipAddressGroups/607b315b-c744-4c43-87fa-51b17aa92b09

NEW CHANGES:

  1. If IP list is used in rule 409 status is returned instead of 400.
  2. Exception style was changed from string to following structure:
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "IP_LIST_NAME is used in a Percentage Filter TEST_PERCENTAGE_BEAN"
}


MAC Rule API

Retrieve a mac rule list - Legacy

GET http://<host>:<port>/queries/rules/macs?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType is required.

With no version parameter or version < 2. Legacy query.

Response: 200 OK, 400 BAD REQUEST

JSON response
[
    {
        "firmwareConfig": {
            "applicationType": "stb",
            "description": "Test Description",
            "firmwareDownloadProtocol": "tftp",
            "firmwareFilename": "firmware-file-name",
            "firmwareVersion": "TEST_FIRMWARE_VERSION_AAA",
            "id": "74f531da-647e-4aaa-bfcf-9af4a29c6e18",
            "supportedModelIds": [
                "PLUME POD V1.0"
            ],
            "updated": 1682695880624
        },
        "macListRef": "TestmacListRef",
        "name": "test mac rule",
        "targetedModelIds": [
            "TEST POD V1.0"
        ]
    }
]

NEW CHANGES:

  1. "applicationType" parameter is mandatory.
  2. New fields added to response: applicationType, firmwareDownloadProtocol, updated.
  3. Error change to following json structure:
{
    "status": 409,
    "type": "ErrorType",
    "message": "Error message"
}

Retrieve a mac rule list - V2

GET http://<host>:<port>/queries/rules/macs?version=2&applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType is required.

Version parameter could any number >= 2.

Response: 200 OK, 400 BAD REQUEST.

JSON response
{
        "id": "d40fdb2d-193a-4d81-95e8-b7b33ed3ac4b",
        "name": "test mac rule",
        "macListRef": "TestMacListRef",
        "firmwareConfig": {
            "id": "74f531da-647e-4aaa-bfcf-9af4a29c6e18",
            "updated": 1682695880624,
            "description": "description",
            "supportedModelIds": [
                "PLUME POD V1.0"
            ],
            "firmwareFilename": "filename",
            "firmwareVersion": "TEST_FIRMWARE_VERSION_AAA",
            "applicationType": "stb",
            "firmwareDownloadProtocol": "tftp"
        },
        "targetedModelIds": [
            "PLUME POD V1.0"
        ],
        "macList": [
            "AA:AA:AA:AA:AA:AA",
            "AA:AA:AA:AA:AA:AA",
            "AA:AA:AA:AA:AA:AA"
        ]
    }

NEW CHANGES:

  1. "applicationType" parameter is mandatory.
  2. Error change to following json structure:
{
    "status": 409,
    "type": "ErrorType",
    "message": "Error message"
}

Retrieve mac rule by name - Legacy

GET http://<host>:<port>/queries/rules/macs/<macRuleName>?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

With no version parameter or version < 2. Legacy query.

Response: 200 OK.

JSON response
{
    "name": "test mac rule",
    "macListRef": "TestMacListRef",
    "firmwareConfig": {
        "id": "74f531da-647e-4aaa-bfcf-9af4a29c6e18",
        "updated": 1682695880624,
        "description": "description",
        "supportedModelIds": [
            "PLUME POD V1.0"
        ],
        "firmwareFilename": "filename",
        "firmwareVersion": "TEST_FIRMWARE_VERSION_AAA",
        "applicationType": "stb",
        "firmwareDownloadProtocol": "tftp"
    },
    "targetedModelIds": [
        "PLUME POD V1.0"
    ]
}

NEW CHANGES:

  1. "applicationType" parameter is mandatory.
  2. New fields added: applicationType, firmwareDownloadProtocol, updated.
  3. Error change to following json structure:
{
    "status": 409,
    "type": "ErrorType",
    "message": "Error message"
}

Retrieve mac rule by name - V2

GET http://<host>:<port>/queries/rules/macs/<macRuleName>?version=2&applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType is required.

Version parameter could any number >= 2.

Response: 200 OK

JSON response
{
    "firmwareConfig": {
        "applicationType": "stb",
        "description": "Description",
        "firmwareDownloadProtocol": "tftp",
        "firmwareFilename": "firmware-file-name",
        "firmwareVersion": "TEST_FIRMWARE_VERSION_AAA",
        "id": "74f531da-647e-4aaa-bfcf-9af4a29c6e18",
        "supportedModelIds": [
            "PLUME POD V1.0"
        ],
        "updated": 1682695880624
    },
    "id": "d40fdb2d-193a-4d81-95e8-b7b33ed3ac4b",
    "macList": [
        "AA:AA:AA:AA:AA:AA",
        "AA:AA:AA:AA:AA:AA",
        "AA:AA:AA:AA:AA:AA",
    ],
    "macListRef": "TestMacListRef",
    "name": "test mac rule",
    "targetedModelIds": [
        "PLUME POD V1.0"
    ]
}


NEW CHANGES:

  1. "applicationType" parameter is mandatory.
  2. New fields added to response: applicationType, firmwareDownloadProtocol, updated.
  3. Error change to following json structure:
{
    "status": 409,
    "type": "ErrorType",
    "message": "Error message"
}

Retrieve mac rule by MAC address - Legacy

GET http://<host>:<port>/queries/rules/macs/address/{macAddress}?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType is required

With no version parameter or version < 2. Legacy query.

Response: 200 OK, 400 BAD REQUEST

JSON response
[
    {
        "name": "test mac rule",
        "macListRef": "TestMaclistRef",
        "firmwareConfig": {
            "id": "74f531da-647e-4aaa-bfcf-9af4a29c6e18",
            "updated": 1682695880624,
            "description": "test description",
            "supportedModelIds": [
                "PLUME POD V1.0"
            ],
            "firmwareFilename": "firmware-file-name",
            "firmwareVersion": "TEST_FIRMWARE_VERSION_AAA",
            "applicationType": "stb",
            "firmwareDownloadProtocol": "tftp"
        },
        "targetedModelIds": [
            "PLUME POD V1.0"
        ]
    }
]

NEW CHANGES:

  1. "applicationType" parameter is mandatory.
  2. New fields added to response: applicationType, firmwareDownloadProtocol, updated.
  3. Error change to following json structure:
{
    "status": 409,
    "type": "ErrorType",
    "message": "Error message"
}

Retrieve mac rule by mac address - V2

GET http://<host>:<port>/queries/rules/macs/address/<macAddress>?version=2&applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType is required.

Version parameter could any number >= 2.

 Response: 200 OK, 400 BAD REQUEST

JSON response
[
    {
        "id": "d40fdb2d-193a-4d81-95e8-b7b33ed3ac4b",
        "name": "test mac rule",
        "macListRef": "TestMacListRef",
        "firmwareConfig": {
            "id": "74f531da-647e-4aaa-bfcf-9af4a29c6e18",
            "updated": 1682695880624,
            "description": "Description",
            "supportedModelIds": [
                "PLUME POD V1.0"
            ],
            "firmwareFilename": "firmware-file-name",
            "firmwareVersion": "TEST_FIRMWARE_VERSION_AAA,
            "applicationType": "stb",
            "firmwareDownloadProtocol": "tftp"
        },
        "targetedModelIds": [
            "PLUME POD V1.0"
        ],
        "macList": [
            "AA:AA:AA:AA:AA:AA"
        ]
    }
]

NEW CHANGES:

  1. "applicationType" parameter is mandatory.
  2. New fields added to response: applicationType, firmwareDownloadProtocol, updated.
  3. Error change to following json structure:
{
    "status": 409,
    "type": "ErrorType",
    "message": "Error message"
}


Create/update mac rule

For creates, use POST method and don't specify id in the input json. Generated id is returned in the response.
For updates, use POST method and id is a mandatory field in the input json.

POST http://<host>:<port>/updates/rules/macs?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType is required.

Response: 200 OK(for successful updates), 201 CREATED (for successful creates), 400 BAD REQUEST, 500 INTERNAL SERVER ERROR.

Restrictions: 

Name, mac address list, model list, mac list, firmware configuration should be not empty, mac address list is never used in another rule, model list contain only existed model, firmware config should support given models

JSON request
{
    "name": "test mac rule 2",
    "macListRef": "maclist",
    "firmwareConfig": {
        "id": "74f531da-647e-4aaa-bfcf-9af4a29c6e18",
        "updated": 1682695880624,
        "description": "description",
        "supportedModelIds": [
            "PLUME POD V1.0"
        ],
        "firmwareFilename": "firmware-file-name",
        "firmwareVersion": "TEST_FIRMWARE_VERSION_AAA",
        "applicationType": "stb",
        "firmwareDownloadProtocol": "tftp"
    },
    "targetedModelIds": [
        "PLUME POD V1.0"
    ],
    "macList": [
        "AA:AA:AA:AA:AA:AA"
    ]
}


NEW CHANGES:

  1. "applicationType" parameter is mandatory.
  2. "id" and "macList" fields are returned in response.
  3. In case of missing Firmware Config:

    1. 404 status is returned instead of 400
    2. Error message does not have double quotes.

    Current error message: Firmware configuration is not specified.

    Previous error message: "Firmware configuration is not specified."

  4. Error change to following json structure:
{
    "status": 409,
    "type": "ErrorType",
    "message": "Error message"
}


Delete mac rule by name

DELETE http://<host>:<port>/delete/rules/macs/{macRuleName}?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType is required.

Response: 204 NO CONTENT, 400 BAD REQUEST.

NEW CHANGES:

  1. "applicationType" parameter is mandatory.
  2. Error change to following json structure:
{
    "status": 409,
    "type": "ErrorType",
    "message": "Error message"
}

Model

Retrieve a model list

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


Response: 200 OK

JSON response
[
    {
        "id": "12",
        "updated": 1682695121503,
        "description": "Test Model"
    },
    {
        "id": "123",
        "updated": 1682695121513,
        "description": "Test Model"
    }
]

NEW CHANGES:

  1. New fields added: updated.


Retrieve model by id

GET http://<host>:<port>/queries/models/{model id}
Headers:
Accept = application/json


Response: 200 OK; 204 NO CONTENT

JSON response
{
    "id": "TESTMODEL",
    "updated": 1682695122378,
    "description": "Test model"
}

NEW CHANGES:

  1. New fields added: updated.
  2. Exception style changed to following json:
JSON response
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "TEST_MODEL_AAA not found"
}


Create model 

POST http://<host>:<port>/updates/models
Headers:
Content-Type = application/json
Accept = application/json


Response: 201 CREATED; 400 BAD REQUEST; 500 INTERNAL SERVER ERROR

Restrictions: 

Model name should be unique and valid by pattern: ^[a-zA-Z0-9]+$ 

JSON request
{
    "id": "TESTMODEL",
    "description": "Test model"
}

Json response:

{
    "id": "TESTMODEL",
	"updated": 1682695122378,     
	"description": "Test model"
}

NEW CHANGES:

  1. New response fields added: updated.
  2. Error structure changed to following structure:
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "\"Model with current name already exists\""
}

Update model description

PUT http://<host>:<port>/updates/models
Headers:
Content-Type = application/json
Accept = application/json


Request:

JSON request
{
    "id": "TESTMODEL",
    "description": "Updated description"
}


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

{
    "id": "TESTMODEL",
    "updated": 1689197427175,
    "description": "Updated description"
}

NEW CHANGES:

  1. New fields added: updated.
  2. Error changed to following structure:
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "TESTMODEL 1 model does not exist"
}


Delete model by id

DELETE http://<host>:<port>/delete/models/{model id}
Headers:
Accept = application/json
Content-Type = application/json
 

Response: 204 NO CONTENT, 404 NOT FOUND

Restrictions:

Model should be not used in another places.


NEW CHANGES:

  1. Error changed to following structure:
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "Entity with id: TESTMODEL does not exist"
}

MAC List (Former NS List)

Retrieve all MAC lists

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


Response: 200 OK

JSON response
[   
	{
    	"id": "Test",
    	"updated": 1682695493885,
    	"data": [
     	   "AA:AA:AA:AA:AA:AA",
     	   "AA:AA:AA:AA:AA:AA"
   		],
    	"typeName": "MAC_LIST"
	} 
]

NEW CHANGES:

  1. New fields added: updated, typeName


Retrieve a MAC list by id

GET http://<host>:<port>/queries/nsLists/byId/{mac list id}
Headers:
Accept = application/json
 


Response: 200 OK. In case of MAC list not found 200 is returned as well.

JSON response
{
    "id": "Test",
    "updated": 1682695493885,
    "data": [
        "AA:AA:AA:AA:AA:AA",
        "AA:AA:AA:AA:AA:AA"
    ],
    "typeName": "MAC_LIST"
}


NEW CHANGES:

  1. New fields added: updated, typeName.


Retrieve a MAC list by mac part

GET http://<host>:<port>/queries/nsLists/byMacPart/{MAC address part}
Headers:
Accept = application/json


Response: 200 OK

JSON response
[
    {
        "id": "TEST_MAC_LIST",
        "updated": 1682695495338,
        "data": [
            "AA:AA:AA:AA:AA:AA"
        ],
        "typeName": "MAC_LIST"
    }
]

NEW CHANGES:

  1. New fields added: updated, typeName.


Create a MAC list

POST http://<host>:<port>/updates/nsLists
Headers:
Content-Type = application/json
Accept = application/json
 


Restrictions:

Name should be valid by pattern: ^[a-zA-Z0-9]+$, list data should be not empty and contain valid mac addresses, mac address should be used only in one NS list

JSON request
{
  "id": "TEST_MAC_LIST",
  "data": [
    "AA:AA:AA:AA:AA:AA"
  ]
}

Response: 201 CREATED; 400 BAD REQUEST; 500 INTERNAL SERVER ERROR

JSON response
{
    "id": "TEST_MAC_LIST",
    "updated": 1689274607201,
    "data": [
        "AA:AA:AA:AA:AA:AA"
    ],
    "typeName": "MAC_LIST"
}

NEW CHANGES:

  1. New fields added: updated, typeName.
  2. Error changed to following structure:
JSON response
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "Name is invalid"
}

Add data to an existing MAC list

POST http://<host>:<port>/updates/nsLists/{MAC list id}/addData
POST http://<host>:<port>/updates/nslist/{MAC list id}/addData - legacy endpoint
Headers:
Content-Type = application/json
Accept = application/json

Response: 200 OK, 400 BAD REQUEST, 500 INTERNAL SERVER ERROR

Restrictions: 

NS list with current id should be exist, see restrictions for create operation

JSON request
{
    "list": [
        "AB:AB:AB:AB:AB:AB"
    ]
}


Response body:

JSON response
{
    "id": "TEST_MAC_LIST",
    "updated": 1689274877522,
    "data": [
        "AA:AA:AA:AA:AA:AA",
        "AB:AB:AB:AB:AB:AB"
    ],
    "typeName": "MAC_LIST"
}


NEW CHANGES:

  1. New fields added: updated, typeName.
  2. Error changed to following structure:
JSON response
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "List contains invalid address(es): [AB:AB:AB:AB:AB:]"
}


Delete data from a MAC list

POST http://<host>:<port>/updates/nsLists/{MAC list id}/removeData
POST http://<host>:<port>/updates/nslist/{MAC list id}/removeData - legacy endpoint
Headers: 
Content-Type = application/json
Accept = application/json


Response: 204 NO CONTENT and NS list object (see get request); 400 BAD REQUEST

Restrictions:

List contains MACs, which should be present in current MAC list, MAC list should contain at least one MAC address, and restrictions for create operation

JSON request
{
  "list": [
    "AB:AB:AB:AB:AB:AB"
  ]
}

Response body:

JSON response
{
    "id": "TEST_MAC_LIST",
    "updated": 1689274877522,
    "data": [
        "AA:AA:AA:AA:AA:AA",
        "AB:AB:AB:AB:AB:AB"
    ],
    "typeName": "MAC_LIST"
}


NEW CHANGES:

  1. New fields added: updated, typeName.
  2. Error changed to following structure:
JSON response
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "List with current ID doesn't exist"
}


Delete a MAC list by id

DELETE http://<host>:<port>/delete/nsLists/{MAC list id}
Headers:
Accept = application/json
Content-Type = application/json

Response: 200 OK and message: MACList doesn't exist OR MACList successfully deleted;


Restrictions:

NS list should be not used in another places


NEW CHANGES:

  1. In case of usage 409 response status is returned instead of 400.
  2. Error changed to following structure:
JSON response
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "List is used by FirmwareRule test mac rule"
}


Reboot Immediately Filter

Retrieve an RI filter list

GET http://<host>:<port>/queries/filters/ri?applicationType={type}
Headers:
Accept = application/json
Content-Type = application/json

applicationType is required.

Response: 200 OK, 400 BAD REQUEST

JSON response
[
    {
        "ipAddressGroups": [
            {
                "id": "TEST_IP_LIST",
                "name": "TEST_IP_LIST",
                "ipAddresses": [
                    "10.10.10.10"
                ]
            }
        ],
        "environments": [],
        "models": [],
        "macAddresses": "BB:BB:BB:BB:BB:BB",
        "id": "e3dc3f95-55c6-4b55-8180-ab7fca244efc",
        "name": "Test RI Filter"
    }
]


NEW CHANGES:

  1. "applicationType" parameter is mandatory.


Retrieve and RI filter by rule name

GET http://<host>:<port>/queries/filters/ri/{ruleName}?applicationType={type}
Headers: 
Accept = application/json
Content-Type = application/json

applicationType is not required, default value is stb

Response: 200 OK, 400 BAD REQUEST

Request: http://localhost:9091/queries/filters/ri/testName.json (deprecated) OR http://localhost:9091/queries/filters/ri/testName

JSON response
  {
    "ipAddressGroups": [
        {
            "id": "All_Contec_Warehouse",
            "name": "All_Contec_Warehouse",
            "ipAddresses": [
                "111.111.111.111/28",
                "111.111.111.111/27",
                "111.111.111.111/28",
                "1001:1234:0001::/48",
            ]
        }
    ],
    "environments": [],
    "models": [],
    "macAddresses": "BB:BB:BB:BB:BB:BB",
    "id": "e3dc3f95-55c6-4b55-8180-ab7fca244efc",
    "name": "Test RI Filter"
}


NEW CHANGES:

  1. "applicationType" parameter is mandatory.
  2. null response is returned in case if filter is not found.
  3. Error changed to following structure:
JSON response
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "List is used by FirmwareRule test mac rule"
}

Create/update an RI filter

For creates, use POST method and don't specify id in the input json. Generated id is returned in the response.
For updates, use PUT method and id is a mandatory field in the input json.

POST http://<host>:<port>/updates/filters/ri?applicationType={type}
Headers: 
Accept = application/json
Content-Type = application/json

applicationType is required.

Response: 200 OK(for successful updates), 201 CREATED (for successful creates), 400 BAD REQUEST, 500 INTERNAL SERVER ERROR.

Restrictions: 

Name should be not empty, at least one of filter criteria should be specified, mac addresses should be valid.

JSON request
{
    "ipAddressGroups": [
        {
            "id": "TEST_IP_LIST",
            "name": "TEST_IP_LIST",
            "ipAddresses": [
                "10.10.10.10"
            ]
        }
    ],
    "environments": [],
    "models": [],
    "macAddresses": "BB:BB:BB:BB:BB:BB",
    "id": "e3dc3f95-55c6-4b55-8180-ab7fca244efc",
    "name": "Test RI Filter"
}


NEW CHANGES:

  1. "applicationType" parameter is mandatory.
  2. Error style changed to following structure:
JSON response
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "IP address group is not matched by existed IP address group"
}

Delete RI filter by name

DELETE http://<host>:<port>/delete/filters/ri/{RI filter name}?applicationType={type}
Headers: 
Accept = application/json
Content-Type = application/json

applicationType is required

Response: 204 NO CONTENT, 400 BAD REQUEST


NEW CHANGES:

  1. "applicationType" parameter is mandatory.
  2. Error style changed to following structure:
JSON response
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Firmware Rule Template

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'

Response: 200

[
    {
        "id": "MAC_RULE",
        "updated": 1682696197569,
        "rule": {
            "condition": {
                "freeArg": {
                    "type": "STRING",
                    "name": "eStbMac"
                },
                "operation": "IN_LIST",
                "fixedArg": {
                    "bean": {
                        "value": {
                            "java.lang.String": ""
                        }
                    }
                }
            },
            "negated": false
        },
        "applicableAction": {
            "type": ".ApplicableAction",
            "actionType": "RULE_TEMPLATE",
            "active": false,
            "useAccountPercentage": false,
            "firmwareCheckRequired": false,
            "rebootImmediately": false
        },
        "priority": 5,
        "editable": true
    }
]

NEW CHANGES:

  1. New fields added: applicableAction.active, applicableAction.firmwareCheckRequired, applicableAction.rebootImmediately, applicableAction.useAccountPercentage, updated.
  2. If there are no values for "byPassFilters" and "requiredFieds" - these fields are missing in response.


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:

[
    {
        "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:

{
    "NOT_IMPORTED": [],
    "IMPORTED": []
}

Response codes: 200, 400, 404, 409

Firmware Rule

Retrieve all firmware rules


GET http://<host>:<port>/firmwarerule?applicationType=stb
Headers:
Accept = application/json
Content-Type = application/json

Response body

[
    {
        "id": "d40fdb2d-193a-4d81-95e8-b7b33ed3ac4b",
        "updated": 1689275903420,
        "name": "test mac rule",
        "applicableAction": {
            "type": ".RuleAction",
            "actionType": "RULE",
            "configId": "74f531da-647e-4aaa-bfcf-9af4a29c6e18",
            "configEntries": [],
            "active": true,
            "useAccountPercentage": false,
            "firmwareCheckRequired": false,
            "rebootImmediately": false
        },
        "rule": {
            "condition": {
                "freeArg": {
                    "type": "STRING",
                    "name": "eStbMac"
                },
                "operation": "IN_LIST",
                "fixedArg": {
                    "bean": {
                        "value": {
                            "java.lang.String": "Ad_Proxy_NoRFC"
                        }
                    }
                }
            },
            "negated": false
        },
        "type": "MAC_RULE",
        "active": true,
        "applicationType": "stb"
    }
]

NEW CHANGES:

  1. "applicationType" is mandatory parameter.
  2. New fields added: updated.
  3. Error structure changed to following structure:
JSON response
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Retrieve filtered firmware rules

GET http://<host>:<port>/firmwarerule/filtered?tepmlateId=TEST_ID&key=firmwareVersion?applicationType=stb
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 can be combined: 

'?applicationType=stb&value=someValue'

NEW CHANGES:

  1. New fields added: updated.
  2. Error structure changed to following structure:
JSON response
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Import firmware rule

POST http://<host>:<port>/firmwarerule/importAll?applicationType=stb
Headers:
Accept = application/json
Content-Type = application/json

Request body is list of firmware rules:

[
  {
    "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"
  }
]

Return list of imported and not imported firmware rules' names:

Response body:

{
    "NOT_IMPORTED": [],
    "IMPORTED": ["testName"]
}

Response codes: 200, 400, 404, 409

NEW CHANGES:

  1. applicationType parameter is required.
  2. Error has following structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Feature

Retrieve all features

GET http://<host>:<port>/feature?applicationType=stb
Headers:
Accept = application/json
Content-Type = application/json

Response body

[
  {
        "id": "27a9d55e-0f0c-4809-b171-8357613f0efa",
        "name": "name",
        "featureName": "featureName",
        "effectiveImmediate": false,
        "enable": false,
        "whitelisted": false,
        "configData": {
            "key1": "value1"
        },
        "whitelistProperty": {},
        "applicationType": "stb"
    }
]

Retrieve filtered features

GET http://<host>:<port>/feature/filtered?applicationType=stb
Headers: 
Accept = application/json
Content-Type = application/json

Request params:

'applicationType' param is required.

  1. NAME: 
    'NAME=someName'
    To filter features by name
  2. FEATURE_INSTANCE
    'FEATURE_INSTANCE=someInstance'
    To filter features by instance
  3. FREE_ARG:
    'FREE_ARG=someKey'
    To filter by property key
  4. FIXED_ARG:
    'FIXED_ARG=someValue'
    to filter by property value
  5. applicationType:
    'applicationType=stb'
    to filter by application type

Parameters can be combined: 

'?applicationType=stb&FIXED_ARG=someValue'

Response: 200 OK, 400 BAD REQUEST, 500 INTERNAL SERVER ERROR

[
  {
        "id": "27a9d55e-0f0c-4809-b171-8357613f0efa",
        "name": "name",
        "featureName": "featureName",
        "effectiveImmediate": false,
        "enable": false,
        "whitelisted": false,
        "configData": {
            "key1": "value1"
        },
        "whitelistProperty": {},
        "applicationType": "stb"
    }
]


NEW CHANGES:

  1. applicationType parameter changed from to APPLICATION_TYPE to applicationType.
  2. New fields added: featureName.
  3. Error has following structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}


Import feature

POST http://<host>:<port>/feature/importAll?applicationType=stb
Headers: 
Accept = application/json
Content-Type = application/json

Request body is list of features:

[
  {
        "id": "27a9d55e-0f0c-4809-b171-8357613f0efa",
        "name": "name",
        "featureInstance": "featureInstance",
        "effectiveImmediate": false,
        "enable": false,
        "whitelisted": false,
        "configData": {
            "key1": "value1"
        },
        "whitelistProperty": {},
        "applicationType": "stb"
    }
]

Return list of imported and not imported feature ID's:

Response body:

{
    "NOT_IMPORTED": [],
    "IMPORTED": ["featureID"]
}

Response codes: 200, 400, 409.


NEW CHANGES:

  1. applicationType is mandatory.
  2. Error has following structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}


Create feature

POST http://<host>:<port>/feature?applicationType=stb
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is mandatory.

Request body is feature json object

{
	"id": "27a9d55e-0f0c-4809-b171-8357613f0efa",
    "name": "name",
    "featureInstance": "featureInstance",
    "effectiveImmediate": false,
    "enable": false,
    "whitelisted": false,
    "configData": {
        "key1": "value1"
    },
    "whitelistProperty": {},
    "applicationType": "stb"
}

Response codes: 201, 400, 409.

Response body: created feature.

NEW CHANGES:

  1. applicationType is mandatory.
  2. Error has following structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}


Update feature

PUT http://<host>:<port>/feature?applicationType=stb
Headers:
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request body is feature json object

{
	"id": "27a9d55e-0f0c-4809-b171-8357613f0efa",
    "name": "name",
    "featureInstance": "featureInstance",
    "effectiveImmediate": false,
    "enable": false,
    "whitelisted": false,
    "configData": {
        "key1": "value1"
    },
    "whitelistProperty": {},
    "applicationType": "stb"
}

Response codes: 200, 400, 404, 409.

Response body: updated feature.

NEW CHANGES:

  1. applicationType is mandatory.
  2. Error has json structure, but is some cases it is string:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

OR

"Entity id is empty"


Delete feature

DELETE http://<host>:<port>/feature/{id}?applicationType=stb
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Response codes: 204, 404, 409.

NEW CHANGES:

  1. applicationType is mandatory.
  2. Error has following structure:
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "This Feature linked to FeatureRule with name: taaa"
}


Feature Rule

Retrieve all feature rules

GET http://<host>:<port>/featurerule?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType is a required parameter.

Response body

[
    {
        "id": "963b2b7c-d198-4c23-820a-b56ac809c333",
        "name": "instance_test",
        "rule": {
            "negated": false,
            "condition": {
                "freeArg": {
                    "type": "STRING",
                    "name": "testKey"
                },
                "operation": "IS",
                "fixedArg": {
                    "bean": {
                        "value": {
                            "java.lang.String": "testValue"
                        }
                    }
                }
            },
            "compoundParts": []
        },
        "priority": 1,
        "featureIds": [
            "27a9d55e-0f0c-4809-b171-8357613f0efa"
        ],
        "applicationType": "stb"
    }
]

Response codes: 200.

NEW CHANGES:

  1. applicationType is mandatory parameter.
  2. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}


Retrieve filtered feature rules

GET http://<host>:<port>/featurerule/filtered??applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType is a required parameter.

Request params:

  1. NAME: 
    'NAME=ruleName'
    to filter feature rule by name
  2. FREE_ARG:
    'FREE_ARG=someKey'
    to filter by feature rule key
  3. FIXED_ARG:
    'FIXED_ARG=someValue'
    to filter by feature rule value
  4. FEATURE:
    'FEATURE=featureInstance'
    to filter by feature instance.
  5. applicationType:
    'applicationType=stb'
    to filter by application type

Parameters can be combined: 

'?APPLICATION_TYPE=stb&FIXED_ARG=someValue'

Response: list of filtered entities.

[
    {
        "id": "963b2b7c-d198-4c23-820a-b56ac809c333",
        "name": "instance_test",
        "rule": {
            "negated": false,
            "condition": {
                "freeArg": {
                    "type": "STRING",
                    "name": "testKey"
                },
                "operation": "IS",
                "fixedArg": {
                    "bean": {
                        "value": {
                            "java.lang.String": "testValue"
                        }
                    }
                }
            },
            "compoundParts": []
        },
        "priority": 1,
        "featureIds": [
            "27a9d55e-0f0c-4809-b171-8357613f0efa"
        ],
        "applicationType": "stb"
    }
]


NEW CHANGES:

  1. applicationType parameter name changed from APPLICATION_TYPE to applicationType.
  2. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}


Import feature rule

If feature rule with provided id does not exist it is imported otherwise updated.

POST http://<host>:<port>/featurerule/importAll?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request body is list of feature rules:

[
	{
        "id": "963b2b7c-d198-4c23-820a-b56ac809c333",
        "name": "instance_test",
        "rule": {
            "negated": false,
            "condition": {
                "freeArg": {
                    "type": "STRING",
                    "name": "testKey"
                },
                "operation": "IS",
                "fixedArg": {
                    "bean": {
                        "value": {
                            "java.lang.String": "testValue"
                        }
                    }
                }
            },
            "compoundParts": []
        },
        "priority": 1,
        "featureIds": [
            "27a9d55e-0f0c-4809-b171-8357613f0efa"
        ],
        "applicationType": "stb"
	}
]

Return list of imported and not imported feature rule IDs:

Response body:

{
    "NOT_IMPORTED": [],
    "IMPORTED": ["featureRuleId"]
}

Response codes: 200, 400, 404, 409

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}


Create feature rule

POST http://<host>:<port>/featurerule?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request body is feature rule json object

{
    "id": "963b2b7c-d198-4c23-820a-b56ac809c333",
    "name": "instance_test",
    "rule": {
        "negated": false,
        "condition": {
            "freeArg": {
                "type": "STRING",
                "name": "testKey"
            },
            "operation": "IS",
            "fixedArg": {
                "bean": {
                    "value": {
                        "java.lang.String": "testValue"
                    }
                }
            }
        },
        "compoundParts": []
    },
    "priority": 1,
    "featureIds": [
        "27a9d55e-0f0c-4809-b171-8357613f0efa"
    ],
    "applicationType": "stb"
}

Response codes: 201, 400, 404, 409.

Response body: created feature rule.

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Update feature rule

PUT http://<host>:<port>/featurerule?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request body is feature rule json object

{
    "id": "963b2b7c-d198-4c23-820a-b56ac809c333",
    "name": "instance_test",
    "rule": {
        "negated": false,
        "condition": {
            "freeArg": {
                "type": "STRING",
                "name": "testKey"
            },
            "operation": "IS",
            "fixedArg": {
                "bean": {
                    "value": {
                        "java.lang.String": "testValue"
                    }
                }
            }
        },
        "compoundParts": []
    },
    "priority": 1,
    "featureIds": [
        "27a9d55e-0f0c-4809-b171-8357613f0efa"
    ],
    "applicationType": "stb"
}

Response codes: 200, 400, 404, 409.

Response body: updated feature rule.

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Delete feature rule

DELETE http://<host>:<port>/featurerule/{id}?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Response codes: 204, 404, 409.

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure but in same cases it is still string:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

OR

"Entity with id: 5e20b32-f27d-42aa-a516-e90ace0a4959 does not exist"

Activation Minimum Version

Retrieve all activation minimum versions


GET http://<host>:<port>/amv?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Response body

[
    {
        "id": "bb71d9be-c6ca-44ee-95f9-4980f1d395d8",
        "applicationType": "stb",
        "description": "TEST ACTIVATION VERSION",
        "model": "MODEL1",
        "partnerId": "PARTNER-ID",
        "regularExpressions": [
            "testregex"
        ],
        "firmwareVersions": [
            "TEST_FIRMWARE_VERSION_AAA",
            "TEST_FIRMWARE_VERSION_AAA"
        ]
    }
]

Response codes: 200.


NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Retrieve filtered activation minimum versions

GET http://<host>:<port>/amv/filtered??applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request params:

'applicationType' param is required.

  1. DESCRIPTION: 
    'DESCRIPTION=description'
    to filter feature rule by description.
  2. MODEL:
    'MODEL=model'
    to filter by feature rule key
  3. PARTNER_ID:
    'PARTNER_ID=partnerId'
    to filter by feature rule value
  4. FIRMWARE_VERSION:
    'FIRMWARE_VERSION=firmwareVersion'
    to filter by feature name.
  5. REGULAR_EXPRESSION:
    'REGULAR_EXPRESSION=regularExpression'
  6. applicationType:
    'applicationType=stb'
    to filter by application type

Parameters can be combined: 

'?applicationType=stb&MODEL=modelId'

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. applicationType parameter name was changed from APPLICATION_TYPE to applicationType.
  3. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Import activation version

If activation minimum version with provided id does not exist it is imported otherwise updated.

POST http://<host>:<port>/amv/importAll?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request body is list of activation minimum version:

[
	{
        "id": "42670af7-6ea2-485f-9aee-1fa5895d655b",
        "applicationType": "stb",
        "description": "Activation Version",
        "regularExpressions": [],
        "model": "MODEL1",
        "firmwareVersions": [
            "FIRMWARE_VERSION"
        ]
    }
]

Return list of imported and not imported activation minimum version IDs:

Response body:

{
    "NOT_IMPORTED": [],
    "IMPORTED": ["42670af7-6ea2-485f-9aee-1fa5895d655b"]
}

Response codes: 200, 400, 404, 409

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Create activation minimum version

POST http://<host>:<port>/amv?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request body is activation minimum version json object

{
    "description": "TEST ACTIVATION VERSION 1 1",
    "model": "MODEL1",
    "partnerId": "PARTNER-ID 1",
    "regularExpressions": [
        "testregex"
    ],
    "firmwareVersions": [
        "TEST_FIRMWARE_VERSION_AAA"
    ]
}

Response codes: 201, 400, 404, 409.

Response body: created activation minimum version.

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Update activation minimum version

PUT http://<host>:<port>/amv?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request body is activation minimum version json object

{
	"id": "42670af7-6ea2-485f-9aee-1fa5895d655b",
    "applicationType": "stb",
    "description": "Activation Version",
    "regularExpressions": [],
    "model": "MODEL1",
    "firmwareVersions": [
        "FIRMWARE_VERSION"
    ]
}

Response codes: 200, 400, 404, 409.

Response body: updated activation minimum version.

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Delete activation minimum version

DELETE http://<host>:<port>/amv/{id}?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Response codes: 204, 404, 409.

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Telemetry Profile

Retrieve all Telemetry Profiles

GET http://<host>:<port>/telemetry/profile?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

[{
    "id": "1a5a55f9-d355-4959-9a9c-ed5e192a61fe",
    "telemetryProfile": [
    {
        "id": "c900bda0-d48a-4ede-9a0f-6459c5ed192b",
        "header": "Test1",
        "content": "Content1",
        "type": "Type1",
        "pollingFrequency": "1"
    }],
    "schedule": "1 1 1 1 1",
    "expires": 0,
    "applicationType": "rdkcloud",
    "telemetryProfile:name": "rdkcloudCompTest",
    "uploadRepository:URL": "rcompTest.com",
    "uploadRepository:uploadProtocol": "TFTP"
}]

Response Codes: 200

Response Body: list of Telemetry Profiles

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. New fields added: "@type".
  3. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Retrieve Telemetry Profile

Retrieve Telemetry Profile by id:

GET http://<host>:<port>/telemetry/profile/{id}?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

Response Body: Telemetry Profile

{
    "id": "1a5a55f9-d355-4959-9a9c-ed5e192a61fe",
    "telemetryProfile": [
    {
        "id": "c900bda0-d48a-4ede-9a0f-6459c5ed192b",
        "header": "Test1",
        "content": "Content1",
        "type": "Type1",
        "pollingFrequency": "1",
        "component": ""
    }],
    "schedule": "1 1 1 1 1",
    "expires": 0,
    "applicationType": "rdkcloud",
    "telemetryProfile:name": "rdkcloudCompTest",
    "uploadRepository:URL": "rcompTest.com",
    "uploadRepository:uploadProtocol": "TFTP"
}

Response Codes: 200, 404

NEW CHANGES:

  1. Error has json structure:
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "Entity with id aa does not exist"
}

Create Telemetry Profile

POST http://<host>:<port>/telemetry/profile?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request Body: Telemetry Profile with of without id

{
    "telemetryProfile": [
    {
        "header": "Test1",
        "content": "Content1",
        "type": "Type1",
        "pollingFrequency": "1",
        "component": ""
    }],
    "schedule": "1 1 1 1 1",
    "expires": 0,
    "applicationType": "rdkcloud",
    "telemetryProfile:name": "rdkcloudCompTest",
    "uploadRepository:URL": "rcompTest.com",
    "uploadRepository:uploadProtocol": "TFTP"
}

Response Codes: 201, 400, 409

Response Body: created telemetry profile

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "PermanentProfile with such name exists: rdkcloudCompTest"
}

Update Telemetry Profile

PUT http://<host>:<port>/telemetry/profile?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json


Request Body: Telemetry Profile

{
    "id": "1a5a55f9-d355-4959-9a9c-ed5e192a61fe",
    "telemetryProfile": [
    {
        "id": "c900bda0-d48a-4ede-9a0f-6459c5ed192b",
        "header": "Test1",
        "content": "Content1",
        "type": "Type1",
        "pollingFrequency": "1",
        "component": ""
    }],
    "schedule": "1 1 1 1 1",
    "expires": 0,
    "applicationType": "rdkcloud",
    "telemetryProfile:name": "rdkcloudCompTest",
    "uploadRepository:URL": "rcompTest.com",
    "uploadRepository:uploadProtocol": "TFTP"
}

Response Codes: 200, 400, 404, 409

NEW CHANGES:

  1. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "Entity id is empty"
}

Delete Telemetry Profile

DELETE http://<host>:<port>/telemetry/profile/{id}?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "Entity with id: 87c3a655-2511-46bd-81b8-206b7d33cbff does not exist"
}

Response Codes: 204, 404, 409

Add Telemetry Profile Entry

PUT http://<host>:<port>/telemetry/profile/entry/add/{id} 
Headers: 
Accept = application/json
Content-Type = application/json

Request Body: Telemetry Profile entry to add

[{
    "header": "Test2",
    "content": "Content2",
    "type": "Type2",
    "pollingFrequency": "2",
    "component": "Test Component"
}]

Response Code: 200, 404.

NEW CHANGES:

  1. Error has json structure:
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "Telemetry entry already exists"
}

Remove Telemetry Profile entry

PUT http://<host>:<port>/telemetry/profile/entry/remove/{id}?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request Body: Telemetry Profile entry to remove (id field is required)

[{
     "header": "Test2",
    "content": "Content2",
    "type": "Type2",
    "pollingFrequency": "2",
    "component": "Test Component"
}]

Response Code: 200, 404.

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
  3. id field is required .
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Create Telemetry Profile through pending changes

POST http://<host>:<port>/telemetry/profile/change?applicationType=stb
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request Body: Telemetry Profile with of without id

{
    "telemetryProfile": [
    {
        "header": "Test1",
        "content": "Content1",
        "type": "Type1",
        "pollingFrequency": "1",
        "component": ""
    }],
    "schedule": "1 1 1 1 1",
    "expires": 0,
    "applicationType": "rdkcloud",
    "telemetryProfile:name": "rdkcloudCompTest",
    "uploadRepository:URL": "rcompTest.com",
    "uploadRepository:uploadProtocol": "TFTP"
}

Response Codes: 201, 400, 409

Response Body: change entity

{
    "id": "f4d002fc-2e27-40b7-a4ff-f951cc02bd89",
    "updated": 1650377421993,
    "entityId": "4b4232c6-6db5-42cf-8e34-faa2f08e9f1a",
    "entityType": "TELEMETRY_PROFILE",
    "newEntity": {
        "@type": "PermanentTelemetryProfile",
        "id": "4b4232c6-6db5-42cf-8e34-faa2f08e9f1a",
        "telemetryProfile": [
            {
                "id": "96eb4a5b-8b8c-426d-96db-22fbbb8438a7",
                "header": "new entry",
                "content": "test CHANGE 1",
                "type": "aa",
                "pollingFrequency": "3",
                "component": "tete"
            }
        ],
        "schedule": "1 1 1 1 54",
        "expires": 0,
        "applicationType": "stb",
        "telemetryProfile:name": "API created PENDING CHANGES XHOME",
        "uploadRepository:URL": "https://test-change-4.com",
        "uploadRepository:uploadProtocol": "HTTPS"
    },
    "operation": "CREATE",
    "author": "UNKNOWN_USER"
}

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 400,
    "type": "ExceptionType",
    "message": "Exception message"
}

Update Telemetry Profile with approval

PUT http://<host>:<port>/telemetry/profile/change?applicationType=stb
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required

Request Body: Telemetry Profile

{
    "id": "1a5a55f9-d355-4959-9a9c-ed5e192a61fe",
    "telemetryProfile": [
    {
        "id": "c900bda0-d48a-4ede-9a0f-6459c5ed192b",
        "header": "Test1",
        "content": "Content1",
        "type": "Type1",
        "pollingFrequency": "1",
        "component": ""
    }],
    "schedule": "1 1 1 1 1",
    "expires": 0,
    "applicationType": "rdkcloud",
    "telemetryProfile:name": "rdkcloudCompTest",
    "uploadRepository:URL": "rcompTest.com",
    "uploadRepository:uploadProtocol": "TFTP"
}

Response Codes: 200, 400, 404, 409

Response Body: null value – needs to be fixed.

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Response is null object (will be fixed)
  3. Error has following json structure:

{
    "status": 400,
    "type": "ExceptionType",
    "message": "Exception message"
}

Delete Telemetry Profile with approval

DELETE http://<host>:<port>/telemetry/profile/change/{id}?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Response Codes: 204, 404, 409

Response Body: change entity

{
    "id": "43784bc2-be36-4ff3-8662-c51e91d67be6",
    "updated": 1650382497651,
    "entityId": "101391a4-5582-4d4d-bd73-e0f68839eadd",
    "entityType": "TELEMETRY_PROFILE",
    "oldEntity": {
        "@type": "PermanentTelemetryProfile",
        "id": "101391a4-5582-4d4d-bd73-e0f68839eadd",
        "telemetryProfile": [
            {
                "id": "cca479b8-66bf-45af-ba07-e7b991f61e35",
                "header": "test-changed",
                "content": "test-changed",
                "type": "test",
                "pollingFrequency": "32",
                "component": "32"
            }
        ],
        "schedule": "1 1 1 1 1",
        "expires": 0,
        "applicationType": "xhome",
        "telemetryProfile:name": "xhome profile",
        "uploadRepository:URL": "http://test.com",
        "uploadRepository:uploadProtocol": "HTTP"
    },
    "operation": "DELETE",
    "author": "UNKNOWN_USER"
}

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Add Telemetry Profile Entry with approval

PUT http://<host>:<port>/telemetry/profile/change/entry/add/{id}?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request Body: Telemetry Profile entry to add


[{
    "header": "Test2",
    "content": "Content2",
    "type": "Type2",
    "pollingFrequency": "2",
    "component": "Test Component"
}]

Response Code: 200, 404

Response Body: change entity

{
    "id": "f1fced8a-6c97-42a3-a8d3-756cbdd32daf",
    "updated": 1650382757134,
    "entityId": "101391a4-5582-4d4d-bd73-e0f68839eadd",
    "entityType": "TELEMETRY_PROFILE",
    "newEntity": {
        "@type": "PermanentTelemetryProfile",
        "id": "101391a4-5582-4d4d-bd73-e0f68839eadd",
        "telemetryProfile": [
            {
                "id": "cca479b8-66bf-45af-ba07-e7b991f61e35",
                "header": "test-changed",
                "content": "test-changed",
                "type": "test",
                "pollingFrequency": "32",
                "component": "32"
            },
            {
                "id": "963bbcff-85d7-46ca-a96e-c5aed0842802",
                "header": "Test2",
    			"content": "Content2",
    			"type": "Type2",
    			"pollingFrequency": "2",
    			"component": "Test Component"
            }
        ],
        "schedule": "1 1 1 1 1",
        "expires": 0,
        "applicationType": "xhome",
        "telemetryProfile:name": "xhome profile",
        "uploadRepository:URL": "http://test.com",
        "uploadRepository:uploadProtocol": "HTTP"
    },
    "oldEntity": {
        "@type": "PermanentTelemetryProfile",
        "id": "101391a4-5582-4d4d-bd73-e0f68839eadd",
        "telemetryProfile": [
            {
                "id": "cca479b8-66bf-45af-ba07-e7b991f61e35",
                "header": "test-changed",
                "content": "test-changed",
                "type": "test",
                "pollingFrequency": "32",
                "component": "32"
            }
        ],
        "schedule": "1 1 1 1 1",
        "expires": 0,
        "applicationType": "xhome",
        "telemetryProfile:name": "xhome profile",
        "uploadRepository:URL": "http://test.com",
        "uploadRepository:uploadProtocol": "HTTP"
    },
    "operation": "UPDATE",
    "author": "UNKNOWN_USER"
}

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 400,
    "type": "ErrorType",
    "message": "Error message"
}

Remove Telemetry Profile entry with approval

PUT http://<host>:<port>/telemetry/profile/change/entry/remove/{id}?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request Body: Telemetry Profile entry to remove

[{
    "header": "Test2",
    "content": "Content2",
    "type": "Type2",
    "pollingFrequency": "2",
    "component": "Test Component"
}]

Response Code: 200, 404

Response Body: update change

{
    "id": "4705486f-2dcc-4ae9-a920-a45b33755993",
    "updated": 1650383061321,
    "entityId": "55dfe0ba-44a3-4953-b6e8-3d165e0cb22d",
    "entityType": "TELEMETRY_PROFILE",
    "newEntity": {
        "@type": "PermanentTelemetryProfile",
        "id": "55dfe0ba-44a3-4953-b6e8-3d165e0cb22d",
        "telemetryProfile": [
            {
                "id": "963bbcff-85d7-46ca-a96e-c5aed0842802",
                "header": "API added header CHANGE",
                "content": "API added content CHANGE 2",
                "type": "API added type",
                "pollingFrequency": "10",
                "component": "API added component"
            }
        ],
        "schedule": "1 1 1 1 54",
        "expires": 0,
        "applicationType": "stb",
        "telemetryProfile:name": "API created profile",
        "uploadRepository:URL": "https://test-change-4.com",
        "uploadRepository:uploadProtocol": "HTTPS"
    },
    "oldEntity": {
        "@type": "PermanentTelemetryProfile",
        "id": "55dfe0ba-44a3-4953-b6e8-3d165e0cb22d",
        "telemetryProfile": [
            {
                "id": "3e39888e-7398-456f-bec4-904b1eab2ff3",
                "header": "testaa test",
                "content": "test CHANGE 1",
                "type": "aa",
                "pollingFrequency": "3",
                "component": "tete"
            },
            {
                "id": "0d02b4cd-cdf6-42f0-8ae6-d7fb7286edb0",
                "header": "API added header CHANGED",
                "content": "API content CHANGE 3",
                "type": "API added type",
                "pollingFrequency": "10",
                "component": "t"
            }
        ],
        "schedule": "1 1 1 1 54",
        "expires": 0,
        "applicationType": "stb",
        "telemetryProfile:name": "API created profile",
        "uploadRepository:URL": "https://test-change-4.com",
        "uploadRepository:uploadProtocol": "HTTPS"
    },
    "operation": "UPDATE",
    "author": "UNKNOWN_USER"
}

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "Telemetry entry does not exist"
}

Telemetry Profile 2.0

Retrieve all Telemetry 2.0 Profiles

GET http://<host>:<port>/telemetry/v2/profile?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

[
	{
    	"@type": "TelemetryTwoProfile",
	    "id": "d46afcad-42d4-4a83-8c4a-540268921998",
    	"updated": 1682348672800,
	    "name": "WhixTelemetry",
	    "jsonconfig": "{\n  \"Protocol\": \"HTTP\",\n  \"EncodingType\": \"JSON\",\n  \"GenerateNow\": false,\n  \"ReportingInterval\": 3600,\n  \"RootName\": \"searchResult\",\n  \"TimeReference\": \"0001-01-01T00:00:00Z\",\n  	\"Parameter\": [\n    {\n      \"type\": \"dataModel\",\n      \"name\": \"Time\",\n      \"reference\": \"Device.Time.X_RDK_CurrentUTCTime\"\n    },\n    {\n      \"type\": \"dataModel\",\n      \"name\": \"CMMAC_split\",\n      \"reference\": \"Device.DeviceInfo.COM_CM_MAC\"\n    },\n    {\n      \"type\": \"dataModel\",\n      \"name\": \"Version\",\n      \"reference\": \"Device.DeviceInfo.SoftwareVersion\"\n    },\n    {\n      \"type\": \"dataModel\",\n      \"name\": \"mac\",\n      \"reference\": \"Device.DeviceInfo.COM_WAN_MAC\"\n    }\n  ],\n  \"HTTP\": {\n    \"URL\": \"https://test.com\",\n    \"Compression\": \"None\",\n    \"Method\": \"POST\",\n    \"RequestURIParameter\": [\n      {\n        \"Name\": \"Wifi_ClientRadioTelemetry\",\n        \"Reference\": \"Wifi markers\"\n      }\n    ]\n  },\n  \"JSONEncoding\": {\n    \"ReportFormat\": \"NameValuePair\",\n    \"ReportTimestamp\": \"None\"\n  }\n}",
    "applicationType": "stb"
	}
]

Response Codes: 200

Response Body: list of Telemetry 2.0 Profiles

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. New fields added: "@type".
  3. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Retrieve Telemetry 2.0 Profile by id

GET http://<host>:<port>/telemetry/v2/profile/{id}?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Response Body: Telemetry 2.0 Profile

{
    "@type": "TelemetryTwoProfile",
    "id": "d46afcad-42d4-4a83-8c4a-540268921998",
    "updated": 1682348672800,
    "name": "WhixTelemetry",
    "jsonconfig": "{\n  \"Protocol\": \"HTTP\",\n  \"EncodingType\": \"JSON\",\n  \"GenerateNow\": false,\n  \"ReportingInterval\": 3600,\n  \"RootName\": \"searchResult\",\n  \"TimeReference\": \"0001-01-01T00:00:00Z\",\n  \"Parameter\": [\n    {\n      \"type\": \"dataModel\",\n      \"name\": \"Time\",\n      \"reference\": \"Device.Time.X_RDK_CurrentUTCTime\"\n    },\n    {\n      \"type\": \"dataModel\",\n      \"name\": \"CMMAC_split\",\n      \"reference\": \"Device.DeviceInfo.COM_CM_MAC\"\n    },\n    {\n      \"type\": \"dataModel\",\n      \"name\": \"Version\",\n      \"reference\": \"Device.DeviceInfo.SoftwareVersion\"\n    },\n    {\n      \"type\": \"dataModel\",\n      \"name\": \"mac\",\n      \"reference\": \"Device.DeviceInfo.COM_WAN_MAC\"\n    }\n  ],\n  \"HTTP\": {\n    \"URL\": \"https://test.com\",\n    \"Compression\": \"None\",\n    \"Method\": \"POST\",\n    \"RequestURIParameter\": [\n      {\n        \"Name\": \"Wifi_ClientRadioTelemetry\",\n        \"Reference\": \"Wifi markers\"\n      }\n    ]\n  },\n  \"JSONEncoding\": {\n    \"ReportFormat\": \"NameValuePair\",\n    \"ReportTimestamp\": \"None\"\n  }\n}",
    "applicationType": "stb"
}

Response Codes: 200, 404

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. New fields added: "@type".
  3. Error has json structure:
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "Entity with id 1d46afcad-42d4-4a83-8c4a-540268921998 does not exist"
}

Create Telemetry 2.0 Profile

POST http://<host>:<port>/telemetry/v2/profile?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request Body: Telemetry 2.0 Profile with of without id

{
    "name": "TEST TEST",
    "jsonconfig": "{\n  \"Protocol\": \"HTTP\",\n  \"EncodingType\": \"JSON\",\n  \"GenerateNow\": false,\n  \"ReportingInterval\": 3600,\n  \"RootName\": \"searchResult\",\n  \"TimeReference\": \"0001-01-01T00:00:00Z\",\n  \"Parameter\": [\n    {\n      \"type\": \"dataModel\",\n      \"name\": \"Time\",\n      \"reference\": \"Device.Time.X_RDK_CurrentUTCTime\"\n    },\n    {\n      \"type\": \"dataModel\",\n      \"name\": \"CMMAC_split\",\n      \"reference\": \"Device.DeviceInf.COM_CM_MAC\"\n    },\n    {\n      \"type\": \"dataModel\",\n      \"name\": \"Version\",\n      \"reference\": \"Device.DeviceInfo.SoftwareVersion\"\n    },\n    {\n      \"type\": \"dataModel\",\n      \"name\": \"mac\",\n      \"reference\": \"Device.DeviceInfo.COM_WAN_MAC\"\n    }\n  ],\n  \"HTTP\": {\n    \"URL\": \"https://test.com\",\n    \"Compression\": \"None\",\n    \"Method\": \"POST\",\n    \"RequestURIParameter\": [\n      {\n        \"Name\": \"Wifi_ClientRadioTelemetry\",\n        \"Reference\": \"Wifi markers\"\n      }\n    ]\n  },\n  \"JSONEncoding\": {\n    \"ReportFormat\": \"NameValuePair\",\n    \"ReportTimestamp\": \"None\"\n  }\n}"
}

Response Codes: 201, 400, 409

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "Entity with id: d46afcad-42d4-4a83-8c4a-540268921998 already exists"
}

Update Telemetry 2.0 Profile

PUT http://<host>:<port>/telemetry/v2/profile?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

 applicationType parameter is required.

Request Body: Telemetry Profile

{
    "id": "8fb459f6-044e-4c64-99ff-e0c7c1b4124b",
    "updated": 1646687418358,
    "name": "test",
    "jsonconfig": "{\n    \"Description\": \"Profile to test the support for lesser than operator in trigger conditions\",\n    \"Version\": \"2\",\n    \"Protocol\": \"HTTP\",\n    \"EncodingType\": \"JSON\",\n    \"ReportingInterval\": 240,\n    \"ActivationTimeOut\": 2400,\n    \"Parameter\": [\n        {\n            \"type\": \"dataModel\",\n            \"reference\": \"Profile.Name\"\n        },\n        {\n            \"type\": \"dataModel\",\n            \"reference\": \"Profile.Version\"\n        },\n        {\n            \"type\": \"dataModel\",\n            \"reference\": \"Device.DeviceInfo.UpTime\",\n            \"use\": \"absolute\"\n        },\n        {\n            \"type\": \"event\",\n            \"eventName\": \"NF_INFO_codedumped\",\n            \"component\": \"sysint\",\n            \"use\": \"count\",\n            \"reportEmpty\": false\n        },\n        {\n            \"type\": \"dataModel\",\n            \"reference\": \"Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.hwHealthTest.dramThreshold\",\n            \"method\": \"subscribe\"\n        },\n        {   \"type\":\"dataModel\", \n            \"reference\":\"Device.WiFi.Radio.1.Stats.Noise\",\n            \"method\": \"get\"\n        }\n    ],\n    \"TriggerCondition\": [\n        {\n            \"type\": \"dataModel\",\n            \"operator\": \"gt\",\n            \"threshold\": 20,\n            \"minThresholdDuration\": 0,\n            \"reference\": \"Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.hwHealthTest.dramThreshold\",\n            \"report\":false\n        }\n    ],\n    \"HTTP\": {\n        \"URL\": \"https://test.com/\",\n        \"Compression\": \"None\",\n        \"Method\": \"POST\",\n        \"RequestURIParameter\": [\n            {\n                \"Name\": \"reportName\",\n                \"Reference\": \"Profile.Name\"\n            }\n        ]\n    },\n    \"JSONEncoding\": {\n        \"ReportFormat\": \"NameValuePair\",\n        \"ReportTimestamp\": \"None\"\n    }\n}",
    "applicationType": "rdkcloud"
}

Response Codes: 200, 400, 404, 409

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "Entity with id: 1d46afcad-42d4-4a83-8c4a-540268921998 does not exist"
}

Delete Telemetry 2.0 Profile

DELETE http://<host>:<port>/telemetry/v2/profile/{id}?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Response Codes: 204, 404, 409.

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "Can't delete profile as it's used in telemetry rule: aaa"
}

Create with approval

POST http://<host>:<port>/telemetry/v2/profile/change?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request Body: telemetry 2.0 profile

{
    
    "name": "test",
    "jsonconfig": "{\n    \"Description\": \"Profile to test the support for lesser than operator in trigger conditions\",\n    \"Version\": \"2\",\n    \"Protocol\": \"HTTP\",\n    \"EncodingType\": \"JSON\",\n    \"ReportingInterval\": 240,\n    \"ActivationTimeOut\": 2400,\n    \"Parameter\": [\n        {\n            \"type\": \"dataModel\",\n            \"reference\": \"Profile.Name\"\n        },\n        {\n            \"type\": \"dataModel\",\n            \"reference\": \"Profile.Version\"\n        },\n        {\n            \"type\": \"dataModel\",\n            \"reference\": \"Device.DeviceInfo.UpTime\",\n            \"use\": \"absolute\"\n        },\n        {\n            \"type\": \"event\",\n            \"eventName\": \"NF_INFO_codedumped\",\n            \"component\": \"sysint\",\n            \"use\": \"count\",\n            \"reportEmpty\": false\n        },\n        {\n            \"type\": \"dataModel\",\n            \"reference\": \"Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.hwHealthTest.dramThreshold\",\n            \"method\": \"subscribe\"\n        },\n        {   \"type\":\"dataModel\", \n            \"reference\":\"Device.WiFi.Radio.1.Stats.Noise\",\n            \"method\": \"get\"\n        }\n    ],\n    \"TriggerCondition\": [\n        {\n            \"type\": \"dataModel\",\n            \"operator\": \"gt\",\n            \"threshold\": 20,\n            \"minThresholdDuration\": 0,\n            \"reference\": \"Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.hwHealthTest.dramThreshold\",\n            \"report\":false\n        }\n    ],\n    \"HTTP\": {\n        \"URL\": \"https://test.com/\",\n        \"Compression\": \"None\",\n        \"Method\": \"POST\",\n        \"RequestURIParameter\": [\n            {\n                \"Name\": \"reportName\",\n                \"Reference\": \"Profile.Name\"\n            }\n        ]\n    },\n    \"JSONEncoding\": {\n        \"ReportFormat\": \"NameValuePair\",\n        \"ReportTimestamp\": \"None\"\n    }\n}",
    "applicationType": "rdkcloud"
}

Response Code: 201, 400

Response Body: telemetry 2.0 profile change:

{
    "id": "3af4204b-ea9e-4f26-9254-1b83cf3dee01",
    "updated": 1659722159734,
    "entityId": "8205d716-8e45-4570-a34b-f1ebe0bdc75e",
    "entityType": "TELEMETRY_TWO_PROFILE",
    "newEntity": {
        "@type": "TelemetryTwoProfile",
        "id": "8205d716-8e45-4570-a34b-f1ebe0bdc75e",
        "updated": 1621625846548,
        "name": "Test Telemetry 2.0 Profile name",
        "jsonconfig": "{\n    \"Description\":\"Test1\",\n    \"Version\":\"0.1\",\n    \"Protocol\":\"HTTP\",\n    \"EncodingType\":\"JSON\",\n    \"ReportingInterval\":43200,\n    \"TimeReference\":\"0001-01-01T00:00:00Z\",\n    \"Parameter\":\n        [\n            { \"type\": \"dataModel\", \"reference\": \"Profile.Name\"}, \n            { \"type\": \"dataModel\", \"reference\": \"Profile.Version\"},\n            { \"type\": \"grep\", \"marker\": \"Connie_marker1\", \"search\":\"restart 'lock to rescue CMTS retry' timer\", \"logFile\":\"cmconsole.log\" }\n\n        ],\n    \"HTTP\": {\n        \"URL\":\"https://test.com\",\n        \"Compression\":\"None\",\n        \"Method\":\"POST\",\n        \"RequestURIParameter\": [\n            {\"Name\":\"profileName\", \"Reference\":\"Profile.Name\" },\n            {\"Name\":\"reportVersion\", \"Reference\":\"Profile.Version\" }\n        ]\n\n    },\n    \"JSONEncoding\": {\n        \"ReportFormat\":\"NameValuePair\",\n        \"ReportTimestamp\": \"None\"\n    }\n\n}",
        "applicationType": "stb"
    },
    "operation": "CREATE",
    "author": "UNKNOWN_USER"
}

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "TelemetryTwo Profile with such name exists: TEST TEST"
}

Update with approval

PUT http://<host>:<port>/telemetry/v2/profile/change?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Request Body: telemetry 2.0 profile

{
    "id": "8fb459f6-044e-4c64-99ff-e0c7c1b4124b",
    "name": "test",
    "jsonconfig": "{\n    \"Description\": \"Profile to test the support for lesser than operator in trigger conditions\",\n    \"Version\": \"2\",\n    \"Protocol\": \"HTTP\",\n    \"EncodingType\": \"JSON\",\n    \"ReportingInterval\": 240,\n    \"ActivationTimeOut\": 2400,\n    \"Parameter\": [\n        {\n            \"type\": \"dataModel\",\n            \"reference\": \"Profile.Name\"\n        },\n        {\n            \"type\": \"dataModel\",\n            \"reference\": \"Profile.Version\"\n        },\n        {\n            \"type\": \"dataModel\",\n            \"reference\": \"Device.DeviceInfo.UpTime\",\n            \"use\": \"absolute\"\n        },\n        {\n            \"type\": \"event\",\n            \"eventName\": \"NF_INFO_codedumped\",\n            \"component\": \"sysint\",\n            \"use\": \"count\",\n            \"reportEmpty\": false\n        },\n        {\n            \"type\": \"dataModel\",\n            \"reference\": \"Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.hwHealthTest.dramThreshold\",\n            \"method\": \"subscribe\"\n        },\n        {   \"type\":\"dataModel\", \n            \"reference\":\"Device.WiFi.Radio.1.Stats.Noise\",\n            \"method\": \"get\"\n        }\n    ],\n    \"TriggerCondition\": [\n        {\n            \"type\": \"dataModel\",\n            \"operator\": \"gt\",\n            \"threshold\": 20,\n            \"minThresholdDuration\": 0,\n            \"reference\": \"Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.hwHealthTest.dramThreshold\",\n            \"report\":false\n        }\n    ],\n    \"HTTP\": {\n        \"URL\": \"https://test.com/\",\n        \"Compression\": \"None\",\n        \"Method\": \"POST\",\n        \"RequestURIParameter\": [\n            {\n                \"Name\": \"reportName\",\n                \"Reference\": \"Profile.Name\"\n            }\n        ]\n    },\n    \"JSONEncoding\": {\n        \"ReportFormat\": \"NameValuePair\",\n        \"ReportTimestamp\": \"None\"\n    }\n}",
    "applicationType": "rdkcloud"
}

Response Code: 200, 400

Response Body: telemetry 2.0 profile change:

{
    "id": "c3fee291-5376-40cf-88a3-96aadaa0e28b",
    "updated": 1659727767163,
    "entityId": "8205d716-8e45-4570-a34b-f1ebe0bdc75e",
    "entityType": "TELEMETRY_TWO_PROFILE",
    "newEntity": {
        "@type": "TelemetryTwoProfile",
        "id": "8205d716-8e45-4570-a34b-f1ebe0bdc75e",
        "updated": 1621625846548,
        "name": "Test Telemetry 2.0 Profile name",
        "jsonconfig": "{\n    \"Description\":\"Test1\",\n    \"Version\":\"0.1\",\n    \"Protocol\":\"HTTP\",\n    \"EncodingType\":\"JSON\",\n    \"ReportingInterval\":43200,\n    \"TimeReference\":\"0001-01-01T00:00:00Z\",\n    \"Parameter\":\n        [\n            { \"type\": \"dataModel\", \"reference\": \"Profile.Name\"}, \n            { \"type\": \"dataModel\", \"reference\": \"Profile.Version\"},\n            { \"type\": \"grep\", \"marker\": \"Connie_marker1\", \"search\":\"restart 'lock to rescue CMTS retry' timer\", \"logFile\":\"cmconsole.log\" }\n\n        ],\n    \"HTTP\": {\n        \"URL\":\"https://test.com\",\n        \"Compression\":\"None\",\n        \"Method\":\"POST\",\n        \"RequestURIParameter\": [\n            {\"Name\":\"profileName\", \"Reference\":\"Profile.Name\" },\n            {\"Name\":\"reportVersion\", \"Reference\":\"Profile.Version\" }\n        ]\n\n    },\n    \"JSONEncoding\": {\n        \"ReportFormat\":\"NameValuePair\",\n        \"ReportTimestamp\": \"None\"\n    }\n\n}",
        "applicationType": "stb"
    },
    "oldEntity": {
        "@type": "TelemetryTwoProfile",
        "id": "8205d716-8e45-4570-a34b-f1ebe0bdc75e",
        "updated": 1659727722268,
        "name": "Test Telemetry 2.0 Profile name",
        "jsonconfig": "{\n    \"Description\":\"Test1\",\n    \"Version\":\"0.1\",\n    \"Protocol\":\"HTTP\",\n    \"EncodingType\":\"JSON\",\n    \"ReportingInterval\":43200,\n    \"TimeReference\":\"0001-01-01T00:00:00Z\",\n    \"Parameter\":\n        [\n            { \"type\": \"dataModel\", \"reference\": \"Profile.Name\"}, \n            { \"type\": \"dataModel\", \"reference\": \"Profile.Version\"},\n            { \"type\": \"grep\", \"marker\": \"Connie_marker1\", \"search\":\"restart 'lock to rescue CMTS retry' timer\", \"logFile\":\"cmconsole.log\" }\n\n        ],\n    \"HTTP\": {\n        \"URL\":\"https://test.com\",\n        \"Compression\":\"None\",\n        \"Method\":\"POST\",\n        \"RequestURIParameter\": [\n            {\"Name\":\"profileName\", \"Reference\":\"Profile.Name\" },\n            {\"Name\":\"reportVersion\", \"Reference\":\"Profile.Version\" }\n        ]\n\n    },\n    \"JSONEncoding\": {\n        \"ReportFormat\":\"NameValuePair\",\n        \"ReportTimestamp\": \"None\"\n    }\n\n}",
        "applicationType": "stb"
    },
    "operation": "UPDATE",
    "author": "UNKNOWN_USER"
}

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 404,
    "type": "EntityNotFoundException",
    "message": "Entity with id: -7c43c035-0d7c-4ea5-bbb5-77eacec91e5f does not exist"
}

Delete with approval

DELETE http://<host>:<port>/telemetry/v2/profile/change/{profile id}?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType parameter is required.

Response statuls: 200, 404, 409

{
    "id": "6c72b3ae-08d0-48a1-90dc-3a942fb49d0a",
    "updated": 1659727950173,
    "entityId": "8205d716-8e45-4570-a34b-f1ebe0bdc75e",
    "entityType": "TELEMETRY_TWO_PROFILE",
    "oldEntity": {
        "@type": "TelemetryTwoProfile",
        "id": "8205d716-8e45-4570-a34b-f1ebe0bdc75e",
        "updated": 1659727722268,
        "name": "Test Telemetry 2.0 Profile name",
        "jsonconfig": "{\n    \"Description\":\"Test1\",\n    \"Version\":\"0.1\",\n    \"Protocol\":\"HTTP\",\n    \"EncodingType\":\"JSON\",\n    \"ReportingInterval\":43200,\n    \"TimeReference\":\"0001-01-01T00:00:00Z\",\n    \"Parameter\":\n        [\n            { \"type\": \"dataModel\", \"reference\": \"Profile.Name\"}, \n            { \"type\": \"dataModel\", \"reference\": \"Profile.Version\"},\n            { \"type\": \"grep\", \"marker\": \"Connie_marker1\", \"search\":\"restart 'lock to rescue CMTS retry' timer\", \"logFile\":\"cmconsole.log\" }\n\n        ],\n    \"HTTP\": {\n        \"URL\":\"https://test.com\",\n        \"Compression\":\"None\",\n        \"Method\":\"POST\",\n        \"RequestURIParameter\": [\n            {\"Name\":\"profileName\", \"Reference\":\"Profile.Name\" },\n            {\"Name\":\"reportVersion\", \"Reference\":\"Profile.Version\" }\n        ]\n\n    },\n    \"JSONEncoding\": {\n        \"ReportFormat\":\"NameValuePair\",\n        \"ReportTimestamp\": \"None\"\n    }\n\n}",
        "applicationType": "stb"
    },
    "operation": "DELETE",
    "author": "UNKNOWN_USER"
}

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "Can't delete profile as it's used in telemetry rule: aaa"
}

Change API

Approve by change ids - deprecated in golang implementation

All not selected changes by entity id will be canceled. For example, there are two changes, "change A" and "change B", id of "change A" is sent to approve, in result "change A" will be approved and "change B" will be canceled

POST http://<host>:<port>/change/approve/byChangeIds 
Headers: 
Accept = application/json
Content-Type = application/json

Request Body: array with change ids

["4705486f-2dcc-4ae9-a920-a45b33755993"]

Response Codes: 200, 404, 409

Response Body: change id - error message object. If change successfully approve an empty object is returned

Approve by entity id - deprecated in golang implementation

To approve all changes by entity id

GET http://<host>:<port>/change/approve/byEntityId/{id}
Headers: 
Accept = application/json
Content-Type = application/json

Response Codes: 200, 404, 409

Response Body: change id - error message object. If change successfully approve an empty object is returned

Cancel change

GET http://<host>:<port>/change/cancel/{changeId}?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType is required parameter

Response status: 200, 400, 404.

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": " Change with 3cfb76d0-6448-401f-9204-50a1556743b3 id does not exist"
}

Retrieve all changes

GET http://<host>:<port>/change/all?applicationType=stb 
Headers: 
Accept = application/json
Content-Type = application/json

applicationType is required parameter

Response Codes: 200

Response Body: array with all telemetry changes

[
 {
        "id": "753b23b6-7269-4ce3-afb8-9e6599f14407",
        "updated": 1650378702485,
        "entityId": "3081f7d2-4364-4c55-a9c4-daf489196d0b",
        "entityType": "TELEMETRY_PROFILE",
        "newEntity": {
            "@type": "PermanentTelemetryProfile",
            "id": "3081f7d2-4364-4c55-a9c4-daf489196d0b",
            "telemetryProfile": [
                {
                    "id": "0fad3efd-d4c6-4380-8d2b-e63e080d75d9",
                    "header": "new entry",
                    "content": "test CHANGE 2",
                    "type": "aa",
                    "pollingFrequency": "3",
                    "component": "tete"
                }
            ],
            "schedule": "1 1 1 1 54",
            "expires": 0,
            "applicationType": "xhome",
            "telemetryProfile:name": "2 API created PENDING CHANGES XHOME",
            "uploadRepository:URL": "https://test-change-4.com",
            "uploadRepository:uploadProtocol": "HTTPS"
        },
        "operation": "CREATE",
        "author": "UNKNOWN_USER"
    }
]

NEW CHANGES:

  1. applicationType parameter is mandatory.
  2. Error has json structure:
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "Can't delete profile as it's used in telemetry rule: aaa"
}

Change v2 API

Approve by change ids - deprecated in golang implementation

All not selected changes by entity id will be canceled. For example, there are two changes, "change A" and "change B", id of "change A" is sent to approve, in result "change A" will be approved and "change B" will be canceled

POST http://<host>:<port>/change/v2/approve/byChangeIds
Headers:
Accept = application/json
Content-Type = application/json

Request Body: array with change ids

["4705486f-2dcc-4ae9-a920-a45b33755993"]

Response Codes: 200, 404, 409

Response Body: change id - error message object. If change successfully approve an empty object is returned

Approve by entity id - deprecated in golang implementation

To approve all changes by entity id

GET http://<host>:<port>/change/v2/approve/byEntityId/{id}

Response Codes: 200, 404, 409

Response Body: change id - error message object. If change successfully approve an empty object is returned

Cancel change

GET http://<host>:<port>/telemetry/v2/change/cancel/{changeId}?applicationType=stb
Headers:
Accept = application/json
Content-Type = application/json

applicationType is required.

Response status: 200, 404

NEW CHANGES:

  1. API mapping changed from /change/v2/cancel/{change id} to /telemetry/v2/change/cancel/{changeId}
  2. applicationType parameter is mandatory.
  3. Error has json structure:
{
    "status": 400,
    "type": "ValidationRuntimeException",
    "message": "ApplicationType is empty"
}

Retrieve all changes

GET http://<host>:<port>/telemetry/v2/change/all?applicationType=stb
Headers:
Accept = application/json
Content-Type = application/json

applicationType is required.

Response Codes: 200

Response Body: array with all telemetry changes

[  {
        "id": "f4ed5948-ba3f-4ccf-a98e-325968dc5fcd",
        "updated": 1659034541903,
        "entityId": "8205d716-8e45-4570-a34b-f1ebe0bdc75e",
        "entityType": "TELEMETRY_TWO_PROFILE",
        "newEntity": {
            "@type": "TelemetryTwoProfile",
            "id": "8205d716-8e45-4570-a34b-f1ebe0bdc75e",
            "updated": 1621625846548,
            "name": "Test - changed again with approval",
            "jsonconfig": "{\n    \"Description\":\"Test1\",\n    \"Version\":\"0.1\",\n    \"Protocol\":\"HTTP\",\n    \"EncodingType\":\"JSON\",\n    \"ReportingInterval\":43200,\n    \"TimeReference\":\"0001-01-01T00:00:00Z\",\n    \"Parameter\":\n        [\n            { \"type\": \"dataModel\", \"reference\": \"Profile.Name\"}, \n            { \"type\": \"dataModel\", \"reference\": \"Profile.Version\"},\n            { \"type\": \"grep\", \"marker\": \"Connie_marker1\", \"search\":\"restart 'lock to rescue CMTS retry' timer\", \"logFile\":\"cmconsole.log\" }\n\n        ],\n    \"HTTP\": {\n        \"URL\":\"https://test.com\",\n        \"Compression\":\"None\",\n        \"Method\":\"POST\",\n        \"RequestURIParameter\": [\n            {\"Name\":\"profileName\", \"Reference\":\"Profile.Name\" },\n            {\"Name\":\"reportVersion\", \"Reference\":\"Profile.Version\" }\n        ]\n\n    },\n    \"JSONEncoding\": {\n        \"ReportFormat\":\"NameValuePair\",\n        \"ReportTimestamp\": \"None\"\n    }\n\n}",
            "applicationType": "stb"
        },
        "oldEntity": {
            "@type": "TelemetryTwoProfile",
            "id": "8205d716-8e45-4570-a34b-f1ebe0bdc75e",
            "updated": 1659034476135,
            "name": "Test - changed with approval",
            "jsonconfig": "{\n    \"Description\":\"Test1\",\n    \"Version\":\"0.1\",\n    \"Protocol\":\"HTTP\",\n    \"EncodingType\":\"JSON\",\n    \"ReportingInterval\":43200,\n    \"TimeReference\":\"0001-01-01T00:00:00Z\",\n    \"Parameter\":\n        [\n            { \"type\": \"dataModel\", \"reference\": \"Profile.Name\"}, \n            { \"type\": \"dataModel\", \"reference\": \"Profile.Version\"},\n            { \"type\": \"grep\", \"marker\": \"Connie_marker1\", \"search\":\"restart 'lock to rescue CMTS retry' timer\", \"logFile\":\"cmconsole.log\" }\n\n        ],\n    \"HTTP\": {\n        \"URL\":\"https://test.com\",\n        \"Compression\":\"None\",\n        \"Method\":\"POST\",\n        \"RequestURIParameter\": [\n            {\"Name\":\"profileName\", \"Reference\":\"Profile.Name\" },\n            {\"Name\":\"reportVersion\", \"Reference\":\"Profile.Version\" }\n        ]\n\n    },\n    \"JSONEncoding\": {\n        \"ReportFormat\":\"NameValuePair\",\n        \"ReportTimestamp\": \"None\"\n    }\n\n}",
            "applicationType": "stb"
        },
        "operation": "UPDATE",
        "author": "UNKNOWN_USER"
    } ]

NEW CHANGES:

  1. API mapping changed from /change/v2/all to /telemetry/v2/change/all
  2. applicationType parameter is mandatory.
  3. Error has json structure:
{
    "status": 409,
    "type": "EntityConflictException",
    "message": "Can't delete profile as it's used in telemetry rule: aaa"
}



 Firmware Rule 

 Create firmware rule

POST http://<host>:<port>/firmwarerule/?applicationType=stb
Headers:
Accept = application/json
Content-Type = application/json


Request body:

{"name":"test","rule":{"compoundParts":[{"condition":{"freeArg":{"type":"STRING","name":"model"},"operation":"IS","fixedArg":{"bean":{"value":{"j ava.lang.String":"123343224"}}}},"negated":false}],"negated":false},"applicableAction":{"type":"com.xconf.firmware.RuleAction","actionType":" RULE","configId":"0abee588-9559-4c4d-90f9-2adc4bf314d3","configEntries":[]},"applicationType":"stb","type":"CUG_IV"}


Response Status: 201 Created


Response Body:

{"id":"2ea59bab-b080-4593-8539-fb6db5fc8fd5","updated":1698923585067,"name":"test","applicableAction":{"type":"com.xconf.firmwa re.RuleAction","actionType":"RULE","configId":"0abee588-9559-4c4d-90f9-2adc4bf314d3","configEntries":[],"active":true,"useAccountPercentage":fals e,"firmwareCheckRequired":false,"rebootImmediately":false},"rule":{"compoundParts":[{"condition":{"freeArg":{"type":"STRING","name":"model"},"opera tion":"IS","fixedArg":{"bean":{"value":{"java.lang.String":"123343224"}}}},"negated":false}],"negated":false},"type":"CUG_IV","active":true,"applicationType":"stb"}



 Update firmware Rule


PUT http://<host>:<port>/firmwarerule/?applicationType=stb
Headers:
Accept = application/json
Content-Type = application/json


Request Body:

{"id":"2ea59bab-b080-4593-8539-fb6db5fc8fd5","updated":1698923585067,"name":"test","applicableAction":{"type":"com.xconf.firmware.RuleAction","actionType":"RULE","configId":"0abee588-9559-4c4d-90f9-2adc4bf314d3","configEntries":[],"active":true,"useAccountPercentage":fals e,"firmwareCheckRequired":false,"rebootImmediately":false},"rule":{"compoundParts":[{"condition":{"freeArg":{"type":"STRING","name":"model"},"opera tion":"IS","fixedArg":{"bean":{"value":{"java.lang.String":"123343224"}}}},"negated":false}],"negated":false},"type":"CUG_IV","active":true,"applicationType":"stb"}


Response Status : 200 Ok

Response Body: 

{"id":"2ea59bab-b080-4593-8539-fb6db5fc8fd5","updated":1698923683332,"name":"test","applicableAction":{"type":"com.xconf.firmware.RuleAction","actionType":"RULE","configId":"0abee588-9559-4c4d-90f9-2adc4bf314d3","configEntries":[],"active":true,"useAccountPercentage":fals e,"firmwareCheckRequired":false,"rebootImmediately":false},"rule":{"compoundParts":[{"condition":{"freeArg":{"type":"STRING","name":"model"},"opera tion":"IS","fixedArg":{"bean":{"value":{"java.lang.String":"123343224"}}}},"negated":false}],"negated":false},"type":"CUG_IV","active":true,"applicationType":"stb"}


 Delete firmware Rule

DELETE http://<host>:<port>/firmwarerule/2ea59bab-b080-4593-8539-fb6db5fc8fd5
Headers:
Accept = application/json
Content-Type = application/json


Request Body:  204 No Content


 Firmware Rule Template 

 Create firmware rule template


POST http://<host>:<port>/firmwareruletemplate/?applicationType=stb
Headers:
Accept = application/json
Content-Type = application/json


Request Body:

{"name":"","rule":{"negated":false,"relation":null,"compoundParts":[{"negated":false,"relation":null,"compoundParts":[],"condition":{"freeArg":{"type":"STR ING","name":"eStbMac"},"operation":"IS","fixedArg":{"bean":{"value":{"java.lang.String":""}}}}},{"negated":false,"relation":"OR","compoundParts":[],"cond ition":{"freeArg":{"type":"STRING","name":"ipAddress"},"operation":"IS","fixedArg":{"bean":{"value":{"java.lang.String":""}}}}}],"condition":null},"applicable Action":{"type":"com.xconf.firmware.RuleAction","actionType":"RULE_TEMPLATE","configId":null},"priority":169,"id":"Test Template","editable":true}


Response Status : 201 Created



Response Body: 

{"id":"Test Template","updated":1698936248053,"rule":{"compoundParts":[{"condition":{"freeArg":{"type":"STRING","name":"eStbMac"},"operation":"IS","fixedArg": {"bean":{"value":{"java.lang.String":""}}}},"negated":false},{"condition":{"freeArg":{"type":"STRING","name":"ipAddress"},"operation":"IS","fixedArg":{"bea n":{"value":{"java.lang.String":""}}}},"negated":false,"relation":"OR"}],"negated":false},"applicableAction":{"type":"com.xconf.firmware.RuleActio n","actionType":"RULE_TEMPLATE","active":false,"useAccountPercentage":false,"firmwareCheckRequired":false,"rebootImmediately":false},"priority": 169,"editable":true}


 Updating firmware rule template

POST http://<host>:<port>/firmwareruletemplate/?applicationType=stb
Headers:
Accept = application/json
Content-Type = application/json


Request Body:

{"id":"Test Template","updated":1698936248053,"rule":{"compoundParts":[{"condition":{"freeArg":{"type":"STRING","name":"eStbMac"},"operation":"IS","fixedArg": {"bean":{"value":{"java.lang.String":""}}}},"negated":false},{"condition":{"freeArg":{"type":"STRING","name":"ipAddress"},"operation":"IS","fixedArg":{"bean":{"value":{"java.lang.String":""}}}},"negated":false,"relation":"OR"},{"negated":false,"relation":"OR","compoundParts":[],"condition":{"freeArg":{"type":"S TRING","name":"firmwareVersion"},"operation":"IS","fixedArg":{"bean":{"value":{"java.lang.String":""}}}}}],"negated":false},"applicableAction":{"type":"co m.xconf.firmware.RuleAction","actionType":"RULE_TEMPLATE","active":false,"useAccountPercentage":false,"firmwareCheckRequired":false, "rebootImmediately":false},"priority":169,"editable":true}


Response Status : 200 OK


 Deleting Firmware rule template

POST http://<host>:<port>/firmwareruletemplate/testTemplateName
Headers:
Content-Type = application/json


Response Status: 204 No Content



  • No labels