Note.template fails in API call

Use Case: I need to send to a .qi file a couple kb.
The code worked a while back. Until the change to max 250 bytes (I must have missed somewhere the heads up :wink:
No problem, note.template to the rescue…
Not so I issue:
{“req”: “note.template”, “file”: “file_transfer_ntf.qi”, “verify”: true}
and get back
b’{“err”:“unknown request type: note.template”}

I send that like all others with the usual (sniplet)
token = get_token()
url = ‘https://api.notefile.net/req?product="’ + project + ‘“&device=”’ + device + ‘"’
headers = {‘Content-Type’: ‘application/json’,‘X-Session-Token’: token}
response = requests.request(“POST”, url, headers=headers, data = str_payload)

where str_payload is the command above

Am I missing something real obvious?

Hi @Francois,

Templated Notefiles are only supported with outgoing Notes (e.g. from Notecard to Notehub), not inbound Notes. This feature was built upon the assumption that devices may want to enqueue many small packets of the same formatted data to Notehub on a regular cadence.

If you are pulling multiple KB of data from a remote service to the host MCU, we would recommend using an inbound Note which contains information like, say a URL and object length. Then, have the host connect to the service using web.get to pull down the data in chunks of 4KB-8KB. These web requests do require the Notecard to be in continuous mode (even if only temporarily).

Thanks,
Rob