Skip to main content

GlobalSearch

Perform a full-text search on data resources in your workspace

Description

  • Executes a full-text search for the specified word (query).
  • It will be searched only when the check of "Target for full-text search" in the field settings is ON.

Method

POST

Request URL Format

/api/v0/globalsearch

URL Params

(N/A)

Payload

query               : Specify search word(Required)。Separate with a half-width space for AND search
category : "items", "files", "histories" Specify one of the following. If not specified, all will be searched.
"items" : Search data in Item
"files" : Search for text in attachments
"histories" : Search for item history comments
app_id : Specify the application ID if you want to search for only the corresponding application
datastore_id : Specify the database ID (datastore-id) if you want to search only the corresponding database
field_id : Specify the field ID if you want to search only the corresponding field
return_item_list : If true is specified, the search result of [ItemList](/docs/v0/items/ItemList) is returned for the corresponding Item
item_search_params : [ItemList](/docs/v0/items/ItemList) filtering conditions, sorting, and pagination parameters can be specified

Request URL Sample

POST https://api.xxx.com/api/v0/globalsearch

Payload sample

{
"query": "タスクX",
"category": "items",
"app_id": "TestApp",
"datastore_id": "TODO-SAMPLE",
"field_id": "Assignee",
"return_item_list": true,
"item_search_params": {
"page": 1,
"per_page" : 100,
"sort_fields" : [{ "id" :"ID", "order": "desc" }]
}
}

Response Sample

"return_item_list": If false

{
"search_result": [
{
"category": "items",
"d_id": "5f38a11baa395581685afdb4",
"datastore_name": "TODO-SAMPLE",
"f_id": "5f38a11baa39556e74845a39",
"highlight_value": {
"value": [
"<em class='searched_em'>X</em>" // Returns the highlight value, including before and after the hit sentence
]
},
"i_id": "5f38a121aa395581685afdc0",
"p_id": "5f25956528dc5c55b463bc7b",
"project_name": "TestApp",
"title": "TaskE",
"w_id": "5f25956428dc5c55b463bc78"
},
{
"category": "items",
"d_id": "5f38a11baa395581685afdb4",
"datastore_name": "TODO-SAMPLE",
"f_id": "5f38a11baa39556e74845a39",
"highlight_value": {
"value": [
"<em class='searched_em'>X</em>"
]
},
"i_id": "5f38a121aa395581685afdc1",
"p_id": "5f25956528dc5c55b463bc7b",
"project_name": "TestApp",
"title": "TaskD",
"w_id": "5f25956428dc5c55b463bc78"
}
]
}

"return_item_list": If true

{
"item_list": {
"items": [
{
"Assignee": "X",
"AutoNum1": "PREFIX_6",
"Category": "A",
"Checkbox": "A",
"DueDate": "2015-12-31T15:00:00Z",
"LU2": null,
"Lookup1": "bbb",
"Num1": "5",
"Num2": "12",
"Radio": "B",
"Status": "Closed",
"Title": "TaskE",
"Total": "17",
"created_at": "2020-08-16T02:59:45Z",
"created_by": "IMPORT",
"d_id": "5f38a11baa395581685afdb4",
"i_id": "5f38a121aa395581685afdc0",
"p_id": "5f25956528dc5c55b463bc7b",
"rev_no": "8",
"status_id": "5f38a11baa39556e74845a3e",
"title": "TaskE",
"unread": "0",
"updated_at": "2021-04-27T06:59:27Z",
"updated_by": "5f25952c28dc5c55b463bc76"
},
{
"Assignee": "X",
"Category": "B",
"Checkbox": "B",
"DueDate": "2015-12-31T15:00:00Z",
"Status": "In Review",
"Title": "TaskD",
"User": "hi-hexabase",
"created_at": "2020-08-16T02:59:45Z",
"created_by": "IMPORT",
"d_id": "5f38a11baa395581685afdb4",
"i_id": "5f38a121aa395581685afdc1",
"p_id": "5f25956528dc5c55b463bc7b",
"rev_no": "4",
"status_id": "5f38a11baa39556e74845a41",
"title": "TaskD",
"unread": "0",
"updated_at": "2020-09-30T14:04:30Z",
"updated_by": "5f25952c28dc5c55b463bc76"
}
],
"totalItems": 2
},
"search_result": [
{
"category": "items",
"d_id": "5f38a11baa395581685afdb4",
"datastore_name": "TODO-SAMPLE",
"f_id": "5f38a11baa39556e74845a39",
"highlight_value": {
"value": [
"<em class='searched_em'>X</em>"
]
},
"i_id": "5f38a121aa395581685afdc0",
"p_id": "5f25956528dc5c55b463bc7b",
"project_name": "TestApp",
"title": "TaskE",
"w_id": "5f25956428dc5c55b463bc78"
},
{
"category": "items",
"d_id": "5f38a11baa395581685afdb4",
"datastore_name": "TODO-SAMPLE",
"f_id": "5f38a11baa39556e74845a39",
"highlight_value": {
"value": [
"<em class='searched_em'>X</em>"
]
},
"i_id": "5f38a121aa395581685afdc1",
"p_id": "5f25956528dc5c55b463bc7b",
"project_name": "TestApp",
"title": "TaskD",
"w_id": "5f25956428dc5c55b463bc78"
}
]
}

If no data hit

{
"search_result": []
"item_list": {
"items": [],
"totalItems": 0
}
}