The MET/CONNECT API allows users to develop integrations with the MET/CONNECT database and access procedure results. This article will provide a quick way to verify that your API service is returning data as expected.
The simplest way to verify your API service is to query the list of results for a single Asset. The method for doing this depends on the version of MET/CONNECT you are running.
Note: Ensure you are using the correct port for API calls. The default port number for the MET/CONNECT API is 6381. The default port number for the MET/CONNECT service (used by MET/CAL) is 6382. Port 6382 will not provide API call responses.
v1 API (MET/CONNECT version 1.1 and earlier)
To do this, visit the URL defined by:
http://<serverurl>/api/v1/asset/resultsbyasset/<dutAssetId>/<authtoken>
- <serverurl> parameter is the URL, including the port number, where your MET/CONNECT API is running. This can be found in IIS on the computer running the service. The default port number for the API is 6381.
- <dutAssetId> parameter needs to be an asset that has been used in a MET/CAL procedure while using MET/CONNECT
- <authtoken> parameter is the Authentication Token defined during the installation of MET/CONNECT, it is saved in a text file on that server's desktop for future reference
The response to this query will be a JSON formatted list of the calibration runs against that asset record. We recommend using a browser add-on for making JSON data more viewer-friendly. The expected response looks like this:
If you receive a similar response, your API is returning data as expected. Specific data queries can be verified in this same manner using the documentation provided in the Help folder of your MET/CONNECT shared directory. From here, you may develop your own API connector or work with one of our integration partners.
If you do not receive a similar JSON response, contact softwaresupport@flukecal.com for assistance.
v2 API (Available in MET/CONNECT version 1.2 and later)
To test the v2 API, we use the CURL function built into Windows.
Open a Command Prompt and enter the following:
curl -i -X GET -H "Authorization: Basic <authtoken>" http://<serverurl>/api/v2/asset/resultsbyasset/<dutAssetId>
- <serverurl> parameter is the URL, including the port number, where your MET/CONNECT API is running. This can be found in IIS on the computer running the service. The default port number for the API is 6381.
- <dutAssetId> parameter needs to be an asset that has been used in a MET/CAL procedure while using MET/CONNECT
- <authtoken> parameter is the Authentication Token defined during the installation of MET/CONNECT, it is saved in a text file on that server's desktop for future reference
The response will include a header with a status 200 "OK" indication if the response from the API was successful.