I’m using the API (v0.23.0) via Python’s requests library and running into an issue with adding labels to tasks. The API spec says I should be passing a Label
type object, the same returned by the /labels
endpoint.
Retrieving a label with:
def get_label(self, label_id):
return get(f"{self.base_url}/labels/{label_id}", headers=self.headers).json()
Seems to correctly fetch a label:
{'id': 10, 'title': 'Project', 'description': '<p></p>', 'hex_color': '45ff24', 'created_by': {'id': 1, 'name': '----', 'username': '----', 'created': '2022-10-10T21:35:16Z', 'updated': '2023-05-25T15:48:42Z'}, 'created': '2024-02-25T21:30:27Z', 'updated': '2024-02-25T21:30:34Z'}
However creating new tasks or trying to update tasks all seem to not result in updating the label. Creating the tasks with the label present creates the task, but no labels. Similar for updating; all info is updated except the labels. I’ve tried passing an array of Label like objects (json returned from /labels/
), label id’s, label titles and a dict consisting of created_at (tried label and task dates) and label_id as specified in the /tasks/{task_id}/labels
endpoint. Nothing is showing in the labels_tasks table either, except those pairs I manually create in the UI.
Logs in the backend seem to only show the request success and I’m not sure where else I can debug.