Enabling Tests
Use this API to enable one/more tests for a chosen component type.
URL: http://<eG manager IP:port>/api/eg/orchestration/enabletests
Method: POST
Content-Type: application/json
Parameters | Key values | Example |
---|---|---|
Headers |
managerurl: Base URL of the eG Manager i.e., http://<IP address of the eG console:Port> user: eG username or domain/eG username pwd: Base64 encoded password |
Example with both Default and Optional Key Values: { "componenttype":"Microsoft SQL", testtype:"configuration" "tests":"Operating System,Drives" } Example with Default key values: { "componenttype":"Microsoft SQL", "tests":"SQL Blocker Processes, SQL locks" } |
Body |
Default: { "componenttype":"Component Type", "tests":"comma-separated list of tests" } |
|
Optional: { "testtype":"performance/configuration", }
|
Type | Code | Content |
---|---|---|
JSON |
200 |
{ "Succeed": "Test(s) is/are enabled for this component type." } |
Type | Code | Content |
---|---|---|
JSON |
401 UNAUTHORIZED |
{ "Error": "One or more tests are not available for this component type." } |
Figure 1 : Enabling one/more tests for a chosen component type using Postman REST Client
Enabling Tests using cURL
To enable one/more tests for a chosen component type through the REST API using cURL, the command should be specified in the following format:
curl --location --request POST "http://<eG Manager IP:Port>/api/eg/orchestration/enabletests" -H "managerurl:http://<eG Manager IP:Port>" -H "user:<eG username or domain/eG username>" -H "pwd:Base64 encoded password" -H "Content-Type: application/json" --data-raw "{'componenttype':'Component Type', 'tests':'comma-separated list of tests', 'testtype':'performance/configuration'}"
Note that the command specified above contains both the Default and Optional key values.
Figure 2 shows an example of enabling one/more tests of a chosen component type using cURL.
Figure 2 : Enabling one/more tests for a chosen component type using cURL