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

Question

Question

API SERVER GET repositories not working

asked on November 24
I am encountering an issue when attempting to perform a GET request to retrieve the list of repositories; it consistently returns the following error: "Failed to get repository resources."
I have enabled this feature via the `appsettings.json` file.
I appreciate any help.
Captura.PNG
Captura.PNG (20.22 KB)
0 0

Replies

replied two days ago

Your screenshot shows HTTP 500 with errorSource: "Laserfiche Server", so I'd check the API Server's repository-server connection next.

In %ProgramData%\Laserfiche\API Server\LFRepositoryAPI\appsettings.json, verify that LaserficheServerName points to the repository server's FQDN, including its port if nonstandard. Also verify that EnableLaserficheServerSSL matches that server's configured connection.

Check %ProgramData\Laserfiche\API Server\LFRepositoryAPI\Logs for the request's timestamp and operation ID. The underlying exception should be more useful than the generic "Failed to get repository resources" response.

Can other API calls connect to a known repository, or does everything fail? Can you share the API Server build and the relevant exception with credentials and sensitive details removed?

1 0
replied one day ago

attach a JSOn capture. looks good to me

this is the log. 


[c43599456f874f6e9ca1644107e705bf]:LFRepositoryAPI started at 2026-12-03T12:46:24.5137724Z.
[INFO+0ms(12)]Correlated operation: 40000005-0000-f600-b63f-84710c7967bb
[INFO+0ms(12)][GET] https://localhost/LFRepositoryAPI/swagger/v1/swagger.json
[INFO+0ms(12)]Fail to get Authorization header from context
[INFO+0ms(12)]Fail to get Authorization header from context
[INFO+234ms(12)]Completed at 2026-12-03T12:46:24.7495347Z MilliSpeedOp.
[LFRepositoryAPI]HTTP Reponse: 200.[c43599456f874f6e9ca1644107e705bf][0!0](234ms)>[Verbose][-1][40000005-0000-f600-b63f-84710c7967bb][system]

[4689a34c982943b0a40b5f4be99dbe95]:LFRepositoryAPI started at 2026-12-03T12:46:39.6788968Z.
[INFO+0ms(12)]Correlated operation: 40000007-0000-f600-b63f-84710c7967bb
[INFO+0ms(12)][GET] https://localhost/LFRepositoryAPI/v1/Repositories
[INFO+0ms(12)]Fail to get Authorization header from context
[INFO+0ms(12)]Fail to get Authorization header from context
[ERR+138ms(12)]One or more errors occurred. (One or more errors occurred. (The proxy tunnel request to proxy 'http://192.168.2.146:3128/' failed with status code '503'."))
THE PROXY TUNNEL REQUEST TO PROXY 'HTTP://192.168.2.146:3128/' FAILED WITH STATUS CODE '503'."
-----TRACES----
System.Net.Http.HttpRequestException: The proxy tunnel request to proxy 'http://192.168.2.146:3128/' failed with status code '503'."
   at System.Net.Http.HttpConnectionPool.EstablishProxyTunnelAsync(Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.InjectNewHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.SocketsHttpHandler.<SendAsync>g__CreateHandlerAndSendAsync|118_0(HttpRequestMessage request, CancellationToken cancellationToken)
   at Laserfiche.HttpClient.TimeoutHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
------
[ERR+149ms(12)]
ERROR: FAILED TO GET REPOSITORY RESOURCES.
-----TRACES----
Laserfiche.Repository.LFSConnector.Exceptions.UncategorizedRAException: Error: Failed to get repository resources.
   at Laserfiche.Repository.LFSConnector.Connectors.RepositoryConnector.GetRepositoriesFromServer(IServer server) in C:\agent01\_work\86\s\RepositoryLFSConnector\Laserfiche.Repository.LFSConnector\Connectors\RepositoryConnector.cs:line 932
   at Laserfiche.Repository.LFSConnector.Connectors.RepositoryConnector.GetRepositoryList_SelfHost_V1() in C:\agent01\_work\86\s\RepositoryLFSConnector\Laserfiche.Repository.LFSConnector\Connectors\RepositoryConnector.cs:line 904
------
-----DATA-----
OperationId = 4689a34c982943b0a40b5f4be99dbe95
[INFO+158ms(12)]RepositoriesController GetRepositoryList failed
[INFO+176ms(12)]HTTP Reponse: 500.
[INFO+176ms(12)]Completed at 2026-12-03T12:46:39.8561727Z MilliSpeedOp.
[LFRepositoryAPI]Error: Failed to get repository resources.[4689a34c982943b0a40b5f4be99dbe95][2!0](176ms)>[Error][-1][40000007-0000-f600-b63f-84710c7967bb][system]

Captura de pantalla 2026-12-03 134820.png
0 0
replied one day ago • Show version history

In you appsettings.json file, set the "EnableLaserficheServerSSL" to false.  It looks like the problem may be with the ssl connection between the API service and the repository.

0 0
replied one day ago

LaserficheServerName needs to be the fully qualified domain name. (it currently isn't)

LaserficheWebClientHostUrl”: Set to your “Laserfiche Web Client Host URL” (e.g., “https://{LaserficheWebClientHostName}/laserfiche”). (It's not the full URL in your configuration)

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

Sign in to reply to this post.