Optimizer

Test template

Test a template with a sample input message.

post/v1/optimize/messages/test

Request

  • Base URL
    https://api.1nce.com/management-api
  • Auth
    HTTP bearer

Request body

templatestring required

A stringified JSON template.

payloadstring required

Sample input used to test the template (base64).

Example request

{
  "template": "<template_json>",
  "payload": "<sample_input_base64>"
}

Response

OK

translatedPayloadstring required

A stringified JSON message (result from applying template to the sample input).

reducedBytesnumber required

The number of bytes that the device didn't have to send over the network by using the translation template.

energyUsageReductionnumber required

The energy saved on data transfer using provided template in percent.

Example response

{
  "translatedPayload": "<message_json>",
  "reducedBytes": 1,
  "energyUsageReduction": 10
}

Changes

No recorded changes to this operation across all 1 revision of this API.