Search for content API | Direction and Sort Field is not working as expected

New post

Comments

4 comments

  • Official comment
    Kourtney

    Hello All,

    I was able to reproduce the behavior of a bug with sorting with ASC/DESC, as well as using the sort_by query param. I will proceed with filing a bug ticket with our engineering team.

    I am not seeing the trimming you're seeing @Mulesoft. You will need to submit a support ticket from a paid account in order for our support team to further troubleshoot if needed.

    Best,

    Kourtney, Box Developer Advocate 

    Comment actions Permalink
  • Mulesoft Developers

    Hi,

    we are also facing the same issue with sorting.

    If we make request to this endpoint

    https://{{api.box.com}}/2.0/search?ancestor_folder_ids=118924929165&query=file&created_at_range=2021-01-22T10:53:43-08:00&sort=modified_at&direction=ASC

    the response is (trimmed)

    {
    "total_count": 3,
    "entries": [
    {
    "created_at": "2021-01-26T01:09:49-08:00",
    "modified_at": "2021-01-26T01:09:49-08:00"
    },
    {
    "created_at": "2021-01-26T01:10:05-08:00",
    "modified_at": "2021-01-26T01:10:05-08:00"
    },
    {
    "created_at": "2021-01-26T01:09:58-08:00",
    "modified_at": "2021-01-26T01:09:58-08:00"
    }
    ],
    "limit": 30,
    "offset": 0
    }
     
    If we change query param direction=ASC to DESC the response is the same. This is not working as expected. Could you please look at it ? Really appreciate it. Thank you
    0
    Comment actions Permalink
  • jeetprakash

    Hello Box Team,

    Waiting for your reply.

    0
    Comment actions Permalink
  • Mulesoft Developers

    Hi Kourtney,

    thank you for your response. The trimmed version is only for demonstration purpose to not overload here with data. I just trimmed it here to show what is the problem. Thanks for you help.

    0
    Comment actions Permalink

Please sign in to leave a comment.