monday.get

You can use the monday.get software development kit (SDK) method to retrieve data from the parent monday.com application where your app is currently running. This object can only be used in client-side apps.

Parameters

  • type: The type of requested information (available values below)
  • params: Reserved for future use

The available types that can be requested are:

TypeDescription
'context'Information about where this app is currently displayed, depending on the type of feature
'settings'The application settings as configured by the user that installed the app
'itemIds'The list of item IDs that are filtered in the current board (or all items if no filters are applied)
'sessionToken'A JWT token that is decoded with your app's secret and can be used as a session token between your app's frontend and backend
'filter'The state of the search filter
'location'The URL location within an app

Returns

A Promise that will be resolved with the requested data.

Examples

Requesting context and settings data

monday.get("settings").then(res => ...);
monday.get("context").then(res => ...);

Sample context objects for each feature type

{
  "theme": "light", // or "dark" or "hacker_theme"
  "account": {
    "id": "5" // unique account ID
  },
  "user": {
    "id": "2631211", // unique user ID
    "isAdmin": false, // or true
    "isGuest": false, // or true
    "isViewOnly": false, // or true
    "countryCode": "IL", // user's two-letter country code
    "currentLanguage": "en", // user's default language
    "timeFormat": "12H", // or "24H"
    "timeZoneOffset": 3 // time zone offset based on GMT
  },
  "region": "use1", // availability zone ID
  "app": {
    "id": 10000205, // unique app ID
    "clientId": "120372d8b9047cb85966f070ca0ee490" // unique client ID
  },
  "appVersion": {
    "id": 10000345, // unique app version ID
    "name": "Shay Test App API Context - New App", // name of the app's current version
    "status": "draft", // or "live"
    "type": "major", // or "minor"
    "versionData": {
      "major": 1, // version number
      "minor": 0, // version number
      "patch": 0, // patch number
      "type": "major" // or "minor"
    }
  },
  "boardId": 118405813, // unique board ID
  "boardIds": [
    118405813 // list of connected boards
  ],
  "boardViewId": 10887, // unique board view ID
  "viewMode": "fullScreen", // or "split" or "widget"
  "instanceId": 10887, // unique instance ID for the feature on the board
  "instanceType": "board_view", // feature type
  "workspaceId": 7870, // unique workspace ID 
}
{
  "theme": "hacker_theme", // or "light" or "dark"
  "account": {
    "id": "654646" // unique account ID
  },
  "user": {
    "id": "65464", // unique user ID
    "isAdmin": false, // or true 
    "isGuest": false, // or true 
    "isViewOnly": false, // or true
    "countryCode": "IL", // user's two-letter country code
    "currentLanguage": "en", // user's default language
    "timeFormat": "24H", // or "12H"
    "timeZoneOffset": 3 // time zone offset based on GMT
  },
  "region": "use1", // availability zone ID
  "productKind": "core",
  "app": {
    "id": 64541082, // unique app ID
    "clientId": "d5be5bbc7re646g76b9988a6ad64d780" // unique client ID
  },
  "appVersion": {
    "id": 6458043, // unique app version ID
    "name": "New App", // name of the app's current version
    "status": "draft", // or "live"
    "type": "major", // or "minor"
    "versionData": {
      "major": 1, // version number
      "minor": 0, // version number
      "patch": 0, // patch number 
      "type": "major" // or "minor"
    }
  },
  "workspaceId": 1350535, // unique workspace ID
  "boardId": 6456619824, // unique board IF
  "boardIds": [
    6454619824 // list of connected boards
  ],
  "itemId": 64564519872, // unique item ID
  "instanceId": 65461164, // unique instance ID for the feature on the board
  "instanceType": "item_view" // feature type
}
{
  "theme": "hacker_theme", // or "dark" or "light"
  "account": {
    "id": "654646" // unique account ID
  },
  "user": {
    "id": "65464", // unique user ID
    "isAdmin": false, // or true
    "isGuest": false, // or true
    "isViewOnly": false, // or true
    "countryCode": "IL", // user's two-letter country code
    "currentLanguage": "en", // user's default language
    "timeFormat": "24H", // or "12H"
    "timeZoneOffset": 3 // time zone offset based on GMT
  },
  "region": "use1", // availability zone ID
  "productKind": "core",
  "app": {
    "id": 64541082, // unique app ID
    "clientId": "d5be5bbc7re646g76b9988a6ad64d780" // unique client ID
  },
  "appVersion": {
    "id": 6458043, // unique app version ID
    "name": "New App", // name of the app's current version
    "status": "draft", // or "live"
    "type": "major", // or "minor"
    "versionData": {
      "major": 1, // version number
      "minor": 0, // version number
      "patch": 0, // patch number
      "type": "major" // or "minor"
    }
  },
  "boardIds": [
    53459894065 // list of connected boards
  ],
  "widgetId": 5435359808, // unique widget ID
  "viewMode": "widget" // or "fullscreen" or "split"
  "editMode": true, // or false
  "instanceId": 543359808, // unique instance ID for the feature on the board
  "instanceType": "dashboard_widget" // feature type
}
{
  "method": "get",
  "type": "context",
  "data": {
    "theme": "light",
    "account": {
      "id": "256337"
    },
    "user": {
      "id": "4322888",
      "isAdmin": false,
      "isGuest": false,
      "isViewOnly": false,
      "countryCode": "US",
      "currentLanguage": "en",
      "timeFormat": "12H",
      "timeZoneOffset": -5
    },
    "region": "use1",
    "productKind": "core",
    "app": {
      "id": 10053555,
      "clientId": "2ec9b687c2a48edb8a5db4348c8fd782"
    },
    "appVersion": {
      "id": 10077266,
      "name": "Workdocs Demo App",
      "status": "draft",
      "type": "major",
      "versionData": {
        "major": 1,
        "minor": 0,
        "patch": 0,
        "type": "major"
      }
    },
    "docId": 4048455,
    "objectId": 3877057000,
    "instanceType": "doc_app_feature",
    "workspaceId": 668837,
    "focusedBlocks": [
      {
        "id": "5fdcd890-ec0e-4ba2-bc63-1fb93678f31c",
        "createdUserId": 4322888,
        "accountId": 256337,
        "docId": 4048462,
        "type": "normal text",
        "content": {
          "alignment": "left",
          "direction": "ltr",
          "deltaFormat": [
            {
              "insert": "THIS TEXT IS SELECTED"
            }
          ],
          "base64Encoded": "CgWSzev3CwCBwZ3R4QMWBoGSzev3CwUJgZLN6/cLDgjBks3r9wsOks3r9wsPBcGSzev3CxuSzev3Cw8EAoTcqtULAMHBndHhAxaSzev3CwAFwZLN6/cLBZLN6/cLBgQCkPzpyAoAwZLN6/cLFs7BlMsJAAXBzsGUywkFzsGUywkGBALOwZTLCQCBks3r9wsWBoHOwZTLCQUEA8Gq/b8JAAEBCXRleHRCbG9ja40BgcGq/b8JjAFBwcGq/b8JjAHBqv2/CY0BAgKlh5KWBQDEzsGUywkJsv/dhAIABUhFTExPxLL/3YQCBbL/3YQCBgZSQUNIRUwFwIKHiQQAwcGq/b8JzQHBndHhAw0CwcGd0eEDD8Gd0eEDEAHBwZ3R4QMRwZ3R4QMSAcHBndHhAxPBndHhAxQBwcGd0eEDFcGd0eEDFgEJwZ3R4QMAgcGq/b8JzQEIwcGq/b8JzQHBndHhAwABgcGd0eEDBwTBwar9vwnNAcGd0eEDCAGBwZ3R4QMMAoHBndHhAw8CgcGd0eEDEQKBwZ3R4QMTAoHBndHhAxUBApipqrEDAMGSzev3Cw6Szev3CxcEwZLN6/cLG5LN6/cLHAQDsv/dhAIAgc7BlMsJCQWEsv/dhAIEASCBsv/dhAIFBgnBqv2/CQEA0AHBndHhAwEAF5LN6/cLAQAghNyq1QsBAAnOwZTLCQEACpD86cgKAQAJwIKHiQQBAAaYqaqxAwEACLL/3YQCAgAFBgY="
        },
        "position": 6529024,
        "parentBlockId": null,
        "createdAt": "2023-02-13T20:09:34.000Z",
        "updatedAt": "2023-02-13T20:09:55.000Z"
      }
    ],
    "placement": "contextualToolbar",
    "highlightedText": "THIS TEXT IS SELECTED",
    "range": {
      "index": 0,
      "length": 21
    },
    "blockId": "5fdcd890-ec0e-4ba2-be83-1fb93678f66f"
  },
  "requestId": "25quho26h"
}

Requesting the list of items currently in view in the board

Use the itemIds type to return the items that are currently visible on the board. If the user uses the board filter to reduce the records on the board, this method will return a list of items that satisfy this filter.

monday.get("itemIds").then(res => console.log(res));
// => [234234, 1114564, 2324234, 6763375, 5726567]

Getting the search term from the board search

Use the filter type to return the value that the user entered into the board search.

monday.get("filter")
  .then(res => console.log(res))
// => { "method":"get", "type":"filter", "data": { "term":"search this" }, "requestId":"vjt8nqrd8" }

Getting the URL location within an app

The SDK allows you to get a location value inside an app and returns the href, query, and search. You can also use the monday.listen("location") SDK method to listen to the location value.

monday.get("location")
  .then(res => console.log(res))
// => { "method":"get", "type":"location", "data": { "href": "https://monday.monday.com/boards/123456789/views/87654321", "query": { "foo": "bar" }, "search": "app[foo]=bar" }