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

# Lock Beast Mode

> Locks a Beast Mode so it cannot be altered.



## OpenAPI

````yaml /openapi/product/beastmodes.yaml put /api/query/v1/functions/template/{beastmodeId}
openapi: 3.0.0
info:
  title: Beast Modes API
  description: Beast Modes are run time calculations on Cards or Datasets.
  version: 1.0.0
servers:
  - url: https://{instance}.domo.com
    variables:
      instance:
        default: your-instance
        description: Your Domo instance name
security:
  - DeveloperToken: []
paths:
  /api/query/v1/functions/template/{beastmodeId}:
    put:
      tags:
        - Beast Modes
      summary: Lock Beast Mode
      description: Locks a Beast Mode so it cannot be altered.
      operationId: lock-beast-mode
      parameters:
        - name: beastmodeId
          in: path
          required: true
          description: The ID of the Beast Mode to lock
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                locked:
                  type: boolean
                  description: true to lock Beast Mode. false to unlock it.
              required:
                - locked
            example:
              locked: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                id: 232
                name: '% Change - Orders'
                owner: 27
                locked: true
                global: false
                expression: >-
                  (CASE  WHEN (sum((CASE  WHEN
                  ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 *
                  7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN
                  `Orders` END )) = 0) THEN 0 ELSE ((sum((CASE  WHEN
                  ((DateDiff(AddDate(Current_Date(),-1),`Date`) < 28) AND
                  (DateDiff(Current_Date(),`Date`) > 0)) THEN `Orders` END )) -
                  sum((CASE  WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`)
                  < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52
                  * 7))) THEN `Orders` END ))) / sum((CASE  WHEN
                  ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 *
                  7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN
                  `Orders` END ))) END )
                checkSum: 4041d1731163b41ae86552ebb46f8a2f1d5aecd5
                links:
                  - resource:
                      type: DATA_SOURCE
                      id: 32e6af61-c725-487a-8a4a-a46fbfed9fb1
                    visible: true
                    active: false
                    valid: VALID
                legacyId: calculation_6ca6ab70-412a-4394-82d7-d6f648758907
                lastModified: 1734470226460
                created: 1654190830737
                aggregated: true
                analytic: false
                dataType: DECIMAL
                status: VALID
                cacheWindow: day
                columnPositions:
                  - columnName: '`Date`'
                    columnPosition: 67
                  - columnName: '`Date`'
                    columnPosition: 123
                  - columnName: '`Orders`'
                    columnPosition: 149
                functions:
                  - DOMO_OP_MULTIPLY
                  - ADDDATE
                  - DOMO_OP_ADD
                  - SUM
                  - DOMO_OP_SUBTRACT
                  - DATEDIFF
                  - DOMO_OP_DIVIDE
                archived: false
                hidden: false
                variable: false
      x-codeSamples:
        - lang: HTTP
          source: >
            PUT
            https://{instance}.domo.com/api/query/v1/functions/template/{beastmodeId}

            X-DOMO-Developer-Token: YOUR_TOKEN

            Content-Type: application/json


            {
              "locked": true
            }
components:
  securitySchemes:
    DeveloperToken:
      type: apiKey
      in: header
      name: X-DOMO-Developer-Token
      description: Domo Developer Token for authentication

````