@sebastián-cisneros In static:api.routes, you'll want to call controllerHelpers.setupAPIRoute to mount the route to the appropriate /api/v3/plugins mount point.
You can see an example of how we do it in the quickstart plugin
Hi, @phenomlab!
Calls to create:
In my project I call the /api/v3/topics/
to create a new topic via Python and requests
lib:
data = {
"cid": int(cid),
"title": entry.title,
"content": '\n'.join(description),
"tags": tags
}
headers = {'Authorization': 'Bearer {token}'.format(token=os.environ.get('NODEBB_TOKEN'))}
url = '{host}/api/v3/topics/'.format(host=os.environ.get('NODEBB_URL'))
response = requests.post(
url=url,
headers=headers,
json=data
)
response.raise_for_status()