PUT and POST – two similar methods, why ?
In HTTP the PUT method is used for changing a ressource. However, according to the HTTP specification for PUT, only a single resource can be changed with the method. See: https://tools.ietf.org/html/rfc7231
If several resources are to be changed at the same time, Bridge API offers the POST method. This reduces the number of method calls and ensures transaction security. This is because the forecast result would be inconsistent during the individual PUT calls. For example, if an application reads the forecast result in this time period since it was informed of the change by an MQTT event, this application would receive the inconsistent result. The entire forecast result should therefore be updated with POST, whereas the PUT method is used for rescheduling a single operation. By the way, this applies to both the forecast result and the planning result.
For the general use of the POST method in FORCE Bridge API please refer to https://docs.forcebridge.io/intro.html#http-methods-used-in-force-bridge-api
Please login or Register to submit your answer