Skip to main content
APIs in PluginCommAPI, PluginNoteAPI, PluginDocAPI, and PluginFileAPI return APIResponse<T>. The data structure is:
FieldTypeDescription
successbooleanWhether the API call succeeds
resultT | nullPresent only when success === true. When the call fails, result is null.
If T is boolean/number/string, result is the corresponding primitive value.
If T is a custom type, result is an instance of that type.
error{ code: number; message: string } | nullPresent only when success === false. When the call succeeds, it is null.
code is the error code, and message is the error description.