Difference between revisions of "Pathway"

From enviPath Wiki
Jump to navigation Jump to search
(Created page with "= REST Operations = == GET == {| class="wikitable" |- !URI !Parameter !Accept Types !Result !Status Codes |- |/compound | |''text/html'' ''application/json'' ''text/plain'...")
 
 
(11 intermediate revisions by 2 users not shown)
Line 11: Line 11:
!Status Codes
!Status Codes
|-
|-
|/compound
|/pathway
|
|
''optional parameter "delimiter" for<br />
text/csv only, default value: ","''
|''text/html''
|''text/html''


Line 18: Line 20:


''text/plain''
''text/plain''
|List of all compounds of all packages that the user has permission to read.
 
''text/csv''
|List of all pathways of all packages that the user has permission to read.
|200 - OK
|200 - OK
500 - Internal Server Error
500 - Internal Server Error
|-
|-
|/package/<id>/compound
|/package/<id>/pathway
|
|
''optional parameter "delimiter" for<br />
text/csv only, default value: ","''
|''text/html''
|''text/html''


Line 29: Line 35:


''text/plain''
''text/plain''
|List of all compounds of all the package given by the URI.
 
''text/csv''
|List of all pathways of all the package given by the URI.
|200 - OK
|200 - OK


Line 36: Line 44:
500 - Internal Server Error
500 - Internal Server Error
|-
|-
|/package/<id>/compound/<id>
|/package/<id>/pathway/<id>
|
|
''optional parameter "delimiter" for<br />
text/csv only, default value: ","''
|''text/html''
|''text/html''


Line 44: Line 54:
''text/plain''
''text/plain''


|The compound identified by the URI.
''text/csv''
|The pathway identified by the URI.
|200 - OK
 
401 - Unauthorized
 
404 - Not Found
 
500 - Internal Server Error
|-
|/package/<id>/pathway/<id>?status
|
|''application/json''
|The status of the pathway identified by the URI.
|200 - OK
|200 - OK


Line 53: Line 76:
500 - Internal Server Error
500 - Internal Server Error
|}
|}


== POST ==
== POST ==
Line 65: Line 87:
!Status Codes
!Status Codes
|-
|-
|/compound
|/pathway
|''compoundSmiles''
|''smilesinput''
''reverse''


''compoundName''
''name''


''compoundDescription''
''description''
 
''rootOnly''
 
''selectedSetting''
 
''<settingParams>''
|
|
|Create a new Compound in the default package. The redirect points to the URI of the new Compound.
|Creates a new predicted pathway in the default package. The redirect points to the URI of the new pathway. If rootOnly is set to true the generated pathway is empty(only contains the root).
 
There are 3 ways to select the [[Settings|setting]] for the pathway:
* Do not specify any setting options (uses default setting)
* Provide a setting URI with ''selectedSetting''
* Provide further setting parameters to create a new setting as defined [[Setting|in the Setting REST API]].
|303 - See Other
|303 - See Other
500 - Internal Server Error
500 - Internal Server Error
|-
|-
|/package/<id>/compound
|/package/<id>/pathway
|''compoundSmiles''
|''smilesinput''
''reverse''


''compoundName''
''name''


''compoundDescription''
''selectedSetting''
 
''<settingParams>''
|
|
|Create a new Compound in the package given by the URI. The redirect points to the URI of the new Compound.
|Creates a new predicted pathway in the package given by the URI. The redirect points to the URI of the new pathway.
|303 - See Other
|303 - See Other


Line 90: Line 127:
500 - Internal Server Error
500 - Internal Server Error
|-
|-
|rowspan="4"|/package/<id>/compound/<id>
|/package/<id>/pathway/<id>
|''compoundSmiles''
|''pathwayName''
|rowspan="4"|
 
|rowspan="4"|Modify the compound identified by the URI.  
''setAsDefaultName''
 
''pathwayDescription''
 
''scenario'' - URI of the scenario
|
|Modify the pathway identified by the URI. Set setAsDefaultName to "setAsDefaultName" to use the new alias as default name.
| 200 - OK
 
401 - Unauthorized
 
404 - Not Found
 
500 - Internal Server Error
|-
|/package/<id>/pathway/<id>/node
|''nodeAsSmiles''
 
''nodeReason''
 
''nodeName''
 
''nodeDepth''
|
|Adds a new node to the pathway.
| 200 - OK
| 200 - OK
401 - Unauthorized
404 - Not Found
500 - Internal Server Error
|-
|-
|''compoundName''
|/package/<id>/pathway/<id>/node/<id>
| 401 - Unauthorized
|''nodeName''
 
''setAsDefaultName''
 
''nodeDescription''
|
|Modify the node identified by the URI. Set setAsDefaultName to "setAsDefaultName" to use the new alias as default name.
| 200 - OK
 
401 - Unauthorized
 
404 - Not Found
 
500 - Internal Server Error
|-
|-
|''compoundDescription''  
|/package/<id>/pathway/<id>/edge
| 404 - Not Found
|''edgeAsSmirks''
 
''edgeReason''
 
''products''
 
''educts''
 
''multistep''
|
|Adds a new edge to the pathway.
| 200 - OK
 
401 - Unauthorized
 
404 - Not Found
 
500 - Internal Server Error
|-
|-
|''scenario'' - URI of the scenario
|/package/<id>/pathway/<id>/edge/<id>
| 500 - Internal Server Error
|''edgeName''
 
''setAsDefaultName''
 
''edgeDescription''
|
|Modify the edge identified by the URI. Set setAsDefaultName to "setAsDefaultName" to use the new alias as default name.
| 200 - OK
 
401 - Unauthorized
 
404 - Not Found
 
500 - Internal Server Error
|}
|}


== DELETE ==  
== DELETE ==  
Line 117: Line 226:
!Status Codes
!Status Codes
|-
|-
|/compound
|/pathway
|
|
|
|
|Delete all compounds the user has write access on.
|Delete all pathways the user has write access on (does not delete created compounds or reactions).
|303 - See Other
|303 - See Other
500 - Internal Server Error
500 - Internal Server Error
|-
|-
|/package/<id>/compound
|/package/<id>/pathway
|
|
|
|
|Delete all compounds in the package given by the URI.
|Delete all pathways in the package given by the URI.
|303 - See Other
|303 - See Other


Line 134: Line 243:
500 - Internal Server Error
500 - Internal Server Error
|-
|-
|rowspan="4"|/package/<id>/compound/<id>
|rowspan="4"|/package/<id>/pathway/<id>
|rowspan="4"|
|rowspan="4"|
|rowspan="4"|
|rowspan="4"|
|rowspan="4"|Delete the compound identified by the URI.  
|rowspan="4"|Delete the pathway identified by the URI.  
| 303 - See Other
| 303 - See Other
|-
|-
Line 145: Line 254:
|-
|-
| 500 - Internal Server Error
| 500 - Internal Server Error
|}
|-
|/package/<id>/pathway/<id>/node/<id>
|
|
|Remove node from pathway.
|303 - See Other


401 - Unauthorized


500 - Internal Server Error
|-
|/package/<id>/pathway/<id>/edge/<id>
|
|
|Remove edge from pathway.
|303 - See Other


401 - Unauthorized
500 - Internal Server Error
|}


== PUT ==
== PUT ==


Not Implemented.
Not Implemented.

Latest revision as of 14:59, 25 January 2016

REST Operations

GET

URI Parameter Accept Types Result Status Codes
/pathway

optional parameter "delimiter" for
text/csv only, default value: ","

text/html

application/json

text/plain

text/csv

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

500 - Internal Server Error

/package/<id>/pathway

optional parameter "delimiter" for
text/csv only, default value: ","

text/html

application/json

text/plain

text/csv

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

401 - Unauthorized

500 - Internal Server Error

/package/<id>/pathway/<id>

optional parameter "delimiter" for
text/csv only, default value: ","

text/html

application/json

text/plain

text/csv

The pathway identified by the URI. 200 - OK

401 - Unauthorized

404 - Not Found

500 - Internal Server Error

/package/<id>/pathway/<id>?status application/json The status of the pathway identified by the URI. 200 - OK

401 - Unauthorized

404 - Not Found

500 - Internal Server Error

POST

URI Parameter Accept Types Result Status Codes
/pathway smilesinput

reverse

name

description

rootOnly

selectedSetting

<settingParams>

Creates a new predicted pathway in the default package. The redirect points to the URI of the new pathway. If rootOnly is set to true the generated pathway is empty(only contains the root).

There are 3 ways to select the setting for the pathway:

* Do not specify any setting options (uses default setting)
* Provide a setting URI with selectedSetting
* Provide further setting parameters to create a new setting as defined in the Setting REST API.
303 - See Other

500 - Internal Server Error

/package/<id>/pathway smilesinput

reverse

name

selectedSetting

<settingParams>

Creates a new predicted pathway in the package given by the URI. The redirect points to the URI of the new pathway. 303 - See Other

401 - Unauthorized

500 - Internal Server Error

/package/<id>/pathway/<id> pathwayName

setAsDefaultName

pathwayDescription

scenario - URI of the scenario

Modify the pathway identified by the URI. Set setAsDefaultName to "setAsDefaultName" to use the new alias as default name. 200 - OK

401 - Unauthorized

404 - Not Found

500 - Internal Server Error

/package/<id>/pathway/<id>/node nodeAsSmiles

nodeReason

nodeName

nodeDepth

Adds a new node to the pathway. 200 - OK

401 - Unauthorized

404 - Not Found

500 - Internal Server Error

/package/<id>/pathway/<id>/node/<id> nodeName

setAsDefaultName

nodeDescription

Modify the node identified by the URI. Set setAsDefaultName to "setAsDefaultName" to use the new alias as default name. 200 - OK

401 - Unauthorized

404 - Not Found

500 - Internal Server Error

/package/<id>/pathway/<id>/edge edgeAsSmirks

edgeReason

products

educts

multistep

Adds a new edge to the pathway. 200 - OK

401 - Unauthorized

404 - Not Found

500 - Internal Server Error

/package/<id>/pathway/<id>/edge/<id> edgeName

setAsDefaultName

edgeDescription

Modify the edge identified by the URI. Set setAsDefaultName to "setAsDefaultName" to use the new alias as default name. 200 - OK

401 - Unauthorized

404 - Not Found

500 - Internal Server Error

DELETE

URI Parameter Accept Types Result Status Codes
/pathway Delete all pathways the user has write access on (does not delete created compounds or reactions). 303 - See Other

500 - Internal Server Error

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

401 - Unauthorized

500 - Internal Server Error

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

401 - Unauthorized

500 - Internal Server Error

/package/<id>/pathway/<id>/edge/<id> Remove edge from pathway. 303 - See Other

401 - Unauthorized

500 - Internal Server Error

PUT

Not Implemented.