Hook post fields

Hi

I am writing the hook web api for some customize flow.
I hava some question about hook and the API

*How to get the issue creater when update hook (not create hook createdUser)

Thanks
James

Hi @sjhapple

Welcome to our community!

Do you mean how to get the issue creator from the webhook data?
I don’t think the webhook data contains the issue creator, unless it’s sent when an issue is created.

The webhook data will be sent in the same JSON format as Backlog API’s format for “Get Recent Updates”.

The createdUser is the person who created the update, e.g. added the issue, added comment or changed status, etc, it’s not the webhook creator.

So, if you want the name of the person who created the update, it would be getting createdUser.name from the response object’s body.

Update:
If we want to get the issue creator, we can use the issue key_id to sent a Get Issue request to Backlog API. This will return information about the issue, and we can parse it to get the issue creator from the createdUser property.

Does this help answer your question?

Hi soohian:

In fact , I would like to got the issue creator (who create the issue) , not who create the update event.
Now , I save the createrUser in a custom filed when issue created.
Because I plan to reject the issue to issue creator in some case.

Thank you.
This is what I need :grinning:

1 Like

Hi @sjhapple

Sorry, I misunderstood your question, I’ve updated the reply above with:

Update:
If we want to get the issue creator, we can use the issue key_id to sent a Get Issue request to Backlog API. This will return information about the issue, and we can parse it to get the issue creator from the createdUser property.

You can generate your personal Backlog API key from your personal settings.

If your key_id is 412, and your project key is XYZ, the issue key will be XYZ-412.

The URL for sending the request will be something like:

https://yourspace.backlog.com/api/v2/XYZ-412

Thank you @sjhapple
I’m glad that your question is solved. :slightly_smiling_face: