Complexity

Query complexity defines the cost of each operation you make. This cost is used when determining an account's API usage with respect to our rate limiting.

The fields in this section will allow you to determine the complexity cost of your queries as you make them. For more information about our rate limits, check out this article: Rate Limits.

query {
    complexity {
        query
        after
    }
    users(kind: non_guests) {
        id
        name
    }
}

mutation {
  complexity {
    query
    before
    after
  }
  create_item(board_id:12345, item_name:"test item") {
    id
  }
}
let query = "query { complexity { query after } users(kind: non_guests) { id    name } }";
let mutation = "mutation { complexity { query before after } create_item(board_id: 12345, item_name: \"test\") { id }}";

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
   },
   body: JSON.stringify({
     query : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));


fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
   },
   body: JSON.stringify({
     query : mutation
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));
curl --location --request POST 'https://api.monday.com/v2' \
--header 'Authorization: YourSuperSecretAPIkey' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query { complexity { query after } users(kind: non_guests) { id   name } }"}'

curl --location --request POST 'https://api.monday.com/v2' \
--header 'Authorization: YourSuperSecretAPIkey' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation { complexity { query before after } create_item(board_id: 12345, item_name: \"test\") { id }}"'

Fields

The following fields will determine what information is returned from your complexity queries.

Field

Description

after !Int

The remaining complexity after the query's execution.

before !Int

The complexity before the query's execution.

query !Int

This specific query's complexity.

reset_in_x_seconds !Int

How long (in seconds) before your complexity budget is reset.


Did this page help you?