SlideShare a Scribd company logo
1 of 15
An Introduction to 
REST Services in Taverna 
Stian Soiland-Reyes and Christian Brenninkmeijer 
University of Manchester 
materials by Katy Wolstencroft and Aleksandra Pawlik 
http://orcid.org/0000-0001-9842-9718 
http://orcid.org/0000-0002-2937-7819 
http://orcid.org/0000-0002-1279-5133 
http://orcid.org/0000-0001-8418-6735 
Bonn University, 2014-09-01 
http://www.taverna.org.uk/ 
This work is licensed under a 
Creative Commons Attribution 3.0 Unported License
REST Services 
Data and tools on the Web have been exposed in a 
RESTful manner. Taverna provides a custom processor 
for accessing such services. 
 REST stands for REpresentational State Transfer 
 Web services with this type of interface typically 
expose some of the following four types of 
operations: 
 GET - to get a resource 
 POST - to make a new resource or to perform a request 
(such as search) 
 PUT - to update a resource 
 DELETE - to delete a resource
Adding a REST web service 
 Expand the Service templates folder under Available 
services in the Service Panel. Select the REST service 
template and drag n drop it into the Workflow Diagram
Configuring a REST Service 
 In a dialog box that pops up, configure the use of a REST service by 
adding the: 
 URL of the service, e.g. http://www.uniprot.org/uniprot/{id} 
 Type of the operation you want to perform on the service, e.g. GET 
 The expected MIME data type as returned by the services. Select 
text/plain in this case.
Configuring a REST Service 
 The URL of the service you enter is actually a template 
that can take configurable parameters 
 In the current example, the name of the parameter is ‘id’ 
which is enclosed within a pair of braces 
 Parameters are used when you do not know their value 
in advance, i.e. at the time of adding the service to the 
workflow diagram, and they depend on some of the 
previous services in the workflow. 
 The value in braces will then be replaced with the 
actual value when the workflow is executed.
Building a simple workflow using a REST 
service 
 To complete the building of a simple workflow using the Uniprot REST web 
service, add: 
 a workflow input for the REST service input port named ‘id’ 
 workflow outputs for the responseBody and status output ports of the 
REST service activity 
 The workflow should now look as follows:
Building a simple workflow using 
a REST service 
 Now try running the workflow using an example Uniprot 
identifier such as Q99102.fasta 
 Note that the presence of the .fasta suffix enables the 
protein sequence to be returned as text 
 What happens when you don’t use the .fasta suffix? 
 Try using other suffixes, e.g. xml, txt, rdf and gff 
 Further information about the Uniprot REST service is 
available from http://www.uniprot.org/faq/28
Configuring a REST service 
 Let’s add the format (xml, fasta and so on) as another 
parameter 
 Open the REST service configuration and add 
“.{format}” to the URL Template 
 Hint: In “Design” view, right click on the REST_Service and 
select Configure REST Service
Configuring a REST service 
 Now we need to add an input port to the workflow
Configuring a REST service 
 Now when we run the workflow we need to specify the 
format as an input, the id must not include the format
Advanced configuration of REST 
services
Advanced configuration of REST 
services 
 Send HTTP Expect request-header 
 This field option allows Taverna to set a special "Expect" 
header when sending a request to the REST service. Client 
requests using the POST method will expect to receive a 100- 
Continue or Redirect response from the service to indicate 
that the client should proceed to send the POST data. 
 This mechanism allows clients to avoid sending large 
amounts of data over the network twice when the service 
could reject or redirect the request. Selecting this option may 
significantly improve performance when large volumes of data 
are to be sent to the service and authentication or a redirect 
from the original URL to the one specified by the service is 
likely.
Advanced configuration of REST 
services 
 Redirection output port 
 The Show "Redirection" output port option makes the service's 
redirection output port visible as this output port is hidden by default. 
The port will contain the URL of the final redirect that has yielded the 
output data on the responseBody port. 
 Show "Actual URL" output port 
 If this box is selected, then the REST service will have a port called 
"actualURL". When the service is invoked, the URL that is used as a 
result of replacing all the parameter values is output on the port.
Advanced configuration of REST 
services 
 Show "Response headers" output port 
 If this box is selected, then the REST service will have a port called 
"responseHeaders". When the service is invoked, the list of HTTP 
headers from the REST service call will be output on the port. Note that 
if the calling of the service includes redirection, then it is the final set of 
HTTP headers that is output. 
 Escape URL parameter values 
 If this box is selected (the default) then when values are passed to the 
REST input and those values are included in the URL, they are escaped 
so that they can form part of a valid URL. It is not a good idea to 
uncheck this box.
Further exercises 
 There are many more REST services available in 
bioinformatics 
 Try to find these using BioCatalogue and test them 
using Taverna

More Related Content

Similar to 2014 Taverna tutorial REST services

How to call REST API without knowing any programming languages
How to call REST API without knowing any programming languages How to call REST API without knowing any programming languages
How to call REST API without knowing any programming languages Marc Leinbach
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Mindfire Solutions
 
Spray - Build RESTfull services in scala
Spray - Build RESTfull services in scalaSpray - Build RESTfull services in scala
Spray - Build RESTfull services in scalaSandeep Purohit
 
Sun certifiedwebcomponentdeveloperstudyguide
Sun certifiedwebcomponentdeveloperstudyguideSun certifiedwebcomponentdeveloperstudyguide
Sun certifiedwebcomponentdeveloperstudyguideAlberto Romero Jiménez
 
MuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataMuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataPace Integration
 
KaTe RESTful adapter for SAP Process Integration: Introduction
KaTe RESTful adapter for SAP Process Integration: IntroductionKaTe RESTful adapter for SAP Process Integration: Introduction
KaTe RESTful adapter for SAP Process Integration: IntroductionKate_RESTful
 
Lunacloud's Compute RESTful API - Programmer's Guide
Lunacloud's Compute RESTful API - Programmer's GuideLunacloud's Compute RESTful API - Programmer's Guide
Lunacloud's Compute RESTful API - Programmer's GuideLunacloud
 
6 Months Industrial Training in Spring Framework
6 Months Industrial Training in Spring Framework6 Months Industrial Training in Spring Framework
6 Months Industrial Training in Spring FrameworkArcadian Learning
 
Time for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web ServicesTime for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web Servicesukdpe
 
RESTful services
RESTful servicesRESTful services
RESTful servicesgouthamrv
 
Rest API and Client OM for Developer
Rest API and Client OM for DeveloperRest API and Client OM for Developer
Rest API and Client OM for DeveloperInnoTech
 

Similar to 2014 Taverna tutorial REST services (20)

How to call REST API without knowing any programming languages
How to call REST API without knowing any programming languages How to call REST API without knowing any programming languages
How to call REST API without knowing any programming languages
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
 
L12: REST Service
L12: REST ServiceL12: REST Service
L12: REST Service
 
Spray
SpraySpray
Spray
 
Spray - Build RESTfull services in scala
Spray - Build RESTfull services in scalaSpray - Build RESTfull services in scala
Spray - Build RESTfull services in scala
 
Sun certifiedwebcomponentdeveloperstudyguide
Sun certifiedwebcomponentdeveloperstudyguideSun certifiedwebcomponentdeveloperstudyguide
Sun certifiedwebcomponentdeveloperstudyguide
 
Rest web services
Rest web servicesRest web services
Rest web services
 
MuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataMuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and OData
 
PDFArticle
PDFArticlePDFArticle
PDFArticle
 
KaTe RESTful adapter for SAP Process Integration: Introduction
KaTe RESTful adapter for SAP Process Integration: IntroductionKaTe RESTful adapter for SAP Process Integration: Introduction
KaTe RESTful adapter for SAP Process Integration: Introduction
 
Lunacloud's Compute RESTful API - Programmer's Guide
Lunacloud's Compute RESTful API - Programmer's GuideLunacloud's Compute RESTful API - Programmer's Guide
Lunacloud's Compute RESTful API - Programmer's Guide
 
Restful services with ColdFusion
Restful services with ColdFusionRestful services with ColdFusion
Restful services with ColdFusion
 
6 Months Industrial Training in Spring Framework
6 Months Industrial Training in Spring Framework6 Months Industrial Training in Spring Framework
6 Months Industrial Training in Spring Framework
 
Time for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web ServicesTime for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web Services
 
Restful API's with ColdFusion
Restful API's with ColdFusionRestful API's with ColdFusion
Restful API's with ColdFusion
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
 
Rest Webservice
Rest WebserviceRest Webservice
Rest Webservice
 
RESTful services
RESTful servicesRESTful services
RESTful services
 
Appcelerator - using node.ACS (part 1)
Appcelerator - using node.ACS (part 1)Appcelerator - using node.ACS (part 1)
Appcelerator - using node.ACS (part 1)
 
Rest API and Client OM for Developer
Rest API and Client OM for DeveloperRest API and Client OM for Developer
Rest API and Client OM for Developer
 

More from myGrid team

2014 Taverna Tutorial Introduction to eScience and workflows
2014 Taverna Tutorial Introduction to eScience and workflows2014 Taverna Tutorial Introduction to eScience and workflows
2014 Taverna Tutorial Introduction to eScience and workflowsmyGrid team
 
2014 Taverna Tutorial Biodiversity example
2014 Taverna Tutorial Biodiversity example2014 Taverna Tutorial Biodiversity example
2014 Taverna Tutorial Biodiversity examplemyGrid team
 
2014 Taverna Tutorial Components
2014 Taverna Tutorial Components2014 Taverna Tutorial Components
2014 Taverna Tutorial ComponentsmyGrid team
 
2014 Taverna Tutorial Interactions
2014 Taverna Tutorial Interactions2014 Taverna Tutorial Interactions
2014 Taverna Tutorial InteractionsmyGrid team
 
2014 Taverna tutorial Advanced Taverna
2014 Taverna tutorial Advanced Taverna2014 Taverna tutorial Advanced Taverna
2014 Taverna tutorial Advanced TavernamyGrid team
 
2014 Taverna tutorial Xpath
2014 Taverna tutorial Xpath2014 Taverna tutorial Xpath
2014 Taverna tutorial XpathmyGrid team
 
2014 Taverna tutorial introduction to Taverna workflows
2014 Taverna tutorial introduction to Taverna workflows2014 Taverna tutorial introduction to Taverna workflows
2014 Taverna tutorial introduction to Taverna workflowsmyGrid team
 
SWeDe - Scientific Webservice Description
SWeDe - Scientific Webservice DescriptionSWeDe - Scientific Webservice Description
SWeDe - Scientific Webservice DescriptionmyGrid team
 
Taverna workflows in the cloud
Taverna workflows in the cloudTaverna workflows in the cloud
Taverna workflows in the cloudmyGrid team
 
The Taverna Software Suite
The Taverna Software SuiteThe Taverna Software Suite
The Taverna Software SuitemyGrid team
 
The Taverna Workflow Management Software Suite - Past, Present, Future
The Taverna Workflow Management Software Suite - Past, Present, FutureThe Taverna Workflow Management Software Suite - Past, Present, Future
The Taverna Workflow Management Software Suite - Past, Present, FuturemyGrid team
 
2014-06-03-Taverna-IS-ENES2
2014-06-03-Taverna-IS-ENES22014-06-03-Taverna-IS-ENES2
2014-06-03-Taverna-IS-ENES2myGrid team
 
The beauty of workflows and models
The beauty of workflows and modelsThe beauty of workflows and models
The beauty of workflows and modelsmyGrid team
 
If we build it will they come?
If we build it will they come?If we build it will they come?
If we build it will they come?myGrid team
 

More from myGrid team (15)

Taverna summary
Taverna summaryTaverna summary
Taverna summary
 
2014 Taverna Tutorial Introduction to eScience and workflows
2014 Taverna Tutorial Introduction to eScience and workflows2014 Taverna Tutorial Introduction to eScience and workflows
2014 Taverna Tutorial Introduction to eScience and workflows
 
2014 Taverna Tutorial Biodiversity example
2014 Taverna Tutorial Biodiversity example2014 Taverna Tutorial Biodiversity example
2014 Taverna Tutorial Biodiversity example
 
2014 Taverna Tutorial Components
2014 Taverna Tutorial Components2014 Taverna Tutorial Components
2014 Taverna Tutorial Components
 
2014 Taverna Tutorial Interactions
2014 Taverna Tutorial Interactions2014 Taverna Tutorial Interactions
2014 Taverna Tutorial Interactions
 
2014 Taverna tutorial Advanced Taverna
2014 Taverna tutorial Advanced Taverna2014 Taverna tutorial Advanced Taverna
2014 Taverna tutorial Advanced Taverna
 
2014 Taverna tutorial Xpath
2014 Taverna tutorial Xpath2014 Taverna tutorial Xpath
2014 Taverna tutorial Xpath
 
2014 Taverna tutorial introduction to Taverna workflows
2014 Taverna tutorial introduction to Taverna workflows2014 Taverna tutorial introduction to Taverna workflows
2014 Taverna tutorial introduction to Taverna workflows
 
SWeDe - Scientific Webservice Description
SWeDe - Scientific Webservice DescriptionSWeDe - Scientific Webservice Description
SWeDe - Scientific Webservice Description
 
Taverna workflows in the cloud
Taverna workflows in the cloudTaverna workflows in the cloud
Taverna workflows in the cloud
 
The Taverna Software Suite
The Taverna Software SuiteThe Taverna Software Suite
The Taverna Software Suite
 
The Taverna Workflow Management Software Suite - Past, Present, Future
The Taverna Workflow Management Software Suite - Past, Present, FutureThe Taverna Workflow Management Software Suite - Past, Present, Future
The Taverna Workflow Management Software Suite - Past, Present, Future
 
2014-06-03-Taverna-IS-ENES2
2014-06-03-Taverna-IS-ENES22014-06-03-Taverna-IS-ENES2
2014-06-03-Taverna-IS-ENES2
 
The beauty of workflows and models
The beauty of workflows and modelsThe beauty of workflows and models
The beauty of workflows and models
 
If we build it will they come?
If we build it will they come?If we build it will they come?
If we build it will they come?
 

Recently uploaded

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 

Recently uploaded (20)

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 

2014 Taverna tutorial REST services

  • 1. An Introduction to REST Services in Taverna Stian Soiland-Reyes and Christian Brenninkmeijer University of Manchester materials by Katy Wolstencroft and Aleksandra Pawlik http://orcid.org/0000-0001-9842-9718 http://orcid.org/0000-0002-2937-7819 http://orcid.org/0000-0002-1279-5133 http://orcid.org/0000-0001-8418-6735 Bonn University, 2014-09-01 http://www.taverna.org.uk/ This work is licensed under a Creative Commons Attribution 3.0 Unported License
  • 2. REST Services Data and tools on the Web have been exposed in a RESTful manner. Taverna provides a custom processor for accessing such services.  REST stands for REpresentational State Transfer  Web services with this type of interface typically expose some of the following four types of operations:  GET - to get a resource  POST - to make a new resource or to perform a request (such as search)  PUT - to update a resource  DELETE - to delete a resource
  • 3. Adding a REST web service  Expand the Service templates folder under Available services in the Service Panel. Select the REST service template and drag n drop it into the Workflow Diagram
  • 4. Configuring a REST Service  In a dialog box that pops up, configure the use of a REST service by adding the:  URL of the service, e.g. http://www.uniprot.org/uniprot/{id}  Type of the operation you want to perform on the service, e.g. GET  The expected MIME data type as returned by the services. Select text/plain in this case.
  • 5. Configuring a REST Service  The URL of the service you enter is actually a template that can take configurable parameters  In the current example, the name of the parameter is ‘id’ which is enclosed within a pair of braces  Parameters are used when you do not know their value in advance, i.e. at the time of adding the service to the workflow diagram, and they depend on some of the previous services in the workflow.  The value in braces will then be replaced with the actual value when the workflow is executed.
  • 6. Building a simple workflow using a REST service  To complete the building of a simple workflow using the Uniprot REST web service, add:  a workflow input for the REST service input port named ‘id’  workflow outputs for the responseBody and status output ports of the REST service activity  The workflow should now look as follows:
  • 7. Building a simple workflow using a REST service  Now try running the workflow using an example Uniprot identifier such as Q99102.fasta  Note that the presence of the .fasta suffix enables the protein sequence to be returned as text  What happens when you don’t use the .fasta suffix?  Try using other suffixes, e.g. xml, txt, rdf and gff  Further information about the Uniprot REST service is available from http://www.uniprot.org/faq/28
  • 8. Configuring a REST service  Let’s add the format (xml, fasta and so on) as another parameter  Open the REST service configuration and add “.{format}” to the URL Template  Hint: In “Design” view, right click on the REST_Service and select Configure REST Service
  • 9. Configuring a REST service  Now we need to add an input port to the workflow
  • 10. Configuring a REST service  Now when we run the workflow we need to specify the format as an input, the id must not include the format
  • 11. Advanced configuration of REST services
  • 12. Advanced configuration of REST services  Send HTTP Expect request-header  This field option allows Taverna to set a special "Expect" header when sending a request to the REST service. Client requests using the POST method will expect to receive a 100- Continue or Redirect response from the service to indicate that the client should proceed to send the POST data.  This mechanism allows clients to avoid sending large amounts of data over the network twice when the service could reject or redirect the request. Selecting this option may significantly improve performance when large volumes of data are to be sent to the service and authentication or a redirect from the original URL to the one specified by the service is likely.
  • 13. Advanced configuration of REST services  Redirection output port  The Show "Redirection" output port option makes the service's redirection output port visible as this output port is hidden by default. The port will contain the URL of the final redirect that has yielded the output data on the responseBody port.  Show "Actual URL" output port  If this box is selected, then the REST service will have a port called "actualURL". When the service is invoked, the URL that is used as a result of replacing all the parameter values is output on the port.
  • 14. Advanced configuration of REST services  Show "Response headers" output port  If this box is selected, then the REST service will have a port called "responseHeaders". When the service is invoked, the list of HTTP headers from the REST service call will be output on the port. Note that if the calling of the service includes redirection, then it is the final set of HTTP headers that is output.  Escape URL parameter values  If this box is selected (the default) then when values are passed to the REST input and those values are included in the URL, they are escaped so that they can form part of a valid URL. It is not a good idea to uncheck this box.
  • 15. Further exercises  There are many more REST services available in bioinformatics  Try to find these using BioCatalogue and test them using Taverna