JDBC Driver for Trello

Build 21.0.7930

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 Trello 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.trello.TrelloDriver
  • Provide the JDBC URL. For example:
    jdbc:trello:APIKey=myApiKey;Token=myGeneratedToken;
    
    or
    
    jdbc:cdata:trello:APIKey=myApiKey;Token=myGeneratedToken;

    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:trello:" or "jdbc:cdata:trello:" and can include any of the connection properties in name-value pairs separated with semicolons.

Trello uses token-based authentication to grant third-party applications access to their API. When a user has granted an application access to their data, the application is given a token that can be used to make requests to Trello's API. Trello's API can be accessed in 2 different ways. The first is using Trello's own Authorization Route, and the second is using OAuth1.0.

Authenticate using the Trello Authorization Route

At the moment of registration, Trello assigns an API key and Token to the account.

Note: Set AuthScheme to Token to activate this authentication method.

At the moment of registration, Trello assigns an API key and Token to the account. We can retrieve this API key after logging in to Trello and visiting https://trello.com/app-key. After obtaining your API key, you can use it to obtain a Token by visiting https://trello.com/1/authorize?expiration=never&name=MyPersonalToken&scope=read&response_type=token&key={Key} and replacing {key} with the obtained API key. After visiting the page, you can authorize the application to use your account by clicking the allow button. You'll be redirected to a page with your token. To make requests to Trello's API you will need both API key and Token.

Note: You can change the expiration time of the token by changing expiration= with one of the following values (1hour, 1day, 30days, never).

Set:

  • APIKey: The key found at https://trello.com/app-key
  • Token: The token obtained

Authenticate using OAuth

Note: Set AuthScheme to OAuth to activate this authentication method.

Similar to using Authorization, OAuth creates an Application Id and Secret when you create your account. See Using OAuth Authentication for information on how to to connect.

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 21.0.7930