4.3.4. TemplateList

Description

The method returns a list of existing templates in the project. Template is a JSON structure, that includes a list of tests. A test is a rule which the probe validates a media file in reliance to. Each test includes severity level, compliance conditions or thresholds and responsible for analyzing a specific parameter or error. Each template is identified by a unique template_id.

Request

{
  "user_id":(number),
  "methods":[
    {
      "method":"TemplateList",
      "params":{
        "project_id":(number)
      }
    }
  ]
}

where:

  • user_id — an integer value, a user identifier;

  • project_id — an integer value, a user project identifier.

Reply

{
  "reply":[
    {
      "method":"TemplateList",
      "result":[
        {
          "template_id":(number),
          "name":(string),
        }
      ]
    }
  ]
}

where:

  • template_id - an integer value, a template identifier;

  • name - a string, a template name.

Example

Request by the cURL utility
Request a list of Templates in a project
curl http://172.16.1.41/ctrl_api/v1/json \
 -H "Content-Type: application/json" \
 --data '{"user_id":1,"methods":[{"method":"TemplateList","params":{"project_id":2}}]}'
Reply
 {
   "reply": [
     {
       "method": "TemplateList",
       "result": [
         {
           "template_id": 33,
           "name": "Default"
         },
         {
           "template_id": 63,
           "name": "AVC_1080"
         },
         {
           "template_id": 65,
           "name": "Test_Audio"
         }
       ]
     }
   ]
 }