Is the "type" value required when requesting custom api? It is indicated as a required value in the document, but when I actually run the example code, I can send the type without putting it in the body, or I can send it other than the four types defined (fields, member, select, and handshake) without ignoring it. Isn't it unnecessary because it's already distinguishable by api endpoint?
Hello,
Thank you for writing to us.
Your observation is correct for most scenarios, when the API endpoints include the request type, and the type
property can be safely ignored. However, the type
property is required for specific custom API connection approaches, where distinguishing by the request URL is impossible. These scenarios include:
singleEndpoint
data source option, custom data source API requests are sent to a single endpoint specified in the url
property.The type
is always included in requests to ease the transition to these connection approaches.
Please let us know if our answer helped you.
Best Regards,
Maksym