# Rest API hash errors

**URL:** <https://community.shotgridsoftware.com/t/rest-api-hash-errors/8659>\
**Category:** Pipeline Integrations\
**Tags:** rest-api\
**Created:** [May 13, 2020, 5:26pm UTC](https://community.shotgridsoftware.com/t/rest-api-hash-errors/8659 "2020-05-13T17:26:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![chadworkman](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@chadworkman](https://community.shotgridsoftware.com/u/chadworkman)\
**Post date:** [May 13, 2020, 5:26pm UTC](https://community.shotgridsoftware.com/t/rest-api-hash-errors/8659/1 "2020-05-13T17:26:20Z")

</div>

While attempting to create a time log via the REST Api I’m getting an error that I can’t sort out.

`{"errors":[{"id":"9e57815a39b4d7eef027db7e6bf7c8b6","status":400,"code":103,"title":"API create() invalid/missing entity hash string 'type': {\"id\"=\u003E45} `

Following the “create entity” portion of the API docs, I’m sending the following body:  
`{"user": {"type": "HumanUser", "id": 494},"entity": {"type": "Task", "id": 265445},"project": {"id": 45},"date": "2020-05-13", "duration": 240, "type": "Timelog"}`

I’m unsure of what the error is.

---

<div class="post-metadata">

**Author:** ![tony](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/tony/32/197_2.png) [@tony](https://community.shotgridsoftware.com/u/tony)\
**Post date:** [May 13, 2020, 7:37pm UTC](https://community.shotgridsoftware.com/t/rest-api-hash-errors/8659/2 "2020-05-13T19:37:15Z")

</div>

Hey Chad!

In your project field, it looks like you’re only supplying the id. Even though we _know_ it’s going to be a project, you still need to supply a type/id pair in order to uniquely identify an entity, so you might want something like:

```auto
'project': {'type': 'Project', 'id': 45}

```

in your body. Give that a shot and let me know how it goes?

---

<div class="post-metadata">

**Author:** ![chadworkman](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@chadworkman](https://community.shotgridsoftware.com/u/chadworkman)\
**Post date:** [May 13, 2020, 8:18pm UTC](https://community.shotgridsoftware.com/t/rest-api-hash-errors/8659/4 "2020-05-13T20:18:33Z")

</div>

First, thank you so much for the reply and explanation. I made the change and am now receiving the following:  
`{"errors":[{"id":"53234e035f5e97250244d28d8a02b22c","status":400,"code":103,"title":"API create() TimeLog.type doesn't exist.","source":{},"detail":null,"meta":null}]}`

---

<div class="post-metadata">

**Author:** ![chadworkman](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@chadworkman](https://community.shotgridsoftware.com/u/chadworkman)\
**Post date:** [May 13, 2020, 8:50pm UTC](https://community.shotgridsoftware.com/t/rest-api-hash-errors/8659/5 "2020-05-13T20:50:00Z")

</div>

That would be because I’m submitting a Time Log via “/entity/time\_log”, therefore, the “type: timelog” is not needed. I’m assuming it checks errors on orphans.

---

<div class="post-metadata">

**Author:** ![tony](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/tony/32/197_2.png) [@tony](https://community.shotgridsoftware.com/u/tony)\
**Post date:** [May 13, 2020, 9:17pm UTC](https://community.shotgridsoftware.com/t/rest-api-hash-errors/8659/6 "2020-05-13T21:17:06Z")

</div>

the extra `'type':'Timelog'` is unnecessary, yes. You’re already pointing to the `/entity/time_logs` endpoint, so there’s no need to specify. 🙂

---

<div class="post-metadata">

**Author:** ![chadworkman](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@chadworkman](https://community.shotgridsoftware.com/u/chadworkman)\
**Post date:** [May 13, 2020, 9:18pm UTC](https://community.shotgridsoftware.com/t/rest-api-hash-errors/8659/7 "2020-05-13T21:18:46Z")

</div>

That was causing the “TimeLog.type doesn’t exist” error.

Thank you for your assistance. Working with the API and having no access to the UI has proven challenging.

---

<div class="post-metadata">

**Author:** ![tony](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/tony/32/197_2.png) [@tony](https://community.shotgridsoftware.com/u/tony)\
**Post date:** [May 13, 2020, 9:27pm UTC](https://community.shotgridsoftware.com/t/rest-api-hash-errors/8659/8 "2020-05-13T21:27:07Z")

</div>

Ouch, no access to the UI is indeed rough. I hope conditions improve for you!

In the meantime, we’re always here if you get stuck down the road. Take it easy!
