Skip to main content
PUT
/
api
/
user
/
reload
/
{fileId}
Reload file content
curl --request PUT \
  --url https://pria.praxislxp.com/api/user/reload/{fileId} \
  --header 'x-access-token: <api-key>'
import requests

url = "https://pria.praxislxp.com/api/user/reload/{fileId}"

headers = {"x-access-token": "<api-key>"}

response = requests.put(url, headers=headers)

print(response.text)
const options = {method: 'PUT', headers: {'x-access-token': '<api-key>'}};

fetch('https://pria.praxislxp.com/api/user/reload/{fileId}', 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/user/reload/{fileId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/user/reload/{fileId}"

req, _ := http.NewRequest("PUT", 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.put("https://pria.praxislxp.com/api/user/reload/{fileId}")
.header("x-access-token", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://pria.praxislxp.com/api/user/reload/{fileId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "success": true,
  "message": "File reloaded successfully!",
  "data": {
    "_id": "<string>",
    "filename": "<string>",
    "originalname": "<string>",
    "mimetype": "<string>",
    "created": "2023-11-07T05:31:56Z",
    "filesize": 123,
    "thumbnail": "<string>",
    "user": "<string>",
    "institution": "<string>",
    "account_shared": true,
    "file_summary": "<string>",
    "file_title": "<string>",
    "file_url": "<string>",
    "tokens_used": 123,
    "is_public": false,
    "is_private": false,
    "file_dimensions": "<string>",
    "file_authors": "<string>",
    "embeddings_model": "<string>",
    "summary_model": "<string>",
    "image_analysis_model": "<string>",
    "googleDriveFileId": "<string>",
    "googleDriveModifiedTime": "2023-11-07T05:31:56Z",
    "ragHitCount": 0,
    "lastRagHitAt": "2023-11-07T05:31:56Z",
    "vaultHealthScore": 123,
    "fileOnDisk": true,
    "owner_data": {
      "email": "jsmith@example.com",
      "fname": "<string>",
      "lname": "<string>",
      "institution": "<string>"
    },
    "institution_data": {
      "name": "<string>",
      "ainame": "<string>"
    },
    "institution_name": "<string>",
    "institution_display_name": "<string>",
    "index": 123,
    "collection": "<string>",
    "collection_path": [
      {
        "_id": "<string>",
        "name": "<string>",
        "color": "<string>"
      }
    ]
  }
}
{
"success": false,
"message": "<string>"
}
{
"success": false,
"message": "<string>",
"error": "<string>"
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Path Parameters

fileId
string
required

The file ID to reload

Response

File reload result. Check the success field - async RAG errors also return HTTP 200 with success: false.

success
boolean
Example:

true

message
string
Example:

"File reloaded successfully!"

data
object