Difference between revisions of "Rule"

From enviPath Wiki
Jump to navigation Jump to search
(Created page with "= REST Operations = == GET == {| class="wikitable" |- !URI !Parameter !Accept Types !Result !Status Codes |- |/rule | |''text/html'' ''application/json'' ''text/plain'' |L...")
 
Line 18: Line 18:


''text/plain''
''text/plain''
''text/csv'' (optional parameter "delimiter", default value: ",")
|List of all rules of all packages that the user has permission to read.
|List of all rules of all packages that the user has permission to read.
|200 - OK
|200 - OK
Line 29: Line 31:


''text/plain''
''text/plain''
''text/csv'' (optional parameter "delimiter", default value: ",")
|List of all rules of the package given by the URI.
|List of all rules of the package given by the URI.
|200 - OK
|200 - OK
Line 44: Line 48:
''text/plain''
''text/plain''


''text/csv'' (optional parameter "delimiter", default value: ",")
|The rule identified by the URI.
|The rule identified by the URI.
|200 - OK
|200 - OK
Line 53: Line 58:
500 - Internal Server Error
500 - Internal Server Error
|}
|}


== POST ==
== POST ==

Revision as of 12:20, 18 January 2016

REST Operations

GET

URI Parameter Accept Types Result Status Codes
/rule text/html

application/json

text/plain

text/csv (optional parameter "delimiter", default value: ",")

List of all rules of all packages that the user has permission to read. 200 - OK

500 - Internal Server Error

/package/<id>/rule text/html

application/json

text/plain

text/csv (optional parameter "delimiter", default value: ",")

List of all rules of the package given by the URI. 200 - OK

401 - Unauthorized

500 - Internal Server Error

/package/<id>/rule/<id> text/html

application/json

text/plain

text/csv (optional parameter "delimiter", default value: ",")

The rule identified by the URI. 200 - OK

401 - Unauthorized

404 - Not Found

500 - Internal Server Error

POST

URI Parameter Accept Types Result Status Codes
/rule smirks

name

description

productFilterSmarts

reactantFilterSmarts

likelihood

subRules


hiddenMethod = APPLYRULES

compound - compound smiles

Create a new Rule in the default package. The redirect points to the URI of the new Rule. If the hidden method APPLYRULES is used all rules from the default package are applied to the compound given by smiles. 303 - See Other

500 - Internal Server Error

/package/<id>/rule smirks

name

description

productFilterSmarts

reactantFilterSmarts

likelihood

subRules


hiddenMethod = APPLYRULES

compound - compound smiles

Create a new Rule in the package given by the URI. The redirect points to the URI of the new Rule. If the hidden method APPLYRULES is used all rules from the package identified by the URI are applied to the compound given by smiles. 303 - See Other

401 - Unauthorized

500 - Internal Server Error

/package/<id>/rule/<id> ruleName Modify the rule identified by the URI. If the hidden method APPLYRULES is used the rule is applied to the compound given by smiles. 200 - OK
ruleDescription 401 - Unauthorized
smirks 404 - Not Found
scenario - URI of the scenario 500 - Internal Server Error
ruleProductFilterSmarts
ruleReactantFilterSmarts

hiddenMethod = APPLYRULES

compound - compound smiles


DELETE

URI Parameter Accept Types Result Status Codes
/rule Delete all rules the user has write access on. 303 - See Other

500 - Internal Server Error

/package/<id>/rule Delete all rules in the package given by the URI. 303 - See Other

401 - Unauthorized

500 - Internal Server Error

/package/<id>/rule/<id> Delete the rule identified by the URI. 303 - See Other
401 - Unauthorized
404 - Not Found
500 - Internal Server Error



PUT

Not Implemented.