curl --request GET \
--url https://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/', 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://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/",
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://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/"
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://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/")
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[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"is_active": true,
"is_archived": true,
"description": "<string>",
"external_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"instructions": "<string>",
"start_date": "2023-11-07T05:31:56Z"
}
]{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Get Trials
Retrieve a list of trials associated with your organization. Requires a valid Bearer token.
curl --request GET \
--url https://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/', 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://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/",
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://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/"
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://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://newleaf-api-336813653216.us-central1.run.app/external/v1/trials/")
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[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"is_active": true,
"is_archived": true,
"description": "<string>",
"external_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"instructions": "<string>",
"start_date": "2023-11-07T05:31:56Z"
}
]{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
OAuth 2.0 Client Credentials Grant. Requires client_id and client_secret to obtain a Bearer token.
Query Parameters
Filter by active status.
Filter by archived status. If not provided, defaults to False (unarchived trials are returned).
Response
A list of trials.
Unique identifier for the project/trial.
Name of the project/trial.
Identifier of the organization this project/trial belongs to.
Identifier of the user who created the project/trial.
Timestamp of when the project/trial was created.
Indicates if the project/trial is currently active.
Indicates if the project/trial is archived.
Optional description of the project/trial.
Optional external identifier for the project/trial.
Timestamp of when the project/trial was last updated.
Optional instructions for the project/trial.
Optional start date of the project/trial.