TIBCO Scribe® Online Connector for HTTP Sample Maps/Flows

TIBCO Scribe® Online Connector for HTTP Sample Maps/Flows

book

Article ID: KB0074659

calendar_today

Updated On:

Products Versions
TIBCO Cloud Integration - Connect ( Scribe ) -

Description

In TIBCO Scribe® Online or TIBCO Cloud™ Integration - Connect, the REST Web Services Connector configures API calls for you based on a Swagger specification, but is limited to RESTful HTTP/API calls. You can use the HTTP Connector to configure customized HTTP/API calls. These simple Maps/flows attempt to demonstrate some of these concepts and how they can be achieved using the HTTP Connector. Review the Group Block labels in the Maps/flows that explain the purpose of the Blocks inside the Group.

The Creating Requests by HTTP Verb map/flow demonstrates the following:

  • Starting a Map/flow with no source data for the Query Block.
  • Using Send Blocks to send HTTP requests.
  • Using Postman Echo to echo the entire HTTP request back to TIBCO Scribe® Online / TIBCO Cloud™ Integration - Connect.
  • Recording that echoed response in the Agent log.

The Adding Request Details Map/flow demonstrates the following:

  • Adding query parameters by mapping the entire query in a formula field.
  • Adding query parameters by selecting QueryParameters on the Include tab of the Send Block and using an Add Block for each parameter or Key Value pair.
  • Adding headers by selecting Headers on the Include tab of the Send Block and using an Add Block for each header or Key Value pair.
  • Adding cookies by selecting Cookies on the Include tab of the Send Block and using an Add Block for each cookie or Key Value pair.
  • Using Postman Echo to echo each HTTP request back to TIBCO Scribe® Online / TIBCO Cloud™ Integration - Connect.
  • Recording each echoed response in the Agent log.

The Configuring Body with Content type Map/flow provides examples for specific types of content and demonstrates the following:

  • Using a string variable.
  • Sending the value of the variable as content type plain text.
  • Sending the value of the variable as content type XML.
  • Sending the value of the variable as content type JSON.
  • Using Postman Echo to echo each HTTP request back to TIBCO Scribe® Online / TIBCO Cloud™ Integration - Connect.
  • Recording each echoed response in the Agent log.

Note: Best practice is to keep mappings to the Content field very simple. Complex formulas may generate errors.

The Authenticating requests Map/flow demonstrates how to configure authorization and authentication for HTTP web service calls, as follows:

Warning: Information stored in variables, such as Username and Password, is stored in plain text making the variable values visible to other TIBCO Scribe® Online / TIBCO Cloud™ Integration - Connect users.

  • Using Basic Authentication.
    • Store Username and Password as variables.
    • Encode the Username and Password.
    • Use a Send Block with Headers selected on the Include tab.
    • Use an Add Block to send a header with a Key Value pair containing the authentication type and the encoded output.
  • Using Token Authentication.
    • Store ClientID and ClientSecret as variables.
    • Use a Send Block to send the authentication information.
    • Parse the token in the response to the Send Block. This step is not configured, but is represented by a Comment Block.
    • Store the token as a variable.
    • Use a Send Block with Headers selected on the Include tab.
    • Use an Add Block to send a header with a Key Value pair containing the token variable.
  • Using HMAC Signature.
    • Store Access Key, HMAC Key, date stamp, and a string value as variables.
    • Use an Execute Block to generate an HMAC256 Hash for a signature.
    • Use a Send Block with Headers selected on the Include tab.
    • Use an Add Block to send a header with a Key Value pair containing the authentication type and the encoded output.
  • Using Postman Echo to echo each HTTP request back to TIBCO Scribe® Online / TIBCO Cloud™ Integration - Connect.
  • Recording each echoed response in the Agent log.
Some APIs may return more detailed status codes that can be used to modify Map/flow behavior. For example, with an Upsert Block, a 201 code could indicate that the operation created a new record instead of updating an existing record. Review the documentation for the API you are accessing to determine if any of these codes would be useful to you. The Response Status Codes Map demonstrates the following:
  • Sending a request that returns a status code. In this example the code returned is 201.
  • Using an If/Else block to decide what to do if the status code returned is a 201 and what to do if it is any other code.
  • Writing to the Agent log when a 201 status code is returned.
The HTTP Message Flow Map demonstrates the following:
  • Support for Message Maps.
  • Support for any string data, such as XML, JSON, or CSV.
  • Responses to requests return a GUID (RequestID) that can be used in the Map/flow.

Scribe Online Classic Users
For more information on prerequisites, importing the Maps, and using the HTTP Connector, see Connector Extensions and HTTP Connector.

TIBCO Cloud Integration - Connect Users
For more information on prerequisites, importing the flows, and using the Files Connector, see Connector Extensions and HTTP Connector.

 
DISCLAIMER

 

Copyright (c) 2020, TIBCO Software Inc. All rights reserved.

 

No Support. You acknowledge that TIBCO will not provide any maintenance or support for this software. You have no right to receive any upgrades, patches, enhancements, bug fixes, new versions or new releases of the software.

 

Internal Use Only License Grant. TIBCO hereby grants you a limited, non‐transferable, non‐exclusive license to use the software solely for your internal business purposes. The name of TIBCO Software Inc. may not be used to endorse or promote products derived from this software without specific prior written permission of TIBCO Software Inc.

 

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 

Issue/Introduction

Use the attached Sample Maps/Flows to familiarize yourself with using the HTTP Connector Extension.

Attachments

TIBCO Scribe® Online Connector for HTTP Sample Maps/Flows get_app