Cannot reorder triggers using API

답변함


2021년 11월 16일에 게시됨

I am using the API.

I call `GET /api/v2/triggers` to get all triggers, and then with that result I get the IDs and call `PUT /api/v2/triggers/reorder`, but I get the following:
400 Bad Request
{"error":"UnknownAttributeError","description":"Invalid attribute: all triggers are not provided"}

What am I missing?


0

5

댓글 5개

No worries at all! Feel free to update this post with any relevant findings.
 
Have a great day!
 
Tipene

0


I do, yes.
I have talked with a developer using Zendesk slack, pretty cool. He has done some tests and created an internal ticket to resolve it, it seems there is a bug.
Thank you Tipene for you help.

 

0


Just to confirm, are you paginating to the next page to access the additional 61 records, and adding them to your ticket_ids array? The GET request only returns a maximum of 100 records per page so if there are more than that, you’ll need to grab those other records as well.
 
https://developer.zendesk.com/documentation/developer-tools/pagination/paginating-through-lists-using-cursor-pagination/

0


Hi Tipene, thank you for your reply.

Is there any other way I can get the `trigger_ids` from the API?

I am doing the `PUT` with the following payload:

{"trigger_ids": [36003953XXXX,...,36011358XXXX]}

Those IDs are the same 161 I am getting from the `GET`, see the following response please:

0


Hi Jose,
 
Thanks for reaching out!
 
Generally, you’d see this error being caused by the full list of trigger IDs from your Zendesk account not being included in the trigger_ids array sent with the reorder request.
 
Can you double-check that all trigger IDs are being included in the payload - it might be worth cross-referencing the trigger section in your Zendesk instance UI as well, if practicable.
 
Let me know if you continue to have any issues!
 
Tipene

0


댓글을 남기려면 로그인하세요.

원하는 정보를 못 찾으셨나요?

새 게시물