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

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

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

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

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

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

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

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

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

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

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

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

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

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

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