import requests
url = "https://{FUSION HOST}/api/custom-rule-types/{id}"
payload = {
"id": "<string>",
"display_type": "<string>",
"pipeline_id": "<string>",
"schema": {
"additionalProperties": {},
"category": "<string>",
"categoryPriority": 123,
"default": "<string>",
"definitions": {},
"description": "<string>",
"enum": [{}],
"hints": ["<string>"],
"maxProperties": 123,
"minProperties": 123,
"oneOf": [
{
"title": "<string>",
"description": "<string>",
"default": "<string>",
"category": "<string>",
"categoryPriority": 123,
"hints": ["<string>"],
"unsafe": True,
"oneOf": [
{
"title": "<string>",
"description": "<string>",
"default": {},
"category": "<string>",
"categoryPriority": 123,
"hints": ["<string>"],
"unsafe": True
}
]
}
],
"properties": {},
"propertyGroups": [
{
"label": "<string>",
"properties": ["<string>"]
}
],
"required": ["<string>"],
"title": "<string>",
"unsafe": True
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"display_type": "<string>",
"pipeline_id": "<string>",
"schema": {
"additionalProperties": {},
"category": "<string>",
"categoryPriority": 123,
"default": "<string>",
"definitions": {},
"description": "<string>",
"enum": [
{}
],
"hints": [
"<string>"
],
"maxProperties": 123,
"minProperties": 123,
"oneOf": [
{
"title": "<string>",
"description": "<string>",
"default": "<string>",
"category": "<string>",
"categoryPriority": 123,
"hints": [
"<string>"
],
"unsafe": true,
"oneOf": [
{
"title": "<string>",
"description": "<string>",
"default": {},
"category": "<string>",
"categoryPriority": 123,
"hints": [
"<string>"
],
"unsafe": true
}
]
}
],
"properties": {},
"propertyGroups": [
{
"label": "<string>",
"properties": [
"<string>"
]
}
],
"required": [
"<string>"
],
"title": "<string>",
"unsafe": true
}
}Update a custom rule type
Use this endpoint to change a custom rule type’s attributes. The request is a JSON body containing the updated attributes.
import requests
url = "https://{FUSION HOST}/api/custom-rule-types/{id}"
payload = {
"id": "<string>",
"display_type": "<string>",
"pipeline_id": "<string>",
"schema": {
"additionalProperties": {},
"category": "<string>",
"categoryPriority": 123,
"default": "<string>",
"definitions": {},
"description": "<string>",
"enum": [{}],
"hints": ["<string>"],
"maxProperties": 123,
"minProperties": 123,
"oneOf": [
{
"title": "<string>",
"description": "<string>",
"default": "<string>",
"category": "<string>",
"categoryPriority": 123,
"hints": ["<string>"],
"unsafe": True,
"oneOf": [
{
"title": "<string>",
"description": "<string>",
"default": {},
"category": "<string>",
"categoryPriority": 123,
"hints": ["<string>"],
"unsafe": True
}
]
}
],
"properties": {},
"propertyGroups": [
{
"label": "<string>",
"properties": ["<string>"]
}
],
"required": ["<string>"],
"title": "<string>",
"unsafe": True
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"display_type": "<string>",
"pipeline_id": "<string>",
"schema": {
"additionalProperties": {},
"category": "<string>",
"categoryPriority": 123,
"default": "<string>",
"definitions": {},
"description": "<string>",
"enum": [
{}
],
"hints": [
"<string>"
],
"maxProperties": 123,
"minProperties": 123,
"oneOf": [
{
"title": "<string>",
"description": "<string>",
"default": "<string>",
"category": "<string>",
"categoryPriority": 123,
"hints": [
"<string>"
],
"unsafe": true,
"oneOf": [
{
"title": "<string>",
"description": "<string>",
"default": {},
"category": "<string>",
"categoryPriority": 123,
"hints": [
"<string>"
],
"unsafe": true
}
]
}
],
"properties": {},
"propertyGroups": [
{
"label": "<string>",
"properties": [
"<string>"
]
}
],
"required": [
"<string>"
],
"title": "<string>",
"unsafe": true
}
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Headers
An optional tag to match.
Path Parameters
The custom rule type ID.
Query Parameters
The app to which this object belongs, as app:SomeApp.
Body
The custom rule type ID. This value must be unique across all apps in Fusion (global namespace).
A user-friendly name for the custom rule type.
The ID of the pipeline that is invoked during rule processing.
Represents a structured object type definition used in the Experience Manager.
Show child attributes
Show child attributes
Response
OK
The custom rule type ID. This value must be unique across all apps in Fusion (global namespace).
A user-friendly name for the custom rule type.
The ID of the pipeline that is invoked during rule processing.
Represents a structured object type definition used in the Experience Manager.
Show child attributes
Show child attributes
Was this page helpful?