Help:WikiPathways Webservice/API

From WikiPathways

(Difference between revisions)
Jump to: navigation, search
Current revision (23:23, 9 November 2020) (view source)
(points to swagger now)
 
(65 intermediate revisions not shown.)
Line 2: Line 2:
  |__TOC__
  |__TOC__
  |}
  |}
-
=== Functions ===
 
-
{{WSFunction
 
-
|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
+
The WikiPathways Web API calls are documented using [https://webservice.wikipathways.org Swagger].  
-
|name=listPathways
+
For more information on libraries and code examples, see [[Help:WikiPathways_Webservice|WikiPathways web services]].
-
|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.
+
-
|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.
+
-
 
+
-
'''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
+
-
* png
+
-
* svg
+
-
* pdf
+
-
* txt
+
-
* pwf
+
-
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 ===
+
-
This section explains the different object classes defined in the WSDL.
+
-
 
+
-
{{WSObject
+
-
|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
+
-
has one additional field:
+
-
|fields={{WSObject/Field
+
-
|name=gpml
+
-
|type=string
+
-
|descr=The content of the pathway (as [http://www.pathvisio.org/EverythingGPML GPML]).
+
-
}}
+
-
}}
+
-
 
+
-
{{WSObject
+
-
|name=WSAuth
+
-
|descr=Container for authentication data for a logged in WikiPathways session.
+
-
|fields={{WSObject/Field
+
-
|name=username
+
-
|type=string
+
-
|descr=The username of a WikiPathways account
+
-
}}
+
-
{{WSObject/Field
+
-
|name=key
+
-
|type=string
+
-
|descr=The authentication key of the session (can be obtained by calling the login function).
+
-
}}
+
-
}}
+
-
 
+
-
{{WSObject
+
-
|name=WSSearchResult
+
-
|descr=Container for a single search result.
+
-
|fields={{WSObject/Field
+
-
|name=score
+
-
|type=double
+
-
|descr=The score of the search result
+
-
}}
+
-
{{WSObject/Field
+
-
|name=fields
+
-
|type=array of WSIndexField
+
-
|descr=An array of index fields that were returned with the search. The included fields may vary among different search functions.
+
-
}}
+
-
}}
+
-
 
+
-
{{WSObject
+
-
|name=WSIndexField
+
-
|descr=Container for a single index field.
+
-
|fields={{WSObject/Field
+
-
|name=name
+
-
|type=string
+
-
|descr=The name of the index field.
+
-
}}
+
-
{{WSObject/Field
+
-
|name=values
+
-
|type=array of string
+
-
|descr=An array with the value(s) of the field.
+
-
}}
+
-
}}
+

Current revision

The WikiPathways Web API calls are documented using Swagger. For more information on libraries and code examples, see WikiPathways web services.

Personal tools