JDBC Driver for Marketo

Build 22.0.8462

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for Marketo consists of three basic steps:

  • Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
  • Provide the driver class. For example:
    cdata.jdbc.marketo.MarketoDriver
  • Provide the JDBC URL. For example:
    jdbc:marketo:Schema=REST;RESTEndpoint=https://MyMarketoUrl/rest;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;
    
    or
    
    jdbc:cdata:marketo:Schema=REST;RESTEndpoint=https://MyMarketoUrl/rest;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;

    The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:marketo:" or "jdbc:cdata:marketo:" and can include any of the connection properties in name-value pairs separated with semicolons.

Both the REST and SOAP APIs are supported and can be chosen using the Schema property.

Connecting to the Marketo REST API

Before you can connect to the Marketo REST API, you will need to create a custom service.

Creating a Custom Service

To create a custom service, follow the procedure below:

  1. Navigate to the admin area of your Marketo application.
  2. Click Users & Roles in the Security section.
  3. Select the Roles tab and click New Role to create a new Role.
  4. Enter a Role Name and select the permissions for the Role. The Access API permissions are specific to the REST API.
  5. Now that an API Role is created, select the Users tab and click Invite New User.
  6. Enter the new user information and select the role that was just created with API access. The API Only option can be selected to denote the user as an API Only user.
  7. Now that a new user has been created, a new service will need to be created. Click the LaunchPoint option (Admin -> Integration -> LaunchPoint).
  8. Click New Service.
  9. Select the Custom service type and enter a display name and description.
  10. Select the user you created.

Obtaining OAuth Credentials

To obtain the OAuthClientId and OAuthClientSecret, navigate to the LaunchPoint option on the Admin area.

Click the View Details link for the desired service. A window containing the authentication credentials is displayed.

Authenticating to the REST API

Once you have created a custom service and obtained your OAuth credentials, set the following to connect to data:

  • Schema: Set this to REST.
  • OAuthClientId: The OAuth Client ID associated with your custom service.
  • OAuthClientSecret: The OAuth Client Secret associated with your custom service.
  • RESTEndpoint: The URL of the REST Web service endpoint. This can be found on your Marketo Admin area on the Integration -> Web Services option in the REST API section.

    The Identity Endpoint will not be needed.

Connecting to the Marketo SOAP API

To connect to the SOAP API, you will need to provide valid Marketo credentials. Specify the following to connect to data:

  • Schema: Set this to SOAP.
  • UserId: The client access ID is found within your Marketo admin SOAP API panel under Integration.
  • EncryptionKey: The Marketo SOAP API Encryption Key. This key is generated on the Admin page of the Marketo website.
  • SOAPEndpoint: The URL of the SOAP Web service endpoint, provided by Marketo on the Admin page of the Marketo website.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462