Identifying sub tasks

How do I identify an event for a sub task? I have a web hook that I only want to trigger on the top level task. Below are the events sent to the web hook when I created a new subtask.

{
“Events”:[
{
“Resource”:{
“Gid”:1170660157316898,
“Resource_type”:“task”,
“Resource_subtype”:“default_task”
},
“Parent”:{
“Gid”:1169457226231776,
“Resource_type”:“task”,
“Resource_subtype”:“default_task”
},
“Created_at”:“2020-04-09T15:56:09.217Z”,
“User”:{
“Gid”:437455500776751,
“Resource_type”:“user”
},
“Action”:“added”,
“Type”:null
},
{
“Resource”:{
“Gid”:1170660157316898,
“Resource_type”:“task”,
“Resource_subtype”:“default_task”
},
“Parent”:null,
“Created_at”:“2020-04-09T15:56:17.74Z”,
“User”:{
“Gid”:437455500776751,
“Resource_type”:“user”
},
“Action”:“changed”,
“Type”:null
},
{
“Resource”:{
“Gid”:1170683419867935,
“Resource_type”:“story”,
“Resource_subtype”:“added_to_task”
},
“Parent”:{
“Gid”:1170660157316898,
“Resource_type”:“task”,
“Resource_subtype”:“default_task”
},
“Created_at”:“2020-04-09T15:56:09.268Z”,
“User”:{
“Gid”:437455500776751,
“Resource_type”:“user”
},
“Action”:“added”,
“Type”:null
}
]
}

I don’t know of any way to do that just from the data returned in the webhook. You’ll have to query the task to see if it’s a subtask or not (i.e. if it has a value in its Parent property). Not the answer you were hoping for, I know.