API endpoint that allows CustomProperties to be viewed or edited.

» click to learn about Filtering, Ordering and more...

Accepted filters:

- 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)
- type: Type (exact)
- label: Label (exact)
- model_name: Model name (exact)
- mandatory: Mandatory (exact)
- created_by: Created by Username (exact)
- modified_by: Modified by Username (exact)
- model_type: Model type (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

- created_by: created_by__username
- modified_by: modified_by__username
- owner: owner__username
- owned_by: owned_by__name
- deleted: <function filter_deleted at 0x7f45063765f0>
- deleted_by: deleted_by__username
- notes: notes__content
- cv_category: cv_category__name
- field_meta: field_meta__name
- mandatory_owned_by: mandatory_owned_by__name
- user: user__username
- credential: credential__name
- workflowversion: workflowversion__name
- workflowrun: workflowrun__name
- dataset: dataset__name

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 CustomProperties to be viewed or edited.

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/custompropertytypes/b6035215-443f-41d6-83c8-34f776352673/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "url": "https://labid-demo.embl.de/api/v2/custompropertytypes/b6035215-443f-41d6-83c8-34f776352673/?format=api",
    "id": "b6035215-443f-41d6-83c8-34f776352673",
    "created_by": "admin",
    "modified_by": "admin",
    "created": {
        "name": "created",
        "value": "2025-12-16T09:31:32.914079+01:00",
        "category": "property"
    },
    "modified": {
        "name": "modified",
        "value": "2025-12-16T09:31:32.914167+01:00",
        "category": "property"
    },
    "name": "stocks_virus_serotype",
    "choice_label": "stocks_virus_serotype",
    "description": "Serotype of this virus.",
    "public": false,
    "permissions": {
        "public": false,
        "actions": {
            "view": {
                "users": [
                    {
                        "id": 1,
                        "username": "admin",
                        "email": "admin@example.com",
                        "is_active": true,
                        "full_name": "Admin User"
                    }
                ],
                "groups": [
                    {
                        "id": 1,
                        "name": "SYSTEM_GROUP"
                    }
                ]
            },
            "change": {
                "users": [
                    {
                        "id": 1,
                        "username": "admin",
                        "email": "admin@example.com",
                        "is_active": true,
                        "full_name": "Admin User"
                    }
                ],
                "groups": [
                    {
                        "id": 1,
                        "name": "SYSTEM_GROUP"
                    }
                ]
            },
            "delete": {
                "users": [
                    {
                        "id": 1,
                        "username": "admin",
                        "email": "admin@example.com",
                        "is_active": true,
                        "full_name": "Admin User"
                    }
                ],
                "groups": []
            }
        }
    },
    "unit_choices_api": null,
    "type": "VOCABULARYTERM",
    "label": "Serotype",
    "help_text": "Serotype of this virus.",
    "default": "",
    "has_default": false,
    "multiple": false,
    "is_protocol_parameter": false,
    "autocomplete": "",
    "searchable": true,
    "readonly": false,
    "sortable": true,
    "cv_category": "00fb69c9-af69-43fb-8d1b-e25d4765ee2b",
    "mandatory": true,
    "validations": [
        {
            "name": "required",
            "arguments": [],
            "error_message": "This field is mandatory."
        }
    ],
    "visibility": "ALWAYS",
    "edit_visibility": "ALWAYS",
    "list_visibility": "ALWAYS",
    "value_choices": null,
    "choices_value": "id",
    "choices_label": "label",
    "choices_api": "https://labid-demo.embl.de/api/v2/vocabularies/terms/?category_id=00fb69c9-af69-43fb-8d1b-e25d4765ee2b&fields=id%2Clabel&ordering=name&page_size=20&response_format=flat",
    "preferred_view_widget": "CVVIEW",
    "preferred_edit_widget": "CVEDIT",
    "preferred_list_widget": "CSVTEXT",
    "field_meta": "ad0a3aab-0680-4e2b-b943-987013ba376b",
    "model_name": "stocks.specimen",
    "model_type": "VIRUS",
    "owner": "admin",
    "owned_by": "SYSTEM_GROUP"
}