Command Service endpoints allow us to execute requests against the internal system that are not accessible in the TDP.
To understand why and when you would use this endpoint, a little background information is helpful. Connectors, which are part of DataHub, as well as agents, are part of TDP but are installed on-premise. They are part of the customer's network and therefore, depending on network setup, should have access to the customer's internal services. Sometimes you might want to trigger an action once the TDP pipeline is completed. That action can occur in various customer systems, such as CoreLIMS, Empower, etc.
The Command Service creates and sends commands to connectors and agents, listens for command updates, and tracks all changes and responses. It also allows you to search for commands and view command history. Once the request is sent, connectors and agents implement logic to receive commands, execute them, and send the response back to the command service.
There are several different endpoints you can use when working with command service:
- Search commands - Searches for all commands in the service based on various search criteria.
- Get one command - Returns a single command with all the details.
- Create command - Creates a command that is sent to the target connector/agent.
- Purge queue - Purges the target queue. This method is useful when developing and testing commands. It also removes all commands that block outgoing queue.
- Get command history - Gets a list of all status changes for a single command including a summary of the details.