Receive email notifications by changing your settings.
Click on your picture in the top right corner, go to Preferences and select your notification preferences.
Thank you for contributing to our forum!
Please keep in mind:
1. To only comment on the topic where the discussion is about. Do you have a new question or topic? Please start a new discussion.
2. Be kind to other users!

Version 2024.7.0: API: Empty string is now accepted as NULL value.

Hi,

I was wondering in what situation this api feature holds up. I have tried today a few instances in which I use the api call /session/query in which I upload an empty string or NULL value like[["UPDATE_AREA_X_WHERE_AREA_IS_18"],[]]. This call is still rejected by the api. So in what type of example does this new feature work?

Tagged:

Comments

  • Hey there,

    this change was to remedy a specific circumstance with attempting to use the API, especially the API Overview HTML pages and the forms therein, to send instructions in the form of events to the Tygron Platform. Some events have optional parameters or permit "null" values as input. But due to the nature of html forms and certain data structures for http requests, an empty input field will be sent as an empty string, rather than "null". An empty string was then interpreted as an actual input, which would then be invalid for that parameter, and thus making it impossible to use that event in that format.

    This change is made so that in a situation where an event has an optional parameters, or a parameter that permits "null" as a value, the empty string can also be interpreted as null. The event is then processed as intended. One event where this is the case is the EditorOverlay/SET_RASTERIZATION event, which sets the rasterization mode for an Average Overlay.

    This change is only relevant for events which allow null as an input. Other events and endpoints, which do not permit a null or an empty string, are not affected. This includes update statements such as your example. An update statement must always write a specific numerical value to some global or attribute. "null", or an empty string, is not a valid value for an update statement.

    Sprawling spreadsheets so intricate Alexander the Great cuts them in half.

  • Ha Rudolf,

    Ah yes that makes sens! Thanks for the responds :)

Sign In or Register to comment.