> ## Documentation Index
> Fetch the complete documentation index at: https://insightsoftware.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Custom Visual

> Requires DATA_ACCESS or READ permission on the source to create a visual. The visual will be created with the initial values based on the provided chart dimensions. The save parameter controls whether the visual is persisted to the gallery.



## OpenAPI

````yaml /simba-embedded-analytics/docs/self-service-analytics/26.3/api-swagger/ssa-api-docs-26-3.json post /api/v2/visuals
openapi: 3.1.0
info:
  title: Logi Composer Rest API
  description: >-
    The Composer REST API provides methods for retrieving, updating, and
    deleting Composer metadata. With the API endpoints, you can manage
    connections, data sources, accounts, groups, and users quickly and easily.


    ## Authentication


    This API supports the following authentication schemes:


    - **basicAuth** – HTTP Basic authentication using global administrator
    credentials (username and password). Required for most endpoints.

    - **trustedAccessAuth** – HTTP Basic authentication using Trusted Access
    client credentials. Use the **client ID** as the username and the **client
    secret** as the password. Required for Trusted Access token and session
    endpoints.

    - **bearerAuth** – HTTP Bearer token authentication. Supply a token
    previously obtained from a Trusted Access token endpoint
    (`/api/trusted-access/push/tokens` or `/api/trusted-access/pull/tokens`).
  contact:
    name: Logi Support
    url: https://help.insightsoftware.com
    email: logisupport@insightsoftware.com
  version: '1.0'
servers:
  - url: http://10.2.4.166:8080/composer
    description: Generated server url
security:
  - basicAuth: []
tags:
  - name: account-attributes
    description: Reserved Account attributes configuration
  - name: accounts
    description: Manage Accounts
  - name: accounts / admins
    description: Manage Account Administrators
  - name: accounts / users
    description: Manage Account Users
  - name: actions
    description: Manage Action Templates
  - name: activity
    description: Manages Activity Logging
  - name: alerts
    description: Manage Alerts
  - name: branding
    description: Manage branding configuration
  - name: branding-extentions
    description: Manage branding extensions (chart colors, etc.)
  - name: calendars
    description: (experimental) Manage calendars
  - name: comments
    description: Dashboard comments
  - name: connection-types
    description: Manage Connection Types
  - name: connections
    description: Manage Source Connections
  - name: connectors
    description: Manage Connectors
  - name: conversations
    description: Manage Workspace Conversations
  - name: customization
    description: Manage customization configuration
  - name: dashboard-conversion
    description: (experimental) Convert dashboards layout
  - name: dashboard-migration
    description: New Dashboards Migration API
  - name: dashboard-reports
    description: Manage Dashboard Reports
  - name: dashboard-sharing
    description: (experimental) Manage dashboard access level
  - name: dashboards
    description: Manage Dashboards
  - name: export
    description: Export Source Data
  - name: favorites
    description: Favorite Items
  - name: filter-sets
    description: Filter Visualizations Data
  - name: folders
    description: Manage folders
  - name: frontend / environment variables
    description: Get environment variables for frontend
  - name: global
    description: Manage global security configuration
  - name: group-membership
    description: Manages Group Membership
  - name: groups
    description: Manage User Groups
  - name: interactivity
    description: Dashboard interactivity
  - name: inventory
    description: Manage Composer Items
  - name: jobs
    description: List of available scheduler jobs
  - name: joins
    description: Manage joins metadata and suggestions
  - name: json-datasets
    description: Manage JSON datasets
  - name: kerberos
    description: Manage Kerberos Config
  - name: keyset
    description: Manage keysets
  - name: ldap
    description: Manage LDAP Configuration
  - name: license
    description: Manage Composer License
  - name: locale, currency, language
    description: Locale, currency, and language info
  - name: materialized-view
    description: (deprecated since 23.1) Manage Materialized Views
  - name: odata
    description: (experimental) Source Data Retrieval OData service
  - name: password-reset
    description: Self-service forgot-password flow
  - name: permissions
    description: Manage Permissions
  - name: Publish
    description: Publish Workspace Artifacts
  - name: quota
    description: Manage Quotas
  - name: recentlyAccessed
    description: Recently Accessed Elements
  - name: register
    description: User registration
  - name: saml
    description: Manage SAML
  - name: security
    description: Retrieve all sids info
  - name: self-service-reports
    description: Self Service Reports
  - name: sharing
    description: (experimental) Manage dashboard sharing
  - name: snapshots
    description: Create and manage entity snapshots
  - name: snippets
    description: (experimental) Manage snippets
  - name: sources
    description: Manage Sources
  - name: sources / cache-settings
    description: Manages sources cache settings
  - name: sources / custom-metrics
    description: Manage Source Custom Metrics
  - name: sources / dictionaries
    description: Manage Source Dictionaries
  - name: sources / fields
    description: Manage Source Fields
  - name: sources / global-settings
    description: Manages sources global settings
  - name: sources / migration
    description: Source Migration API
  - name: sources / preview and describe
    description: Source preview and describe
  - name: sources / raw data
    description: (experimental) Get source raw data
  - name: sources / security
    description: Manage Sources Security
  - name: sources / security / custom metrics
    description: (experimental) Manage Sources Custom Metric Security
  - name: sources / security / fields
    description: Manage Sources Fields Security
  - name: sources / security / row
    description: Manage Sources Row Security
  - name: sources / unique-key
    description: Manages sources unique key
  - name: sources / visual-types
    description: Manages source visual types
  - name: start-vis
    description: (experimental) Execute start-vis or meta request
  - name: stream
    description: Search stream sources
  - name: tags
    description: Manage tags
  - name: timezones
    description: Timezone Information
  - name: toggle
    description: Toggle Features
  - name: topics
    description: Manage topics
  - name: trusted-access-client
    description: Manage Trusted Access clients
  - name: trusted-access-session
    description: Manage user sessions via Trusted Access
  - name: trusted-access-token
    description: Manage Trusted Access tokens
  - name: uploads
    description: Manage Uploads
  - name: user
    description: Manage User
  - name: users
    description: Manage Users
  - name: users segregation
    description: Segregate users into tenants
  - name: version
    description: System version
  - name: visual-types
    description: Manage Visual Types
  - name: visuals
    description: Manage Visuals
  - name: visuals / migration
    description: New Visuals Migration API
  - name: workspaces
    description: Manage Workspaces
paths:
  /api/v2/visuals:
    post:
      tags:
        - visuals
      summary: Create Custom Visual
      description: >-
        Requires DATA_ACCESS or READ permission on the source to create a
        visual. The visual will be created with the initial values based on the
        provided chart dimensions. The save parameter controls whether the
        visual is persisted to the gallery.
      operationId: createCustomVisualForSource
      parameters:
        - name: save
          in: query
          description: Whether to persist the visual to the gallery. Defaults to false.
          required: false
          schema:
            type: boolean
            default: false
      requestBody:
        content:
          application/vnd.composer.v3+json:
            schema:
              $ref: '#/components/schemas/ChartDimensions'
        required: true
      responses:
        '200':
          description: The visual was created successfully
          content:
            application/vnd.composer.v3+json:
              schema:
                $ref: '#/components/schemas/VisualResource'
        '401':
          description: The user must be logged in
          content:
            application/vnd.composer.v3+json:
              schema:
                $ref: '#/components/schemas/VisualResource'
        '403':
          description: The user doesn't have privilege to perform the operation
          content:
            application/vnd.composer.v3+json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
components:
  schemas:
    ChartDimensions:
      type: object
      description: Defines a Custom Chart Dimensions
      properties:
        sourceId:
          type: string
          description: Source Id
          minLength: 1
        visualTypeId:
          type: string
          description: Visual Type Id
          minLength: 1
        visualName:
          type: string
          description: >-
            Visual Name. 'visualNamePrefix' is a deprecated alias, will be
            removed in 26.3
          minLength: 1
        description:
          type: string
          description: Visual Description
        tags:
          type: array
          description: tags
          items:
            type: string
          uniqueItems: true
        metrics:
          type: array
          description: Defines an metrics
          items:
            type: object
            additionalProperties:
              type: string
        dimensions:
          type: array
          description: Defines a group by
          items:
            type: object
            additionalProperties:
              type: string
        timeFilter:
          type: object
          additionalProperties:
            type: string
          description: Defines time filter
        filters:
          type: array
          description: Defines filter
          items:
            $ref: '#/components/schemas/Restriction'
        aggregateFilters:
          type: array
          description: Defines Aggregation Filters
          items:
            $ref: '#/components/schemas/AggregateRestriction'
        sortAndLimit:
          type: array
          description: Defines sort order and result limit for each dimension group.
          example:
            - groupByFieldName: status
              sortByFieldName: total_price
              sortDirection: desc
              aggregation: sum
              limit: 10
          items:
            $ref: '#/components/schemas/SortAndLimitConfig'
        conditionalFormatting:
          type: array
          description: Defines conditional formatting rules applied to rows or pivot cells.
          example:
            - condition:
                type: row
                filter:
                  path: customer_country
                  operation: IN
                  value:
                    - France
                    - Germany
              applyTo:
                type: fullRow
              format:
                type: single
                format:
                  style:
                    backgroundColor: '#bd10e0'
          items:
            $ref: '#/components/schemas/ConditionalFormattingRule'
        projectId:
          type: string
          description: >-
            Project ID where this visual is organized. This field is read-only
            and only.
          example: 2222
          readOnly: true
        folderId:
          type: string
          description: Optional folder ID for organizing the visual within a project.
          example: 1111
      required:
        - sourceId
        - visualName
        - visualTypeId
    VisualResource:
      type: object
      description: Defines a visual payload
      properties:
        id:
          type: string
          description: Defines a visual identifier
          readOnly: true
        visId:
          type: string
          deprecated: true
          description: >-
            (deprecated since 7.10, to be removed in 8.x. Use 'visualTypeId'
            instead) Defines a visual type identifier
        visualTypeId:
          type: string
          description: Defines a visual type identifier
        accountId:
          type: string
          description: Defines an account identifier
          readOnly: true
        description:
          type: string
          description: Defines a description
          maxLength: 750
          minLength: 0
        type:
          type: string
          description: Defines a visual type
        visualName:
          type: string
          description: Defines a visual name
          maxLength: 255
          minLength: 1
        source:
          $ref: '#/components/schemas/SourceDetailsResource'
          description: Defines source details
        controlsCfg:
          $ref: '#/components/schemas/ControlsConfigResource'
          description: Defines a controls configuration
        interactivityProfile:
          type: object
          additionalProperties:
            type: string
            enum:
              - I
              - RO
              - H
          description: Defines an interactivity profile setting
        tags:
          type: array
          description: Defines tags
          items:
            type: string
          uniqueItems: true
        creatingUserName:
          type: string
          description: Defines a creator of the visual
          readOnly: true
        level:
          type: string
          description: Defines a type of visual usage level
          enum:
            - TOP
            - IN_DASHBOARD
          readOnly: true
        createdByUserID:
          type: string
          description: Defines a visual creator's identifier
          readOnly: true
        lastModifiedByUserID:
          type: string
          description: Defines an identifier of the user who has modified the visual last
          readOnly: true
        createdDate:
          type: string
          format: date-time
          description: Defines a date of creation of the visual
          readOnly: true
        lastModifiedDate:
          type: string
          format: date-time
          description: Defines a date of the last modification of the visual
          readOnly: true
        originId:
          type: string
          description: Id of the exported visual
          readOnly: true
        projectId:
          type: string
          description: >-
            Project ID where this visual is organized. This field is read-only
            and only.
          example: 2222
          readOnly: true
        folderId:
          type: string
          description: Optional folder ID for organizing the visual within a project.
          example: 1111
      required:
        - source
        - visualName
    ErrorMessage:
      type: object
      description: Generic error message
      properties:
        error:
          type: string
        details:
          type: string
        message:
          type: string
        path:
          type: string
        status:
          type: string
        code:
          type: string
        errorCode:
          type: string
        timestamp:
          type: string
        problems:
          type: array
          items:
            $ref: '#/components/schemas/ProblemResource'
    Restriction:
      type: object
      properties:
        operation:
          type: string
          enum:
            - EQUALS
            - EQUALSI
            - NOTEQUALS
            - LT
            - LE
            - GT
            - GE
            - IN
            - NOTIN
            - BETWEEN
            - ISNOTNULL
            - ISNULL
            - AND
            - OR
            - TEXT_SEARCH
            - INKEYSET
            - NOTINKEYSET
            - NOT
            - STARTSWITH_CS
            - STARTSWITH_CI
            - STARTSWITH_DS
            - ENDSWITH_CS
            - ENDSWITH_CI
            - ENDSWITH_DS
            - CONTAINS_CS
            - CONTAINS_CI
            - CONTAINS_DS
            - EQUALS_OR_DESCENDANT_OF
            - EXPR
        value: {}
        custom:
          type: object
          additionalProperties: {}
        label:
          type: string
        path:
          type: string
    AggregateRestriction:
      type: object
      properties:
        operation:
          type: string
          enum:
            - LT
            - LE
            - EQUALS
            - GE
            - GT
            - BETWEEN
            - NOTEQUALS
            - AND
            - OR
            - ISNOTNULL
            - ISNULL
            - IN
            - NOTIN
            - NOT
        value: {}
        custom:
          type: object
          additionalProperties: {}
        label:
          type: string
        name:
          type: string
        function:
          type: string
          enum:
            - avg
            - min
            - max
            - sum
            - stddev_pop
            - stddev_samp
            - var_pop
            - var_samp
            - distinct_count
            - last_value
            - first_value
            - count
            - calc
            - percentile
            - median
            - listagg
    SortAndLimitConfig:
      type: object
      description: Defines the sort order and result limit for a dimension group
      properties:
        groupByFieldName:
          type: string
          description: Name of the dimension group to sort
          example: status
          minLength: 1
        sortByFieldName:
          type: string
          description: Field or metric to sort by
          example: total_price
          minLength: 1
        sortDirection:
          type: string
          description: Sort direction
          enum:
            - asc
            - desc
          example: asc
        aggregation:
          type: string
          description: >-
            Aggregate function applied to sortByFieldName when sorting by a
            metric (e.g. 'sum', 'count')
          example: sum
        limit:
          type: integer
          format: int32
          description: Maximum number of groups to return
          example: 50
      required:
        - groupByFieldName
        - sortByFieldName
    ConditionalFormattingRule:
      type: object
      description: A single conditional formatting rule
      properties:
        condition:
          $ref: '#/components/schemas/Condition'
          description: Defines when the formatting rule triggers
        applyTo:
          $ref: '#/components/schemas/ApplyTo'
          description: Defines what to format when the condition matches
        format:
          $ref: '#/components/schemas/Format'
          description: Defines how to style the target
      required:
        - applyTo
        - condition
        - format
    SourceDetailsResource:
      type: object
      description: Defines source details of the visual
      properties:
        variables:
          type: object
          additionalProperties: {}
          description: Defines source variables
        filters:
          type: array
          description: Defines source restrictions
          items:
            $ref: '#/components/schemas/Restriction'
        aggregateFilters:
          type: array
          description: Defines source aggregated restrictions
          items:
            $ref: '#/components/schemas/AggregateRestriction'
        sourceId:
          type: string
          description: Defines a source identifier
        accountId:
          type: string
          description: Defines an account identifier
          readOnly: true
        sourceName:
          type: string
          description: Defines a source name
          readOnly: true
        playbackMode:
          type: boolean
          description: Defines a playback mode
          readOnly: true
        live:
          type: boolean
          description: Defines a live option
          readOnly: true
        textSearchEnabled:
          type: boolean
          description: Defines a text searching option
          readOnly: true
      required:
        - aggregateFilters
        - filters
        - sourceId
    ControlsConfigResource:
      type: object
      description: Defines a controls configuration
      properties:
        id:
          type: string
          description: Defines a controls configuration identifier
        timeControlCfg:
          $ref: '#/components/schemas/TimeControlsConfigResource'
          description: Defines a time controls configuration
        playerControlCfg:
          $ref: '#/components/schemas/PlayerControlsConfigResource'
          description: Defines a player controls configuration
        sharpeningCfg:
          $ref: '#/components/schemas/SharpeningControlsConfigResource'
          description: Defines a sharpening controls configuration
    ProblemResource:
      type: object
      properties:
        name:
          type: string
        message:
          type: string
        level:
          type: string
          enum:
            - ERROR
            - WARNING
        dependencies:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ObjectUsageResource'
    Condition:
      type: object
      description: >-
        Condition used to match records from two data entities. Fields in
        condition are compared using EQUALS operator
      properties:
        leftFieldName:
          type: string
          description: Name of the field used as a left operand of EQUALS operator
          example: left_field_name
          minLength: 1
        rightFieldName:
          type: string
          description: Name of the field used as a right operand of EQUALS operator
          example: right_field_name
          minLength: 1
      required:
        - leftFieldName
        - rightFieldName
    ApplyTo:
      type: object
      description: Defines what to format when a conditional formatting rule matches
      properties:
        type:
          type: string
          description: Scope of the formatting target
          example: fullRow
          minLength: 1
        targets:
          type: array
          description: Named targets; required when type=namedTargets
          example:
            - groupMetrics
          items:
            type: string
      required:
        - type
    Format:
      type: object
      description: Defines how to style the target of a conditional formatting rule
      properties:
        type:
          type: string
          description: Style block type
          example: single
          minLength: 1
        format:
          $ref: '#/components/schemas/StyleBlock'
          description: Style definition; required when type=single
      required:
        - type
    TimeControlsConfigResource:
      type: object
      description: Defines a time controls configuration
      properties:
        from:
          type: string
        to:
          type: string
        timeField:
          type: string
        calendarId:
          type: string
    PlayerControlsConfigResource:
      type: object
      description: Defines a player controls configuration
      properties:
        timeWindowScale:
          type: string
          enum:
            - PINNED
            - ROLLING
        pauseAfterRead:
          type: boolean
        stopTime:
          type: string
        speed:
          type: integer
          format: int32
    SharpeningControlsConfigResource:
      type: object
      description: Defines a sharpening controls configuration
      properties:
        prefer:
          type: boolean
        maxQueries:
          type: integer
          format: int32
    ObjectUsageResource:
      type: object
      properties:
        hasOtherUsages:
          type: boolean
        accessible:
          type: array
          items:
            $ref: '#/components/schemas/AccessibleObjectUsageResource'
    StyleBlock:
      type: object
      description: Style properties block
      properties:
        style:
          type: object
          additionalProperties: {}
          description: CSS-like style properties; e.g. backgroundColor (#RRGGBB)
          example:
            backgroundColor: '#bd10e0'
    AccessibleObjectUsageResource:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        type:
          type: string
          enum:
            - SOURCE
            - MATERIALIZED_VIEW
            - KEY_SET
            - VISUAL
            - DASHBOARD
            - IN_DASHBOARD_VISUAL
            - SNIPPET
            - REPORT
            - FILTER_SET
            - DERIVED_FIELD
            - CUSTOM_METRIC
            - FIELD_LINK
            - ROW_SECURITY_FILTER
            - ACTION
            - SOURCE_JOIN
            - HIERARCHY
            - PARTITION
            - GLOBAL_FILTER
            - UNIQUE_KEY
            - TIME_CONTROL
        parent:
          $ref: '#/components/schemas/AccessibleObjectUsageResource'
  securitySchemes:
    basicAuth:
      type: http
      description: >-
        HTTP Basic authentication using global administrator credentials
        (username and password).
      scheme: basic

````