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 0x7f45063765f0>
- 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/6b546a5e-00a8-4768-9861-c05b573a4816/?format=api&ordering=modified
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "results": {
        "url": {
            "name": "url",
            "value": "https://labid-demo.embl.de/api/v2/vocabularies/categories/6b546a5e-00a8-4768-9861-c05b573a4816/?format=api",
            "category": "property"
        },
        "id": {
            "name": "id",
            "category": "property",
            "value": "6b546a5e-00a8-4768-9861-c05b573a4816"
        },
        "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.040022+01:00",
            "category": "property"
        },
        "modified": {
            "name": "modified",
            "value": "2025-12-16T09:24:09.040083+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": "6b546a5e-00a8-4768-9861-c05b573a4816",
                "name": "imaging_screen_library_types",
                "model_name": "category",
                "app_name": "vocabularies",
                "model_type": null
            },
            "category": "property"
        },
        "choice_label": {
            "name": "choice_label",
            "category": "property",
            "value": "imaging_screen_library_types"
        },
        "description": {
            "name": "description",
            "category": "property",
            "value": "A screening library is a collection of materials engineered to identify qualities of a subset of its members during a screening process. http://www.ebi.ac.uk/efo/EFO_0007559"
        },
        "label": {
            "name": "label",
            "category": "property",
            "value": "Imaging Screening Library Type"
        },
        "status": {
            "name": "status",
            "value": {
                "value": "ACTIVE",
                "label": "Active"
            },
            "category": "property"
        },
        "source": {
            "name": "source",
            "category": "property",
            "value": "http://www.ebi.ac.uk/efo/releases/v3.36.0/efo.owl"
        },
        "version": {
            "name": "version",
            "category": "property",
            "value": "3.36.0"
        },
        "terms": {
            "name": "terms",
            "category": "property",
            "value": [
                {
                    "id": "f86b3445-a166-4ef5-96c0-c857edce2a72",
                    "name": "YFP protein fusion library",
                    "description": "a collection of sets of cells in which a different gene is targetted in each set such that it results in a protein fused with the YFP protein",
                    "dbxref_id": "EFO_0007567",
                    "default": false,
                    "short_name": "YFP protein fusion library",
                    "image_url": "",
                    "public": true
                },
                {
                    "id": "cb134032-e5da-4022-8c04-ff11d1cb3cd0",
                    "name": "HA-Flag protein fusion library",
                    "description": "a collection of sets of cells in which a different gene is targetted in each set such that it results in a protein fused with HA and FLAG protein epitopes",
                    "dbxref_id": "EFO_0007568",
                    "default": false,
                    "short_name": "HA-Flag protein fusion library",
                    "image_url": "",
                    "public": true
                },
                {
                    "id": "6ba51249-c306-462a-a0e5-2d0e779b3f1c",
                    "name": "GFP protein fusion library",
                    "description": "a collection of sets of cells in which a different gene is targetted in each set such that it results in a protein fused with the GFP protein",
                    "dbxref_id": "EFO_0007566",
                    "default": false,
                    "short_name": "GFP protein fusion library",
                    "image_url": "",
                    "public": true
                },
                {
                    "id": "78567deb-b2ff-4cca-84a7-217d8c3e04f0",
                    "name": "tag protein fusion library",
                    "description": "a collection of sets of cells in which a different gene is targetted in each set such that it results in a recombinant protein with a polypeptide fusion partner or tag which can be used for protein detection",
                    "dbxref_id": "EFO_0007565",
                    "default": false,
                    "short_name": "tag protein fusion library",
                    "image_url": "",
                    "public": true
                },
                {
                    "id": "73bdd733-8b20-4f3c-b96e-888716fb1217",
                    "name": "haploid deletion library",
                    "description": "a collection of sets of haploid cells in which a different gene has been deleted in each set",
                    "dbxref_id": "EFO_0007561",
                    "default": false,
                    "short_name": "haploid deletion library",
                    "image_url": "",
                    "public": true
                },
                {
                    "id": "742f3fa5-3e61-427b-b80a-7da8663faf2e",
                    "name": "diploid homozygous deletion library",
                    "description": "a collection of sets of diploid cells in which a different gene has been deleted in each set, such that both copies of the gene has been deleted",
                    "dbxref_id": "EFO_0007562",
                    "default": false,
                    "short_name": "diploid homozygous deletion library",
                    "image_url": "",
                    "public": true
                },
                {
                    "id": "3a2a5ce5-4cb5-446d-989b-69094524d5bf",
                    "name": "gene deletion library",
                    "description": "A collection of sets of cells in which a different target gene has been deleted in each set",
                    "dbxref_id": "EFO_0007560",
                    "default": false,
                    "short_name": "gene deletion library",
                    "image_url": "",
                    "public": true
                },
                {
                    "id": "68ab4eb9-44d7-4f41-9325-0fc8e4901053",
                    "name": "compound library",
                    "description": "The name of a small molecule collection from one source, which can be either commercial or academic, e.g., MLSMR, LOPAC, etc. This collection is generally diverse and contains compounds that modulate diverse biological targets.",
                    "dbxref_id": "EFO_0007569",
                    "default": false,
                    "short_name": "compound library",
                    "image_url": "",
                    "public": true
                },
                {
                    "id": "caa6bf7b-c7e1-4c2a-951c-091f9efdbcb9",
                    "name": "siRNA library",
                    "description": "RNAi library that is comprised of small (20-25 nucleotides) interfering RNA or silencing RNA that targets mRNA for degradation. siRNAs are synthetic double-stranded RNA. siRNA libraries are NOT in expression vectors. The siRNAs are directly transfected into cells.",
                    "dbxref_id": "EFO_0007564",
                    "default": false,
                    "short_name": "siRNA library",
                    "image_url": "",
                    "public": true
                },
                {
                    "id": "ad923454-e181-4478-9979-6a0768db37c7",
                    "name": "RNAi library",
                    "description": "Nucleic acid library that is comprised of small interfering RNA molecules.",
                    "dbxref_id": "EFO_0007563",
                    "default": false,
                    "short_name": "RNAi library",
                    "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"
        }
    }
}