# Workflow log events 'No Content(empty input stream)' error.

**URL:** <https://community.hubspot.com/t/workflow-log-events-no-content-empty-input-stream-error/12798>\
**Category:** APIs & Integrations\
**Tags:** workflows, webhooks\
**Created:** [February 6, 2019, 12:37am UTC](https://community.hubspot.com/t/workflow-log-events-no-content-empty-input-stream-error/12798 "2019-02-06T00:37:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CoderAcademy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/coderacademy/32/99678_2.png) [@CoderAcademy](https://community.hubspot.com/u/CoderAcademy)\
**Post date:** [February 6, 2019, 12:37am UTC](https://community.hubspot.com/t/workflow-log-events-no-content-empty-input-stream-error/12798/1 "2019-02-06T00:37:01Z")

</div>

Hi all,

Thanks in advance for any light you can shed on the issues that I am facing.

I have implemented the OAuth workflow and am passing the access token as a bearer token as a header. This workflow works for other endpoints that I have previously implemented. This is the endpoint I am PUT requesting to:

/automation/v3/logevents/workflows/\<workflow\_id\>/filter

Am I correct in assuming that the following url’s ‘workflow\_id’ would be ‘2106109’ or would it be ‘2106109/flow/3136415’?

URL: [Automation UI Canvas](https://app.hubspot.com/workflows/2106109/flow/3136415/history)

This is the documentation that I am following from:

[https://developers.hubspot.com/docs/methods/workflows/log\_events](https://developers.hubspot.com/docs/methods/workflows/log_events)

I am a bit confused as to why it would be a ‘PUT’ request and not a ‘GET’ request as no data is being updated on the server. That small issue aside, these are the filters I am passing as the request body:

request\_parameters = {  
‘types’: [‘COMPLETED\_WORKFLOW’],  
‘offset’: ‘1548979200’,  
‘limit’: 1546300800  
}

No matter what types I pass the content is always empty. I have also tried without ‘offset’ and ‘limit’ filters. Yes, this workflow is active and has had multiple deals pass through it everyday for the last 6 months or so.

Here is the error json that is returned:

{“status”:“error”,“message”:“No content (empty input stream)”,“correlationId”:“f18408cb-2aeb-432a-8607-bd4b4dad109e”,“requestId”:“44248fa6d01adbebec5d370039d53a3c”}

Could someone point me in the right direction?

Cheers,

James.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [February 7, 2019, 5:21pm UTC](https://community.hubspot.com/t/workflow-log-events-no-content-empty-input-stream-error/12798/2 "2019-02-07T17:21:01Z")

</div>

Welcome, @CoderAcademy.

Happy to clarify. **2106109** is actually Coder Academy’s Hub ID. The workflow ID you want to use is **3136415**.

That request body is registering as invalid JSON for me since it contains single quotes. Also, the timestamp values don’t need quotes around them.

I just tried this request and it returned successfully for me:

```auto
PUT https://api.hubapi.com/automation/v3/logevents/workflows/3136415/filter

{
 "types": ["COMPLETED_WORKFLOW"],
 "offset": 1548979200,
 "limit": 1546300800
}

```

Let me know if you’re still seeing issues with this formatting.

---

<div class="post-metadata">

**Author:** ![CoderAcademy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/coderacademy/32/99678_2.png) [@CoderAcademy](https://community.hubspot.com/u/CoderAcademy)\
**Post date:** [February 12, 2019, 3:45am UTC](https://community.hubspot.com/t/workflow-log-events-no-content-empty-input-stream-error/12798/3 "2019-02-12T03:45:42Z")

</div>

Thank you for your time with this issue. This is my code:

def workflow\_history(workflow\_id):  
try:  
#Access token will be None if cookie does not exist.  
access\_token = request.cookies.get(‘hubspot\_access\_token’)  
except Exception as error:  
return redirect(url\_for(‘authenticate\_hubspot’))  
domain = ‘[https://api.hubapi.com](https://api.hubapi.com)’  
endpoint = ‘/automation/v3/logevents/workflows/{0}/filter’  
request\_url = domain + endpoint.format(workflow\_id)  
request\_headers = {  
“Content-Type”: “application/json”,  
“Authorization”: "Bearer " + str(access\_token)  
}  
request\_parameters = {  
“types”: [“ENROLLED”]  
}  
try:  
put\_request = requests.put(  
request\_url,

headers=request\_headers,  
params=request\_parameters  
)

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [February 13, 2019, 2:53pm UTC](https://community.hubspot.com/t/workflow-log-events-no-content-empty-input-stream-error/12798/4 "2019-02-13T14:53:52Z")

</div>

Hi, @CoderAcademy.

Sorry, I’m not sure what to do with that code. What error are you receiving?
