V3_MiddlewareAccess_PutByCommand (Put)
- Last UpdatedNov 06, 2025
- 2 minute read
| Put | V3_MiddlewareAccess_PutByCommand |
Resource Path:/api/v3/MiddlewareAccess/{command}
This method allows a Put 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 and the fields to update), they are passed in the request body.
This operation is intended to be used with MES model-driven application content in Work Tasks.
| Name | Description | Data Type |
|---|---|---|
| command | Holds the command in the format object.command, where object is the MES table being acted on and command is the MES command (e.g., update, updatespecific) 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.Update). 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. |
The request body is of type object.
The request body is a JObject string that specifies the stored procedure parameters. The contents of the request are dependent upon the object.command being used.
For example:
{"ent_id":15,"ent_name":"Roaster", "description":"Roaster for bagged mixed nuts", ...}
for updating an entity.
The response body is of type Mes.WebApi.Shared.ModelsV3.MiddlewareAccessPutResponse.
The operation returns a JObject string that represents the result of the Put call. The string will include the last_edit_at and mod_id columns of the updated record, and raw XML that represents the other columns of the updated record.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, to update an entity record, you should use the existing Web API ent Put operation instead, an example of which is shown below:
api/v3/Entity?entId=5&entName=Roaster&description=Roaster for mixed nuts& ...
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.