Hi Team,
We are trying to implement the get-search API and passing the sort=modified_at&direction=ASC in URL but not getting the sort data also if I tried by passing direction as DESC then also getting the response in the same order.
Request URL: https://api.box.com/2.0/search?file_extensions=java,txt,csv&query=f&sort=modified_at&direction=ASC
Response:
{
"total_count": 4,
"entries": [
{
"type": "file",
"id": "763588855519",
"file_version": {
"type": "file_version",
"id": "814427942719",
"sha1": "21d19c2ba8f06a30a464f308fe732e0d5321aa98"
},
"sequence_id": "0",
"etag": "0",
"sha1": "21d19c2ba8f06a30a464f308fe732e0d5321aa98",
"name": "demo-file2.csv",
"description": "",
"size": 96,
"path_collection": {
"total_count": 1,
"entries": [
{
"type": "folder",
"id": "0",
"sequence_id": null,
"etag": null,
"name": "All Files"
}
]
},
"created_at": "2021-01-12T23:07:33-08:00",
"modified_at": "2021-01-12T23:07:33-08:00",
"trashed_at": null,
"purged_at": null,
"content_created_at": "2020-07-10T02:23:27-07:00",
"content_modified_at": "2020-07-10T02:23:27-07:00",
"created_by": {
"type": "user",
"id": "6893528044",
"name": "Jeet Prakash",
"login": "jeet.prakash+boxdev@jitterbit.com"
},
"modified_by": {
"type": "user",
"id": "6893528044",
"name": "Jeet Prakash",
"login": "jeet.prakash+boxdev@jitterbit.com"
},
"owned_by": {
"type": "user",
"id": "6893528044",
"name": "Jeet Prakash",
"login": "jeet.prakash+boxdev@jitterbit.com"
},
"shared_link": null,
"parent": {
"type": "folder",
"id": "0",
"sequence_id": null,
"etag": null,
"name": "All Files"
},
"item_status": "active"
},
{
"type": "file",
"id": "763568741183",
"file_version": {
"type": "file_version",
"id": "814404894383",
"sha1": "d0102ed19296717a42a51589e323fa26f7bbf7f0"
},
"sequence_id": "0",
"etag": "0",
"sha1": "d0102ed19296717a42a51589e323fa26f7bbf7f0",
"name": "demo-filenewc.csv",
"description": "",
"size": 96,
"path_collection": {
"total_count": 1,
"entries": [
{
"type": "folder",
"id": "0",
"sequence_id": null,
"etag": null,
"name": "All Files"
}
]
},
"created_at": "2021-01-12T23:07:37-08:00",
"modified_at": "2021-01-12T23:07:37-08:00",
"trashed_at": null,
"purged_at": null,
"content_created_at": "2020-06-05T04:18:57-07:00",
"content_modified_at": "2020-06-05T04:18:57-07:00",
"created_by": {
"type": "user",
"id": "6893528044",
"name": "Jeet Prakash",
"login": "jeet.prakash+boxdev@jitterbit.com"
},
"modified_by": {
"type": "user",
"id": "6893528044",
"name": "Jeet Prakash",
"login": "jeet.prakash+boxdev@jitterbit.com"
},
"owned_by": {
"type": "user",
"id": "6893528044",
"name": "Jeet Prakash",
"login": "jeet.prakash+boxdev@jitterbit.com"
},
"shared_link": null,
"parent": {
"type": "folder",
"id": "0",
"sequence_id": null,
"etag": null,
"name": "All Files"
},
"item_status": "active"
},
{
"type": "file",
"id": "763292893651",
"file_version": {
"type": "file_version",
"id": "814076670451",
"sha1": "2351d91b70087236bd440518a9a9717fe1983447"
},
"sequence_id": "0",
"etag": "0",
"sha1": "2351d91b70087236bd440518a9a9717fe1983447",
"name": "file.java",
"description": "",
"size": 33183,
"path_collection": {
"total_count": 3,
"entries": [
{
"type": "folder",
"id": "0",
"sequence_id": null,
"etag": null,
"name": "All Files"
},
{
"type": "folder",
"id": "63240439633",
"sequence_id": "0",
"etag": "0",
"name": "folder"
},
{
"type": "folder",
"id": "74659548772",
"sequence_id": "0",
"etag": "0",
"name": "from_workato2"
}
]
},
"created_at": "2021-01-12T04:27:10-08:00",
"modified_at": "2021-01-12T04:27:10-08:00",
"trashed_at": null,
"purged_at": null,
"content_created_at": "2019-01-03T04:50:37-08:00",
"content_modified_at": "2019-01-03T04:50:37-08:00",
"created_by": {
"type": "user",
"id": "6893528044",
"name": "Jeet Prakash",
"login": "jeet.prakash+boxdev@jitterbit.com"
},
"modified_by": {
"type": "user",
"id": "6893528044",
"name": "Jeet Prakash",
"login": "jeet.prakash+boxdev@jitterbit.com"
},
"owned_by": {
"type": "user",
"id": "6893528044",
"name": "Jeet Prakash",
"login": "jeet.prakash+boxdev@jitterbit.com"
},
"shared_link": null,
"parent": {
"type": "folder",
"id": "74659548772",
"sequence_id": "0",
"etag": "0",
"name": "from_workato2"
},
"item_status": "active"
},
{
"type": "file",
"id": "379803472641",
"file_version": {
"type": "file_version",
"id": "401480680641",
"sha1": "2351d91b70087236bd440518a9a9717fe1983447"
},
"sequence_id": "1",
"etag": "1",
"sha1": "2351d91b70087236bd440518a9a9717fe1983447",
"name": "file.java",
"description": "",
"size": 33183,
"path_collection": {
"total_count": 1,
"entries": [
{
"type": "folder",
"id": "0",
"sequence_id": null,
"etag": null,
"name": "All Files"
}
]
},
"created_at": "2019-01-07T22:48:58-08:00",
"modified_at": "2019-01-07T22:49:16-08:00",
"trashed_at": null,
"purged_at": null,
"content_created_at": "2019-01-03T04:50:37-08:00",
"content_modified_at": "2019-01-03T04:50:37-08:00",
"created_by": {
"type": "user",
"id": "6893528044",
"name": "Jeet Prakash",
"login": "jeet.prakash+boxdev@jitterbit.com"
},
"modified_by": {
"type": "user",
"id": "6893528044",
"name": "Jeet Prakash",
"login": "jeet.prakash+boxdev@jitterbit.com"
},
"owned_by": {
"type": "user",
"id": "6893528044",
"name": "Jeet Prakash",
"login": "jeet.prakash+boxdev@jitterbit.com"
},
"shared_link": null,
"parent": {
"type": "folder",
"id": "0",
"sequence_id": null,
"etag": null,
"name": "All Files"
},
"item_status": "active"
}
],
"limit": 30,
"offset": 0
}