Standardize rule endpoint client identification#643
Conversation
bracyw
left a comment
There was a problem hiding this comment.
actually looking at this I think it would be better to add the client-id as a Header, instead of in the url param because rule_id forcing you to add the client_id after the "/rules/ " which makes querying possible conflict based on client_id. (so disregard the ticket recommendation of path param or body)
TLDR: let's pivot to Header based client-id
You can check rust axum docs on how to write the backend code for this. |
Changes
Standardized client identification across all rule endpoints by moving
client_idinto the URL path. Previouslyadd_ruleanddelete_rulepulled it from a Basic Auth header whilesubscribe_rulesandunsubscribe_rulespulled it from the JSON body. Instead, all rule endpoint readsclient_idnow. The frontend API layer was updated to match this.Checklist
It can be helpful to check the
ChecksandFiles changedtabs.Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.
package-lock.jsonchanges (unless dependencies have changed)Closes #561