404 Client Error: Not Found for /pull request


#1

After identifying the ‘id’ using the /historics/get endpoint, when I treid a client.pull(subscription_id), it keeps giving me the error: 404 Client Error: Not Found.

The client instantiation is working properly, but the pull is throwing this error. I am not sure what is causing this issue and how do I get around it.

Here is the traceback:

Traceback:
File “/home/haris/Envs/project/local/lib/python2.7/site-packages/django/core/handlers/base.py” in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File “/home/haris/project/imports/views.py” in list_historics
66. pull_and_ingest_data(event, sub_id)
File “/home/haris/project/imports/utils.py” in pull_and_ingest_data
40. for interaction in client.pull(subscription_id):
File “/home/haris/Envs/project/local/lib/python2.7/site-packages/datasift/client.py” in pull
388. return self.request.build_response(raw, parser=parser)
File “/home/haris/Envs/project/local/lib/python2.7/site-packages/datasift/request.py” in build_response
87. response.raise_for_status()
File “/home/haris/Envs/project/local/lib/python2.7/site-packages/requests/models.py” in raise_for_status
773. raise HTTPError(http_error_msg, response=self)

Exception Type: HTTPError at /historics/
Exception Value: 404 Client Error: Not Found


#2

Hi,

Push and historics are separate entities. Historics is responsible for retrieving the data and push is responsible for the delivery of that data, so all historic queries are linked to a push subscription. More on this can be found on our documentation site

When using the pull connector you need to use the push ID, not the historic ID.


#3

But how will I be able to retreive the subscription ids? /push/get does not return anything. Only /historics/get returns the list of historic jobs that are there.

/push/get gives me the list of subscriptions while they are active. Do I have to write down the subscription id before /push/get stops returning the list? Or is there another way to access it?


#4

I’ll post this query as a new question.