Skip to content

get_certification_tests

Alberto Gonzalez edited this page Jun 19, 2017 · 1 revision

(GET)/certification/tests

Description

Returns all application tests from RDR for given guest_os

Request

Syntax

GET /api/certification/tests/?guest_os={os}
Host: <server host name>
Accept: application/json
AuthToken: <authentication token returned from authenticate>

Response

200 success

Parameters

required filter:

Filter Description Example
guest_os Return tests for given guest os /api/certification/tests/?guest_os=linux
  • | | /api/certification/tests/?guest_os=windows

Parameters

Index Value Type Returned
id test group id long always
name test group name string always
app_tests array of tests array always

** app_test object format: **

Index Value Type Returned
id test id long always
title test name string always
guest_os_type OS type on which the test is to be run string always
  • | "Linux" or "Windows" | is_custom | True if custom script, False otherwise | bool | always command | script to run | string | always app_test_group_id | | long | always app_test_params | list of parameters | array | always (may be empty)

** app_test_params format: **

Index Value Type Returned
id param id long always
app_test_id long always
name name of param string always
text string always
order position in param order (0 is first) long always
control_type string always
attributes string always

Examples

Sample Request

GET /api/certification/tests/?guest_os={os}
Host: <server host name>
Accept: application/json
AuthToken: 8a00sjerhterqerjlqkjlk443l4j56869h4f_)(fjdkasHHHHHkdal324

Sample Response

HTTP Status 200 (OK)


{
    "tests": [
        {
            "app_tests": [
                {
                    "app_test_group_id": 1,
                    "app_test_params": [
                        {
                            "app_test_id": 11,
                            "attributes": "MaxLength:100;EmptyText:Introduce the script path",
                            "control_type": "TextBox",
                            "id": 111,
                            "name": "name",
                            "order": 0,
                            "text": "Script path"
                        },
                        {
                            "app_test_id": 11,
                            "attributes": "Required:False;MaxLength:300;EmptyText:Introduce the arguments",
                            "control_type": "TextArea",
                            "id": 112,
                            "name": "arguments",
                            "order": 1,
                            "text": "Arguments"
                        }
                    ],
                    "command": null,
                    "guest_os_type": "Linux",
                    "id": 11,
                    "is_custom": true,
                    "title": "Custom Script"
                }
            ],
            "id": 1,
            "name": "Custom Script"           
        },
        {
            "app_tests": [
                {
                    "app_test_group_id": 8,
                    "app_test_params": [
                        {
                            "app_test_id": 82,
                            "attributes": "MaxLength:50;EmptyText:Introduce the URL",
                            "control_type": "TextBox",
                            "id": 821,
                            "name": "url",
                            "order": 0,
                            "text": "URL"
                        },
                        {
                            "app_test_id": 82,
                            "attributes": "MaxLength:50;EmptyText:Introduce the check words",
                            "control_type": "TextBox",
                            "id": 822,
                            "name": "expword",
                            "order": 1,
                            "text": "Check Words"
                        }
                    ],
                    "command": "CheckWeb.sh",
                    "guest_os_type": "Linux",
                    "id": 82,
                    "is_custom": false,
                    "title": "Check HTTP URL"
                }
            ],
            "id": 8,
            "name": "Web Application"
        },
    ],
    "timestamp": 1465495837
}


Clone this wiki locally