import requests
url = "https://app.strandai.com/api/v1/samples"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://app.strandai.com/api/v1/samples \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.strandai.com/api/v1/samples', 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.strandai.com/api/v1/samples",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.strandai.com/api/v1/samples"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.strandai.com/api/v1/samples")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.strandai.com/api/v1/samples")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"ownership": "mine",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"filename": "<string>",
"status": "<string>",
"fileSize": "<string>",
"fields": {},
"createdAt": "2023-11-07T05:31:56Z",
"appUrl": "<string>"
}
],
"nextCursor": "<string>",
"appUrl": "<string>"
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}List samples
List the calling organization’s samples, the public cohort, or both. Cursor-paginated newest-first; all always emits mine first and de-duplicates owned public samples in favor of the mine representation. Credit-free.
The facet parameters are byte-identical to the ones the Strand web app puts in a filtered /samples URL, so a browser query string is a valid API query string and vice versa. Facets compose with AND; status and workflow values compose with OR; repeated marker and field values compose with AND. Tags is addressed through the predefined Tags field definition. The retired tag parameter is rejected with 400 rather than ignored. Unknown values, malformed clauses and over-cap arrays are also rejected.
A public release supports title search (q) only. Under scope=all any other facet suppresses the public block; under scope=public it is a 400.
import requests
url = "https://app.strandai.com/api/v1/samples"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://app.strandai.com/api/v1/samples \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.strandai.com/api/v1/samples', 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.strandai.com/api/v1/samples",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.strandai.com/api/v1/samples"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.strandai.com/api/v1/samples")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.strandai.com/api/v1/samples")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"ownership": "mine",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"filename": "<string>",
"status": "<string>",
"fileSize": "<string>",
"fields": {},
"createdAt": "2023-11-07T05:31:56Z",
"appUrl": "<string>"
}
],
"nextCursor": "<string>",
"appUrl": "<string>"
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}Authorizations
Query Parameters
Repeatable custom-field filter of the form DEFINITION_UUID:op[:VALUE]. op is one of eq, contains, gte, lte, is_empty, is_not_empty; the first four carry a value that is JSON-encoded and then URL-encoded (so "high", 3, true). Operators are checked against the definition's type. Org-defined fields have no meaning on the public cohort. Under scope=all a field facet returns matching organization-owned samples and suppresses public rows; under scope=public it is rejected. Values compose with AND.
20^[0-9a-fA-F-]{36}:(eq|contains|gte|lte)(:.+)$|^[0-9a-fA-F-]{36}:(is_empty|is_not_empty)$Was this page helpful?