Reports in the WATS Standard XML Format can be submitted to WATS by calling this method with a WSXF report in the body of the request:
POST https://your-wats-server.com/api/report/wsxf
NOTE: This method is available from server version 20.2.
The method returns OK 200 if the report was received and validated successfully, or 400 Bad Request along with a validation error text if the report does not validate.
This method can be used to submit Test reports or Repair reports.
Read more about WSXF here: https://virinco.zendesk.com/hc/en-us/articles/207424643-Wats-Standard-Xml-Format-WSXF-
NOTE: This method is stricter than the original WSXF specification.
NOTE: Attributes called Text should be text inside the element.
The following is a description of what elements and attributes are used in this format.
Reports
Reports is the root element.
xmlns is the XML Namespace, it can be thought of as the name of the XML format. The convention is to use a URL to a domain you own, so that all namespaces will be unique and the namespace describes who is responsible for the format. Some make the XML schema definition available from the namespace URL, but it is not required. Virinco does not do this.</p
Nested elements |
Count |
Required |
Report |
1 |
Yes |
Report
Attribute |
Data type |
Required |
ID |
Guid |
Yes |
Location |
String (100) |
Yes |
MachineName |
String (100) |
Yes |
PN |
String (100) |
Yes |
Purpose |
String (100) |
Yes |
Result |
Enum(Passed, Failed, Error, Terminated) |
Yes |
Rev |
String (100) |
Yes |
SN |
String (100) |
Yes |
Start |
DateTime |
Yes |
Start_utc |
DateTime |
Yes |
type |
Enum(UUT, UUR) |
Yes |
origin |
String |
Output only |
ProductName |
String |
Output only |
Nested elements |
Count |
Required |
Process |
1 |
Yes |
MiscInfo |
Unlimited |
No |
ReportUnitHierarchy |
Unlimited |
No |
UUT |
1, only if type is UUT |
If type is UUT, yes |
Step |
1, only if type is UUT |
If type is UUT, yes |
UUR |
1, only if type is UUR |
If type is UUR, yes |
Failure |
Unlimited, only if type is UUR |
If type is UUR, yes |
Binary |
Unlimited, only if type is UUR |
No |
Asset |
Unlimited |
No |
AssetStats |
Unlimited |
Output Only |
Process
Attribute |
Data type |
Required |
Code |
Number |
If no name, yes |
CodeFormat |
String |
No |
Name |
String |
If no code, yes |
Validation Rules
- Code and Name are required to be valid values.
MiscInfo
Attribute |
Data type |
Required |
Description |
String |
Yes |
Numeric |
Number |
If no value, yes |
NumericFormat |
String |
No |
Text |
String (100) |
If no numeric, yes |
TypeDef |
String (30) |
No |
Validation Rules
- If type is UUR, Description is required to be a valid value.
ReportUnitHierarchy
Attribute |
Data type |
Required |
PartType |
String (50) |
Yes |
SN |
String (100) |
Yes |
PN |
String (100) |
Yes |
Rev |
String (100) |
Yes |
Idx |
Number, only if type is UUR |
If type is UUR, yes |
ParentIDX |
Number, only if type is UUR |
No |
Position |
Number, only if type is UUR |
No |
ReplacedIDX |
Number, only if type is UUR |
No |
Validation rules
- When type is UUR, one ReportUnitHierarchy is required to have Idx = 0,it is required to have PN, SN, and Rev equal to Report, and it cannot have ParentIDX.
- Idx is required to be unique.
- ParentIDX cannot be the same as Idx.
- ParentIDX must refer to an Idx.
- ReplacedIDX cannot be the same as Idx or ParentIDX.
- ReplacedIDX must refer to an Idx.
Asset
Attribute |
Data type |
Required |
AssetSN |
String (100) |
Yes |
UsageCount |
Number |
Yes |
UsageCountFormat |
String |
No |
AssetStats
Attribute |
Data type |
Required |
AssetSN |
String (100) |
Output only |
RunningCount |
Number |
Output only |
RunningCountExceeded |
Number |
Output only |
TotalCount |
Number |
Output only |
TotalCountExceeded |
Number |
Output only |
DaysSinceCalibration |
Number |
Output only |
CalibrationDaysOverdue |
Number |
Output only |
DaysSinceMaintenance |
Number |
Output only |
MaintenanceDaysOverdue |
Number |
Output only |
Message |
String |
Output only |
UUT
Attribute |
Data type |
Required |
BatchFailCount |
Number |
No |
BatchFailCountFormat |
String |
No |
BatchLoopIndex |
Number |
No |
BatchLoopIndexFormat |
String |
No |
BatchSN |
String (100) |
No |
Comment |
String (5000) |
No |
ErrorCode |
Number |
No |
ErrorCodeFormat |
String |
No |
ErrorMessage |
String |
No |
ExecutionTimeFormat |
String |
No |
FixtureId |
String (100) |
No |
StepIdCausedUUTFailure |
Number |
No |
TestSocketIndexFormat |
String |
No |
UserLoginName |
String (100) |
Yes |
Nested elements |
Count |
Required |
Comment |
1 |
No |
Step
Attribute |
Data type |
Required |
Group |
Enum(Setup, Main, Cleanup) |
Yes |
Name |
String (100) |
Yes |
Status |
Enum(Passed, Failed, Error, Terminated, Skipped) |
Yes |
StepType |
String |
Yes |
Id |
Number |
If on one step, required for all |
StepIndex |
Number |
If on one step, required for all |
InteractiveExeNum |
Number |
No |
InteractiveExeNumFormat |
String |
No |
module_time |
Number |
No |
module_timeFormat |
String |
No |
ReportText |
String |
No |
Start |
DateTime |
No |
StepCausedSequenceFailure |
Bool |
No |
StepCausedUUTFailure |
Bool |
No |
StepErrorCode |
Number |
No |
StepErrorCodeFormat |
String |
No |
StepErrorMessage |
String |
No |
total_time |
Number |
No |
total_timeFormat |
String |
No |
TSGuid |
String (30) |
No |
Nested elements |
Count |
Required |
SequenceCall |
1 |
No |
NumericLimit |
Unlimited |
No |
StringValue |
Unlimited |
No |
PassFail |
Unlimited |
No |
Chart |
1 |
No |
Attachment |
1 |
No |
AdditionalResults |
Unlimited |
No |
Loop |
1 |
No |
Step |
Unlimited |
No |
Validation Rules
- The first Step's Status is required to match Report Status and have a SequenceCall.
- Id is required to be unique.
- At least one of SequenceCall, NumericLimit, StringValue, PassFail, Chart, Attachment or AdditionalResults is required.
- SequenceCall, NumericLimit, StringValue, or PassFail cannot be nested together.
- Step can only be nested if a SequenceCall is also nested, and at least one Step is required if a SequenceCall is nested.
- Chart and Attachment cannot be nested together.
- If one nested NumericLimit, StringValue, or PassFail; Status and NumericLimit, StringValue, or PassFail Status is required to match.
- If multiple nested NumericLimit, StringValue, or PassFail; Status cannot be Failed unless at least one of the NumericLimit, StringValue, or PassFail have Status Failed.
- If status is Skipped, numericMeas, stringMeas, booleanMeas, callExe, messagePopup, chart, attachment, additionalResults and steps will be ignored. This provides better analysis of skipped steps.
- If multiple nested NumericLimit, StringValue, or PassFail, Status cannot be Passed unless none of the NumericLimit, StringValue, or PassFail have Status Failed.
- NumericLimit, StringValue, or PassFail MeasIndex is required be unique within a Step.
- NumericLimit, StringValue, or PassFail Name is required be unique within a Step.
- Step Name within a Step is required to be unique.
- Step Index within a Step is required to be unique.
SequenceCall
Attribute |
Data type |
Required |
Filename |
String (200) |
Yes |
Filepath |
String (500) |
Yes |
Name |
String (200) |
Yes |
Version |
String (30) |
Yes |
NumericLimit
NumericLimit is a measurement, where the measurement is a number.
Attribute |
Data type |
Required |
CompOperator |
Enum (LOG, EQ, NE, LT, LE, GT, GE, LTGT, LTGE, LEGT, LEGE, GTLT, GTLE, GELT, GELE) |
Yes |
HighLimit |
Number |
If CompOperator is dual limit, yes |
HighLimitFormat |
String |
No |
LowLimit |
Number |
If CompOperator is single or dual limit, yes |
LowLimitFormat |
String |
No |
MeasIndex |
Number |
If on one measurement, required for all |
MeasOrderNumber |
Number |
If on one measurement, required for all |
Name |
String (100) |
If multiple NumericLimit are nested, yes |
NumericValue |
Number |
Yes |
NumericValueFormat |
String |
No |
Status |
Enum (Passed, Failed, Skipped) |
Yes |
Units |
String (20) |
Yes |
Validation Rules
- LOG is a none limit CompOperator; when used, LowLimit and HighLimit are not supported.
- EQ, NE, LT, LE, GT, and GE are single limit CompOperators; when used, LowLimit is required and HighLimit is not supported.
- LTGT, LTGE, LEGT, LEGE, GTLT, GTLE, GELT, GELE are dual limit CompOperators; when used, LowLimit and HighLimit are required. LowLimit and HighLimit are missnamed, think of them as Limit1 and Limit2 respectively.
- MeasOrderNumber is required to be unique.
StringValue
StringValue is a measurement, where the measurement is text.
Attribute |
Data type |
Required |
CompOperator |
Enum (LOG, EQ, NE, CASESENSIT, IGNORECASE) |
Yes |
StringLimit |
String (100) |
If CompOperator is single limit, yes |
StringValue |
String (100) |
Yes |
MeasIndex |
Number |
If on one measurement, required for all |
MeasOrderNumber |
Number |
If on one measurement, required for all |
Name |
String (100) |
If multiple StringLimit are nested, yes |
Status |
Enum (Passed, Failed, Skipped) |
Yes |
Validation Rules
- LOG is a none limit CompOperator; when used, StringLimit is not supported.
- EQ, NE, CASESENSIT, and IGNORECASE are single limit CompOperators; when used, StringLimit is required.
- MeasOrderNumber is required to be unique.
PassFail
PassFail is a measurement, where the measurement is true or false.
Attribute |
Data type |
Required |
MeasIndex |
Number |
If on one measurement, required for all |
MeasOrderNumber |
Number |
If on one measurement, required for all |
Name |
String (100) |
If multiple PassFail are nested, yes |
Status |
Enum (Passed, Failed, Skipped) |
Yes |
Validation Rules
- MeasOrderNumber is required to be unique.
Chart
Attribute |
Data type |
Required |
ChartType |
Enum (Line, LineLogXY, LineLogX, LineLogY) |
Yes |
Label |
String (100) |
Yes |
XLabel |
String (50) |
Yes |
XUnit |
String (20) |
Yes |
YLabel |
String (50) |
Yes |
YUnit |
String (20) |
Yes |
Nested elements |
Count |
Required |
Series |
1 to 10 |
Yes |
Validation Rules
- Cannot have more than 10000 data points total.
Series
Attribute |
Data type |
Required |
DataType |
Enum (XYG) |
Yes |
Name |
String (100) |
Yes |
Nested elements |
Count |
Required |
xdata |
1 |
No |
ydata |
1 |
Yes |
xdata and ydata
The text in xdata and ydata is a semicolon separated list of numbers.
Attachment
Attribute |
Data type |
Required |
ContentType |
MIME type (100) |
Yes |
Name |
String (100) |
Yes |
Text |
Base64 encoded string |
Yes |
AdditionalResults
Attribute |
Data type |
Required |
Name |
String (200) |
Yes |
Text |
XML |
Yes |
Loop
Attribute |
Data type |
Required |
index |
Number |
If step is an index in a loop, yes |
ending_index |
Number |
If step is a summary step, yes |
num |
Number |
If step is a summary step, yes |
passed |
Number |
If step is a summary step, yes |
failed |
Number |
If step is a summary step, yes |
Validation Rules
- Steps that are part of the same loop is required to have the same Name.
- One Step in a loop is required to be a Summary Step.
- ending_index in Summary Step is required to be the same as the index in the last Index Step.
- passed in a Summary Step is required to match the number of Index Steps with Status Passed.
- failed in a Summary Step is required to match the number of Index Steps with Status Failed.
- num is required to match the number of Index Steps.
- index in an Index Step is required to be unique within a loop.
- A SequenceCall. NumericLimit, StringValue, PassFail, or Step within an Index Step is required to have a matching SequenceCall. NumericLimit, StringValue, PassFail, or Step, respectively, in the Summary Step.
- A SequenceCall. NumericLimit, StringValue, PassFail, or Step within a Summary Step is required to have a matching SequenceCall. NumericLimit, StringValue, PassFail, or Step, respectively, in each Index Step.
- The last Index Step is required to have matching Statuses and measurement values as well.
UUR
Attribute |
Data type |
Required |
Active |
Bool |
Yes |
ConfirmDate |
DateTime |
Yes |
ExecutionTime |
Number |
Yes |
ExecutionTimeFormat |
String |
No |
FinalizeDate |
DateTime |
Yes |
Parent |
GUID |
No |
ReferencedUUT |
GUID |
Yes |
UserLoginName |
String (100) |
Yes |
Nested elements |
Count |
Required |
Comment |
1 |
No |
Process |
1 |
Yes |
Comment
Attribute |
Data type |
Required |
Text |
String (5000) |
Yes |
Failures
Attribute |
Data type |
Required |
ArticleNumber |
String (100) |
No |
ArticleVendor |
String (500) |
No |
ArticleRevision |
String (100) |
No |
ArticleDescription |
String (500) |
No |
Category |
String |
Yes |
Code |
String |
Yes |
CompRef |
String (50) |
Yes |
FunctionBlock |
String (100) |
No |
Comment |
String |
No |
Idx |
Number |
Yes |
PartIdx |
Number |
Yes |
StepID |
Number |
No |
Validation Rules
- Idx is required to be unique.
- PartIdx is required to refer to a ReportUnitHierarchy Idx.
- Category and Code are required to be valid values.
Binary
Attribute |
Data type |
Required |
BinaryDataIndex |
Number |
No |
FailIdx |
Number |
No |
Nested elements |
Count |
Required |
BinaryData |
1 |
Yes |
BinaryData
Attribute |
Data type |
Required |
ContentType |
MIME type (100) |
Yes |
FileName |
String |
Yes |
size |
Number |
Yes |
Text |
Base64 encoded string |
Yes |
Validation Rules
- FailIdx is required to refer to a Failures Idx.
Comments
0 comments
Please sign in to leave a comment.