Project

General

Profile

Actions

User story #17408

closed

Possibility to attach Rules to Rule Categories when using the REST API

Added by Bas B over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
N/A
Assignee:
-
Category:
API
Target version:
-
UX impact:
Suggestion strength:
Require - I need this to use Rudder as I intend
User visibility:
Effort required:
Name check:
To do
Fix check:
To do
Regression:

Description

Hello,

At this moment, the Rudder API does not expose endpoint capabilities to attach a rule to a rule category with the Rest API. The Rudder Console does allow this.
It would be very nice to make this feature available through the REST API. It will bring the capabilities to automatically create and organize rules with the Rule Categories.

Regards, Bas


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #17409: API documentation on Rules is missing explaination on how to update rule categoryReleasedAlexis MoussetActions
Actions #1

Updated by Bas B over 4 years ago

  • Subject changed from Possibility to attach Rudder Rules to Rudder Rule Categories when using the REST API to Possibility to attach Rules to Rule Categories when using the REST API
Actions #2

Updated by Nicolas CHARLES over 4 years ago

Hi Bas,

It's possible to do it, but indeed the doc is not mentionning it
To change the category of a rule, you need to update its "category" field with the id of the category, as follow

# curl --header "X-API-Token: 3tSnPlnbEiknLxslYlaP1TaHqalxhjvV" --request POST 'https://localhost/rudder/api/latest/rules/38e0c6ea-917f-47b8-82e0-e6a1d3dd62ca' --data "category=c9dcb5bd-efac-466a-b525-ce442af93021" 
{"action":"updateRule","id":"38e0c6ea-917f-47b8-82e0-e6a1d3dd62ca","result":"success","data":{"rules":[{"id":"38e0c6ea-917f-47b8-82e0-e6a1d3dd62ca","displayName":"test move category","shortDescription":"","longDescription":"","directives":["18c390c0-c193-49e9-844b-b91e7ff857eb"],"targets":[{"include":{"or":["group:a1cf3963-f1a2-496f-9640-4c38470f34bb"]},"exclude":{"or":[]}}],"enabled":true,"system":false,"tags":[]}]}}

Actions #3

Updated by Nicolas CHARLES over 4 years ago

  • Related to Bug #17409: API documentation on Rules is missing explaination on how to update rule category added
Actions #4

Updated by Bas B over 4 years ago

Nicolas CHARLES wrote in #note-2:

Hi Bas,

It's possible to do it, but indeed the doc is not mentionning it
To change the category of a rule, you need to update its "category" field with the id of the category, as follow
[...]

Works! Thanks, Nicolas.

Actions #5

Updated by Nicolas CHARLES about 4 years ago

  • Status changed from New to Resolved

i'm marking this as resolved then

Actions

Also available in: Atom PDF