Tableau Favorites API

Add and remove content items from a user's list of favorites, including workbooks, views, data sources, projects, and flows.

OpenAPI Specification

tableau-favorites-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: 3.24.0
  title: Tableau REST Authentication Favorites API
  description: The Tableau REST API allows you to manage and change Tableau Server and Tableau Cloud resources programmatically using HTTP. You can use the REST API to manage sites, projects, workbooks, views, data sources, users, groups, permissions, schedules, subscriptions, and more.
  license:
    name: Proprietary
    url: https://www.tableau.com/legal
  termsOfService: https://www.tableau.com/legal
  contact:
    name: Tableau Developer Support
    url: https://www.tableau.com/support
servers:
- url: https://{server}/api/{api-version}
  description: Tableau Server or Tableau Cloud
  variables:
    server:
      default: 10ax.online.tableau.com
      description: The hostname of your Tableau Server or Tableau Cloud site. For Tableau Cloud, use the pod URL (e.g., 10ax.online.tableau.com). For Tableau Server, use your server hostname.
    api-version:
      default: '3.24'
      description: The version of the REST API to use. The API version corresponds to the version of Tableau Server or Tableau Cloud.
      enum:
      - '3.24'
      - '3.23'
      - '3.22'
      - '3.21'
      - '3.20'
      - '3.19'
security:
- TableauAuth: []
tags:
- name: Favorites
  description: Add and remove content items from a user's list of favorites, including workbooks, views, data sources, projects, and flows.
paths:
  /sites/{site-id}/favorites/{user-id}:
    get:
      operationId: getFavorites
      summary: Tableau Get Favorites for User
      description: Returns a list of favorite items for the specified user.
      tags:
      - Favorites
      parameters:
      - $ref: '#/components/parameters/SiteId'
      - $ref: '#/components/parameters/UserId'
      responses:
        '200':
          description: A list of the user's favorite items.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FavoritesResponse'
              examples:
                Getfavorites200Example:
                  summary: Default getFavorites 200 response
                  x-microcks-default: true
                  value:
                    favorites:
                      favorite:
                      - label: Example Title
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      operationId: addFavorites
      summary: Tableau Add Favorites
      description: Adds the specified content to a user's favorites. You can add workbooks, views, data sources, projects, and flows.
      tags:
      - Favorites
      parameters:
      - $ref: '#/components/parameters/SiteId'
      - $ref: '#/components/parameters/UserId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddFavoriteRequest'
            examples:
              AddfavoritesRequestExample:
                summary: Default addFavorites request
                x-microcks-default: true
                value:
                  favorite:
                    label: Example Title
                    workbook:
                      id: abc123
                    view:
                      id: abc123
                    datasource:
                      id: abc123
                    project:
                      id: abc123
      responses:
        '200':
          description: Favorite was added successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FavoritesResponse'
              examples:
                Addfavorites200Example:
                  summary: Default addFavorites 200 response
                  x-microcks-default: true
                  value:
                    favorites:
                      favorite:
                      - label: Example Title
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    FavoritesResponse:
      type: object
      properties:
        favorites:
          type: object
          properties:
            favorite:
              type: array
              items:
                type: object
                properties:
                  label:
                    type: string
                    description: The label for the favorite.
                  workbook:
                    $ref: '#/components/schemas/Workbook'
                  view:
                    $ref: '#/components/schemas/View'
                  datasource:
                    $ref: '#/components/schemas/DataSource'
                  project:
                    $ref: '#/components/schemas/Project'
          example: example_value
    Project:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the project.
          example: abc123
        name:
          type: string
          description: The name of the project.
          example: Example Title
        description:
          type: string
          description: A description of the project.
          example: A sample description.
        parentProjectId:
          type:
          - string
          - 'null'
          description: The ID of the parent project. If null, this is a top-level project.
          example: '500123'
        contentPermissions:
          type: string
          enum:
          - LockedToProject
          - ManagedByOwner
          - LockedToProjectWithoutNested
          description: The permissions model for the project.
          example: LockedToProject
        createdAt:
          type: string
          format: date-time
          description: The date and time the project was created.
          example: '2026-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          description: The date and time the project was last updated.
          example: '2026-01-15T10:30:00Z'
        owner:
          type: object
          properties:
            id:
              type: string
              description: The ID of the project owner.
          example: example_value
        topLevelProject:
          type: boolean
          description: Whether this is a top-level project.
          example: true
    AddFavoriteRequest:
      type: object
      properties:
        favorite:
          type: object
          required:
          - label
          properties:
            label:
              type: string
              description: The label for the favorite.
            workbook:
              type: object
              properties:
                id:
                  type: string
            view:
              type: object
              properties:
                id:
                  type: string
            datasource:
              type: object
              properties:
                id:
                  type: string
            project:
              type: object
              properties:
                id:
                  type: string
          example: example_value
    Tag:
      type: object
      properties:
        label:
          type: string
          description: The text of the tag.
          example: Example Title
    Workbook:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the workbook.
          example: abc123
        name:
          type: string
          description: The name of the workbook.
          example: Example Title
        description:
          type: string
          description: A description of the workbook.
          example: A sample description.
        contentUrl:
          type: string
          description: The URL name of the workbook, used in URLs to access the workbook.
          example: https://www.example.com
        webpageUrl:
          type: string
          format: uri
          description: The full URL to the workbook on the server.
          example: https://www.example.com
        showTabs:
          type: boolean
          description: Whether the workbook shows views as tabs.
          example: true
        size:
          type: integer
          description: The size of the workbook in bytes.
          example: 10
        createdAt:
          type: string
          format: date-time
          description: The date and time the workbook was created.
          example: '2026-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          description: The date and time the workbook was last updated.
          example: '2026-01-15T10:30:00Z'
        encryptExtracts:
          type: string
          description: Whether extracts in the workbook are encrypted.
          example: example_value
        defaultViewId:
          type: string
          description: The ID of the default view in the workbook.
          example: '500123'
        project:
          type: object
          properties:
            id:
              type: string
              description: The ID of the containing project.
            name:
              type: string
              description: The name of the containing project.
          example: example_value
        owner:
          type: object
          properties:
            id:
              type: string
              description: The ID of the workbook owner.
            name:
              type: string
              description: The name of the workbook owner.
          example: example_value
        tags:
          type: object
          properties:
            tag:
              type: array
              items:
                $ref: '#/components/schemas/Tag'
          example: example_value
        views:
          type: object
          properties:
            view:
              type: array
              items:
                $ref: '#/components/schemas/View'
          example: example_value
        usage:
          type: object
          properties:
            totalViewCount:
              type: integer
              description: The total number of times the workbook has been viewed.
          example: example_value
    View:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the view.
          example: abc123
        name:
          type: string
          description: The name of the view.
          example: Example Title
        contentUrl:
          type: string
          description: The URL name of the view.
          example: https://www.example.com
        createdAt:
          type: string
          format: date-time
          description: The date and time the view was created.
          example: '2026-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          description: The date and time the view was last updated.
          example: '2026-01-15T10:30:00Z'
        viewUrlName:
          type: string
          description: The URL-friendly name of the view used in the content URL.
          example: https://www.example.com
        sheetType:
          type: string
          enum:
          - worksheet
          - dashboard
          - story
          description: The type of sheet (worksheet, dashboard, or story).
          example: worksheet
        project:
          type: object
          properties:
            id:
              type: string
              description: The ID of the containing project.
            name:
              type: string
              description: The name of the containing project.
          example: example_value
        owner:
          type: object
          properties:
            id:
              type: string
              description: The ID of the view owner.
            name:
              type: string
              description: The name of the view owner.
          example: example_value
        workbook:
          type: object
          properties:
            id:
              type: string
              description: The ID of the containing workbook.
            name:
              type: string
              description: The name of the containing workbook.
          example: example_value
        tags:
          type: object
          properties:
            tag:
              type: array
              items:
                $ref: '#/components/schemas/Tag'
          example: example_value
        usage:
          type: object
          properties:
            totalViewCount:
              type: integer
              description: The total number of times the view has been accessed.
          example: example_value
    DataSource:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the data source.
          example: abc123
        name:
          type: string
          description: The name of the data source.
          example: Example Title
        description:
          type: string
          description: A description of the data source.
          example: A sample description.
        contentUrl:
          type: string
          description: The URL name of the data source.
          example: https://www.example.com
        type:
          type: string
          description: The type of data source (e.g., sqlserver, postgres, excel, hyper, etc.).
          example: example_value
        createdAt:
          type: string
          format: date-time
          description: The date and time the data source was created.
          example: '2026-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          description: The date and time the data source was last updated.
          example: '2026-01-15T10:30:00Z'
        isCertified:
          type: boolean
          description: Whether the data source is certified.
          example: true
        certificationNote:
          type: string
          description: The certification note for the data source.
          example: example_value
        useRemoteQueryAgent:
          type: boolean
          description: Whether the data source uses a remote query agent.
          example: true
        hasExtracts:
          type: boolean
          description: Whether the data source has extracts.
          example: true
        encryptExtracts:
          type: string
          description: Whether the data source extracts are encrypted.
          example: example_value
        project:
          type: object
          properties:
            id:
              type: string
              description: The ID of the containing project.
            name:
              type: string
              description: The name of the containing project.
          example: example_value
        owner:
          type: object
          properties:
            id:
              type: string
              description: The ID of the data source owner.
            name:
              type: string
              description: The name of the data source owner.
          example: example_value
        tags:
          type: object
          properties:
            tag:
              type: array
              items:
                $ref: '#/components/schemas/Tag'
          example: example_value
  parameters:
    UserId:
      name: user-id
      in: path
      required: true
      schema:
        type: string
      description: The ID of the user.
    SiteId:
      name: site-id
      in: path
      required: true
      schema:
        type: string
      description: The ID of the site. You can get the site ID from the response to the Sign In method.
  securitySchemes:
    TableauAuth:
      type: apiKey
      in: header
      name: X-Tableau-Auth
      description: The authentication token obtained from the Sign In method. Include this token in the X-Tableau-Auth header of all subsequent requests.
externalDocs:
  description: Tableau REST API Reference
  url: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm