QC Analytical Results API
The QC Analytical Results API gives your own software the same QA/QC analysis as the app: control charts for certified reference materials (CRMs), duplicate-pair precision charts and blank checks, worked out the same way, from the same code.
You send your QC results once, then ask for charts by type. Each answer is JSON: the points, the control limits, the flags (outliers, Nelson rules) and the statistics. Nothing is drawn for you. You draw it with whatever you use, or feed the numbers into your own reports and alerts.
Address: https://api.geoscience-analytics.com
Version: 1.0. The calls, the parameters and the layout of every chart’s spec are settled: anything that changes them later gets a new version, announced in What’s new and by email. While the API is new, the limits may be tuned.
How a call goes
- Get a key on your Geoscience Analytics Toolkit account page.
POST /v1/datasetswith your results, as JSON rows or a CSV file (gzipped if you like). You get adataset_idand a summary of what it holds: laboratories, analytes, check stages or CRMs, date range.POST /v1/charts/{type}with thedataset_id, the laboratory and analyte, and the chart’s own parameters. You get the chart.- Ask for as many charts as you like. The dataset stays for an hour after its last use; send it again when it has gone.
curl -s https://api.geoscience-analytics.com/v1/charts/shewhart \
-H "Authorization: Bearer $QC_API_KEY" -H "Content-Type: application/json" \
-d '{"dataset_id": "ds_1764f96f6e0293773b8d1068", "lab": "ALS", "analyte": "Au_AA25_ppm",
"crm_type": "LAB_STD", "crms": ["ALS-26"], "nelson_rules": true}'In this guide
- Getting started: your key, the first calls.
- Datasets: the two kinds of data, the columns, the limits.
- Charts: every chart, its parameters, an example request and answer.
- Errors: what an error looks like, every code, the rate limit.
- Clients: a complete example in R and in Python.
- What’s new
What the API is not
- It does not store your data. A dataset lives in memory on the server for an hour after it was last used, then it is gone. Nothing is written to disk.
- It does not draw. The app draws its charts from these same answers; your software draws its own.
- It is not the app’s Overview. The lab-by-lab Overview, Data health and the import checks are in the app; the API gives you the charts and their numbers.
Where the methods are described
The manual’s How this is calculated pages give every formula: relative difference, control limits, the Nelson rules, Thompson-Howarth, CUSUM and EWMA. The API uses exactly these.
Questions: [email protected]. Quote the request_id from the answer, or the X-Request-Id header, and we can see the call.