Netzo Logo

monday

Monday is a work operating system (Work OS) that powers teams to run projects and workflows.

Usage

import { monday } from 'netzo/apis/monday.ts'

const api = monday({
  apiKey: Deno.env.get('MONDAY_API_KEY')
})

Configuration

The monday factory function expects an object with the following, and returns an object with an API client api.

ParamTypeDefaultDescription
apiKeystringDeno.env.get('MONDAY_API_KEY')the api key to use for authentication
Refer to the API documentation to get the required information.

Examples

The following examples assume you have created an api client instance. Monday API is built with GraphQL, so refer to the API documentation to learn about data that is available for your queries and responses.

Find boards

Find boards up to the limit you specify.

Specify the data you want returned in the query.

const query: string = `
    query {
        boards (limit:50) {
            name
            id
        }
    }`
const resultData = await api.post<Record<string, any>>(query)

Get board

Get information about a specific board.

Specify the data you want returned in the query.

const query: string = `
    query {
        boards (ids: ${BOARD_ID}) {
            name
            state
            id
            permissions
        }
    }`
const resultData = await api.post<Record<string, any>>(query)

Add board

Add a new board.

Specify the data you want returned in the query.

const query: string = `
    mutation {
        create_board (board_name: 'New board', board_kind: public) {
            id
        }
    }`
const resultData = await api.post<Record<string, any>>(query)

Update board

Update a board by id.

Specify the data you want returned in the query.

const query: string = `
    mutation {
        update_board(board_id: ${BOARD_ID}, board_attribute: name, new_value: 'Updated board name')
      }`
const resultData = await api.post<Record<string, any>>(query)

Delete a board

Delete a board by id.

Specify the data you want returned in the query.

const query: string = `
   mutation {
    delete_board (board_id: ${BOARD_ID}) {
        id
        name
    }
  }`
const resultData = await api.post<Record<string, any>>(query)

References