Update a draft ruleset

Updates a draft ruleset for a specified event type.

SecuritySecretApiKey or JWT
Request
path Parameters
eventType
required
string

Type of event.

id
required
string <= 50 characters ^[@~\-\.\w]+$

Resource identifier string.

Request Body schema: application/json

Draft ruleset resource.

required
Array of objects (Rule)

Rule can be configured to stop subsequent rules in the event list from being executed. A rule is a configuration of an event and one or more actions.

Array
name
required
string

Name of the rule.

required
Array of objects (RuleAction) unique

Actions that execute when an event occurs.

id
string <= 50 characters

ID of the rule.

labels
Array of strings unique

Labels of the rule.

status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
filter
string

Filters the collection items. This field requires a special format. Use , for multiple allowed values. Use ; for multiple fields.

For more information, see Using filter with collections.

final
boolean
Default: true

Specifies whether the rule stops subsequent rules in the event list from being executed.

name
required
string

Name of the draft.

baseVersion
required
integer >= 0

Ruleset version on which the draft ruleset is based. Generally, a draft ruleset is cloned from an existing ruleset. Use this field to determine if the active ruleset changed since the draft creation. 0 denotes a draft ruleset that is not created from an existing ruleset. The value of this field is informational only, it is not assigned to the active ruleset.

Array of objects (Bind)

Binds always execute, regardless of rule based events. A rule is a configuration of an event and one or more actions.

Array
name
required
string

Name of the rule.

required
Array of objects (RuleAction) unique

Actions that execute when an event occurs.

id
string <= 50 characters

ID of the rule.

labels
Array of strings unique

Labels of the rule.

status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
filter
string

Filters the collection items. This field requires a special format. Use , for multiple allowed values. Use ; for multiple fields.

For more information, see Using filter with collections.

description
string

Detailed description of the drafted ruleset.

Responses
200

Draft ruleset updated.

Response Schema: application/json
required
Array of objects (Rule)

Rule can be configured to stop subsequent rules in the event list from being executed. A rule is a configuration of an event and one or more actions.

Array
name
required
string

Name of the rule.

required
Array of objects (RuleAction) unique

Actions that execute when an event occurs.

id
string <= 50 characters

ID of the rule.

labels
Array of strings unique

Labels of the rule.

status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
filter
string

Filters the collection items. This field requires a special format. Use , for multiple allowed values. Use ; for multiple fields.

For more information, see Using filter with collections.

final
boolean
Default: true

Specifies whether the rule stops subsequent rules in the event list from being executed.

name
required
string

Name of the draft.

baseVersion
required
integer >= 0

Ruleset version on which the draft ruleset is based. Generally, a draft ruleset is cloned from an existing ruleset. Use this field to determine if the active ruleset changed since the draft creation. 0 denotes a draft ruleset that is not created from an existing ruleset. The value of this field is informational only, it is not assigned to the active ruleset.

id
string <= 50 characters

Unique resource ID. Defaults to UUID v4.

Array of objects (Bind)

Binds always execute, regardless of rule based events. A rule is a configuration of an event and one or more actions.

Array
name
required
string

Name of the rule.

required
Array of objects (RuleAction) unique

Actions that execute when an event occurs.

id
string <= 50 characters

ID of the rule.

labels
Array of strings unique

Labels of the rule.

status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
filter
string

Filters the collection items. This field requires a special format. Use , for multiple allowed values. Use ; for multiple fields.

For more information, see Using filter with collections.

object

Author of the draft.

id
string <= 50 characters

Author's user ID.

name
string

Author's first and last name.

description
string

Detailed description of the drafted ruleset.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

Array of LinkSelf (object) or LinkUser (object)

Related links.

Array
Any of:
rel
required
string

Type of link.

Value: "self"
href
required
string

Link URL.

201

Draft ruleset created.

Response Headers
Location
string <uri>

Location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
required
Array of objects (Rule)

Rule can be configured to stop subsequent rules in the event list from being executed. A rule is a configuration of an event and one or more actions.

Array
name
required
string

Name of the rule.

required
Array of objects (RuleAction) unique

Actions that execute when an event occurs.

id
string <= 50 characters

ID of the rule.

labels
Array of strings unique

Labels of the rule.

status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
filter
string

Filters the collection items. This field requires a special format. Use , for multiple allowed values. Use ; for multiple fields.

For more information, see Using filter with collections.

final
boolean
Default: true

Specifies whether the rule stops subsequent rules in the event list from being executed.

name
required
string

Name of the draft.

baseVersion
required
integer >= 0

Ruleset version on which the draft ruleset is based. Generally, a draft ruleset is cloned from an existing ruleset. Use this field to determine if the active ruleset changed since the draft creation. 0 denotes a draft ruleset that is not created from an existing ruleset. The value of this field is informational only, it is not assigned to the active ruleset.

id
string <= 50 characters

Unique resource ID. Defaults to UUID v4.

Array of objects (Bind)

Binds always execute, regardless of rule based events. A rule is a configuration of an event and one or more actions.

Array
name
required
string

Name of the rule.

required
Array of objects (RuleAction) unique

Actions that execute when an event occurs.

id
string <= 50 characters

ID of the rule.

labels
Array of strings unique

Labels of the rule.

status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
filter
string

Filters the collection items. This field requires a special format. Use , for multiple allowed values. Use ; for multiple fields.

For more information, see Using filter with collections.

object

Author of the draft.

id
string <= 50 characters

Author's user ID.

name
string

Author's first and last name.

description
string

Detailed description of the drafted ruleset.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

Array of LinkSelf (object) or LinkUser (object)

Related links.

Array
Any of:
rel
required
string

Type of link.

Value: "self"
href
required
string

Link URL.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

422

Invalid data sent.

put/events/{eventType}/rules/drafts/{id}
Request samples
application/json
{
  • "baseVersion": 0,
  • "binds": [
    ],
  • "rules": [
    ],
  • "name": "string",
  • "description": "string"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "baseVersion": 0,
  • "binds": [
    ],
  • "rules": [
    ],
  • "author": {
    },
  • "name": "string",
  • "description": "string",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}