List the project's Models and its uploads in flight
curl --request GET \
--url https://{tenant}.earnie.dev/v1/projects/{projectId}/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.earnie.dev/v1/projects/{projectId}/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.earnie.dev/v1/projects/{projectId}/models', 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://{tenant}.earnie.dev/v1/projects/{projectId}/models",
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://{tenant}.earnie.dev/v1/projects/{projectId}/models"
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://{tenant}.earnie.dev/v1/projects/{projectId}/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.earnie.dev/v1/projects/{projectId}/models")
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": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"kind": "file",
"sha256": "<string>",
"size_bytes": 123,
"status": "scanning",
"weights": "stored",
"scan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error_code": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"findings": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"model_status": "identified",
"purl": "<string>",
"name": "<string>",
"confidence_band": "high",
"decision_state": "open",
"decision_reason": "<string>",
"expected_version": 123,
"license": "<string>"
}
]
}
],
"pending_uploads": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"size_bytes": 123,
"offset": 1,
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"max_size_bytes": 123,
"repository_items": [
{
"finding": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"model_status": "identified",
"purl": "<string>",
"name": "<string>",
"confidence_band": "high",
"decision_state": "open",
"decision_reason": "<string>",
"expected_version": 123,
"license": "<string>"
},
"scan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_type": "git",
"sha256": "<string>",
"size_bytes": 123
}
]
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}scans
List the project's Models and its uploads in flight
Newest first. When ai is hidden from the caller both lists are empty; the Models are kept and reappear when ai is enabled again.
GET
/
v1
/
projects
/
{projectId}
/
models
List the project's Models and its uploads in flight
curl --request GET \
--url https://{tenant}.earnie.dev/v1/projects/{projectId}/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.earnie.dev/v1/projects/{projectId}/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.earnie.dev/v1/projects/{projectId}/models', 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://{tenant}.earnie.dev/v1/projects/{projectId}/models",
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://{tenant}.earnie.dev/v1/projects/{projectId}/models"
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://{tenant}.earnie.dev/v1/projects/{projectId}/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.earnie.dev/v1/projects/{projectId}/models")
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": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"kind": "file",
"sha256": "<string>",
"size_bytes": 123,
"status": "scanning",
"weights": "stored",
"scan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error_code": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"findings": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"model_status": "identified",
"purl": "<string>",
"name": "<string>",
"confidence_band": "high",
"decision_state": "open",
"decision_reason": "<string>",
"expected_version": 123,
"license": "<string>"
}
]
}
],
"pending_uploads": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"size_bytes": 123,
"offset": 1,
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"max_size_bytes": 123,
"repository_items": [
{
"finding": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"model_status": "identified",
"purl": "<string>",
"name": "<string>",
"confidence_band": "high",
"decision_state": "open",
"decision_reason": "<string>",
"expected_version": 123,
"license": "<string>"
},
"scan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_type": "git",
"sha256": "<string>",
"size_bytes": 123
}
]
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Authorizations
An Earnie API key, sent as Authorization: Bearer sk_earnie_.... Create one under Settings > API keys. The key's scopes decide which operations it may call.
Path Parameters
Response
The Models.
Show child attributes
Show child attributes
Uploads in flight that can be resumed by dropping the same file again.
Show child attributes
Show child attributes
The largest Model this tenant accepts (SCANS_AI_MAX_MODEL_MB).
Present repository model-file findings, including Git LFS pointers. Not deletable through Model endpoints.
Show child attributes
Show child attributes