https://linen.dev logo
#singer-tap-development
Title
# singer-tap-development
n

nicholas_van_kuren

03/17/2022, 9:48 PM
Hi! I am working on a custom tap and working with an API that does not really have paths and running into a 403 error message in pytest. This is a REST API that only accepts POST requests and expects an "entity" to be passed as a config setting vs. as a path in the url. I.e. - Instead of www.api.com/characters I just need to specify the base url and then add a config setting that looks like "entity": "characters". I tried setting the path to an empty string in
streams.py
and added the following to the stream class:
Copy code
rest_method = "POST"
It is at this point I am getting a 403 error. I am able to get this request to work via Postman where I have to enter the data as "form-data" in the body and the form-data section seems to correspond to the properties list in
taps.py
, but its not working for some reason. My best guess is that it has something to do with the endpoint property. I have tried leaving it blank as mentioned as well as specifying the whole url and leaving the base url blank and vice versa, but all return the same error. Any help would be much appreciated!