-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support POST as HTTP method #8
Comments
@allanw Can you answer these 2 questions? Q1. Can I confirm that you are not trying to write anything to aXcelerate via tap-rest-api? Just reading the data out? I'm asking this because it's unusual for an API to use POST method while it is not creating or modifying the record. |
Hi @daigotanaka,
I realise that this is an unusual scenario - I'm not actually sure why their API requires this to be a POST method. |
Hi @allanw Thanks for the clarification and reference. I'm not quite sure if this fits to tap-rest-api's intended cases for these 2 reasons (I'm not familiar with aXcelerate's, so I may be wrong):
For #2, The example I see on doc is:
...which seems like a one-page report than a list of records. It is technically possible to modify tap-rest-api to call this endpoint with POST method and pull the data out. But I'm hesitant in supporting this in this tap because POST call typically requires data as payload. Providing logic to prepare the payload depends on the applications and the use cases. There isn't a good way of authoring that other than developing custom code. It seems your objective is to call this API periodically to pull the report and load it on a destination data store. Wouldn't it be simpler to just call it with Python's requests library and store the result? I'm curious to know why you think singer.io or tap-rest-api is suited for this use case. Let me know what you think. More than happy to help what you need to achieve whether you use tap-rest-api or not. |
Hi @daigotanaka, thanks for the detailed reply!
To get this working in my test environment, I did actually modify You make a good point that this could be done using the requests library and then storing the result, but I was keen to stay within the Singer tap/target ecosystem as this is how I'm extracting other sources of data on a regular schedule, and ideally I'm trying to avoid writing too much bespoke code. Interested to hear any more feedback you have. I appreciate your help and understand why you'd be hesitant about adding |
This particular API I'm dealing with (aXcelerate) requires that some requests be sent as POSTs. Could the request type be set in the config?
The text was updated successfully, but these errors were encountered: