Project

General

Profile

Actions

User story #3280

closed

User story #3000: Build a REST API to manage all actions in Rudder (CRUD on Nodes, Groups, Directives and Rules)

Rest API : Rules

Added by Vincent MEMBRÉ almost 12 years ago. Updated over 9 years ago.

Status:
Released
Priority:
2
Category:
API
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

We need to build a Rest API to manage rules.

We should be able to :
  • List Rules
  • See a Rule Details
  • Add a Rule
  • Delete a Rule
  • Modify a Rule :
    • Modify name
    • Modify descriptions
    • Modify targeted groups
    • Modify Directive used
  • Activate Rule
  • Desactivate Rule
  • Clone Rule
Actions #1

Updated by Vincent MEMBRÉ almost 12 years ago

  • Description updated (diff)

We should also be able to clone and to activate/desactivate Rule

Actions #2

Updated by Vincent MEMBRÉ almost 12 years ago

Here is an example of Rule API:

  • List Rules
    • /api/rules
  • Add a Rule
    • /api/rules/add/{name}
  • Delete a Rule
    • /api/rules/delete/{id}
  • See a Rule Details
    • /api/rules/{id}
  • Change Rule name
    • /api/rules/{id}/rename/{name}
  • Short description
    • /api/rules/{id}/description/short/{description}
  • Long description
    • /api/rules/{id}/description/long/{description}
  • List Groups
    • /api/rules/{id}/groups
  • Add Group
    • /api/rules/{id}/groups/add/{groupId}
  • Remove Group
    • /api/rules/{id}/groups/remove/{groupId}
  • List Directives
    • /api/rules/{id}/directives
  • Add Directive
    • /api/rules/{id}/directives/add/{groupId}
  • Remove Directive
    • /api/rules/{id}/directives/remove/{groupId}
  • Activate Rule
    • /api/rules/{id}/on
    • /api/rules/activate/{id}
  • Desactivate Rule
    • /api/rules/{id}/off
    • /api/rules/desactivate/{id}
  • Clone Rule
    • /api/rules/clone§/{id}
Actions #3

Updated by Vincent MEMBRÉ almost 12 years ago

I propose having a standard response for all the REST API looking like this :

{
  Called function:{
    "id": Target id,
    "status": Answer Status (Ok or Error),
    "message": The answer or an error message
  }
}
Actions #4

Updated by Vincent MEMBRÉ almost 12 years ago

A first version of the API containing only:

  • List Rules
    • GET
    • /api/rules
    • Answer: list of availables Rules with following format :
      "rule":{
      "id": id
      "displayName": name
      }
  • Voir le détail d'une Rule
    • GET
    • /api/rules/id
    • Answer: rule information, based on the following format :
      "rule":{
      "id": id,
      "displayName": name,
      "serial":serial,
      "shortDescription": short,
      "longDescription": long,
      "directiveIds": list of Directives id,
      "targets": list of target groups,
      "isEnabled": boolean,
      "isSystem": boolean
      }
  • Delete Rule
    • DELETE
    • /api/rules/delete/id
    • Answer: The rule has been deleted
  • Clone Rule
    • Put
    • /api/rules/clone/id
    • Answer: The new created Rule details (on the same format than the rule details)
  • Enable Rule
    • Put
    • /api/rules/enable/id
    • Answer : The Rule has been enabled
  • Disable Rule
    • Put
    • /api/rules/disable/id
    • Answer: The rule has been disabled
Actions #5

Updated by Vincent MEMBRÉ almost 12 years ago

  • Status changed from New to In progress
Actions #6

Updated by Jonathan CLARKE over 11 years ago

  • Category changed from 11 to API
Actions #7

Updated by Vincent MEMBRÉ over 11 years ago

  • Status changed from In progress to 10
  • Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE

Going to functionnal review for this first version.

Actions #8

Updated by Nicolas PERRON over 11 years ago

  • Target version changed from 2.6.0~beta1 to 2.6.0~rc1
Actions #9

Updated by Jonathan CLARKE over 11 years ago

  • Target version changed from 2.6.0~rc1 to 2.7.0~beta1
Actions #10

Updated by François ARMAND over 11 years ago

  • Status changed from 10 to Pending technical review
  • Assignee changed from Jonathan CLARKE to François ARMAND
Actions #11

Updated by Vincent MEMBRÉ over 11 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #12

Updated by Nicolas PERRON over 11 years ago

  • Status changed from Pending release to Released
Actions #13

Updated by Benoît PECCATTE over 9 years ago

  • Tracker changed from Enhancement to User story
Actions

Also available in: Atom PDF