Skip to main content

Create Rule Set

Use this API to create a new SQL rule set by copying an existing rule set. This lets you reuse an existing rule baseline and save it with a new name and description.

Request URL: /openapi/v1/ruleSet/create

Request Method: POST

Before You Begin

  • Call List Rule Sets to obtain the parentId to copy from.
  • Use a clear name and description for the new rule set so it is easy to find, bind, and maintain later.

Request Parameters

ParameterTypeRequiredDescriptionExample
nameStringYesRule set name.Production SQL Rule Set
parentIdStringYesID of the source rule set to copy from.rs-default-dev
descriptionStringYesRule set description.For production SQL development workflows

How to Use the Returned Value

After the call succeeds, data in the response is the new rule set ID. Use this value as id when calling Delete Rule Set or Bind or Unbind Rule Set Resources.

Request Example

{
"name": "Production SQL Rule Set",
"parentId": "rs-default-dev",
"description": "For production SQL development workflows"
}

Response Parameters

ParameterTypeDescriptionExample
successBooleanWhether the request is successful.true
requestIdStringRequest ID for troubleshooting and tracing.Ew4t6KMF-HNNOpCMnNKPn0RHdIOh4TLN
dataStringID of the new rule set.rs-dii9zwptapl1
errorCodeStringError code returned when the call fails.None
messageStringError message returned when the call fails.None

Successful Invocation Example

{
"success": true,
"requestId": "Ew4t6KMF-HNNOpCMnNKPn0RHdIOh4TLN",
"data": "rs-dii9zwptapl1"
}

Result

A successful response returns the new rule set ID in data. Store this value if you plan to bind the rule set to environments, data sources, or database groups.