VMware Cloud Community
xian_
Expert
Expert

deployment requests orderby

I'm fetching all the deployment requests from a deployment and wanted to order the result. 

curl -s -k -H "Authorization: Bearer $access_token" 'https://vra8.corp.local/deployment/api/deployments/7bf9d205-f73b-4364-9e0d-cc482a2516b9/requests?$orderby=createdAt%20asc'

curl -s -k -H "Authorization: Bearer $access_token" 'https://vra8.corp.local/deployment/api/deployments/7bf9d205-f73b-4364-9e0d-cc482a2516b9/requests?$orderby=createdAt%20desc'

The parameter seems to be recognized but the results are always the same even if I change sort order:

 

...
   "queryInfo": {
      "orderBy": [
        {
          "expression": {
            "propertyName": "createdAt"
          },
          "direction": "DESCENDING"
        }
      ],
      "customOptions": {},
      "expand": [],
      "select": [],
      "rawOrderBy": "createdAt desc",
      "properties": [
        "createdAt"
      ],
      "sort": {
        "empty": false,
        "sorted": true,
        "unsorted": false
      }
...

 

Is this a bug or my query string is wrong?

0 Kudos
1 Reply
emacintosh
Hot Shot
Hot Shot

For what it's worth, I have the same experience (8.4.2).  Seems like a bug.

0 Kudos