I need to query "BackupJobSession" ordered by date, however, I can't find how.
My current workaround is to sort by name, due to the fact that, date is appended to name.
But, when Job is renamed, this workaround not working.
It's possible to sort "BackupJobSession" by date ?
Current query :
Code: Select all
https://10.10.10.10:9398/api/query?type=BackupJobSession&filter=JobUid==60d09f44-645e-0185-da00-a00b4dcc7b15&pageSize=1&page=1&sortDesc=date
Code: Select all
{
"Refs": {
"Refs": [
{
"Links": [
{
"Rel": "Up",
"Href": "https://10.10.10.10:9398/api/backupServers/2a164d6b-1a3f-45b3-89e6-ab12075ab1ff",
"Name": "veeam-server",
"Type": "BackupServerReference"
},
{
"Rel": "Up",
"Href": "https://10.10.10.10:9398/api/jobs/60d09f44-645e-0185-da00-a00b4dcc7b15",
"Name": "Backup Job Name",
"Type": "JobReference"
},
{
"Rel": "Alternate",
"Href": "https://10.10.10.10:9398/api/backupSessions/70b38e55-76aa-4d43-ad50-c6bb2a63e406?format=Entity",
"Name": "Backup Job Name@2019-05-17 03:15:19",
"Type": "BackupJobSession"
},
{
"Rel": "Down",
"Href": "https://10.10.10.10:9398/api/backupSessions/70b38e55-76aa-4d43-ad50-c6bb2a63e406/taskSessions",
"Type": "BackupTaskSessionReferenceList"
}
],
"UID": "urn:veeam:BackupJobSession:70b38e55-76aa-4d43-ad50-c6bb2a63e406",
"Name": "Backup Job Name@2019-05-17 03:15:19",
"Href": "https://10.10.10.10:9398/api/backupSessions/70b38e55-76aa-4d43-ad50-c6bb2a63e406",
"Type": "BackupJobSessionReference"
}
]
},
"PagingInfo": {
"Links": [
{
"Rel": "First",
"Href": "https://10.10.10.10:9398/api/query?type=BackupJobSession&filter=JobUid%3d%3d60d09f44-645e-0185-da00-a00b4dcc7b15&pageSize=1&page=1&sortDesc=name"
},
{
"Rel": "Next",
"Href": "https://10.10.10.10:9398/api/query?type=BackupJobSession&filter=JobUid%3d%3d60d09f44-645e-0185-da00-a00b4dcc7b15&pageSize=1&page=2&sortDesc=name"
},
{
"Rel": "Last",
"Href": "https://10.10.10.10:9398/api/query?type=BackupJobSession&filter=JobUid%3d%3d60d09f44-645e-0185-da00-a00b4dcc7b15&pageSize=1&page=200&sortDesc=name"
}
],
"PageNum": 1,
"PageSize": 1,
"PagesCount": 200
}
}