send_subscription in subscriptions module - wrong method - is GET should be POST
pawelgnatowski opened this issue · 1 comments
mstrio.py (11.3.9.103)
return connection.get( url=f'{connection.base_url}/api/subscriptions/{subscription_id}/send', params={'fields': fields}, headers={'X-MSTR-ProjectID': project_id}, json=body, )
Should be POST , get does not have body.
as per docs body should be specified for prompted content only:
{
"contentId": "string",
"instanceId": "string"
}
Yet calling the endpoint with POST returns error No content Id provided.
v2 version of the endpoint just returns ERE001 and ticket id with no explanation.
Looks like either the docs do not explain it correctly or there might be API defect.
Hi @pawelgnatowski, thank you for your comment. We will have it in mind in future development. As you described this is probably API defect. As we've checked, in mstrio-py we don't consume this endpoint. There is only this wrapper and it's not used in our objects interface directly. Please think about using our object interface as these things are tested, should work properly and we support it. If you see that our object didn't expose to the user some functionalities and it's possible via API endpoints, please describe this use case and log an enhancement request so we can add this to our backlog and improve it in the future.