Filter

API for Filter object

Method & Permission

API

GET

POST

PUT

PATCH

DELETE

Filter List

Admin, Member*

Admin, Member

-

-

-

Filter Detail

Admin, Member*

-

-

Admin, Member*

Admin, Member*

*Member can only view/edit the filters belong to the members

Filter List

GET {{ base_url }} /tables/filter/list/{level}/{sid}/{serializer}/

Path Parameters

Name
Type
Description

level

string

organization

sid

string

organization sid

serializer

string

Query Parameters

Name
Type
Description

table__sid

string

Headers

Name
Type
Description

token

string

# serializer = name
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 1,
    "count": 5,
    "next": null,
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "My experiments",
            "count": 2
        },
        ...
    ]
}
# serializer = list
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 1,
    "count": 5,
    "next": null,
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "My experiments",
            "description": "The experiments created by me",
            "query": "{\"user__profile__euid\": \"xxx\"}",
            "users": [
                {
                    "sid": "xxx",
                    "name": "xxx"
                }
            ],
            "show_in_menu": true,
            "digest_frequency": "None",
            "is_default": false,
            "is_archived": false,
            "table": {
                "sid": "xxx",
                "name": "experiments"
            },
            "change_permission": true
        },
        ...
    ]
}
# serializer = detail
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 1,
    "count": 5,
    "next": null,
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "table": {
                "sid": "xxx",
                "name": "experiments"
            },
            "name": "My experiments",
            "description": "The experiments created by me",
            "query": "{\"user__profile__euid\": \"xxx\"}",
            "users": [
                {
                    "sid": "xxx",
                    "name": "xxx"
                }
            ],
            "digest_frequency": "None",
            "show_in_menu": true,
            "is_default": false,
            "is_archived": false,
            "date_updated": "2020-05-16T01:43:55.354273Z",
            "date_created": "2020-02-10T03:02:27.135768Z",
            "change_permission": true
        },
        ...
    ]
}

Filter List

POST {{ base_url }} /tables/filter/list/{level}/{sid}/{serializer}/

Path Parameters

Name
Type
Description

level

string

organization

sid

string

organization sid

serializer

string

Query Parameters

Name
Type
Description

table__sid

string

Headers

Name
Type
Description

token

string

Request Body

Name
Type
Description

name

string

description

string

is_archived

boolean

users

array

query

object

{field__expr: value}

{
    "sid": "xxx",
    "table": {
        "sid": "xxx",
        "name": "experiments"
    },
    "name": "My experiments",
    "description": "The experiments created by me",
    "query": "{\"user__profile__euid\": \"xxx\"}",
    "users": [
        {
            "sid": "xxx",
            "name": "xxx"
        }
    ],
    "digest_frequency": "None",
    "show_in_menu": true,
    "is_default": false,
    "is_archived": false,
    "date_updated": "2020-05-16T01:43:55.354273Z",
    "date_created": "2020-02-10T03:02:27.135768Z",
    "change_permission": true
}

Filter Detail

GET {{ base_url }} /tables/filter/detail/{sid}/

Path Parameters

Name
Type
Description

sid

string

Headers

Name
Type
Description

token

string

{
    "sid": "xxx",
    "table": {
        "sid": "xxx",
        "name": "experiments"
    },
    "name": "My experiments",
    "description": "The experiments created by me",
    "query": "{\"user__profile__euid\": \"xxx\"}",
    "users": [
        {
            "sid": "xxx",
            "name": "xxx"
        }
    ],
    "digest_frequency": "None",
    "show_in_menu": true,
    "is_default": false,
    "is_archived": false,
    "date_updated": "2020-05-16T01:43:55.354273Z",
    "date_created": "2020-02-10T03:02:27.135768Z",
    "change_permission": true
}

Filter Detail

PATCH {{ base_url }} /tables/filter/detail/{sid}/

Path Parameters

Name
Type
Description

sid

string

Headers

Name
Type
Description

token

string

Request Body

Name
Type
Description

name

string

description

string

is_archived

string

users

string

query

string

Please note this is different to POST

{
    "sid": "xxx",
    "table": {
        "sid": "xxx",
        "name": "experiments"
    },
    "name": "My experiments",
    "description": "The experiments created by me",
    "query": "{\"user__profile__euid\": \"xxx\"}",
    "users": [
        {
            "sid": "xxx",
            "name": "xxx"
        }
    ],
    "digest_frequency": "None",
    "show_in_menu": true,
    "is_default": false,
    "is_archived": false,
    "date_updated": "2020-05-16T01:43:55.354273Z",
    "date_created": "2020-02-10T03:02:27.135768Z",
    "change_permission": true
}

Filter Detail

DELETE {{ base_url }} /tables/filter/detail/{sid}/

Path Parameters

Name
Type
Description

sid

string

Headers

Name
Type
Description

token

string

{}

Last updated