Subitem Methods
| Method Name | Method Type | Description |
|---|---|---|
get_subitems(item_id) |
Getter | Retrieves the UUIDs of the subitems of an item. |
get_subitem_names(item_id) |
Getter | Retrieves the UUIDs and names of an item's subitems. |
get_subitem_info(sub_item_id) |
Getter | Retrieves the board ID and parent ID of a subitem. |
create_subitem(parent_id, item_name, column_dictionary) |
Setter | Creates a new subitem under a parent item. |
Method Details
get_subitems()
get_subitems(item_id)
Description: Retrieves the UUIDs of the subitems of an item.
Arguments:
- item_id (int): UUID of the parent item.
Returns:
Array of subitem IDs. None or error message on API call failure.
Example:
subitems = monday.subitems.get_subitems(123456789)
get_subitem_names()
get_subitem_names(item_id)
Description: Retrieves the UUIDs and names of an item's subitems.
Arguments:
- item_id (int): UUID of the parent item.
Returns:
Dictionary of subitem IDs and names. None or error message on API call failure.
Example:
subitem_names = monday.subitems.get_subitem_names(123456789)
get_subitem_info()
get_subitem_info(sub_item_id)
Description: Retrieves the board ID and parent ID of a subitem.
Arguments:
- sub_item_id (int): UUID of the subitem.
Returns:
Dictionary containing the parent ID and board ID of the subitem. None or error message on API call failure.
Example:
subitem_info = monday.subitems.get_subitem_info(987654321)
create_subitem()
create_subitem(parent_id, item_name, column_dictionary)
Description: Creates a new subitem under a parent item.
Arguments:
- parent_id (int): UUID of the item to create the subitem under.
- item_name (str): Name of the new subitem.
- column_dictionary (dict): Dictionary containing column IDs, column types, and values (refer to Column Types in the Columns section).
Returns:
Dictionary containing the newly created subitem ID and the board ID on which the subitem was created.
None or error message on API call failure.
Example:
col_dict = {
"text1": {"type": "text", "values": ["Review documents"]},
"status1": {"type": "status", "values": ["Pending"]}
}
new_subitem = monday.subitems.create_subitem(parent_id=123456789,
item_name="New Subitem",
column_dictionary=col_dict)