Help:WikiPathways Webservice/API
From WikiPathways
(New page: === Functions === ==== listOrganisms ==== Get a list of all available organisms. {|class=wikitable |colspan=3 | '''returns''' |- |array of string |The names of the supported organisms ...) |
|||
Line 1: | Line 1: | ||
=== Functions === | === Functions === | ||
- | + | {{WSFunction | |
- | Get a list of all available organisms. | + | |name=listOrganisms |
- | + | |descr=Get a list of all available organisms. | |
- | + | |returns= | |
- | + | {{WSFunction/Return|type=array of string|descr=The names of the supported organisms.}} | |
- | + | }} | |
- | + | ||
- | + | {{WSFunction | |
- | + | |name=listPathways | |
- | Get a list of all available pathways. | + | |descr=Get a list of all available pathways. |
- | + | |returns= | |
- | + | {{WSFunction/Return|type=array of [[Help:WikiPathways_Webservice#WSPathwayInfo|WSPathwayInfo]]|descr=The available pathways.}} | |
- | + | }} | |
- | + | ||
- | + | {{WSFunction | |
- | + | |name=getPathway | |
- | + | |descr=Download the pathway from WikiPathways. | |
- | Download the pathway from WikiPathways. | + | |args= |
- | + | {{WSFunction/Argument|name=pwId|type=string|descr=The pathway identifier.}} | |
- | + | {{WSFunction/Argument|name=revision|type=integer|descr=The revision number of the pathway (use '0' for most recent version).}} | |
- | + | |returns= | |
- | + | {{WSFunction/Return|type=[[Help:WikiPathways_Webservice#WSPathway|WSPathway]]|descr=The pathway.}} | |
- | + | }} | |
- | + | ||
- | + | {{WSFunction | |
- | + | |name=getRecentChanges | |
- | + | |descr=Get the recently changed pathways. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | Get the recently changed pathways. | + | |
'''Note:''' the recent changes table only retains items for a limited time (2 months), so there is no guarantee that you will get all changes when the timestamp points to a date that is more than 2 months in the past. | '''Note:''' the recent changes table only retains items for a limited time (2 months), so there is no guarantee that you will get all changes when the timestamp points to a date that is more than 2 months in the past. | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | = | + | |args= |
- | + | {{WSFunction/Argument|name=timestamp|type=string|descr=Only get changes from after this time. Timestamp format: yyyymmddMMHHSS.}} | |
- | {| | + | |returns= |
- | + | {{WSFunction/Return|type=array of [[Help:WikiPathways_Webservice#WSPathwayInfo|WSPathwayInfo]]|descr=The changed pathways.}} | |
- | + | }} | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ==== | + | {{WSFunction |
- | + | |name=login | |
- | {| | + | |descr=Start a logged in session, using an existing WikiPathways account. This function will return an authentication code that can be used to excecute methods that need authentication (e.g. updatePathway). |
- | + | |args= | |
- | + | {{WSFunction/Argument|name=name|type=string|descr=The username of the WikiPathways account.}} | |
- | + | {{WSFunction/Argument|name=pass|type=string|descr=The password of the WikiPathways account.}} | |
- | + | |returns= | |
- | + | {{WSFunction/Return|type=string|descr=The authentication code for this session.}} | |
- | + | }} | |
- | + | ||
- | + | {{WSFunction | |
- | + | |name=getPathwayAs | |
+ | |descr=Download a pathway in the specified file format. | ||
+ | |args= | ||
+ | {{WSFunction/Argument|name=fileType|type=string|descr=Download a pathway in the specified file format. | ||
* gpml | * gpml | ||
* png | * png | ||
Line 105: | Line 58: | ||
* txt | * txt | ||
* pwf | * pwf | ||
- | See [[Download_Pathways | the download page]] for an explanation of these file formats. | + | See [[Download_Pathways | the download page]] for an explanation of these file formats.}} |
- | + | {{WSFunction/Argument|name=pwId|type=string|descr=The pathway identifier.}} | |
- | + | |returns= | |
- | + | {{WSFunction/Return|type=base64Binary|descr=The file contents (base64 encoded).}} | |
- | + | }} | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ==== | + | {{WSFunction |
- | + | |name=updatePathway | |
+ | |descr=Update a pathway on the wiki with the given GPML code. | ||
+ | |args= | ||
+ | {{WSFunction/Argument|name=pwId|type=string|descr=The pathway identifier.}} | ||
+ | {{WSFunction/Argument|name=description|type=string|descr=A description of the modifications.}} | ||
+ | {{WSFunction/Argument|name=pass|type=string|descr=The updated GPML code.}} | ||
+ | {{WSFunction/Argument|name=revision|type=integer|descr=The revision number of the version this GPML code was based on. This is used to prevent edit conflicts in case another client edited the pathway after this client downloaded it.}} | ||
+ | {{WSFunction/Argument|name=auth|type=string|descr=The authentication info.}} | ||
+ | |returns= | ||
+ | {{WSFunction/Return|type=boolean|descr=True if the pathway was updated successfully.}} | ||
+ | }} | ||
- | {| | + | {{WSFunction |
- | + | |name=findPathwaysByText | |
- | + | |descr=Find pathways using a textual search on the description and text labels of the pathway objects. | |
- | + | |args= | |
- | + | {{WSFunction/Argument|name=query|type=string|descr=The search query (e.g. 'apoptosis' or 'p53').}} | |
- | + | {{WSFunction/Argument|name=species|type=string|descr=The species to limit the search to (leave blank to search on all species).}} | |
- | + | {{WSFunction/Argument|name=pass|type=string|descr=The updated GPML code.}} | |
- | + | {{WSFunction/Argument|name=revision|type=integer|descr=The revision number of the version this GPML code was based on. This is used to prevent edit conflicts in case another client edited the pathway after this client downloaded it.}} | |
- | + | |returns= | |
- | + | {{WSFunction/Return|type=array of [[Help:WikiPathways_Webservice#WSSearchResult|WSSearchResult]]|descr=An array of search results.}} | |
- | + | }} | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | {| | + | {{WSFunction |
- | + | |name=findPathwaysByXref | |
- | + | |descr=Find pathways by searching on the external references of DataNodes (gene/protein/metabolite identifiers). | |
- | + | |args= | |
- | + | {{WSFunction/Argument|name=id|type=string|descr=The DataNode identifier (e.g. 'P45985').}} | |
- | + | {{WSFunction/Argument|name=code|type=string|descr=The code of the database system to limit the search to. Leave blank to search on all database systems. See [http://www.pathvisio.org/Help_1.1#Supported_database_systems this page] for an overview of available system codes.}} | |
- | + | {{WSFunction/Argument|name=pass|type=string|descr=The updated GPML code.}} | |
- | + | {{WSFunction/Argument|name=revision|type=integer|descr=The revision number of the version this GPML code was based on. This is used to prevent edit conflicts in case another client edited the pathway after this client downloaded it.}} | |
- | + | |returns= | |
- | + | {{WSFunction/Return|type=array of [[Help:WikiPathways_Webservice#WSSearchResult|WSSearchResult]]|descr=An array of search results.}} | |
- | + | }} | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
=== Objects === | === Objects === |
Revision as of 12:05, 17 December 2008
Contents |
Functions
listOrganisms
Get a list of all available organisms.
listPathways
Get a list of all available pathways.
getPathway
Download the pathway from WikiPathways.
Arguments:
-
string
pwId- The pathway identifier.
-
integer
revision- The revision number of the pathway (use '0' for most recent version).
getRecentChanges
Get the recently changed pathways.
Note: the recent changes table only retains items for a limited time (2 months), so there is no guarantee that you will get all changes when the timestamp points to a date that is more than 2 months in the past.
Arguments:
-
string
timestamp- Only get changes from after this time. Timestamp format: yyyymmddMMHHSS.
login
Start a logged in session, using an existing WikiPathways account. This function will return an authentication code that can be used to excecute methods that need authentication (e.g. updatePathway).
Arguments:
-
string
name- The username of the WikiPathways account.
-
string
pass- The password of the WikiPathways account.
getPathwayAs
Download a pathway in the specified file format.
Arguments:
-
string
fileType- Download a pathway in the specified file format.
- gpml
- png
- svg
- txt
- pwf
See the download page for an explanation of these file formats.
-
string
pwId- The pathway identifier.
updatePathway
Update a pathway on the wiki with the given GPML code.
Arguments:
-
string
pwId- The pathway identifier.
-
string
description- A description of the modifications.
-
string
pass- The updated GPML code.
-
integer
revision- The revision number of the version this GPML code was based on. This is used to prevent edit conflicts in case another client edited the pathway after this client downloaded it.
-
string
auth- The authentication info.
findPathwaysByText
Find pathways using a textual search on the description and text labels of the pathway objects.
Arguments:
-
string
query- The search query (e.g. 'apoptosis' or 'p53').
-
string
species- The species to limit the search to (leave blank to search on all species).
-
string
pass- The updated GPML code.
-
integer
revision- The revision number of the version this GPML code was based on. This is used to prevent edit conflicts in case another client edited the pathway after this client downloaded it.
findPathwaysByXref
Find pathways by searching on the external references of DataNodes (gene/protein/metabolite identifiers).
Arguments:
-
string
id- The DataNode identifier (e.g. 'P45985').
-
string
code- The code of the database system to limit the search to. Leave blank to search on all database systems. See this page for an overview of available system codes.
-
string
pass- The updated GPML code.
-
integer
revision- The revision number of the version this GPML code was based on. This is used to prevent edit conflicts in case another client edited the pathway after this client downloaded it.
Objects
This section explains the different object classes defined in the WSDL.
WSPathwayInfo
Container for pathway metadata, such as name, organism and url.
fields | ||
name | string | The name of the pathway |
species | string | The species (organism) of the pathway |
url | string | The url to the pathway |
revision | string | The revision number of the pathway ('0' can be used for the most recent revision) |
WSPathway
Extends WSPathwayInfo.
Container for pathway metadata and content. This object inherits all fields from WSPathwayInfo and has one additional field:
fields | ||
gpml | string | The content of the pathway (as GPML). |
WSAuth
Container for authentication data for a logged in WikiPathways session.
fields | ||
user | string | The username of a WikiPathways account |
key | string | The authentication key of the session (can be obtained by calling the login function). |
WSSearchResult
Container for a single search result.
fields | ||
score | double | The score of the search result |
fields | array of object WSIndexField | An array of index fields that were returned with the search. The included fields may vary among different search functions. |
WSIndexField
Container for a single index field.
fields | ||
name | string | The name of the index field. |
fields | array of string | An array with the value(s) of the field. |