Skip to content

Latest commit

 

History

History
344 lines (257 loc) · 7.54 KB

api.md

File metadata and controls

344 lines (257 loc) · 7.54 KB

OPC UA TestTool API v1.0.0

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

Default

get__api_jobs

GET /api/jobs

get finished test jobs

Parameters

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
    }
  }
]

Responses

Status Meaning Description Schema
200 OK jobs Inline
400 Bad Request bad input parameter None

Response Schema

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
This operation does not require authentication

post__api_jobs

POST /api/jobs

schedules a new job

Body parameter

{
  "name": "MyTestJob",
  "script": "browseRecursive.chai",
  "serverUri": "opc.tcp://localhost:4840"
}

Parameters

Name In Type Required Description
body body JobRequest false Inventory item to add

Responses

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
This operation does not require authentication

get__api_jobs_{id}

GET /api/jobs/{id}

get finished test job with specified id

Parameters

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
  }
}

Responses

Status Meaning Description Schema
200 OK Finished Job FinishedJob
400 Bad Request bad input parameter None
500 Internal Server Error job not found None
This operation does not require authentication

get__api_jobs_{id}_log

GET /api/jobs/{id}/log

get log of finished job

Parameters

Name In Type Required Description
id path integer true Numeric ID of the finished job to get

Example responses

200 Response

"string"

Responses

Status Meaning Description Schema
200 OK log content string
400 Bad Request bad input parameter None
500 Internal Server Error job not found None
This operation does not require authentication

get__api_targets

GET /api/targets

get test targets

Example responses

200 Response

[
  {
    "name": "TestTarget1",
    "host": "localhost",
    "port": 4840
  }
]

Responses

Status Meaning Description Schema
200 OK log content Inline
400 Bad Request bad input parameter None

Response Schema

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
This operation does not require authentication

Schemas

JobRequest

{
  "name": "MyTestJob",
  "script": "browseRecursive.chai",
  "serverUri": "opc.tcp://localhost:4840"
}

Properties

Name Type Required Restrictions Description
name string true none none
script string true none none
serverUri string true none none

JobResult

{
  "id": 0,
  "statusCode": "string",
  "totalRuntime_ms": 0,
  "ts_start": 0,
  "ts_end": 0
}

Properties

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

FinishedJob

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

Properties

Name Type Required Restrictions Description
request JobRequest true none none
result JobResult true none none

Target

{
  "name": "TestTarget1",
  "host": "localhost",
  "port": 4840
}

Properties

Name Type Required Restrictions Description
name string true none none
host string true none none
port number true none none