Glyue User Docs
  • What is Glyue?
  • Tutorials
    • Start Here
    • Building a Single-Step Integration
      • 1. Creating the Integration
      • 2. Calling the External System
      • 3. Running the Integration
      • 4. Crafting the Output
    • Building a Multi-System Integration
      • 1. Connecting to the Core
      • 2. Field Mapping
      • 3. Running the Integration
    • Building an Event-Driven Integration
      • 1. Setting up the Mock CRM
      • 2. Receiving Inbound Requests
      • 3. Triggering the Integration from the CRM
    • Building an Email Integration
      • 1. Create and Configure the Integration
      • 2. Input Validation
      • 3. Get Story IDs from Hacker News
      • 4. Get Story Content
      • 5. Sending the Email
      • 6. Wrapping Up
      • 7. Extra credit
        • extra_credit.json
    • Building a RESTful CRUD Web Service
      • 1. Integration Setup
      • 2. Vault Setup
      • 3. Create Web Service Endpoints
      • 4. Execute Web Service Endpoints with Vault Methods
      • 5. Vault Code Examples and Explanation
    • Building a Retrieval API against FIS CodeConnect
      • 1. Integration Setup
      • 2. Service Request Setup
      • 3. Field Mapping Setup
      • 4. Integration and Service Request Hook Setup
      • 5. Testing the Integration
      • 6. Common Errors
    • What is Pre-Mapping?
      • Before you start
      • Bookmarks
      • Source and Targets
      • Field Mapping Status
      • Field Mapping Comments
      • Summary
  • How-To Guides
    • How to Run an Integration from Glyue
    • How to Invite New Users
    • How to Create a Value Mapping Set
    • How to Build and Deploy a Custom Frontend
    • How to Migrate an Integration
    • How to Set Up Single Sign On (SSO)
      • Glyue Setup
      • JumpCloud Setup
      • Azure Setup
      • Okta Setup
      • Glyue SAML Config Reference
    • How to Install the Glyue App for Zoom Contact Center
    • How to use the Vault
  • Reference
    • Integration Builder Page
    • Integration Anatomy
    • Integration Components
      • Integration
      • Service Request
      • Field Mapping
      • Value Mapping Set
      • Value Mapping
      • Validation Rule
      • Mask
      • Integration Config
      • Integration Engine Versions
    • Integration Lifecycle
    • Special Functions
      • add_run_label
      • callint
      • debug
      • end
      • get_namespace
      • humanize
      • import_helper
      • keep
      • list_files
      • map_value
      • open_glyuefile
      • open_vault
      • Data Manipulation Utilities
      • calladapter
    • Special Variables
      • __adapter_config__
      • input
      • parentint
      • retvalue
      • run_history_id
      • Iterables
        • fitem/fidx
        • sritem/sridx
        • vritem/vridx/vrmsg
    • Adapters
      • Generic HTTP Adapter
      • Email SMTP Adapter
    • Web Service Endpoints
    • Vault Reference
  • Glyue Platform Reference
    • Banking Core Connectivity Guide
    • Authentication
    • Permissions
      • Service Accounts
      • Organizations
    • Frontends
    • Idempotency Layer
    • Integration Scheduler
    • Governance Reports
    • Arbitrary Integration Request Content Support
    • Admin Components
    • Logging
  • ETL
    • Glyue ETL Overview
    • Data Connectors
    • Workflows
    • Run History
    • Scheduler
Powered by GitBook
On this page
  • Adapter Config
  • Field Mappings

Was this helpful?

  1. Reference
  2. Adapters

Generic HTTP Adapter

This is a generic HTTP adapter that can connect with a variety of different systems using the Python requests library.

Adapter Config

Field
Description
Example

Host

REQUIRED | Host of web server (note: web server is expected to use “https”).

The adapter assumes HTTPS is to be used. Unsecure HTTP is not supported.

Do not include any path components besides the domain name of the host (use www.example.com not https://www.example.com/some/path)

www.example.com

Basic Auth Username

OPTIONAL | Username for authenticating with remote host.

test-user

Basic Auth Password

OPTIONAL | Password for authenticating with remote host.

*********

Server Auth Cert

OPTIONAL | Certificate used to verify the identity of the remote server.

Certificates can come in many filetypes: .der, .cer, .crt, .cert, .pem, .p12, .pfx

Password protected .pfx / .p12 certificates are not currently supported.

server_certificate.cer

Client Auth Cert

OPTIONAL | Certificate used to verify the identity of the requestor (Glyue) to the remote server.

client_certificate.pem

Timeout Seconds

REQUIRED | The number of seconds before the connection should time out. Min 1, max 120, default 60.

60

Field Mappings

Field
Description
Example

url_path

REQUIRED | str | URL path to use with host.

'/test/example'

method

REQUIRED | str | HTTP method to use in request.

'POST'

body

OPTIONAL | multiple types | Payload in the request.

Setting a dict as the value will make the adapter set the Content-Type header to application/x-www-form-urlencoded.

To send JSON data, import the json module and use json.dumps(value).

JSON: json.dumps({'key': "value"})

Form data: {'key': "value"}

params

OPTIONAL | dict | Key-value pairs to send as query parameters.

{'search': "foo", 'page': "3"}

params.search : "foo"

params.page : "3"

Resulting URL: https://www.example.com/url/path?search=foo,page=3

headers

OPTIONAL | dict | Key-value pairs representing headers for the request.

Consider using the Content-Type header to tell the remote host the type of content you are sending and/or the Accept header to tell the remote server what type of content you are willing/able to receive.

Hyphens do not work with dot.notation so please use ['bracket-notation'] in this case.

References

headers['Content-Type'] : "application/json"

headers.Accept : "application/octet-stream"

auth

OPTIONAL | tuple | Username and password used for basic authentication.

This overrides the Adapter Config Basic Auth Username and Password and should only be used in special circumstances.

('username', 'p@$$w0rd')

force_response_content_type

OPTIONAL | str | Force the adapter to parse the response content in a certain way.

If not specified, the adapter dynamically parses the response according to its Content-Type header. This optional field is likely unnecessary, but is nonetheless available for unique circumstances that may arise.

  • "json" | Adapter will parse the response as JSON, regardless of the response Content-Type header.

    • Returns JSON-like Python object, usually dict, list, but possibly str, int or float.

  • "xml" | Adapter will parse the response as XML, regardless of the response Content-Type header.

    • Returns a dict representing the XML data structure, following the same standard as most (if not all) Glyue XML adapters.

  • "text" | Adapter will parse the response as plaintext, regardless of the response Content-Type header.

    • Returns a str.

  • "bytes" | Adapter will parse the response as binary data, regardless of the response Content-Type header.

    • Returns bytes

Using "json" will call the requests Response.json() method when parsing the response, and will raise an exception if the response is not valid JSON, causing the Service Request to fail.

Using "xml" will call the django_glyue_app.utils.xml_to_adapter_payload() method when parsing the response, and will raise an exception if the response is not valid XML, causing the Service Request to fail.

Using "text" or "bytes" should never raise an exception, and generally safe to use in all circumstances.

"json"

"xml"

"text"

"bytes"

Additional Information:

the adapter attempts to parse the relevant content for the user based on the ‘content-type’ response header. These align with the force_response_content_type on the field mappings.

PreviousAdaptersNextEmail SMTP Adapter

Last updated 1 year ago

Was this helpful?

,

For more info, please see on requests Basic Authentication features.

{
  'Content-Type': "application/xml",
  'Accept': "application/xml",
  'Some-Custom-Header': "Some custom value"
}
Mozilla docs: HTTP authentication - Basic authentication scheme
Mozilla docs: Content-Type
Mozilla docs: Accept
Mozilla docs: Common MIME types (Content Types)
Mozilla docs: HTTP Content negotiation
Mozilla docs: HTTP headers
the documentation