Skip to end of metadata
Go to start of metadata

Introduction

HTTP activities interact with an HTTP connection to read or write data as a source or target in an operation or a script. After configuring an HTTP connection, you can configure as many HTTP activities as you like for each HTTP connection. HTTP activities can be configured to use standard methods such as GET, PUT, POST, or DELETE, or they can be configured to use a custom action. 

Whether the activity can be used as a source or a target in an operation or a script depends on the specific web service and the request and response structures, if present. For more information about what determines if an activity can be used as a source or target, see Parts of an Operation in Operation Creation and Configuration.

Creating an HTTP Activity

From the design canvas, open the Connectivity tab of the design component palette:

Within the Endpoints filter, click the HTTP connection block to display activities that are available to be used with an HTTP connection:

To create an activity that can be configured, the activity must first be added to an operation on the design canvas. To add an activity to an operation, drag the activity block from the palette to the operation.

For more information about the parts of an operation and adding activities to operations, see Operation Creation and Configuration.

Accessing Menu Actions

After an HTTP activity has been added to an operation, menu actions for that activity are accessible from the project pane in both the Workflows and Components tabs, and from the design canvas:

  • Project Pane: In the Workflows or Components tab of the project pane, hover over an activity name and click the actions menu icon  to open the actions menu.

  • Design Canvas: Within the operation, click an existing activity block to open the actions menu.

Each of these menu actions is available:

  • View/Edit: This opens the activity configuration screen for you to configure the activity. For details, see Configuring an HTTP Activity later on this page.
  • Delete: This is used to permanently delete the activity (see Component Dependencies, Deletion, and Removal).
  • Rename: This positions the cursor on the activity name in the project pane for you to make edits.
  • View Dependencies: This changes the view in the project pane to display any other parts of the project that the activity is dependent on (see Component Dependencies, Deletion, and Removal).
  • Remove: Available only from the actions menu on the design canvas, this removes the activity as a step in the operation without deleting it from the project. When you remove an activity that is adjacent to a transformation, if schemas are provided within that activity, they will no longer be referenced by the transformation. Removed components can be accessed or permanently deleted from the project pane (see Component Dependencies, Deletion, and Removal).
  • Deploy: This deploys the activity and any components it is dependent on (see Component Deployment).
  • Configurable Deploy: This opens the deployment screen, where you can select project components to deploy (see Component Deployment).
  • Add to group: This opens a prompt to create a new custom group or to add the component to an existing group. Custom groups are an organizational tool to help organize a project (see Component Groups).
  • Duplicate: This creates a copy of the activity as a new, unreferenced component. Upon creating the component copy, the cursor is positioned on the component name within the project pane for you to rename the component.

Configuring an HTTP Activity

Follow these steps to configure an HTTP activity, including GET, PUT, POST, DELETE, or custom action:

Step 1 – Enter Basic Information

TIP: Fields with a variable icon support using global variablesproject variables, and Jitterbit variables. Begin typing an open square bracket [ into the field or click the variable icon to display existing variables to choose from.

  • Name: Enter a name to use to identify the HTTP activity. The name must be unique for each HTTP GET, PUT, POST, DELETE, or custom activity and must not contain forward slashes (/) or colons (:).
  • HTTP Verb: Use the dropdown to select from GET, PUT, POST, or DELETE. This dropdown is not present for an HTTP custom activity.

    NOTE: For an HTTP POST used as a source, an empty request is posted to the URL and the response is used as the source. 

    For an HTTP POST used as a target, virtually any type of payload can be included, but must be understood by the web server that is receiving it. A response is returned based on the HTTP request and is parsed by Jitterbit Harmony. If the response indicates success, nothing more is done. If an error message is received, it is used as part of the error logging process for the operation and is reported in operation logs.

  • Custom Verb: Enter the custom verb (for example, PATCH) into the text box. This field is present only for an HTTP custom activity.
  • Path: Enter a path and/or query parameters that should be appended to the base URL that was specified in the configuration of the HTTP connection. If providing query parameters, specify them as you would in a web browser, such as /queryrecord?id=10.
  • URL: The URL created as a concatenation of the base URL and the path entered above is provided for reference. To edit the URL, make changes either to the base URL in the HTTP connection or to the path entered above.
  • Request Parameters: Click the Add button to add a line and then enter a specific Name and Value for requested parameters. Click the Remove button to remove an existing line.
  • Request Headers: Click the Add button to add a line and then enter a specific Name and Value for requested header information. Click the Remove button to remove an existing line.

  • Save & Exit: Click this button to save the configuration for this step and close the activity configuration.
  • Next: Click Next to save the configuration for this step and continue to the next step.
  • Discard Changes: After making changes to this step, click Discard Changes to close the configuration without saving changes to this step. A message will ask you to confirm that you want to discard changes.

Step 2 – Provide the Request Schema

  • Provide Request Schema: The request schema defines the structure of request data that will be used by the HTTP activity. Whether a request schema is required depends on if the activity will be used as the target of a transformation and if the web service expects structured request data (see When to Use a Schema). For instructions on completing this section of activity configuration, refer to Schemas Defined in an Activity.

    NOTE: As an alternative to providing a schema during activity configuration, you can define a schema directly within a transformation (see Schemas Defined in a Transformation). File schemas defined directly in a transformation take precedence over those configured as part of an activity.
  • Back: Click Back to save the configuration for this step and return to the previous step.
  • Next: Click Next to save the configuration for this step and continue to the next step.
  • Discard Changes: After making changes to this step, click Discard Changes to close the configuration without saving changes to this step. A message will ask you to confirm that you want to discard changes.

Step 3 – Provide the Response Schema

  • Provide Response Schema: The response schema defines the structure of response data that will be used by the HTTP activity. Whether a response schema is required depends on if the activity will be used as the source of a transformation and if the web service returns structured response data (see When to Use a Schema). For instructions on completing this section of activity configuration, refer to Schemas Defined in an Activity.

    NOTE: As an alternative to providing a schema during activity configuration, you can define a schema directly within a transformation (see Schemas Defined in a Transformation). File schemas defined directly in a transformation take precedence over those configured as part of an activity.
  • Back: Click Back to save the configuration for this step and return to the previous step.
  • Next: Click Next to save the configuration for this step and continue to the next step.
  • Discard Changes: After making changes to this step, click Discard Changes to close the configuration without saving changes to this step. A message will ask you to confirm that you want to discard changes.

Step 4 – Review Data Schema

  • Data Schema: If provided during activity configuration, the request and/or response data schemas are displayed. If the operation uses a transformation, the data schemas will be displayed again later during the transformation mapping process, where you can map to target fields using source objects, scripts, variables, custom values, and more. You can also define schemas directly in a transformation.

  • Add Plugin(s): Plugins are Jitterbit- or user-provided applications that extend Harmony's native capabilities. To apply a plugin to the activity, click to expand this section and select the checkbox next to the plugin to be used. For additional instructions on using plugins, including details on setting any required variables used by the plugin, see Plugins Added to an Activity.

  • Back: Click Back to save the configuration for this step and return to the previous step.
  • Finished: Click Finished to save the configuration for this step and close the activity configuration.
  • Discard Changes: After making changes to this step, click Discard Changes to close the configuration without saving changes to this step. A message will ask you to confirm that you want to discard changes.

Jitterbit Variables Affecting HTTP Submission

The Jitterbit Harmony system defines certain global variables that are always available throughout a project, known as Jitterbit variables or as predefined global variables. The Jitterbit variables listed below are particularly useful for HTTP activities. For more information on using Jitterbit variables, see Jitterbit Variables.

These Jitterbit variables affect the way HTTP source submissions are performed:

These Jitterbit variables affect the way HTTP target submissions are performed:

Next Steps

After configuring an HTTP activity, you can use it within an operation or script as described below. You may also want to configure chunking to split the data into smaller chunks for processing.

Completing the Operation

After configuring an HTTP activity, complete the configuration of the operation by adding and configuring other activitiestransformations, or scripts as operation steps (see Operation Creation and Configuration). You can also configure an operation's operation settings, which include the ability to chain operations together that are in the same or different workflows (see Operation Settings).

The operation patterns that HTTP activities can be used with depend on whether the activity provides data (as a source) or receives data (as a target) in an operation. 

HTTP activities used as a source can be used with these operation patterns:

  • Archive Pattern
  • Transformation Pattern
  • Two-Target Archive Pattern
  • Two-Target Transformation Pattern
  • Salesforce Bulk Target Pattern

HTTP activities used as a target can be used with these operation patterns:

  • Archive Pattern
  • Transformation Pattern
  • Script Pattern
  • Two-Target Archive Pattern (as either the first or second target)
  • Two-Target Transformation Pattern (as the second target only)
  • Salesforce Bulk Source Pattern

For validation rules and operation patterns, see Operation Validity.

One common application is in an operation chain. This example shows one operation being used to retrieve a REST token and write that response to a global variable for use in a downstream operation:

When ready, deploy and run the operation (see Operation Deployment and Execution) and validate behavior by checking the operation logs (see Operation Logs).

Using HTTP Activities in Scripts

HTTP activities that have already been configured as part of an operation can also be referenced in a script for use with certain script functions that use a sourceId or targetId as a parameter. For example:

To add a configured HTTP activity to a script to be referenced by one of these functions, drag the configured activity from the Endpoints tab of the script component palette to the script. Or, if you already know the function you want to use, add it from the Functions tab first; then position the cursor after the opening parenthesis of the function and press Control+Space to display a list of autocomplete suggestions. Select an activity to insert the activity reference into the script.

For more details on referencing activities in scripts, see Endpoints on the Jitterbit Script page.

Using Chunking

Many web service APIs have size limitations. If you are running into record limits imposed by the API, you may want to use chunking to split the source data into multiple chunks. The transformation is then performed on each chunk separately, with each source chunk producing one target chunk. The resulting target chunks combine to produce the final target.

For instructions and best practices on using chunking, see Operation Options.

On This Page

Last updated:  Nov 20, 2019

  • No labels