Skip to main content Skip to complementary content

Send a command to a custom connector

Send a generic command to a custom connector by using the SendGenericCommandToCustomConnector method.

Examples

The goal is to send generic commands to a custom connector.

Example 1:  

The custom connector file name is QvEventLogConnectorSimple.exe.

The command that the custom connector should execute is JsonRequest and the method name is getInfo. There is no parameters for that command.

The method getInfo is a method that is recognized by the connector QvEventLogConnectorSimple.exe.

The client sends:

{ "handle": 1, "method": "SendGenericCommandToCustomConnector", "params": { "qProvider": "QvEventLogConnectorSimple.exe", "qCommand": "JsonRequest", "qMethod": "getInfo", "qParameters": [ "" ], "qAppendConnection": "" }, "id": 2, "jsonrpc": "2.0" }

The engine returns:

{ "jsonrpc": "2.0", "id": 2, "result": { "qResult": "{\"qMessage\":\"Example connector for Windows Event Log. Use account sdk-user\\/sdk-password\"}" } }

The result of the JsonRequest command is returned.

Example 2:  

The custom connector file name is QvEventLogConnectorSimple.exe.

The command that the custom connector should execute is JsonRequest and the method name is getDatabases. There is no parameters for that command.

The method getDatabases is a method that is recognized by the connector QvEventLogConnectorSimple.exe.

The name of the connection is Connection01. This connection has been previously created. For more information on how to create a custom connection, see Create a connection.

The client sends:

{ "handle": 1, "method": "SendGenericCommandToCustomConnector", "params": { "qProvider": "QvEventLogConnectorSimple.exe", "qCommand": "JsonRequest", "qMethod": "getDatabases", "qParameters": [ "" ], "qAppendConnection": "Connection01" }, "id": 42, "jsonrpc": "2.0" }

The engine returns:

{ "jsonrpc": "2.0", "id": 42, "result": { "qResult": "{\"qDatabases\":[{\"qName\":\"Windows Event Log\"}]}" } }

The result of the JsonRequest command is returned.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!