@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api WikiPathways Webservices
@base https://webservice.wikipathways.org/
@version 1.0
@auth ApiKey auth in query
@common_fields {format: any}
@endpoints 26
@hint download_for_search
@toc listOrganisms(1), listPathways(1), getPathway(1), getPathwayInfo(1), getPathwayHistory(1), getRecentChanges(1), login(1), updatePathway(1), createPathway(1), findPathwaysByText(1), findPathwaysByXref(1), removeCurationTag(1), saveCurationTag(1), getCurationTags(1), getCurationTagsByName(1), getCurationTagHistory(1), getColoredPathway(1), findInteractions(1), getXrefList(1), findPathwaysByLiterature(1), saveOntologyTag(1), removeOntologyTag(1), getOntologyTermsByPathway(1), getPathwaysByOntologyTerm(1), getPathwaysByParentOntologyTerm(1), getUserByOrcid(1)

@group listOrganisms
@endpoint GET /listOrganisms
@desc listOrganisms
@returns(200) everything ok

@endgroup

@group listPathways
@endpoint GET /listPathways
@desc listPathways
@optional {organism: any # The organism to filter by (optional)}
@returns(200) everything ok

@endgroup

@group getPathway
@endpoint GET /getPathway
@desc getPathway
@required {pwId: any # The pathway identifier}
@optional {revision: any # The revision number of the pathway (use 0 for most recent)}
@returns(200) everything ok

@endgroup

@group getPathwayInfo
@endpoint GET /getPathwayInfo
@desc getPathwayInfoGet some general info about the pathway, such as the name, species, without downloading the GPML.
@required {pwId: any # The pathway identifier}
@returns(200) everything ok

@endgroup

@group getPathwayHistory
@endpoint GET /getPathwayHistory
@desc getPathwayHistoryGet the revision history of a pathway.
@required {pwId: any # The pathway identifier, timestamp: any # Limit by time, only history items after the given}
@returns(200) everything ok

@endgroup

@group getRecentChanges
@endpoint GET /getRecentChanges
@desc getRecentChangesGet 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.
@required {timestamp: any # Get the changes after this time}
@returns(200) everything ok

@endgroup

@group login
@endpoint GET /login
@desc loginStart 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).
@required {name: any # The usernameset_include_path(get_include_path().PATH_SEPARATOR.realpath('../includes').PATH_SEPARATOR.realpath('../').PATH_SEPARATOR);, pass: any # The password}
@returns(200) everything ok

@endgroup

@group updatePathway
@endpoint GET /updatePathway
@desc updatePathwayUpdate a pathway on the wiki with the given GPML code.Note: To create/modify pathways via the web service, you need to have an account with web service write permissions. Please contact us to request write access for the web service.
@required {pwId: any # The pathway identifier, description: any # A description of the modifications, gpml: any # The updated GPML code, revision: any # The revision the GPML code is based on, auth: any # The authentication key, username: any # The username}
@returns(200) everything ok

@endgroup

@group createPathway
@endpoint POST /createPathway
@desc createPathwayCreate a new pathway on the wiki with the given GPML code.Note: To create/modify pathways via the web service, you need to have an account with web service write permissions. Please contact us to request write access for the web service.
@required {gpml: any # The GPML code for the new pathway, auth: any # The authentication info, username: any # The user name}
@returns(200) everything ok

@endgroup

@group findPathwaysByText
@endpoint GET /findPathwaysByText
@desc findPathwaysByText
@required {query: any # The query, e.g. 'apoptosis'}
@optional {species: any # Optional, limit the query by species. Leave}
@returns(200) everything ok

@endgroup

@group findPathwaysByXref
@endpoint GET /findPathwaysByXref
@desc findPathwaysByXref
@required {ids: any # string}
@optional {codes: any # string}
@returns(200) everything ok

@endgroup

@group removeCurationTag
@endpoint GET /removeCurationTag
@desc removeCurationTagRemove a curation tag from a pathway.
@required {pwId: any # The pathway identifier, tagName: any # The name of the tag to apply, auth: any # The authentication data, username: any # The user name}
@returns(200) everything ok

@endgroup

@group saveCurationTag
@endpoint GET /saveCurationTag
@desc saveCurationTag
@required {pwId: any # The pathway identifier, tagName: any # The name of the tag to apply, text: any # string, revision: any # The revision this tag applies to, auth: any # The authentication key, username: any # The user name}
@returns(200) everything ok

@endgroup

@group getCurationTags
@endpoint GET /getCurationTags
@desc getCurationTagsGet all curation tags for the given tag name. Use this method if you want to find all pathways that are tagged with a specific curation tag.
@required {pwId: any # The pathway identifier}
@returns(200) everything ok

@endgroup

@group getCurationTagsByName
@endpoint GET /getCurationTagsByName
@desc getCurationTagsByNameGet all curation tags for the given tag name. Use this method if you want to find all pathways that are tagged with a specific curation tag.
@required {tagName: any # The tag name}
@returns(200) everything ok

@endgroup

@group getCurationTagHistory
@endpoint GET /getCurationTagHistory
@desc getCurationTagHistory
@required {pwId: any # The pathway identifier}
@optional {timestamp: any # Only include history from after the given date}
@returns(200) everything ok

@endgroup

@group getColoredPathway
@endpoint GET /getColoredPathway
@desc getColoredPathwayGet a colored image version of the pathway.
@required {pwId: any # The pathway identifier, revision: any # The revision of the pathway (use '0' for most recent), graphId: any # string, color: any # string, fileType: any # The image type (One of 'svg', 'pdf' or 'png').}
@returns(200) everything ok

@endgroup

@group findInteractions
@endpoint GET /findInteractions
@desc findInteractionsFind interactions defined in WikiPathways pathways.
@required {query: any # The name of an entity to find interactions for (e.g. 'P53')}
@returns(200) everything ok

@endgroup

@group getXrefList
@endpoint GET /getXrefList
@desc getXrefList
@required {pwId: any # The pathway identifier., code: any # The database code to translate to (e.g. 'S' for UniProt).}
@returns(200) everything ok

@endgroup

@group findPathwaysByLiterature
@endpoint GET /findPathwaysByLiterature
@desc findPathwaysByLiterature
@required {query: any # The query, can be a pubmed id, author name or title keyword.}
@returns(200) everything ok

@endgroup

@group saveOntologyTag
@endpoint GET /saveOntologyTag
@desc saveOntologyTag
@required {pwId: any # The pathway identifier, term: any # The ontology term to apply, termId: any # The identifier of the term in the ontology, auth: any # The authentication key, user: any # The username}
@returns(200) everything ok

@endgroup

@group removeOntologyTag
@endpoint GET /removeOntologyTag
@desc removeOntologyTag
@required {pwId: any # The pathway identifier, termId: any # The ontology term identifier in the ontology, auth: any # The authentication key, user: any # The username}
@returns(200) everything ok

@endgroup

@group getOntologyTermsByPathway
@endpoint GET /getOntologyTermsByPathway
@desc getOntologyTermsByPathway
@required {pwId: any # The pathway identifier}
@returns(200) everything ok

@endgroup

@group getPathwaysByOntologyTerm
@endpoint GET /getPathwaysByOntologyTerm
@desc getPathwaysByOntologyTerm
@required {term: any # The Ontology term}
@returns(200) everything ok

@endgroup

@group getPathwaysByParentOntologyTerm
@endpoint GET /getPathwaysByParentOntologyTerm
@desc getPathwaysByParentOntologyTerm
@required {term: any # The Ontology term}
@returns(200) everything ok

@endgroup

@group getUserByOrcid
@endpoint GET /getUserByOrcid
@desc getUserByOrcid
@required {orcid: any # string}
@returns(200) everything ok

@endgroup

@end
