Category Instance
API endpoint that allows CV Categories to be viewed or edited. In addition to the normal detail page, when provided with the param nested=True, the detail endpoint shows all Terms on the category. Then on the detail page, terms can be viewed, changed, deleted and added to the Category.
» click to learn about Filtering, Ordering and more...
Accepted filters:
- search: Search in the following fields: ^name. (^startswith, $regex, =exact)
- id: ID (exact)
- created: Created (exact)
- modified: Modified (exact)
- name: Name starts with (istartswith)
- description: Description contains (icontains)
- query: Search filter on the name property (exact)
- owner: Owner Username (exact)
- owned_by: Filter on list of owned by group names [OR] (exact)
- public: Public (exact)
- deleted: Deleted (exact)
- deleted_by: Deleted by (exact)
- deleted_date: Deleted date (exact)
- label: Label contains (icontains)
- created_by: Created by Username (exact)
- modified_by: Modified by Username (exact)
Advanced Filtering
You can also filter using a json object to process all search parameters. Currently this filter supports the syntax as produced/used by the http://summitroute.github.io/react-structured-filter/ search UI.
Example
?query_expression={"category":"name","operator":"contains","value":"Y00"},
{"category":"amount","operator":">","value":"10"},
{"category":"type__name","operator":"exact","value":"ANTIBODY"}
» more info about the query_expression param..
Preset mappings
- terms: {'name': 'term_count', 'aggregate': Count(F(terms), distinct=True)}
- deleted: <function filter_deleted at 0x7f45063b6710>
- deleted_by: deleted_by__username
- owner: owner__username
- owned_by: owned_by__name
- created_by: created_by__username
- modified_by: modified_by__username
Operators
- ==
- =
- >=
- >
- <=
- <
- contains
- icontains
- exact
- iexact
- startswith
- istartswith
- endswith
- iendswith
Permission filtering
Based on the current logged in user you can filter for objects that have a particular permission set:
- can_change: True/False, show objects that you can change
- can_delete: True/False, show objects that you can delete
# not applicable - will raise NotAcceptable:
- can_view: as this is always True, you can only view items you are allowed to see
Ordering
You can order on practically any field even spanning relations.
# reverse order on owner username
?ordering=-owner
# order on related field
?ordering=category__version
API endpoint that allows CV Categories to be viewed or edited.
In addition to the normal detail page, when provided with the param *nested*=True,
the detail endpoint shows all Terms on the category.
Then on the detail page, terms can be viewed, changed, deleted and added to the Category.
None
The default modelviewset used in this project
Add JSONPatch like functionality to bulk update items.
### Bulk Delete
This view also allows for one to bulk delete items. The url needs to be appended by ``/bulk_delete/`` and the ids
need to be given by multiple query_params:
```
{current_url}/bulk_delete/?id=<id_1>,id=<id_2>
```
GET /api/v2/vocabularies/categories/643b76ea-3b91-404b-b6c2-6a8bd1d9cf54/?format=api&ordering=public
{ "results": { "url": { "name": "url", "value": "https://labid-demo.embl.de/api/v2/vocabularies/categories/643b76ea-3b91-404b-b6c2-6a8bd1d9cf54/?format=api", "category": "property" }, "id": { "name": "id", "category": "property", "value": "643b76ea-3b91-404b-b6c2-6a8bd1d9cf54" }, "created_by": { "name": "created_by", "value": { "id": 1, "username": "admin", "full_name": "Admin User" }, "category": "property" }, "modified_by": { "name": "modified_by", "value": { "id": 1, "username": "admin", "full_name": "Admin User" }, "category": "property" }, "created": { "name": "created", "value": "2025-12-16T09:24:09.008010+01:00", "category": "property" }, "modified": { "name": "modified", "value": "2025-12-16T09:24:09.008177+01:00", "category": "property" }, "model_name": { "name": "model_name", "category": "property", "value": "category" }, "app_name": { "name": "app_name", "category": "property", "value": "vocabularies" }, "model_type": { "name": "model_type", "category": "property", "value": "DEFAULT" }, "name": { "name": "name", "value": { "id": "643b76ea-3b91-404b-b6c2-6a8bd1d9cf54", "name": "imaging_screen_types", "model_name": "category", "app_name": "vocabularies", "model_type": null }, "category": "property" }, "choice_label": { "name": "choice_label", "category": "property", "value": "imaging_screen_types" }, "description": { "name": "description", "category": "property", "value": "High content screening stage, http://www.ebi.ac.uk/efo/EFO_0007555" }, "label": { "name": "label", "category": "property", "value": "Imaging_Screen_Types" }, "status": { "name": "status", "value": { "value": "ACTIVE", "label": "Active" }, "category": "property" }, "source": { "name": "source", "category": "property", "value": "" }, "version": { "name": "version", "category": "property", "value": "2020-11-06" }, "terms": { "name": "terms", "category": "property", "value": [ { "id": "c439288e-d016-4331-93f2-9a2641697320", "name": "validation high content screen", "description": "a screen to check whether the results in another screen are reproducible. Usually a different reagent targetting genes of interest are used.", "dbxref_id": "EFO_0007558", "default": false, "short_name": "validation high content screen", "image_url": "", "public": true }, { "id": "d6ce820e-b97e-4540-9a28-f50b5b9ec30c", "name": "secondary high content screen", "description": "a screen to investigate further potential genes or phenotypes of interest. This screen may target orthologous genes in another species.", "dbxref_id": "EFO_0007557", "default": false, "short_name": "secondary high content screen", "image_url": "", "public": true }, { "id": "3c33e3c1-ac14-47c0-9bf4-4b6edaaa18fc", "name": "primary high content screen", "description": "an initial, exploratory screen", "dbxref_id": "EFO_0007556", "default": false, "short_name": "primary high content screen", "image_url": "", "public": true } ] }, "permissions": { "name": "permissions", "value": { "public": true, "actions": { "view": { "users": [], "groups": [] }, "change": { "users": [], "groups": [] }, "delete": { "users": [], "groups": [] } }, "allowed": [ "view" ] }, "category": "property" }, "public": { "name": "public", "value": true, "category": "property" }, "owner": { "name": "owner", "value": { "id": 1, "username": "admin", "full_name": "Admin User" }, "category": "property" }, "owned_by": { "name": "owned_by", "value": { "id": 1, "name": "SYSTEM_GROUP" }, "category": "property" } } }