[RELEASED] Define status labels via API

I’m seeing that you can create a column on a board with this:

mutation {
  create_column (board_id: 20178755, 
        title: "Work status", column_type: dropdown) {
    id
  }
}

But no where in the documentation i see a way of defining the labels for the column_type dropdown.

When trying to set a label on a item

mutation {
  change_column_value (board_id: 20178755, 
      item_id: 200819371, column_id: "status", 
      value: "{\"label\": \"done\"}") {
    id
  }
}

You get a error back that the label does not exist. So it seems you can create a column but not define the options of a dropdown column through the api. Is this true?

Have the same question. How can I change the label of a certain index?
Say I want index 0 to be called 'NotDone`. Is there no way to do this with API?

Hey there!

At the moment it is not possible to change the settings or label configuration of a particular column via the API. Instead, you need to do this in the GUI.

Can you tell me a bit about your use case here? I’d love to learn what you’re trying to use this for.

Piggybacking off of this older thread, but I’d like something similar in the ability to modify label options with the API. For instance, the dropdown label options themselves need to change based on active clients in our DB. If we stop working with a client or work with a new one, then ideally it would be reflected in our DB which would then update the options for the dropdown. Doing this manually using the GUI is something we’d like to avoid because of the potential for human error in spelling and people do forget.

2 Likes

Awesome. Please upvote this post so we can track the demand for this feature and see how many folks would find it helpful.

Definitely useful.

My use case is using Monday as a front end for database information.
Statuses make an easier way to control columns that need to be something like yes, no, or maybe than linking a board. However, I may want to update a bunch of those columns to say “sometimes.” It’s also a much cleaner look on the interface than linked columns.

1 Like

This seems like pretty basic functionality, surprising to find it missing in the first place. When will it become available?

Any update on this, that would be very helpful to make multiple columns consistent and eliminate human errors

1 Like

Hi there @MountainMan and @lalondesteve :wave:

I totally get where you are coming from here and I am really looking forward to this being part of our API as well. We are working hard to make improvements like this happen, but I’m afraid I have no updates regarding the timeline of this specific feature being available. I’ll see what I can do in terms of bumping the priority on this with the team from my end. :slight_smile:

Thanks for making sure your voice is heard - this helps us make things better.

-Alex

Hi Alex,

Any news on this? It might not fit all use cases but it would be great if when the dropdown item doesn’t exist it just creates the item automatically instead of failing.

2 Likes

Hey @mru :wave:

No good news to share on this just yet - but I’ve made sure our development team is aware that more and more users are looking for this :slight_smile: Thanks so much for helping us improve.

-Alex

I am also definitely interested in this feature. I’d like to be able to add values to the dropdown column type

Hi all–

Feel free to check out my announcement here regarding the release of this feature!

Let us know if you have additional questions or concerns about it at this time.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

Hi @Helen

Amazing feature. I do have a question about it. Your article states that this is also implemented for change_column_value, but AFAIK changing a status column value with change_column_value can only be done by sending a JSON with the index number. My question is: how can I add a new label with change_column_value.

mutation {
  change_column_value(board_id: 123, item_id: 456, column_id: "status6", value: "New Label", create_labels_if_missing: true) {
    id
  }
}

Above one in the PAI playground gives: SyntaxError: Unexpected token < in JSON at position 0

mutation {
  change_column_value(board_id: 123, item_id: 456, column_id: "status6", value: "{\"index\": 0}", create_labels_if_missing: true) {
    id
  }
}

This one works perfectly fine for existing labels, not when I supply an index for a non existing label.

Can’t get my head around how I could add a new label when using change_column_value.

Hi @basdebruin!

So in this case, you can utilize the label attribute instead of the index attribute.

For instance, you can send a query like this:

mutation { change_column_value(board_id: 12345, item_id: 1234, column_id: "status", create_labels_if_missing: true, value:"{\"label\":\"New Label\"}") { id } }

1 Like