/v1/messages with Query Parameters not working for me. #3755
-
Hi everyone, get messages api with query parameter gives the whole bunch of subscribers transactions not a filtered records. const transactionIds = [***,] This is the way I am using api end point.
Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 10 replies
-
Hello @KhushbuAsrani08 Do you send After fast source code check, I suspect that API understands your query just as a string "1,2,3,4,5", not array. I think you should pass array of transactions as following: You can try something like this in your code to get query params for all your transactions (untested): const transactionIds = ['111', '222', '333']
transactionIds.map(val => `transactionId=${val}`).join('&');
// 'transactionId=111&transactionId=222&transactionId=333' |
Beta Was this translation helpful? Give feedback.
-
@michaldziuba03 , any suggestion on this? |
Beta Was this translation helpful? Give feedback.
-
@KhushbuAsrani08 Do you run Novu locally, right? I cannot reproduce your issues (I use cloud Novu). If you run locally, what version you currently use? (0.16.x is newest) If you run Novu locally, can you try if on cloud version you encounter same problems? I think some older versions of Novu may have issues with result relevance. |
Beta Was this translation helpful? Give feedback.
-
@jainpawan21 , let me give you brief explanation. but getting irrelevant data. As you can see I have send only one transaction Id and one subscriber Id in above api call but it gives me result as follow which is not correct. Thank you |
Beta Was this translation helpful? Give feedback.
-
Hi @jainpawan21 , any suggestion on this? Thank you |
Beta Was this translation helpful? Give feedback.
-
@ainouzgali Now I have clicked on Accept button of subscriber 1 message then it will look like this to respective suscribers Here code I have used :
To get the details of both messages I am using above mentioned api but I am not getting relevant data. |
Beta Was this translation helpful? Give feedback.
-
No one by one. Bcz I have different payload for each subscriber. Corresponding to each trigger I am getting transactionId which I am saving for future use.
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: ainouzgali ***@***.***>
Sent: Monday, July 17, 2023 5:23:43 PM
To: novuhq/novu ***@***.***>
Cc: Khushbu Asrani ***@***.***>; Mention ***@***.***>
Subject: Re: [novuhq/novu] /v1/messages with Query Parameters not working for me. (Discussion #3755)
Are you sending to all those 10 subscribers in one novu.trigger?
—
Reply to this email directly, view it on GitHub<#3755 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A54A2O574TGFPVK3B4IFFW3XQURUPANCNFSM6AAAAAA2ELRJOQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@KhushbuAsrani08 are you on discord? We could schedule a call, because I feel I need to see some code snippets in order to help |
Beta Was this translation helpful? Give feedback.
-
yes, I have registered just now. |
Beta Was this translation helpful? Give feedback.
-
Update - filtering messages by transactionId has been added as of v0.16.3. In this question an older version has been used. |
Beta Was this translation helpful? Give feedback.
Update - filtering messages by transactionId has been added as of v0.16.3. In this question an older version has been used.
@KhushbuAsrani08 thanks for reaching out! I will close this for now, if you still have a problem after you upgrade, let us know.