GET mlsts results
curl --request GET \
--url https://app.onecodex.com/api/v1/mlsts/{id}/results \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.onecodex.com/api/v1/mlsts/{id}/results"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.onecodex.com/api/v1/mlsts/{id}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.onecodex.com/api/v1/mlsts/{id}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.onecodex.com/api/v1/mlsts/{id}/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.onecodex.com/api/v1/mlsts/{id}/results")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.onecodex.com/api/v1/mlsts/{id}/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"mlstResults": {
"results": [
{
"alleles": [
{
"allele": 123,
"gene": "<string>"
}
],
"metadata": [
{}
],
"st": 123
}
],
"summary": {
"complete_match": true,
"n_alleles_matched": 123,
"n_alleles_total": 123,
"mlst": 123
}
},
"panelResults": "<unknown>"
}MLST
MLST Results
GET
/
api
/
v1
/
mlsts
/
{id}
/
results
GET mlsts results
curl --request GET \
--url https://app.onecodex.com/api/v1/mlsts/{id}/results \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.onecodex.com/api/v1/mlsts/{id}/results"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.onecodex.com/api/v1/mlsts/{id}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.onecodex.com/api/v1/mlsts/{id}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.onecodex.com/api/v1/mlsts/{id}/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.onecodex.com/api/v1/mlsts/{id}/results")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.onecodex.com/api/v1/mlsts/{id}/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"mlstResults": {
"results": [
{
"alleles": [
{
"allele": 123,
"gene": "<string>"
}
],
"metadata": [
{}
],
"st": 123
}
],
"summary": {
"complete_match": true,
"n_alleles_matched": 123,
"n_alleles_total": 123,
"mlst": 123
}
},
"panelResults": "<unknown>"
}GET the structured MLST result for a single analysis — the assigned sequence type (ST), the per-locus allele calls, and the MLST scheme used. The returned JSON has the following top-level structure:
The
| Property | Description |
|---|---|
| panelResults object | An object consisting of 1 or more “sub-panels”, which include detailed alignment statistics (e.g., coverage, depth, etc.) for marker alleles used to determine sequence types (format below). |
| mlstResults object | An object containing sequence type information and detected alleles. |
panel_results object itself contains 1 or more sub-panels which describe alignment statistics for all markers. Each marker is a separate allele that is used to determine a sequence type. The markers themselves contain the following fields.
| Property | Description |
|---|---|
| name string | The name of the marker sequence, this includes the gene and allele number. |
| status string | Whether the marker sequence is ‘present’, ‘probable’, or ‘absent’. This determination is based on the below fields, but cutoff values may differ between panels. The default thresholds are identity and coverage >= 99% for “present” and >= 95% for “probable” |
| length integer | The length of the marker sequence. |
| pct_identity number | The percent identity of the detected marker sequence in the sample. |
| coverage number | The breadth of coverage of the detected marker sequence in the sample. |
| depth number | The depth of coverage for the detected marker sequence in the sample. |
| n_reads integer | The number of reads aligned to the marker sequence. |
Warning: The above JSON format is not guaranteed to remain stable, though we do not expect to substantively alter the meaning of any fields. Please use caution and include fallbacks when writing non-exploratory code using the above route. Please also feel free to reach out if you’d like to discuss this format and any forthcoming changes with us.
⌘I

