API for searching for recorded streams

Hi! We are working on an integration with XProtect where we want to be able search for recorded streams given a camera id and a date interval, what API should we use? We are developing in .NET 8 so we will need to use a REST/Websocket API.

Best regards, Hans

Currently there is no implementation to get this via REST or WebSocket. It is on the wish list for future enhancement of the REST API.

Currently the options are to use the MIP SDK (.NET Framework) (VideoOS.Platform.Data.SequenceDataSource Class) or to use the RecorderCommandService SOAP protocol (SequencesGet).

Ok, thanks! I see that the soap-interface is tagged as “legacy”, but I suppose it is safe to use until there is a corresponding REST API available?

/Hans

Yes.

Great, thanks!

We have done some testing now and have gotten it to work, just one question:

Is Windows Authentication the only way to get a token (that is needed for the soap messaging)? We are also integrating with the web socket API and there we use your IdP to get token.

/Hans

With the token from IDP you can login on the ServerCommandServiceOAuth, this is the recommended way. There should be some information here..

https://doc.developer.milestonesys.com/html/index.html?base=reference/protocols/protocol_authenticate.html&tree=tree_3.html

https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/intro_soap_protocols.html&tree=tree_3.html

Ok, but does it not say (in the table in the link you refer to) that we should use an XProtect token for the RecorderCommandService

Authentication method Default port Path

XProtect token 7563 /RecorderCommandService/RecorderCommandService.asmx

But maybe I have misunderstood the table… So I can chose any of the authentication methods in the list and the path indicates where to retrieve the token?

With the IDP Token you can login on ServerCommandServiceOAuth, there you then get the XProtect token, and this legacy XProtect token can then be used on the RecorderCommandService. Two different kinds of tokens. I hope this is the hint you need, and it gets clearer.

Thanks, I got it to work know, I was first a bit confused with the different types of tokens so I tried to send in the IdP access token via the Login requests Token property but when I instead added it as an Authorization header it worked fine :slight_smile:

/Hans

That is good news. Great.