V3_MiddlewareAccess_GetByCommand (Get)
- Last UpdatedNov 06, 2025
- 2 minute read
| Get | V3_MiddlewareAccess_GetByCommand |
Resource Path:/api/v3/MiddlewareAccess/{command}
This method allows a Get command to be supplied in a URI in the format object.command. If the command is not specified as object.command, an error is raised.
If the stored procedure that is associated with the object.command has parameters (e.g., the key fields to identify the record to retrieve), they are passed as a REST API query string in the URI resource path.
This operation is intended to be used with MES model-driven application content in Work Tasks.
| Name | Description | Data Type |
|---|---|---|
| command | The command in the format object.command, where object is the MES table being acted on and command is the MES command (e.g., getall, getbykey) for the XML request to the middleware. The command name combined with the object name allow the MES middleware to identify the stored procedure to be called. The object.command combination is looked up in the middleware mapping file to determine which stored procedure to call. Note: This command parameter is not actually a parameter. The object and command pair should be provided in the URI resource path (e.g., api/v3/MiddlewareAccess/ent.GetAll). Including the word "command" in the URI resource path will cause the call to fail. | string |
| Name | Description |
|---|---|
| trans_id | Used to supply the ID of the transaction if the call is taking part in a transaction. |
| max_rows | Used to supply the maximum number of rows that will be returned by the get. |
The response body is of type object.
The returned JObject represents the dataset returned by the Get call.This operation behaves differently than most other Web API commands. The MES middleware object.command syntax is exposed as a Web API endpoint. The parameters are then dependent on the object.command being called.
Using this Web API operation requires a solid understanding of the MES middleware and is recommended only when the needed call is not already exposed through an existing standard Web API operation.
For example:
api/v3/MiddlewareAccess/ent.GetAll?canRunJobs=True&canCaptureUtil=True
should use the existing Web API ent Get operation instead, an example of which is shown below:
api/v3/Entity?canRunJobs=True&canCaptureUtil=True
If you do use this operation, make sure that the names of the parameters being passed match those in the stored procedure that is being called by the command.