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

get
Filter List

{{ base_url }} /tables/filter/list/{level}/{sid}/{serializer}/
Request
Response
Request
Path Parameters
level
required
string
organization
sid
required
string
organization sid
serializer
required
string
Headers
token
required
string
Query Parameters
table__sid
required
string
Response
200: OK
# 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
},
...
]
}

post
Filter List

{{ base_url }} /tables/filter/list/{level}/{sid}/{serializer}/
Request
Response
Request
Path Parameters
level
required
string
organization
sid
required
string
organization sid
serializer
required
string
Headers
token
required
string
Query Parameters
table__sid
required
string
Form Data Parameters
name
required
string
description
optional
string
is_archived
optional
boolean
users
optional
array
query
required
object
{field__expr: value}
Response
200: OK
{
"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
}

get
Filter Detail

{{ base_url }} /tables/filter/detail/{sid}/
Request
Response
Request
Path Parameters
sid
required
string
Headers
token
required
string
Response
200: OK
{
"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
}

patch
Filter Detail

{{ base_url }} /tables/filter/detail/{sid}/
Request
Response
Request
Path Parameters
sid
required
string
Headers
token
required
string
Form Data Parameters
name
optional
string
description
optional
string
is_archived
optional
string
users
optional
string
query
optional
string
Please note this is different to POST
Response
200: OK
{
"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
}

delete
Filter Detail

{{ base_url }} /tables/filter/detail/{sid}/
Request
Response
Request
Path Parameters
sid
required
string
Headers
token
required
string
Response
204: No Content
{}