Help:WikiPathways Webservice/API

From WikiPathways

(Difference between revisions)
Jump to: navigation, search
(Objects)
Line 103: Line 103:
=== Objects ===
=== Objects ===
This section explains the different object classes defined in the WSDL.
This section explains the different object classes defined in the WSDL.
-
==== WSPathwayInfo ====
 
-
Container for pathway metadata, such as name, organism and url.
 
-
{|class=wikitable
 
-
|colspan=3 | '''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 ====
+
{{WSObject
-
'''Extends WSPathwayInfo'''.
+
|name=WSPathwayInfo
 +
|descr=Container for pathway metadata, such as name, organism and url.
 +
|fields={{WSObject/Field
 +
|name=id
 +
|type=string
 +
|descr=The pathway identifier
 +
}}
 +
{{WSObject/Field
 +
|name=name
 +
|type=string
 +
|descr=The name of the pathway
 +
}}
 +
{{WSObject/Field
 +
|name=species
 +
|type=string
 +
|descr=The species (organism) of the pathway
 +
}}
 +
{{WSObject/Field
 +
|name=revision
 +
|type=string
 +
|descr=The revision number of the pathway ('0' can be used for the most recent revision)
 +
}}
 +
}}
 +
 
 +
{{WSObject
 +
|name=WSPathway
 +
|descr='''Extends WSPathwayInfo'''.
Container for pathway metadata and content. This object inherits all fields from WSPathwayInfo and
Container for pathway metadata and content. This object inherits all fields from WSPathwayInfo and
has one additional field:
has one additional field:
-
{|class=wikitable
+
|fields={{WSObject/Field
-
|colspan=3 | '''fields'''
+
|name=gpml
-
|-
+
|type=string
-
|gpml
+
|descr=The content of the pathway (as [http://www.pathvisio.org/EverythingGPML GPML]).
-
|string
+
}}
-
|The content of the pathway (as [http://www.pathvisio.org/EverythingGPML GPML]).
+
}}
-
|}
+
-
==== WSAuth ====
+
{{WSObject
-
Container for authentication data for a logged in WikiPathways session.
+
|name=WSAuth
-
{|class=wikitable
+
|descr=Container for authentication data for a logged in WikiPathways session.
-
|colspan=3 | '''fields'''
+
|fields={{WSObject/Field
-
|-
+
|name=username
-
|user
+
|type=string
-
|string
+
|descr=The username of a WikiPathways account
-
|The username of a WikiPathways account
+
}}
-
|-
+
{{WSObject/Field
-
|key
+
|name=key
-
|string
+
|type=string
-
|The authentication key of the session (can be obtained by calling the login function).
+
|descr=The authentication key of the session (can be obtained by calling the login function).
-
|}
+
}}
 +
}}
-
==== WSSearchResult ====
+
{{WSObject
-
Container for a single search result.
+
|name=WSSearchResult
-
{|class=wikitable
+
|descr=Container for a single search result.
-
|colspan=3 | '''fields'''
+
|fields={{WSObject/Field
-
|-
+
|name=score
-
|score
+
|type=double
-
|double
+
|descr=The score of the search result
-
|The score of the search result
+
}}
-
|-
+
{{WSObject/Field
-
|fields
+
|name=fields
-
|array of object WSIndexField
+
|type=array of WSIndexField
-
|An array of index fields that were returned with the search. The included fields may vary among different search functions.
+
|descr=An array of index fields that were returned with the search. The included fields may vary among different search functions.
-
|}
+
}}
 +
}}
-
==== WSIndexField ====
+
{{WSObject
-
Container for a single index field.
+
|name=WSIndexField
-
{|class=wikitable
+
|descr=Container for a single index field.
-
|colspan=3 | '''fields'''
+
|fields={{WSObject/Field
-
|-
+
|name=name
-
|name
+
|type=string
-
|string
+
|descr=The name of the index field.
-
|The name of the index field.
+
}}
-
|-
+
{{WSObject/Field
-
|fields
+
|name=values
-
|array of string
+
|type=array of string
-
|An array with the value(s) of the field.
+
|descr=An array with the value(s) of the field.
-
|}
+
}}
 +
}}

Revision as of 12:27, 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
  • pdf
  • 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:

  • string id
    • The pathway identifier
  • string name
    • The name of the pathway
  • string species
    • The species (organism) of the pathway
  • string revision
    • 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:

  • string gpml
    • The content of the pathway (as GPML).

WSAuth

Container for authentication data for a logged in WikiPathways session.

Fields:

  • string username
    • The username of a WikiPathways account
  • string key
    • The authentication key of the session (can be obtained by calling the login function).

WSSearchResult

Container for a single search result.

Fields:

  • double score
    • The score of the search result
  • array of WSIndexField fields
    • 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:

  • string name
    • The name of the index field.
  • array of string values
    • An array with the value(s) of the field.
Personal tools