Skip to main content
PUT
/
api
/
query
/
v1
/
functions
/
template
/
{beastmodeId}
http
PUT https://{instance}.domo.com/api/query/v1/functions/template/{beastmodeId}
X-DOMO-Developer-Token: YOUR_TOKEN
Content-Type: application/json

{
  "locked": true
}
{
  "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
}

Authorizations

X-DOMO-Developer-Token
string
header
required

Domo Developer Token for authentication

Path Parameters

beastmodeId
integer
required

The ID of the Beast Mode to lock

Body

application/json
locked
boolean
required

true to lock Beast Mode. false to unlock it.

Response

200 - application/json

Successful response

The response is of type object.