Rules Resource

Endpoints under /rule allow you to list and manage the rules.

GET /v2/rule

A GET request to the /rule endpoint retrieves a list of all stored rules.

Response Body
media type data type description
application/json array of Rule (JSON) A list of Rule objects in JSON format.

Example

Request
GET /v2/rule
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "ruleActions" : [ {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  }, {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  } ],
  "ruleScope" : {
    "tagStates" : [ "...", "..." ],
    "sourcePropertyFilters" : {
      "property1" : "...",
      "property2" : "..."
    },
    "virtualFolders" : [ "...", "..." ],
    "fieldTags" : [ "...", "..." ],
    "resourceTags" : [ "...", "..." ]
  },
  "name" : "...",
  "ruleBody" : "...",
  "ruleType" : "...",
  "metadataRule" : [ {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  }, {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  } ],
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
} ]
                
              

POST /v2/rule

A POST request to the /rule endpoint creates a rule.

Request Body
media type data type description
application/json Rule (JSON) request payload in JSON format.
Response Body
media type data type description
application/json Rule (JSON) newly created Rule object in JSON format.

Example

Request
POST /v2/rule
Content-Type: application/json
Accept: application/json

                
{
  "ruleActions" : [ {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  }, {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  } ],
  "ruleScope" : {
    "tagStates" : [ "...", "..." ],
    "sourcePropertyFilters" : {
      "property1" : "...",
      "property2" : "..."
    },
    "virtualFolders" : [ "...", "..." ],
    "fieldTags" : [ "...", "..." ],
    "resourceTags" : [ "...", "..." ]
  },
  "name" : "...",
  "ruleBody" : "...",
  "ruleType" : "...",
  "metadataRule" : [ {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  }, {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  } ],
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "ruleActions" : [ {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  }, {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  } ],
  "ruleScope" : {
    "tagStates" : [ "...", "..." ],
    "sourcePropertyFilters" : {
      "property1" : "...",
      "property2" : "..."
    },
    "virtualFolders" : [ "...", "..." ],
    "fieldTags" : [ "...", "..." ],
    "resourceTags" : [ "...", "..." ]
  },
  "name" : "...",
  "ruleBody" : "...",
  "ruleType" : "...",
  "metadataRule" : [ {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  }, {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  } ],
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              

PUT /v2/rule

A PUT request to the /rule endpoint updates a specific rule identified by key retrieved from payload.

Request Body
media type data type description
application/json Rule (JSON) object used to accept json payload.
Response Body
media type data type description
application/json Rule (JSON) The Rule object in JSON format.

Example

Request
PUT /v2/rule
Content-Type: application/json
Accept: application/json

                
{
  "ruleActions" : [ {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  }, {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  } ],
  "ruleScope" : {
    "tagStates" : [ "...", "..." ],
    "sourcePropertyFilters" : {
      "property1" : "...",
      "property2" : "..."
    },
    "virtualFolders" : [ "...", "..." ],
    "fieldTags" : [ "...", "..." ],
    "resourceTags" : [ "...", "..." ]
  },
  "name" : "...",
  "ruleBody" : "...",
  "ruleType" : "...",
  "metadataRule" : [ {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  }, {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  } ],
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "ruleActions" : [ {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  }, {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  } ],
  "ruleScope" : {
    "tagStates" : [ "...", "..." ],
    "sourcePropertyFilters" : {
      "property1" : "...",
      "property2" : "..."
    },
    "virtualFolders" : [ "...", "..." ],
    "fieldTags" : [ "...", "..." ],
    "resourceTags" : [ "...", "..." ]
  },
  "name" : "...",
  "ruleBody" : "...",
  "ruleType" : "...",
  "metadataRule" : [ {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  }, {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  } ],
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              

PUT /v2/rule/name

A PUT request to the /rule/name endpoint updates a specific rule identified by name retrieved from payload.

Request Body
media type data type description
application/json Rule (JSON) object used to accept json payload.
Response Body
media type data type description
application/json Rule (JSON) The Rule object in JSON format.

Example

Request
PUT /v2/rule/name
Content-Type: application/json
Accept: application/json

                
{
  "ruleActions" : [ {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  }, {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  } ],
  "ruleScope" : {
    "tagStates" : [ "...", "..." ],
    "sourcePropertyFilters" : {
      "property1" : "...",
      "property2" : "..."
    },
    "virtualFolders" : [ "...", "..." ],
    "fieldTags" : [ "...", "..." ],
    "resourceTags" : [ "...", "..." ]
  },
  "name" : "...",
  "ruleBody" : "...",
  "ruleType" : "...",
  "metadataRule" : [ {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  }, {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  } ],
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "ruleActions" : [ {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  }, {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  } ],
  "ruleScope" : {
    "tagStates" : [ "...", "..." ],
    "sourcePropertyFilters" : {
      "property1" : "...",
      "property2" : "..."
    },
    "virtualFolders" : [ "...", "..." ],
    "fieldTags" : [ "...", "..." ],
    "resourceTags" : [ "...", "..." ]
  },
  "name" : "...",
  "ruleBody" : "...",
  "ruleType" : "...",
  "metadataRule" : [ {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  }, {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  } ],
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              

DELETE /v2/rule/{key}

A DELETE request to the /rule/{key} endpoint deletes a specific rule identified by key.

Request Parameters
name type description
key path The unique identifier for a rule.

Example

Request
DELETE /v2/rule/{key}
Content-Type: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /v2/rule/{key}

A GET request to the /rule/{key} endpoint retrieves details of a specific rule identified by key.

Request Parameters
name type description
key path The unique identifier of the Rule object, as returned in the call to getAllRules().
Response Body
media type data type description
application/json Rule (JSON) The Rule object in JSON format.

Example

Request
GET /v2/rule/{key}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "ruleActions" : [ {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  }, {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  } ],
  "ruleScope" : {
    "tagStates" : [ "...", "..." ],
    "sourcePropertyFilters" : {
      "property1" : "...",
      "property2" : "..."
    },
    "virtualFolders" : [ "...", "..." ],
    "fieldTags" : [ "...", "..." ],
    "resourceTags" : [ "...", "..." ]
  },
  "name" : "...",
  "ruleBody" : "...",
  "ruleType" : "...",
  "metadataRule" : [ {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  }, {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  } ],
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              

DELETE /v2/rule/name/{name}

A DELETE request to the /rule/name/{name} endpoint deletes a specific rule identified by key.

Request Parameters
name type description
name path The name of the Rule object, as returned in the call to getAllRules() or getRule().

Example

Request
DELETE /v2/rule/name/{name}
Content-Type: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /v2/rule/name/{name}

A GET request to the /rule/name/{name} endpoint retrieves details of a specific rule.

Request Parameters
name type description
name path The name of the Rule object, as returned in the call to getAllRules() or getRule().
Response Body
media type data type description
application/json Rule (JSON) The Rule object in JSON format.

Example

Request
GET /v2/rule/name/{name}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "ruleActions" : [ {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  }, {
    "actionType" : "...",
    "actionDisplayName" : "...",
    "actionName" : "...",
    "actionAttributes" : {
      "property1" : { },
      "property2" : { }
    }
  } ],
  "ruleScope" : {
    "tagStates" : [ "...", "..." ],
    "sourcePropertyFilters" : {
      "property1" : "...",
      "property2" : "..."
    },
    "virtualFolders" : [ "...", "..." ],
    "fieldTags" : [ "...", "..." ],
    "resourceTags" : [ "...", "..." ]
  },
  "name" : "...",
  "ruleBody" : "...",
  "ruleType" : "...",
  "metadataRule" : [ {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  }, {
    "tagDetails" : [ {
      "tagName" : "...",
      "domainName" : "..."
    }, {
      "tagName" : "...",
      "domainName" : "..."
    } ]
  } ],
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}