Apache ManifoldCF: Get a history report for a repository connection over REST API

81 Views Asked by At

I'm trying to get a history report for a repository connection over ManifoldCF REST API. According to the documentation:

https://manifoldcf.apache.org/release/release-2.11/en_US/programmatic-operation.html#History+query+parameters

It should be possible with the following URL (connection name: myConnection):

http://localhost:8345/mcf-api-service/json/repositoryconnectionhistory/myConnection

I have also tried to use some of the history query parameters:

http://localhost:8345/mcf-api-service/json/repositoryconnectionhistory/myConnection?report=simple

But I am not sure if I am using them correctly or how they should be attached to the URL, because it is not mentioned in the documentation. The problem is also that I don't receive any error, but an empty object, so it is difficult to debug. The API returns an empty object even for a non-existing connection.

However it works for resources, which doesn't have any attributes, e.g.:

http://localhost:8345/mcf-api-service/json/repositoryconnectionjobs/myConnection

or

http://localhost:8345/mcf-api-service/json/repositoryconnections/myConnection

Thanks in advace for any help.

1

There are 1 best solutions below

0
On BEST ANSWER

I also wrote a message to ManifoldCF team and they gave me an answer. So I summed up it for you below.

Query parameters go after the fixed "path" part of the URL and are of the form ?parameter=value&parameter2=value2... So in the same way as in any other URL.

The problem was that I didn't supply the activity(s) that I wanted to match. Possible activities are e.g. fetch, process. My example:

http://localhost:8345/mcf-api-service/json/repositoryconnectionhistory/myConnection?activity=process&activity=fetch

Finally, the reason why I didn't get an error when I used a connection name that is bogus is because the underlying implementation is merely doing a dumb query and not checking for the legality/existence of the connection name.