ImpulseSync™ User Manual
HomePricingContact Us
  • Introduction
    • What is Impulse?
  • Crash Course of ImpulseSync
    • Overview Of ImpulseSync
    • Step 1: Endpoints
      • Endpoint Configuration
    • Step 2: Jobs
      • Job Configuration
      • Step 2a: Content manipulators
      • Step 2b: Content mapper
    • Step 3: Syncing
  • Getting Started
    • Core Concepts
    • Creating Endpoints
    • Creating Jobs
    • Starting a Transaction
    • Transaction Reports
    • Automating Jobs with Pipelines
    • Scripting Post Sync
    • Scheduling Jobs and Pipelines
    • Dashboard
    • Managing Jobs/Pipelines
    • Content Mapper
      • Aligning Mismatched Content
      • Connector Matrix
      • Locked Fields
      • Content Aligner
      • Aligning Content Challenges
  • Reports
    • Reports Screen
    • Debug Report
    • Messages
  • Connectors
    • Common Job Options
    • All Connectors List
    • Source Connectors
      • Contentful
      • Contentstack
      • dotCMS
      • Drupal v7
      • Drupal v9
      • GitHub
      • GraphQL
      • MS Teams
      • SCP
      • Snapshot
      • Strapi v3
      • Strapi v4
    • Destination Connectors
      • Contentful
      • Contentstack
      • dotCMS
      • SCP
      • Strapi v3
      • Strapi v4
  • Content Manipulators
    • Common Manipulator Options
    • Add Replace Field
    • AI(Artificial intelligence)
    • Change ID Manipulator
    • CSV Store Manipulator
    • Dynamic Job Store Manipulator
    • File to Text
    • Folder Manipulator
    • Get and Set Field
    • Language
    • Liquid Field
      • Liquid On the Quick
      • Basics
        • Impulse Values
        • Impulse Variables
        • Operators
        • Truthy and falsy
        • Types
        • Whitespace control
      • Tags
        • Control flow
        • Impulse Content Objects
        • Iteration
        • Utility
        • Variable
      • Filters
        • abs
        • append
        • capitalize
        • ceil
        • compact
        • concat
        • date
        • date_str
        • default
        • divided_by
        • downcase
        • escape
        • escape_once
        • first
        • floor
        • getStoredValue
        • htmlQuery
        • htmlReplace
        • idMap
        • join
        • jq
        • json
        • last
        • lstrip
        • map
        • minus
        • modulo
        • newline_to_br
        • plus
        • prepend
        • remove
        • remove_first
        • replace
        • replace_first
        • reverse
        • round
        • rstrip
        • section
        • sections
        • size
        • slice
        • sort
        • sort_natural
        • split
        • str_to_date
        • strip
        • strip_html
        • strip_newlines
        • times
        • truncate
        • truncatewords
        • type
        • uniq
        • upcase
        • utl_decode
        • url_encode
      • Liquid Playground
    • Markdown
    • Regex
    • Relationship
    • Store Field
    • Tidy
  • Time Machine
    • Snapshot
    • Viewing Snapshots
    • Delivery from Snapshots
  • Cookbook Recipes
    • Adding Fields
    • Aligning Content between Endpoints
    • Avoid overriding Fields
    • Avoid syncing Content Types
    • Combing Fields
    • Default Field Value
    • File (.doc) to Structured Content
    • File (.docx) to Structured Content - Expanded
    • HTML to Structured Content
    • Language (Locale) mismatch between endpoints
    • Paths/IDs Changed
    • Reference to Value
    • Single Content Type to Multiple
    • Splitting Content with Reference
    • Syncing Content with Languages
    • Text Select to Boolean
    • Text to Reference
    • Text to Reference - liquid
    • Two Sources to One Destination
    • Changing a folder path
    • Combining data between content types
    • Converting HTML Sections
    • JSON object to reference
    • Use CSV to convert values
    • Storing fields with Store field motator
  • Troubleshooting
    • What to do if I run into a Job Problem
    • Troubleshooting via UI
    • Submitting a ticket
  • Using Impulse Headlessly
    • Getting Started with cURL
      • Creating Endpoints
      • Creating Jobs
      • Starting a Transaction
      • Transaction Reports
      • Automating Jobs with Pipelines
      • Scheduling Jobs and Pipelines
      • Aligning Mismatched Content
      • Scripting Post Sync
  • Organization Tier Restrictions
  • Content Storage Options
Powered by GitBook
On this page
  • Unsupported
  • Getting Endpoint IDs
  • Saving a Job
  • Getting Job Options
  1. Using Impulse Headlessly
  2. Getting Started with cURL

Creating Jobs

PreviousCreating EndpointsNextStarting a Transaction

Last updated 2 years ago

Unsupported

Jobs can only have a single source. Jobs with more than one source will not sync content and run forever. Transactions started with this job configuration should be canceled. We intend to add support for multiple jobs in the future.

Getting Endpoint IDs

To save a job, you will need all the endpoint IDs you want to use in the job. If you do not have all the endpoint IDs already saved you can use the to view all endpoints and find the endpoint you want to use.

curl --location -g --request GET '{{impulse-protocol}}://{{impulse-domain}}:{{impulse-port}}/private/endpoint-depot/endpoints'

From this response, you can identify the endpoints by their name, which is unique. In addition you can view the contentRepo to determine what connector the endpoint is associated with.

The connectorId returned in the response can be used to find the job options for the connector.

Saving a Job

To save a job you will need to use the .

To save a job the payload will require a few attributes:

  • name

    • The name of the job.

    • Must be unique

  • endpoints

    • The list of endpoints to be used by the job. This is an array of endpoint objects

Jobs can also have the following attributes:

  • type

    • Type of job.

    • We currently only support "manual" value

  • active

    • Determines if the job is active or not.

  • description

    • A description of the job

Each endpoint object requires the following attributes:

  • endpoint.id

    • The ID of the endpoint to be used

  • type

    • The type of the endpoint.

    • Either "source" or "destination"

  • detail

    • The job options for the endpoint

    • Comma separated string of job options following key:value notation.

For this example we will save a job with a source dotCMS endpoint and a destination dotCMS endpoint.

curl --request POST '{{impulse-protocol}}://{{impulse-domain}}:{{impulse-port}}/private/job-depot/jobs' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "dotCMS-to-dotCMS-contentType",
  "type": "manual",
  "description": "dotCMS to dotCMS job using Content Type",
  "active": true,
  "endpoints": [
    {
      "endpoint": {
        "id": "{{source-endpoint-id}}"
      },
      "type": "source",
      "detail": "contentType:webPageContent,contentDependencies:true,dependenciesDepth:4"
    },
    {
      "endpoint": {
        "id": "{{destination-endpoint-id}}"
      },
      "type": "destination",
      "detail": "contentType:webPageContent,contentDependencies:true,dependenciesDepth:4"
    }
  ]
}'

The response returned after the job is saved will contain the job ID. You will need to make note of this ID and use it in later API to start a transaction.

Getting Job Options

Using the connectorId from the endpoint response you can make a call like the following.

curl --request GET '{{impulse-protocol}}://{{impulse-domain}}:{{impulse-port}}/public/connector-depot/connectors/{{connector-id}}

From this response you can view the jobOptions array. Based on if the endpoint is a source or destination, the available job options are listed with the connectorType "Read" or "Write" respectively.

{
    "id": "12dcb152-51b5-422a-b2f3-615dd3387fbd",
    "name": "dotcms-connector",
    "description": "Connector for dotCMS",
    "active": true,
    "level": 3,
    "versionRanges": [
        {
            "startVersion": "5.2.7",
            "endVersion": "5.3.3"
        }
    ],
    "jobOptions": [
        {
            "connectorType": "Read",
            "jobOptions": {
                "options": [
                    {
                        "name": "path",
                        "dataType": "Array",
                        "required": false
                    },
                    {
                        "name": "contentType",
                        "dataType": "Array",
                        "required": false
                    },
                    {
                        "name": "dependenciesDepth",
                        "dataType": "Integer",
                        "defaultValue": "1",
                        "required": false
                    },
                    {
                        "name": "systemObjects",
                        "dataType": "Boolean",
                        "defaultValue": "false",
                        "required": false
                    },
                    {
                        "name": "contentDependencies",
                        "dataType": "Boolean",
                        "defaultValue": "false",
                        "required": false
                    }
                ]
            }
        },
        {
            "connectorType": "Write",
            "jobOptions": {
                "options": [
                    {
                        "name": "path",
                        "dataType": "Array",
                        "required": false
                    },
                    {
                        "name": "contentType",
                        "dataType": "Array",
                        "required": false
                    },
                    {
                        "name": "dependenciesDepth",
                        "dataType": "Integer",
                        "defaultValue": "1",
                        "required": false
                    },
                    {
                        "name": "systemObjects",
                        "dataType": "Boolean",
                        "defaultValue": "false",
                        "required": false
                    },
                    {
                        "name": "contentDependencies",
                        "dataType": "Boolean",
                        "defaultValue": "false",
                        "required": false
                    },
                    {
                        "name": "location.path",
                        "dataType": "Text",
                        "required": false
                    },
                    {
                        "name": "location.site",
                        "dataType": "Text",
                        "required": false
                    }
                ]
            }
        }
    ]
}

In this response you can see the various keys available for job options as well as the data type. For example, the source connector has the job option contentType which is a data type "Array". While the destination connector has the job option location.path which is a data type "Text".

This response can be used to find the keys of the job options to set and in the details for the endpoint in the job.

Data Types

A job option can have the following data types.

  • Text

    • String value.

    • key:myvalue

  • Integer

    • Whole number value

    • key:4

  • Decimal

    • Decimal number value

    • key:4.2

  • Boolean

    • Boolean value

    • key:true

  • Array

    • Multiple string key:values

    • key:myvalue,key:myothervalue

To get the possible job options for a connector to set in the job payload endpoints.detail, you can view the for the chosen connector to view details about the job options. As well as use the to know the key value to use.

endpoint-depot API
job-depot API
connector doc
connector-depot API