Skip to content

Laravel package used to integrate Tableau Server and Cloud APIs

License

Notifications You must be signed in to change notification settings

Mrkbingham/laravel-tableau

Repository files navigation

Laravel interface for using Tableau APIs

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Laravel package that allows you to interact with Tableau Server and Tableau Cloud's APIs. This package provides a simple and flexible interface for interacting with the following APIs:

Requirements

  • Laravel 10.x or higher
  • PHP 8.2 or higher
  • Composer

Installation

You can install the package via composer:

composer require interworks/laravel-tableau

You can publish the config file with:

php artisan vendor:publish --tag="laravel-tableau-config"

This is the contents of the published config file:

return [
    'url'             => env('TABLEAU_URL', 'https://your-tableau-server.com'),
    'site_name'       => env('TABLEAU_SITE_NAME', ''),
    'product_version' => env('TABLEAU_PRODUCT_VERSION'),
    'credentials' => [
        'username' => env('TABLEAU_USERNAME', ''),
        'password' => env('TABLEAU_PASSWORD', ''),
        'site_id' => env('TABLEAU_SITE_ID', '')
    ],
    'token_name' => env('TABLEAU_TOKEN_NAME', ''),
];

NOTE: The product_version is not required, but will make an additional GET request prior to authorization. For performance considerations, either configure your product_version prior to initializing a new TableauAPI() class, or enter it into your published config file.

Usage

Initialize the API

use InterWorks\Tableau\TableauAPI;

$tableau = new TableauAPI();

Alternatively, you can override configuration dynamically if needed:

Config::set('tableau.server_url', 'https://my-new-server-url.com');
Config::set('tableau.credentials.pat_name', 'new_server_pat_name');
Config::set('tableau.credentials.pat_secret', 'new_server_pat_secret');

$tableau = new TableauAPI();

Authentication

You don't need to manually authenticate. The TableauAPI class automatically manages authentication tokens and reuses them as long as they remain valid.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Contributing

Feel free to fork this repository and submit pull requests. Make sure to add tests for new features or changes.

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin feature/my-new-feature).
  5. Open a pull request.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Laravel package used to integrate Tableau Server and Cloud APIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages