API to download blobs from project files

Reposting a ticket I filed.

Hello,

I have a need to upload excel files and store them as raw data files and be able to download them programmatically at a later time.

In the api docs: https://www.palantir.com/docs/foundry/api/v2, there are apis to download media files, dataset files, attachments, and list folder contents.

I can call the Get Folder Children API to see my blobs:

GET https://<FOUNDRY-URL>.palantirfoundry.com/api/v2/filesystem/folders/ri.compass.main.folder.3fa1cd7d-xxxxxxxxxxx/children?preview=true`


{
  "data": [
    {
      "rid": "ri.blobster.main.spreadsheet.e48c68a4-xxxxxxxxx",
      "displayName": "LOGSTAT.xlsx",
      "path": "/x/y.z",
      "type": "BLOBSTER_SPREADSHEET",
      "createdBy": "xxxxxxx",
      "updatedBy": "xxxxxxxxxxxx",
      "createdTime": "2025-02-13T01:38:03.565248383Z",
      "updatedTime": "2025-02-13T01:38:03.565248383Z",
      "trashStatus": "NOT_TRASHED",
      "parentFolderRid": "ri.compass.main.folder.3fa1cd7d-xxxxxxxxxx",
      "projectRid": "ri.compass.main.folder.108895fd-xxxxxxxxxx",
      "spaceRid": "ri.compass.main.folder.3ea70608-xxxxxxxxxxxxxx"
    },
    {
      "rid": "ri.blobster.main.archive.d43541c2-xxxxxxxxxx",
      "displayName": "Archive.zip",
      "path": "/a/b/c.d",
      "type": "BLOBSTER_ARCHIVE",
      "createdBy": "92cd7fda-xxxxxxxx",
      "updatedBy": "92cd7fda-xxxxxxxxx",
      "createdTime": "2025-02-20T20:23:37.23625781Z",
      "updatedTime": "2025-02-20T20:23:37.23625781Z",
      "trashStatus": "NOT_TRASHED",
      "parentFolderRid": "ri.compass.main.folder.3fa1cd7d-xxxxxxxxxxxx",
      "projectRid": "ri.compass.main.folder.108895fd-xxxxxxxxxxx",
      "spaceRid": "ri.compass.main.folder.3ea70608-xxxxxxxxxxxxxxx"
    }
  ]
}

what API can i use to download these blobs?

Answer:

Hi Josh,

Unfortunately, there is no endpoint for specifically downloading a raw file that is directly in the file system. However what you could do is:

1.) Upload these files to an unstructured dataset (docs: https://www.palantir.com/docs/foundry/building-pipelines/unstructured-overview#overview, which basically just acts as a sort of container for whichever files you upload to it.

2.) Use the getFileContent endpoint to retrieve the file(s) - API reference here: https://www.palantir.com/docs/foundry/api/v2/datasets-v2-resources/files/get-file-content/
I hope this is helpful to you! Let me know if you have any additional questions and I’m happy to assist.

Best regards,
Fran

Thanks Fran!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.