Nodebb API development history
-
I am experimenting with a 'mini nodebb' javascript (only) frontend, with the idea to use an existing forum back-end database, and access it via API.
I have hit a read-only wall for some things- there are many GET API calls, but not some corresponding POST actions.So before returning to my challenge I have 2 questions:
-
were the many APIs, in existance at the birth of Nodebb, or were they added later?
-
Does the NodeBB code use some of these API calls itself?
-
-
Can you give an example?
-
@PitaJ
E.g. there are documented API calls to GET user info, Get Topics etc, but not write them back.
But in meantime I have found on Github, a Write API, from v1.5 time. It says depreciated but still works.
https://github.com/NodeBB/nodebb-plugin-write-apiAs regards to the many API calls, are they used by NodeBB itself?
Also, when I go to Admin>Settings>API Access
And click create token
The button changes from blue to purple, but no key is ever created? -
-
@eeeee The Write API plugin is "v2", the built-in write API is "v3". The latter supercedes the former, so just use the built-in v3 API.
@pitaj linked to the correct docs. The nomenclature is confusing, because it's less "read" and "write", and more "page" and "REST".
- The "read api" is used by the NodeBB frontend when loading pages
- The "write api" is preferred for server-to-server interactions
-
Thanks, was on 3.2 will request an upgrade.
For Nodebb hosted forums is it best to email support each time for upgrade? Was wondering actually if it would be a good feature to have the upgrade button in Admin notify nodebb of request, or even have auto upgrade to latest version setting! -
@eeeee re: auto upgrade button
We don't implement this because of the customizable nature of NodeBB. It is possible that if someone had a lot of plugins and they upgraded to a version that was incompatible, NodeBB might go down and not come back up.
So it'd be like a "shoot yourself in the foot" button