GraphQL - How to get the order of status label?


Is there a way I can get the order of the status label?

I tried this query:

`query { 
        boards(ids: 1720999724) {
            columns {

and this is what I get from the settings_str :

which doesn’t include the information that I wanted.
I would expect the results will return in the correct order which is :
“Level 0” > “Level 1” > “Level 2” > “Level 3”

May I know which graphQL can I use to get this result?

Br, YarHuoy

Hi @yarhuoy

I don’t think you can do it with a simple GraphQL query, but the order is returned in the data you show. The label_posittion 0 holds labelId 5 (which is level 0), label_position 1 holds labelId 0 (which is level 1, etc. Depending on the programming environment you run this graphQL from you need to joggle with the ids and positions.

Hope that make sense.

Hi basdebruin,

I see!! Thanks!! :grinning_face_with_smiling_eyes:

Br, YarHuoy

Hi @basdebruin

I noticed that “labels_positions_vs2” is not always returned, for example:

and this is what I get

Based on this result, I wouldn’t know the order will be Done > Working on it > Stuck, can you please advise?

Br, YarHuoy

hi @yarhuoy
If you run the exact same query and the structure of the return value change I would advice to contact monday support.

Hey @yarhuoy

I’d love to shed more light onthis.

Currently, our API will always return the Status values in the order of their index values. By default, this means that a certain Index will correspond to a specific color. For example, Index 5 matches a Grey color, whereas Index 2 is red.

You can find the map of index values here:
Status Index Value Map

That said, those labels could change their positions if a user chooses to do so. Just to make sure we’re on the same page here, would you be able to clarify what your app is looking to do with the order of labels here?

I also recommend reaching out to us via email so we can troubleshoot further :slight_smile:


Hi @AlexSavchuk

Based on my example above, my screenshot does include “grey” color, but in the json result, it does not includes index “5” in the labels. I will not be able to find out the order of the labels in the screenshot is Done > Working on it > Stuck > "" > "" > "" > "" if the json does not return labels_positions_v2.

We are developing a radar chart here, and we define the value based on the order of the labels (item 1 = 1, item 2 = 2, and so on.).

May I know what email should I contact to discuss further?

Br, YarHuoy


Thank you for circling back with me!

The grey label will either be returned as null, or as an index value of 5. You can assume both to be the same color.

I’ve just DMed you, thanks so much for your patience and cooperation :slight_smile: