Get upload by ID
curl --request GET \
--url https://pria.praxislxp.com/api/admin/upload/{id} \
--header 'x-access-token: <api-key>'import requests
url = "https://pria.praxislxp.com/api/admin/upload/{id}"
headers = {"x-access-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-access-token': '<api-key>'}};
fetch('https://pria.praxislxp.com/api/admin/upload/{id}', 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://pria.praxislxp.com/api/admin/upload/{id}",
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-access-token: <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://pria.praxislxp.com/api/admin/upload/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-access-token", "<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://pria.praxislxp.com/api/admin/upload/{id}")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/admin/upload/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "<string>",
"filename": "<string>",
"originalname": "<string>",
"mimetype": "<string>",
"thumbnail": "<string>",
"created": "2023-11-07T05:31:56Z",
"filesize": 123,
"user": {
"_id": "<string>",
"email": "jsmith@example.com",
"fname": "<string>",
"lname": "<string>"
},
"institution": {
"_id": "<string>",
"name": "<string>"
},
"account_shared": false,
"collection": "<string>",
"file_summary": "<string>",
"file_title": "<string>",
"file_authors": "<string>",
"file_url": "<string>",
"source_url": "<string>",
"embed_url": "<string>",
"file_dimensions": "<string>",
"tokens_used": 0,
"is_public": false,
"is_private": false,
"embeddings_model": "<string>",
"summary_model": "<string>",
"image_analysis_model": "<string>",
"audio_analysis_model": "<string>",
"googleDriveFileId": "<string>",
"googleDriveModifiedTime": "2023-11-07T05:31:56Z",
"ragHitCount": 0,
"lastRagHitAt": "2023-11-07T05:31:56Z",
"vaultHealthScore": 123,
"downloadCount": 0,
"lastDownloadAt": "2023-11-07T05:31:56Z",
"diskMissCount": 0,
"diskMissFirstAt": "2023-11-07T05:31:56Z",
"batchId": "<string>",
"history": "<string>",
"replacedBy": [
"<string>"
],
"ingestion": {
"progress": 0,
"attempts": 0,
"heartbeatAt": "2023-11-07T05:31:56Z",
"claimedBy": "<string>",
"lastError": "<string>",
"errorStack": "<string>",
"enqueuedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"counts": {
"total": 0,
"sanitized": 0,
"embedded": 0
},
"sanitizeSkippedCount": 0
},
"embeddings": [
"<string>"
]
}
}{
"success": false,
"message": "Invalid upload Id"
}{
"success": false,
"message": "Upload not found"
}Admin Uploads
Get upload by ID
Retrieves a single upload by Mongo ObjectId with user and institution populated. The thumbnail Buffer is returned base64-encoded, and if the embeddings DB connection is ready an embeddings array of chunk text (sorted by chunkIndex) is attached.
GET
/
api
/
admin
/
upload
/
{id}
Get upload by ID
curl --request GET \
--url https://pria.praxislxp.com/api/admin/upload/{id} \
--header 'x-access-token: <api-key>'import requests
url = "https://pria.praxislxp.com/api/admin/upload/{id}"
headers = {"x-access-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-access-token': '<api-key>'}};
fetch('https://pria.praxislxp.com/api/admin/upload/{id}', 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://pria.praxislxp.com/api/admin/upload/{id}",
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-access-token: <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://pria.praxislxp.com/api/admin/upload/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-access-token", "<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://pria.praxislxp.com/api/admin/upload/{id}")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/admin/upload/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "<string>",
"filename": "<string>",
"originalname": "<string>",
"mimetype": "<string>",
"thumbnail": "<string>",
"created": "2023-11-07T05:31:56Z",
"filesize": 123,
"user": {
"_id": "<string>",
"email": "jsmith@example.com",
"fname": "<string>",
"lname": "<string>"
},
"institution": {
"_id": "<string>",
"name": "<string>"
},
"account_shared": false,
"collection": "<string>",
"file_summary": "<string>",
"file_title": "<string>",
"file_authors": "<string>",
"file_url": "<string>",
"source_url": "<string>",
"embed_url": "<string>",
"file_dimensions": "<string>",
"tokens_used": 0,
"is_public": false,
"is_private": false,
"embeddings_model": "<string>",
"summary_model": "<string>",
"image_analysis_model": "<string>",
"audio_analysis_model": "<string>",
"googleDriveFileId": "<string>",
"googleDriveModifiedTime": "2023-11-07T05:31:56Z",
"ragHitCount": 0,
"lastRagHitAt": "2023-11-07T05:31:56Z",
"vaultHealthScore": 123,
"downloadCount": 0,
"lastDownloadAt": "2023-11-07T05:31:56Z",
"diskMissCount": 0,
"diskMissFirstAt": "2023-11-07T05:31:56Z",
"batchId": "<string>",
"history": "<string>",
"replacedBy": [
"<string>"
],
"ingestion": {
"progress": 0,
"attempts": 0,
"heartbeatAt": "2023-11-07T05:31:56Z",
"claimedBy": "<string>",
"lastError": "<string>",
"errorStack": "<string>",
"enqueuedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"counts": {
"total": 0,
"sanitized": 0,
"embedded": 0
},
"sanitizeSkippedCount": 0
},
"embeddings": [
"<string>"
]
}
}{
"success": false,
"message": "Invalid upload Id"
}{
"success": false,
"message": "Upload not found"
}Authorizations
JWT token passed in x-access-token header
Path Parameters
Upload ID (Mongo ObjectId)
Response
Upload retrieved successfully
Admin view of an upload row. Mirrors the persisted shape from routes/models/upload.js, with two admin-handler shape changes: (1) thumbnail is returned as a base64-encoded string instead of a Buffer, and (2) an embeddings array of chunk text strings is appended when the embeddings DB connection is ready.
Show child attributes
Show child attributes
Was this page helpful?
⌘I