Term Instance
API endpoint that allows CV Terms to be viewed or edited.
» click to learn about Filtering, Ordering and more...
Accepted filters:
- search: Search in the following fields: ^name, ^description. (^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)
- default: Default (exact)
- category__name: Category Name (exact)
- category__id: Category ID (exact)
- created_by: Created by Username (exact)
- modified_by: Modified by Username (exact)
- dbxref_id: DBXRef ID (exact)
- category_name: Filter on category name (exact)
- category: Filter by category id (exact)
- category_id: Filter by category id (exact)
- category_id_list: Filter on list of category ids [OR] (exact)
- category_name_list: Filter on list of category names [OR] (exact)
» more..
- property: A property for which we need to retrieve the available terms, can be a name or uuid
- dependencies: a json dict that has the values for the properties the given property depends on:
{"chemical_risk_code": "R1", "<uuid>": "H1"}
- intersect: default False, Intersect on the given filter values instead of doing a "ANY" lookup
- scope(_id): (multiple) name or uuid of one or more Scopes.
- scope_tag(_id): (multiple) name or uuid of one or more Scope Tags.
Multiple scopes or scope tags are given like so: scope=Scope1&scope=Scope2
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
- category: category__name
- 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 Terms to be viewed or edited.
<details>
<summary>
<i> » click to learn about Filtering, Ordering and more...</i>
</summary>
<details>
<summary> » more..</summary>
```
- property: A property for which we need to retrieve the available terms, can be a name or uuid
- dependencies: a json dict that has the values for the properties the given property depends on:
{"chemical_risk_code": "R1", "<uuid>": "H1"}
- intersect: default False, Intersect on the given filter values instead of doing a "ANY" lookup
- scope(_id): (multiple) name or uuid of one or more Scopes.
- scope_tag(_id): (multiple) name or uuid of one or more Scope Tags.
Multiple scopes or scope tags are given like so: scope=Scope1&scope=Scope2
```
</details>
</details>
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/terms/469eb2cd-ed0d-4f77-9373-494880f73630/?format=api&ordering=deleted
{ "results": { "url": { "name": "url", "value": "https://labid-demo.embl.de/api/v2/vocabularies/terms/469eb2cd-ed0d-4f77-9373-494880f73630/?format=api", "category": "property" }, "id": { "name": "id", "category": "property", "value": "469eb2cd-ed0d-4f77-9373-494880f73630" }, "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:23:19.337574+01:00", "category": "property" }, "modified": { "name": "modified", "value": "2025-12-16T09:23:19.337645+01:00", "category": "property" }, "model_name": { "name": "model_name", "category": "property", "value": "term" }, "app_name": { "name": "app_name", "category": "property", "value": "vocabularies" }, "model_type": { "name": "model_type", "category": "property", "value": "DEFAULT" }, "name": { "name": "name", "value": { "id": "469eb2cd-ed0d-4f77-9373-494880f73630", "name": "FLIP", "model_name": "term", "app_name": "vocabularies", "model_type": null }, "category": "property" }, "choice_label": { "name": "choice_label", "category": "property", "value": "FLIP" }, "description": { "name": "description", "category": "property", "value": "Fluorescence loss in photobleaching; a method of determining whether two populations of fluorophore are in diffusive communication with one another by observing the decrease in brightness of one population when the other population is subjected to continuous photobleaching." }, "label": { "name": "label", "category": "property", "value": "FLIP (Fluorescence loss in photobleaching; a method of determining whether two populations of fluorophore are in diffusive communication with one another by observing the decrease in brightness of one population when the other population is subjected to continuous photobleaching.)" }, "short_name": { "name": "short_name", "category": "property", "value": "FLIP" }, "image_url": { "name": "image_url", "category": "property", "value": "" }, "category": { "name": "category", "value": { "id": "098696ce-c0b4-4536-a846-53f64d57fa1c", "name": "imaging_methods", "label": "Imaging_Methods", "deleted": false, "model_name": "category", "app_name": "vocabularies", "model_type": "DEFAULT" }, "category": "property" }, "dbxref_id": { "name": "dbxref_id", "category": "property", "value": "FBbi:00000365" }, "default": { "name": "default", "category": "property", "value": false }, "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" } } }