Download OpenAPI specification:Download
This documentation describes how to retrieve, store and update saved queries.
Retrieve a paginated response of saved queries
Note: endpoint is available with "query-builder" feature
Array of objects (Saved query) | |
object |
{- "data": [
- {
- "id": 2432,
- "name": "string",
- "description": "Sample saved query",
- "query": [
- {
- "predicate": "andWhere",
- "field": "first_name, appear_in_directory, t_shirt_size",
- "relationType": "user",
- "operator": "=",
- "value": "Medium"
}
], - "type": "users",
- "global": true,
- "created_at": "2023-01-05 14:40:25",
- "created_by": {
- "id": 46485,
- "display_name": "John Smith",
- "title": "Mr",
- "can_manage": true,
- "role_name": "Volunteer",
- "team_name": "Kent",
- "about_me": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Laoreet suspendisse interdum consectetur libero id faucibus nisl tincidunt eget.",
- "facebook": "john.smith",
- "twitter": "john.smith",
- "on_hold": "with-contact",
- "appear_in_directory": true,
- "appear_in_near_me": true,
- "is_volunteer": true,
- "is_non_volunteer": true,
- "is_system": true,
- "anonymised": null,
- "volunteer_for": "2 years",
- "on_call": true,
- "on_call_end": "2019-08-24T14:15:22Z",
- "first_name": "John",
- "last_name": "Smith",
- "username": "john.smith",
- "dob": "1985-01-01",
- "adult_at_risk": true,
- "preferred_name": "string",
- "on_hold_start": "string",
- "on_hold_end": "string",
- "status": {
- "id": "1",
- "name": "Active",
- "contactable": true
}, - "is_minor": true,
- "start_date": "2020-01-01",
- "2fa_enabled": true,
- "2fa_disabled": true,
- "internal_email": "string",
- "flags": { },
- "accessibility_info": "string",
- "finance_ref": "string",
- "int_ref": "string",
- "personal_risk_assessment": {
- "id": 5982
}
}, - "updated_at": "2023-01-05 14:40:25",
- "ephemeral": true
}
], - "meta": {
- "pagination": {
- "total": "string",
- "count": "string",
- "per_page": "string",
- "current_page": "string",
- "total_pages": "string",
- "links": {
- "next": "string",
- "previous": "string"
}
}
}
}
Create a new saved query
Note: endpoint is available with "query-builder" feature
name | string |
description | string |
Array of objects | |
global | boolean Specifies whether the query should be made available to the entire organisation |
object (Saved query) A model representing a stored query created using the query builder |
{- "name": "string",
- "description": "string",
- "query": [
- {
- "predicate": "andWhere",
- "field": "first_name, appear_in_directory, t_shirt_size",
- "relationType": "user",
- "operator": "=",
- "value": "Medium"
}
], - "global": true
}
{- "data": {
- "id": 2432,
- "name": "string",
- "description": "Sample saved query",
- "query": [
- {
- "predicate": "andWhere",
- "field": "first_name, appear_in_directory, t_shirt_size",
- "relationType": "user",
- "operator": "=",
- "value": "Medium"
}
], - "type": "users",
- "global": true,
- "created_at": "2023-01-05 14:40:25",
- "created_by": {
- "id": 46485,
- "display_name": "John Smith",
- "title": "Mr",
- "can_manage": true,
- "role_name": "Volunteer",
- "team_name": "Kent",
- "about_me": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Laoreet suspendisse interdum consectetur libero id faucibus nisl tincidunt eget.",
- "facebook": "john.smith",
- "twitter": "john.smith",
- "on_hold": "with-contact",
- "appear_in_directory": true,
- "appear_in_near_me": true,
- "is_volunteer": true,
- "is_non_volunteer": true,
- "is_system": true,
- "anonymised": null,
- "volunteer_for": "2 years",
- "on_call": true,
- "on_call_end": "2019-08-24T14:15:22Z",
- "first_name": "John",
- "last_name": "Smith",
- "username": "john.smith",
- "dob": "1985-01-01",
- "adult_at_risk": true,
- "preferred_name": "string",
- "on_hold_start": "string",
- "on_hold_end": "string",
- "status": {
- "id": "1",
- "name": "Active",
- "contactable": true
}, - "is_minor": true,
- "start_date": "2020-01-01",
- "2fa_enabled": true,
- "2fa_disabled": true,
- "internal_email": "string",
- "flags": { },
- "accessibility_info": "string",
- "finance_ref": "string",
- "int_ref": "string",
- "personal_risk_assessment": {
- "id": 5982
}
}, - "updated_at": "2023-01-05 14:40:25",
- "ephemeral": true
}
}
Retrieve a specific saved query
Note: endpoint is available with "query-builder" feature
id required | string |
object (Saved query) A model representing a stored query created using the query builder |
{- "data": {
- "id": 2432,
- "name": "string",
- "description": "Sample saved query",
- "query": [
- {
- "predicate": "andWhere",
- "field": "first_name, appear_in_directory, t_shirt_size",
- "relationType": "user",
- "operator": "=",
- "value": "Medium"
}
], - "type": "users",
- "global": true,
- "created_at": "2023-01-05 14:40:25",
- "created_by": {
- "id": 46485,
- "display_name": "John Smith",
- "title": "Mr",
- "can_manage": true,
- "role_name": "Volunteer",
- "team_name": "Kent",
- "about_me": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Laoreet suspendisse interdum consectetur libero id faucibus nisl tincidunt eget.",
- "facebook": "john.smith",
- "twitter": "john.smith",
- "on_hold": "with-contact",
- "appear_in_directory": true,
- "appear_in_near_me": true,
- "is_volunteer": true,
- "is_non_volunteer": true,
- "is_system": true,
- "anonymised": null,
- "volunteer_for": "2 years",
- "on_call": true,
- "on_call_end": "2019-08-24T14:15:22Z",
- "first_name": "John",
- "last_name": "Smith",
- "username": "john.smith",
- "dob": "1985-01-01",
- "adult_at_risk": true,
- "preferred_name": "string",
- "on_hold_start": "string",
- "on_hold_end": "string",
- "status": {
- "id": "1",
- "name": "Active",
- "contactable": true
}, - "is_minor": true,
- "start_date": "2020-01-01",
- "2fa_enabled": true,
- "2fa_disabled": true,
- "internal_email": "string",
- "flags": { },
- "accessibility_info": "string",
- "finance_ref": "string",
- "int_ref": "string",
- "personal_risk_assessment": {
- "id": 5982
}
}, - "updated_at": "2023-01-05 14:40:25",
- "ephemeral": true
}
}
Update an existing saved query
Note: endpoint is available with "query-builder" feature
id required | string |
id | integer The unique ID of the saved query record |
name | string <= 255 characters Name of the saved query |
description | string <= 255 characters The description of a saved query |
Array of objects An array of Query Builder Fragments to filter results by | |
global | boolean Specifies whether the saved query can be accessible by other users in the organisation |
created_at | string <date-time> Creation time of the saved query |
object | |
ephemeral | boolean When true, indicates this is a temporary query that will be deleted after execution |
object (Saved query) A model representing a stored query created using the query builder |
{- "id": 2432,
- "name": "string",
- "description": "Sample saved query",
- "query": [
- {
- "predicate": "andWhere",
- "field": "first_name, appear_in_directory, t_shirt_size",
- "relationType": "user",
- "operator": "=",
- "value": "Medium"
}
], - "global": true,
- "created_at": "2023-01-05 14:40:25",
- "created_by": {
- "id": 46485,
- "title": "Mr",
- "can_manage": true,
- "about_me": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Laoreet suspendisse interdum consectetur libero id faucibus nisl tincidunt eget.",
- "facebook": "john.smith",
- "twitter": "john.smith",
- "appear_in_directory": true,
- "appear_in_near_me": true,
- "on_call": true,
- "on_call_end": "2019-08-24T14:15:22Z",
- "first_name": "John",
- "last_name": "Smith",
- "dob": "1985-01-01",
- "adult_at_risk": true,
- "preferred_name": "string",
- "on_hold_start": "string",
- "on_hold_end": "string",
- "status": { },
- "start_date": "2020-01-01",
- "2fa_disabled": true,
- "accessibility_info": "string",
- "finance_ref": "string",
- "int_ref": "string",
- "personal_risk_assessment": {
- "id": 5982
}
}, - "ephemeral": true
}
{- "data": {
- "id": 2432,
- "name": "string",
- "description": "Sample saved query",
- "query": [
- {
- "predicate": "andWhere",
- "field": "first_name, appear_in_directory, t_shirt_size",
- "relationType": "user",
- "operator": "=",
- "value": "Medium"
}
], - "type": "users",
- "global": true,
- "created_at": "2023-01-05 14:40:25",
- "created_by": {
- "id": 46485,
- "display_name": "John Smith",
- "title": "Mr",
- "can_manage": true,
- "role_name": "Volunteer",
- "team_name": "Kent",
- "about_me": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Laoreet suspendisse interdum consectetur libero id faucibus nisl tincidunt eget.",
- "facebook": "john.smith",
- "twitter": "john.smith",
- "on_hold": "with-contact",
- "appear_in_directory": true,
- "appear_in_near_me": true,
- "is_volunteer": true,
- "is_non_volunteer": true,
- "is_system": true,
- "anonymised": null,
- "volunteer_for": "2 years",
- "on_call": true,
- "on_call_end": "2019-08-24T14:15:22Z",
- "first_name": "John",
- "last_name": "Smith",
- "username": "john.smith",
- "dob": "1985-01-01",
- "adult_at_risk": true,
- "preferred_name": "string",
- "on_hold_start": "string",
- "on_hold_end": "string",
- "status": {
- "id": "1",
- "name": "Active",
- "contactable": true
}, - "is_minor": true,
- "start_date": "2020-01-01",
- "2fa_enabled": true,
- "2fa_disabled": true,
- "internal_email": "string",
- "flags": { },
- "accessibility_info": "string",
- "finance_ref": "string",
- "int_ref": "string",
- "personal_risk_assessment": {
- "id": 5982
}
}, - "updated_at": "2023-01-05 14:40:25",
- "ephemeral": true
}
}
Check if a query is valid and can be executed by the current user
Note: endpoint is available with "query-builder" feature
Array of objects | |
name | string |
description | string |
can_save | boolean Whether the query structure is valid |
can_view | boolean Whether the user has permission to access all fields used in the query |
{- "query": [
- {
- "predicate": "andWhere",
- "field": "first_name, appear_in_directory, t_shirt_size",
- "relationType": "user",
- "operator": "=",
- "value": "Medium"
}
], - "name": "string",
- "description": "string"
}
{- "can_save": true,
- "can_view": true
}