# setEffect

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /json-rpc/input/effect:
    post:
      summary: setEffect
      deprecated: false
      description: >-
        Set a color for all LEDs or provide a pattern of LED colors.

        For best practices on using priorites, see [Components &
        Priorities](https://api.hyperion-project.org/components-priorities-1024426m0.md).
      tags:
        - Hyperion API/Controls/Input Controls
        - Websocket
        - HTTP/S
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                command:
                  type: string
                  enum:
                    - effect
                  x-apidog-enum:
                    - value: effect
                      name: ''
                      description: ''
                  description: The type of command to execute.
                instance:
                  type: array
                  items: &ref_0
                    $ref: '#/components/schemas/instance%20-%20single'
                  uniqueItems: true
                  description: >-
                    List of instance indices (0-254) to which the command
                    applies. An empty array applies a command to all instances.
                priority:
                  type: integer
                  minimum: 1
                  maximum: 253
                  description: >-
                    The priority of this input (1-253). Lower values override
                    higher ones.
                origin:
                  type: string
                  minLength: 4
                  maxLength: 20
                  description: Origin string (4-20 characters), e.g., the application name.
                duration:
                  type: integer
                  examples:
                    - -1
                  minimum: -1
                  description: >-
                    Duration in milliseconds to keep this input. Use -1 for
                    indefinite duration.
                effect:
                  type: object
                  properties:
                    name:
                      type: string
                    args:
                      type: object
                      x-apidog-orders: []
                      properties: {}
                      x-apidog-ignore-properties: []
                  additionalProperties: false
                  x-apidog-orders:
                    - name
                    - args
                  required:
                    - name
                  description: >-
                    Effect object containing the name and optional argument
                    overrides.
                  x-apidog-ignore-properties: []
                pythonScript:
                  type: string
                  description: Custom Python script for an effect.
                imageData:
                  type: string
                  description: Image data to be used with the effect.
                tan:
                  type: integer
                  minimum: 0
                  examples:
                    - 4711
                  description: Transaction number for tracking requests and responses.
              additionalProperties: false
              x-apidog-orders:
                - command
                - 01JVFF0Y93620XZSVKFBAVHEJB
                - 01JVFHN08EBAD43BZ0H5Q3XTCH
                - effect
                - pythonScript
                - imageData
                - 01JVFHN70X6XCEYVSZ17Z5HAY9
              x-apidog-refs:
                01JVFF0Y93620XZSVKFBAVHEJB:
                  $ref: '#/components/schemas/instance%20-%20multiple'
                01JVFHN08EBAD43BZ0H5Q3XTCH:
                  $ref: '#/components/schemas/priorityParameters'
                01JVFHN70X6XCEYVSZ17Z5HAY9:
                  $ref: '#/components/schemas/tan'
              required:
                - command
                - priority
              x-apidog-ignore-properties:
                - instance
                - priority
                - origin
                - duration
                - tan
            examples:
              '1':
                value:
                  command: effect
                  effect:
                    name: Warm mood blobs
                  priority: 50
                  origin: My Fancy App
                summary: '1'
                description: >-
                  Set the 'Warm mood blobs' effect with indefinite duration for
                  all instances
              '2':
                value:
                  command: effect
                  effect:
                    name: Rainbow swirl
                  duration: 5000
                  priority: 50
                  origin: My Fancy App
                summary: '2'
                description: Set 'Rainbow swirl' effect for 5 seconds
              '3':
                value:
                  command: effect
                  effect:
                    name: Rainbow swirl
                    args:
                      rotation-time: 1
                  duration: 5000
                  priority: 50
                  origin: My Fancy App
                summary: '3'
                description: >-
                  Set 'Rainbow swirl' effect for 1 second with overridden
                  agrument

                  Each effect has different agruments inside the args property
                  that can be overridden.

                  WARNING: We highly recommend using the effects configurator in
                  the UI instead. Sending invalid values may cause the effect to
                  misbehave or crash.v
      responses:
        '200':
          x-apidog-name: Success
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  command:
                    type: string
                    description: The command executed
                  subcommand:
                    type: string
                    description: The sub-command executed
                  success:
                    type: boolean
                    description: Result, if the request excuted successfully
                  info:
                    type: object
                    properties: {}
                    x-apidog-orders: []
                    description: Information requested
                    additionalProperties: true
                    x-apidog-ignore-properties: []
                  error:
                    type: string
                    description: Reason why a request did not execute successfully
                  errorData:
                    type: array
                    items:
                      type: object
                      properties:
                        description:
                          type: string
                      x-apidog-orders:
                        - description
                      x-apidog-ignore-properties: []
                    description: Detailed error explaination
                  tan:
                    type: integer
                    description: Request's transaction number
                x-apidog-orders:
                  - 01JV5M76DZ4M3GA4AD8Y4G69AP
                x-apidog-refs:
                  01JV5M76DZ4M3GA4AD8Y4G69AP:
                    $ref: '#/components/schemas/response'
                required:
                  - command
                  - success
                  - tan
                x-apidog-ignore-properties:
                  - command
                  - subcommand
                  - success
                  - info
                  - error
                  - errorData
                  - tan
              examples:
                '1':
                  summary: Success
                  value:
                    command: effect
                    success: true
                    tan: 0
                '2':
                  summary: Exception
                  value:
                    command: effect
                    error: Effect 'Non existing effect' not found
                    success: false
                    tan: 4711
          headers: {}
      security:
        - bearer: []
      x-apidog-folder: Hyperion API/Controls/Input Controls
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/894413/apis/api-17010032-run
components:
  schemas:
    instance - single:
      type: integer
      minimum: 0
      maximum: 254
      description: Instance index (0-254) to which the command applies.
      x-apidog-folder: ''
    tan:
      type: object
      properties:
        tan:
          type: integer
          minimum: 0
          examples:
            - 4711
          description: Transaction number for tracking requests and responses.
      x-apidog-orders:
        - tan
      title: tan
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    priorityParameters:
      type: object
      properties:
        priority:
          type: integer
          minimum: 1
          maximum: 253
          description: >-
            The priority of this input (1-253). Lower values override higher
            ones.
        origin:
          type: string
          minLength: 4
          maxLength: 20
          description: Origin string (4-20 characters), e.g., the application name.
        duration:
          type: integer
          examples:
            - -1
          minimum: -1
          description: >-
            Duration in milliseconds to keep this input. Use -1 for indefinite
            duration.
      x-apidog-orders:
        - priority
        - origin
        - duration
      required:
        - priority
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    instance - multiple:
      type: object
      properties:
        instance:
          type: array
          items: *ref_0
          uniqueItems: true
          description: >-
            List of instance indices (0-254) to which the command applies. An
            empty array applies a command to all instances.
      x-apidog-orders:
        - instance
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    response:
      type: object
      properties:
        command:
          type: string
          description: The command executed
        subcommand:
          type: string
          description: The sub-command executed
        success:
          type: boolean
          description: Result, if the request excuted successfully
        info:
          type: object
          properties: {}
          x-apidog-orders: []
          description: Information requested
          additionalProperties: true
          x-apidog-ignore-properties: []
        error:
          type: string
          description: Reason why a request did not execute successfully
        errorData:
          type: array
          items:
            type: object
            properties:
              description:
                type: string
            x-apidog-orders:
              - description
            x-apidog-ignore-properties: []
          description: Detailed error explaination
        tan:
          type: integer
          description: Request's transaction number
      required:
        - command
        - success
        - tan
      x-apidog-orders:
        - command
        - subcommand
        - success
        - info
        - error
        - errorData
        - tan
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: http://{{host}}:8090
    description: Develop Env
  - url: https://{{host}}:8092
    description: Testing Env
security: []

```
