Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
api of test tool app
Base URLs:
Email: Support
GET /api/jobs
get finished test jobs
Name | In | Type | Required | Description |
---|---|---|---|---|
from | query | integer | true | start job |
max | query | integer | false | max number of jobs to return |
Example responses
200 Response
[
{
"request": {
"name": "MyTestJob",
"script": "browseRecursive.chai",
"serverUri": "opc.tcp://localhost:4840"
},
"result": {
"id": 0,
"statusCode": "string",
"totalRuntime_ms": 0,
"ts_start": 0,
"ts_end": 0
}
}
]
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | jobs | Inline |
400 | Bad Request | bad input parameter | None |
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [FinishedJob] | false | none | none |
» request | JobRequest | true | none | none |
»» name | string | true | none | none |
»» script | string | true | none | none |
»» serverUri | string | true | none | none |
» result | object | true | none | none |
»» id | number | true | none | none |
»» statusCode | string | true | none | none |
»» totalRuntime_ms | number | true | none | none |
»» ts_start | number | true | none | none |
»» ts_end | number | true | none | none |
POST /api/jobs
schedules a new job
Body parameter
{
"name": "MyTestJob",
"script": "browseRecursive.chai",
"serverUri": "opc.tcp://localhost:4840"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | JobRequest | false | Inventory item to add |
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | item created | None |
400 | Bad Request | invalid input, object invalid | None |
409 | Conflict | an existing item already exists | None |
GET /api/jobs/{id}
get finished test job with specified id
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer | true | Numeric ID of the finished job to get |
Example responses
200 Response
{
"request": {
"name": "MyTestJob",
"script": "browseRecursive.chai",
"serverUri": "opc.tcp://localhost:4840"
},
"result": {
"id": 0,
"statusCode": "string",
"totalRuntime_ms": 0,
"ts_start": 0,
"ts_end": 0
}
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Finished Job | FinishedJob |
400 | Bad Request | bad input parameter | None |
500 | Internal Server Error | job not found | None |
GET /api/jobs/{id}/log
get log of finished job
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer | true | Numeric ID of the finished job to get |
Example responses
200 Response
"string"
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | log content | string |
400 | Bad Request | bad input parameter | None |
500 | Internal Server Error | job not found | None |
GET /api/targets
get test targets
Example responses
200 Response
[
{
"name": "TestTarget1",
"host": "localhost",
"port": 4840
}
]
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | log content | Inline |
400 | Bad Request | bad input parameter | None |
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [Target] | false | none | none |
» name | string | true | none | none |
» host | string | true | none | none |
» port | number | true | none | none |
{
"name": "MyTestJob",
"script": "browseRecursive.chai",
"serverUri": "opc.tcp://localhost:4840"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | none |
script | string | true | none | none |
serverUri | string | true | none | none |
{
"id": 0,
"statusCode": "string",
"totalRuntime_ms": 0,
"ts_start": 0,
"ts_end": 0
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | true | none | none |
statusCode | string | true | none | none |
totalRuntime_ms | number | true | none | none |
ts_start | number | true | none | none |
ts_end | number | true | none | none |
{
"request": {
"name": "MyTestJob",
"script": "browseRecursive.chai",
"serverUri": "opc.tcp://localhost:4840"
},
"result": {
"id": 0,
"statusCode": "string",
"totalRuntime_ms": 0,
"ts_start": 0,
"ts_end": 0
}
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
request | JobRequest | true | none | none |
result | JobResult | true | none | none |
{
"name": "TestTarget1",
"host": "localhost",
"port": 4840
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | none |
host | string | true | none | none |
port | number | true | none | none |