The SORACOM Data Post component allows sending data to SORACOM’s Harvest.

Preliminary Setup on SORACOM’s Side

In SORACOM’s management console, assign the target SIM card to a SIM group and enable Harvest Data in the settings.

※A SORACOM Air SIM card or SORACOM Arc is required to connect Gravio to the internet.
※For operations on SORACOM’s management console, please contact SORACOM directly.

Content-Type Property for HTTP Request Body

Content-Type Property Body Content During HTTP Request
Default Automatically selects the Content-Type based on the type of the input payload.
String type Executes the HTTP request with the Payload as a string using “text/plain; charset=utf-8”.
JSON array, JSON object Executes the HTTP request with the Payload marshalled into a byte array as “application/json”.
Byte array Executes the HTTP request with the Payload converted to a string as “application/octet-stream”.
Others Executes the HTTP request with the string-converted Payload as “text/plain”.
application/x-www-form-urlencoded The input payload is treated as a JSON object type, where key-value pairs are sandwiched by ‘=’ and separated by ‘&’, then sent in the body during the HTTP request. (An error occurs if the input is anything other than a JSON Object type).
multipart/form-data The input payload is treated as a JSON Object type, where key-value pairs are separated in multipart format, and the Content-Type of multipart/form-data is automatically appended with a boundary during the HTTP request. (An error occurs if the input is anything other than a JSON Object type).
Any other Content-Type entered manually Outputs the input payload converted to a byte array as specified by the entered Content-Type.

Input and Output Payload

Input Payload Description
cv.Payload The data to be sent. Please refer to the Harvest documentation for usable formats.
Output Payload Description
cv.Payload If the HTTP response’s Content-Type header is “application/json”, it is stored as a JSON type; if “text/*” and a charset (utf-8/shift_jis/euc-jp/iso-2022-jp) is specified, it is stored as a string; otherwise, it is stored as a byte array.

Component Properties

Property Name Description
Content-Type HTTP header’s Content-Type
Timestamp Date of the data *1
Timeout HTTP request response timeout value

*1 Refer to the supported date formats below for the date formats supported.

Component Variables

Component Variable Description
cv.Payload Body of the response
cv.StatusCode Result of the request
cv.Headers Response headers
cv.ContentLength Length of the response

Supported Date Formats

Timestamp supports the following formats:
time.RFC3339 format
“2006-01-02T15:04:05.9999999Z”
“2006-01-02T15:04:05Z”
“2006-01-02 15:04:05.9999”
“2006-01-02 15:04:05”
“2006-01-02”

Need more help with this?
Join our slack community for help

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.