You are viewing limited content. For full access, please sign in.

Question

Question

API server on-prem not returning Path values after search

asked on June 18 Show version history

Hello all,
I'm using the LF API server, and I can get it working just fine. I now need to return the entry I'm searching for path. For some reason, the API is returning null. Everything else looks good. I'm testing in the Swagger playground. Here are the results. 

{
  "@odata.context": "https://anlfdevsrv.srapacific.com/LFRepositoryAPI/v1/$metadata#Results",
  "value": [
    {
      "id": 173966,
      "isContainer": false,
      "isLeaf": true,
      "name": "Packing Slip - PO 13-1249889 VendorID: 30358",
      "parentId": 173969,
      "fullPath": null,
      "folderPath": null,
      "creator": "Forms",
      "creationTime": "2025-06-17T13:39:26-07:00",
      "lastModifiedTime": "2025-06-17T13:41:13-07:00",
      "entryType": "Document",
      "templateName": "Accounts Payable - Packing List",
      "templateId": 31,
      "templateFieldNames": [],
      "volumeName": "DEFAULT",
      "rowNumber": 1
    }
  ]
}

I see the entry ID, template, name, and other information. For some reason, null is in the path. Any idea why? 

0 0

Replies

replied on June 24 Show version history

I needed some help from Laserfiche AI on this as the documentation does show that full path will be null but does not comment further on the subject.

From AI: "The fullPath and folderPath fields may be null in the search results because the search operation is designed to return entries without necessarily providing the context of their location within the folder structure."*

I tried asking if I can use specific search criteria to get anything other than null and it could not find any documentation although it thinks it might be possible

To get the path for each found entry it seems you can hack the get folder contents endpoint and turn it into a find entry endpoint which returns the full path of a non-folder entry.**

By removing the /Laserfiche.Repository.Folder/children, and using the ID of a document instead, this endpoint becomes a secret endpoint that is not documented. It will return the entries' properties including the full path.

So this secret endpoint for getting entry paths would be

GET /repository/vX/Repositories/RepositoryName/Entries/Y 

where X is your API version, RepositoryName is your repository, and Y is your entry ID

*Reference to documentation showing that it will likely be null when searching
https://developer.laserfiche.com/docs/guides/search/guide_search-v1/

**Get Folder endpoint documentation
https://developer.laserfiche.com/docs/guides/documents-and-folders/guide_get-folder-listing-v1/

0 0
replied on June 24

Thanks Chad. I would still like some input from Lasefiche on this one. What you explained, IMO is a workaround. I don't understand why the API for Searches/Results can't return the path since it's part of the response values. It is the 4th value to be expected to be returned. Nothing in the Swagger docs shows that it will be null. I would argue that there is an expected result when looking at the example response below. 
 

{
  "value": [
    {
      "id": 0,
      "name": "string",
      "parentId": 0,
      "fullPath": "string",
      "folderPath": "string",
      "creator": "string",
      "creationTime": "2025-06-24T17:22:04.235Z",
      "lastModifiedTime": "2025-06-24T17:22:04.235Z",
      "entryType": "Folder",
      "isContainer": true,
      "isLeaf": true,
      "templateName": "string",
      "templateId": 0,
      "templateFieldNames": [
        "string"
      ],
      "volumeName": "string",
      "rowNumber": 0,
      "fields": [
        {
          "fieldName": "string",
          "values": [
            {
              "additionalProp1": "string",
              "additionalProp2": "string",
              "additionalProp3": "string"
            }
          ],
          "fieldType": "DateTime",
          "fieldId": 0,
          "isMultiValue": true,
          "isRequired": true,
          "hasMoreValues": true
        }
      ]
    }
  ],
  "@odata.nextLink": "string",
  "@odata.count": 0
}

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.