The WATS REST API is part of the WATS installation and can be used to retrieve collected information from and add data to WATS using standard web API methods. The API has endpoints available to:
- Query for WATS Reports (Test reports and Repair reports),
- Request the entire report in WSXF or WJSF format,
- Upload reports in WSXF or WJSF format,
- Query for various yield reports for analysis, for example worst yield, high volume, and volume yield,
- Query for, add, and update metadata and production data, for example products (part numbers), revisions, bill of materials, and assets.
The API results are returned in JSON format unless explicitly requested as XML.
The documentation of the API endpoints are available from your WATS help menu:
Overview of usage, categories and purpose
The REST API is split into following categories based on the purpose of the endpoints:
These endpoints are focused around accessing aggregated data from the data warehouse, such as yield, measurement data.
These endpoint lets you communicate with the asset module to maintain your list of assets, check status and increase counters. This is typically used in integration WATS with a 3rd party asset management system and or with the test equipment directly.
Gets a WATS access token.
Manages the setup of your barcode identifiers. Here you can get your current configuration, delete old setups or put new ones. This video explains how to configure and set up your bar code scanners.: https://www.youtube.com/watch?v=HRcJ2_LiT38&t=2100s
Lets you export unit certificates from the REST API.
The product endpoints lets you access and update the setting of the WATS Product Manager. This is typically used to integrate with other systems to keep list of products, product names and BOM lists up to date.
These endpoints apply to the production part of WATS and is only available when production is activated. The endpoints can be used to add units to production, read and alter the status of a unit and do unit verification. Typically used to integrate with your test software to implement routing rules and verify that a unit is ready for test before execution.
The report endpoint lets you find report headers based on filter parameters and get existing reports from WATS or post new reports in JSON or XML format.
This is typically used to:
1. Read / export the data from specific reports for processing outside WATS.
2. Post new / edited reports to WATS
It is not advised to use these endpoints to load large amounts of report data for analysis. For this purpose use the endpoints found in the App category.
Used to integrate WATS user provisioning with Microsoft Entra ID or other provider. See this article for more info on this topic: https://support.virinco.com/hc/en-us/articles/7978299009948-WATS-Provisioning-SCIM-
Endpoints to read and update the WATS System Manages' levels and client list.
Endpoints to initiate and end a test in the WATS Workflow module. Only applies to customers using workflow.
Tools references & authentication
The PostMan app can be used for simplified test and debugging against the WATS API. You may also navigate to the API documentation and test the available endpoints directly in your browser.
All API requests must be authenticated using basic authentication. A special GetToken endpoint can be used to request a special machine account token that can be used in other api calls. You may also manage tokens from within the WATS Control Panel.
Refer to https://virinco.zendesk.com/entries/80833265-Authentication for details about authentication.