API reference · Hubtask API 0.1.0
structure
GET /containers/{containerId}/buckets
List buckets
Path parameters
Responses
200The collection's buckets4XXAn error per RFC 9457 Problem
curl -X GET "$HUBTASK_URL/containers/{containerId}/buckets" \ -H "Authorization: Bearer $HUBTASK_TOKEN" POST /containers/{containerId}/buckets
Create bucket
Path parameters
Request body application/json — BucketCreate
curl -X POST "$HUBTASK_URL/containers/{containerId}/buckets" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "before_bucket_id": "018f6e2a-2b7c-7c1e-9b1a-3d5e6f7a8b9c", "wip_limit": 1, "is_done_bucket": false, "color_token": "string"}' PATCH /containers/{containerId}/buckets/{bucketId}
Update bucket
Changes a column's own fields. A field that is not sent is left alone; sending color_token as null clears it, and sending wip_limit as null or 0 removes the limit. The name stays unique in the collection. Where the column sits is not here - that is :reorder, so that a rename and a rearrangement are two operations with two audit entries.
Path parameters
Headers
Request body application/merge-patch+json — BucketUpdate
curl -X PATCH "$HUBTASK_URL/containers/{containerId}/buckets/{bucketId}" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H 'If-Match: "<the ETag you read>"' \ -H "Content-Type: application/merge-patch+json" \ -d '{ "name": "string", "wip_limit": 0, "is_done_bucket": true, "color_token": "string"}' DELETE /containers/{containerId}/buckets/{bucketId}
Delete bucket
Takes the column off the board. Its entries are not deleted with it: they move to the leftmost remaining column, or out of any column when this was the last one. What became of them is in the answer rather than left to be discovered.
Path parameters
Headers
Responses
200Deleted, with what became of the entries that were in it BucketDeletion4XXAn error per RFC 9457 Problem
curl -X DELETE "$HUBTASK_URL/containers/{containerId}/buckets/{bucketId}" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H 'If-Match: "<the ETag you read>"' POST /containers/{containerId}/buckets/{bucketId}:reorder
Reorder bucket
Moves a column along its board. An absent before_bucket_id moves it to the right hand end.
Path parameters
Headers
Request body application/json
curl -X POST "$HUBTASK_URL/containers/{containerId}/buckets/{bucketId}:reorder" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H 'If-Match: "<the ETag you read>"' \ -H "Content-Type: application/json" \ -d '{ "before_bucket_id": "018f6e2a-2b7c-7c1e-9b1a-3d5e6f7a8b9c"}' GET /containers/{containerId}/labels
List labels
Path parameters
Responses
200The collection's labels, by name4XXAn error per RFC 9457 Problem
curl -X GET "$HUBTASK_URL/containers/{containerId}/labels" \ -H "Authorization: Bearer $HUBTASK_TOKEN" POST /containers/{containerId}/labels
Create label
Adds a label to a collection's vocabulary. The name has to be free in the collection, compared without regard to case or accents. The colour is required: a label is rendered as a chip and nothing else, so with none a client would have to invent one.
Path parameters
Request body application/json — LabelCreate
curl -X POST "$HUBTASK_URL/containers/{containerId}/labels" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "color_token": "string", "description": "string"}' PATCH /containers/{containerId}/labels/{labelId}
Update label
Changes a label's own fields. A field that is not sent is left alone; sending description as null clears it. The colour cannot be cleared - a label is rendered as a chip and nothing else. The name stays unique in the collection.
Path parameters
Headers
Request body application/merge-patch+json — LabelUpdate
curl -X PATCH "$HUBTASK_URL/containers/{containerId}/labels/{labelId}" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H 'If-Match: "<the ETag you read>"' \ -H "Content-Type: application/merge-patch+json" \ -d '{ "name": "string", "color_token": "string", "description": "string"}' DELETE /containers/{containerId}/labels/{labelId}
Delete label
Takes the label out of the collection's vocabulary. The entries that carried it are not rewritten: they stop showing it because it is gone, which is what makes the deletion undoable without having to remember who wore it.
Path parameters
Headers
Responses
204Deleted4XXAn error per RFC 9457 Problem
curl -X DELETE "$HUBTASK_URL/containers/{containerId}/labels/{labelId}" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H 'If-Match: "<the ETag you read>"' GET /custom-fields
List custom fields
The custom field definitions in force, by key. Naming a collection answers the ones that apply inside it: its own, and the workspace-wide ones above it. Naming none answers the workspace-wide ones alone. Deleted definitions are not in the answer - their values stay in the entries and stop being visible, which is what makes the deletion undoable.
Query parameters
Responses
200The definitions4XXAn error per RFC 9457 Problem
curl -X GET "$HUBTASK_URL/custom-fields" \ -H "Authorization: Bearer $HUBTASK_TOKEN" POST /custom-fields
Define custom field
Defines a custom field. The key has to be free in its scope - a collection's keys are free of each other's and of the workspace-wide ones - and it is an identifier rather than a label: lower case, digits and underscores, and it never changes afterwards. Which types carry the field is applies_to, bounded by the CUSTOM_FIELDS capability: an activity has no custom fields, so naming one is refused.
Headers
Request body application/json — CustomFieldDefinitionCreate
Responses
201Created CustomFieldDefinition4XXAn error per RFC 9457 Problem
curl -X POST "$HUBTASK_URL/custom-fields" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "collection_id": "018f6e2a-2b7c-7c1e-9b1a-3d5e6f7a8b9c", "key": "string", "kind": "TEXT", "options": [ "string" ], "is_required": false, "applies_to": [ "TASK" ]}' PATCH /custom-fields/{fieldId}
Update custom field
Changes what a definition permits. A field that is not sent is left alone. The key and the kind are not among them: a key that moved would orphan every value stored under it, and a kind that changed would reinterpret them - both are a new definition rather than an edit. Narrowing the options of a SELECT does not rewrite the entries that hold a value which is no longer offered; they keep it until somebody sets the field again.
Path parameters
Headers
Request body application/merge-patch+json — CustomFieldDefinitionUpdate
Responses
200Updated CustomFieldDefinition4XXAn error per RFC 9457 Problem
curl -X PATCH "$HUBTASK_URL/custom-fields/{fieldId}" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H 'If-Match: "<the ETag you read>"' \ -H "Content-Type: application/merge-patch+json" \ -d '{ "options": [ "string" ], "is_required": true, "applies_to": [ "TASK" ]}' DELETE /custom-fields/{fieldId}
Delete custom field
Takes the definition out of use. A soft delete: the values stay in the entries and stop being visible, because rewriting custom_fields across every entry in a collection would be an unbounded write from one request. A definition recreated under the same key is a new definition and shows none of what the old one held.
Path parameters
Headers
Responses
204Deleted4XXAn error per RFC 9457 Problem
curl -X DELETE "$HUBTASK_URL/custom-fields/{fieldId}" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H 'If-Match: "<the ETag you read>"'