Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter on Swagger Docs not working #8211

Open
Dave2526 opened this issue Jan 16, 2024 · 3 comments
Open

Filter on Swagger Docs not working #8211

Dave2526 opened this issue Jan 16, 2024 · 3 comments

Comments

@Dave2526
Copy link

Dave2526 commented Jan 16, 2024

Hi there, i have a Problem with the v3-API swagger... I can get Data from Nightscout, but if I set a filter on The swagger Page I didn´t get any response from it... I tried the given filters and create one by myself, is there an error in it?

Not Working one (without baerer and url):

/api/v3/treatments?filter_parameters=eventType%24eq%3DProfile%2520Switch&sort%24desc=created_at&limit=100&skip=0 
/api/v3/treatments?filter_parameters=insulin%24ne%3D1.5&sort%24desc=created_at&limit=100&skip=0&fields=_all

Body respone:

{
  "status": 200,
  "result": []
}

Working one:

/api/v3/treatments?sort%24desc=created_at&limit=20&skip=0

Body response:

{
  "status": 200,
  "result": [
    {
      "app": "AAPS",
      "date": 1705403220000,
      "duration": 120,
      "durationInMilliseconds": 7200000,
      "eventType": "Temp Basal",
      "isReadOnly": false,
      "isValid": true,
      "percent": -100,
      "pumpId": 3410806440035,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "rate": 0,
      "type": "NORMAL",
      "utcOffset": 60,
      "created_at": "2024-01-16T11:07:00.000Z",
      "identifier": "c0ed7211-38a3-50ae-ae87-7046a4fb82e7",
      "srvModified": 1705403223347,
      "srvCreated": 1705403223347,
      "subject": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705403111000,
      "eventType": "Meal Bolus",
      "insulin": 12,
      "isBasalInsulin": false,
      "isReadOnly": false,
      "isValid": true,
      "pumpId": 3410806222034,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "type": "NORMAL",
      "utcOffset": 60,
      "created_at": "2024-01-16T11:05:11.000Z",
      "identifier": "00b8ee43-5a49-50fb-b2ad-14284ba4fdcc",
      "srvModified": 1705403114947,
      "srvCreated": 1705403114947,
      "subject": "Aaps"
    },
    {
      "app": "AAPS",
      "carbs": 50,
      "date": 1705402748964,
      "eventType": "Meal Bolus",
      "isReadOnly": false,
      "isValid": true,
      "notes": "",
      "utcOffset": 60,
      "created_at": "2024-01-16T10:59:08.964Z",
      "identifier": "a7b3476e-a30e-567d-8ccd-dcd3825a111c",
      "srvModified": 1705403113615,
      "srvCreated": 1705403113615,
      "subject": "Aaps"
    },
    {
      "app": "AAPS",
      "bolusCalculatorResult": "{\"basalIOB\":0.439,\"bolusIOB\":-0.304,\"carbs\":50.0,\"carbsInsulin\":13.815789473684212,\"cob\":0.0,\"cobInsulin\":0.0,\"dateCreated\":1705402748983,\"glucoseDifference\":0.0,\"glucoseInsulin\":0.0,\"glucoseTrend\":0.67,\"glucoseValue\":103.0,\"ic\":3.6190476190476186,\"id\":733,\"interfaceIDs_backing\":{},\"isValid\":true,\"isf\":35.714285714285715,\"note\":\"\",\"otherCorrection\":0.0,\"percentageCorrection\":95,\"profileName\":\"Arbeit_Mo-Do Buero(105%)\",\"superbolusInsulin\":0.0,\"targetBGHigh\":110.0,\"targetBGLow\":100.0,\"timestamp\":1705402748964,\"totalInsulin\":13.3,\"trendInsulin\":0.056280000000000004,\"utcOffset\":3600000,\"version\":0,\"wasBasalIOBUsed\":true,\"wasBolusIOBUsed\":true,\"wasCOBUsed\":false,\"wasGlucoseUsed\":true,\"wasSuperbolusUsed\":false,\"wasTempTargetUsed\":false,\"wasTrendUsed\":true,\"wereCarbsUsed\":false}",
      "date": 1705402748964,
      "eventType": "Bolus Wizard",
      "glucose": 103,
      "isReadOnly": false,
      "isValid": true,
      "notes": "",
      "units": "mg/dl",
      "utcOffset": 60,
      "created_at": "2024-01-16T10:59:08.964Z",
      "identifier": "52364b82-f0d2-5f25-b04c-11b203b9dda4",
      "srvModified": 1705402749049,
      "srvCreated": 1705402749049,
      "subject": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705402308000,
      "eventType": "Correction Bolus",
      "insulin": 0.05,
      "isBasalInsulin": false,
      "isReadOnly": false,
      "isValid": true,
      "pumpId": 3410804616032,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "type": "SMB",
      "utcOffset": 60,
      "created_at": "2024-01-16T10:51:48.000Z",
      "identifier": "894d8756-060d-57ff-90e8-d476d9250921",
      "srvModified": 1705402313232,
      "srvCreated": 1705402313232,
      "subject": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705402299000,
      "duration": 4,
      "durationInMilliseconds": 242000,
      "eventType": "Temp Basal",
      "isReadOnly": false,
      "isValid": true,
      "percent": 30,
      "pumpId": 3410804598031,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "rate": 1.0237500000000002,
      "type": "NORMAL",
      "utcOffset": 60,
      "created_at": "2024-01-16T10:51:39.000Z",
      "identifier": "093b0dd6-ae79-5740-a8b6-15bab298d706",
      "srvModified": 1705402543877,
      "srvCreated": 1705402302384,
      "subject": "Aaps",
      "endId": 3410805082033,
      "modifiedBy": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705401679000,
      "eventType": "Correction Bolus",
      "insulin": 0.05,
      "isBasalInsulin": false,
      "isReadOnly": false,
      "isValid": true,
      "pumpId": 3410803358029,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "type": "SMB",
      "utcOffset": 60,
      "created_at": "2024-01-16T10:41:19.000Z",
      "identifier": "d16fd17f-9a0e-55e0-b6ce-e2a4052f3b0b",
      "srvModified": 1705401684620,
      "srvCreated": 1705401684620,
      "subject": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705401671000,
      "duration": 10,
      "durationInMilliseconds": 627000,
      "eventType": "Temp Basal",
      "isReadOnly": false,
      "isValid": true,
      "percent": 10,
      "pumpId": 3410803342028,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "rate": 0.8662500000000002,
      "type": "NORMAL",
      "utcOffset": 60,
      "created_at": "2024-01-16T10:41:11.000Z",
      "identifier": "0ea337bc-2c79-5db5-a34c-f4a202f63598",
      "srvModified": 1705402302263,
      "srvCreated": 1705401673986,
      "subject": "Aaps",
      "endId": 3410804596030,
      "modifiedBy": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705401414000,
      "duration": 4,
      "durationInMilliseconds": 256000,
      "eventType": "Temp Basal",
      "isReadOnly": false,
      "isValid": true,
      "percent": -80,
      "pumpId": 3410802828026,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "rate": 0.15750000000000003,
      "type": "NORMAL",
      "utcOffset": 60,
      "created_at": "2024-01-16T10:36:54.000Z",
      "identifier": "4edef93a-1eec-5111-9b4d-181b261bec22",
      "srvModified": 1705401673874,
      "srvCreated": 1705401417453,
      "subject": "Aaps",
      "endId": 3410803340027,
      "modifiedBy": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705401068000,
      "duration": 5,
      "durationInMilliseconds": 345000,
      "eventType": "Temp Basal",
      "isReadOnly": false,
      "isValid": true,
      "percent": -10,
      "pumpId": 3410802136024,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "rate": 0.7087500000000001,
      "type": "NORMAL",
      "utcOffset": 60,
      "created_at": "2024-01-16T10:31:08.000Z",
      "identifier": "4eb55d1a-6fd1-574f-90be-fda4c356772b",
      "srvModified": 1705401417324,
      "srvCreated": 1705401080676,
      "subject": "Aaps",
      "endId": 3410802826025,
      "modifiedBy": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705400474000,
      "eventType": "Correction Bolus",
      "insulin": 0.05,
      "isBasalInsulin": false,
      "isReadOnly": false,
      "isValid": true,
      "pumpId": 3410800948022,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "type": "SMB",
      "utcOffset": 60,
      "created_at": "2024-01-16T10:21:14.000Z",
      "identifier": "a442c84b-1cd2-5854-8235-5ae8f7b40499",
      "srvModified": 1705400479166,
      "srvCreated": 1705400479166,
      "subject": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705400465000,
      "duration": 10,
      "durationInMilliseconds": 602000,
      "eventType": "Temp Basal",
      "isReadOnly": false,
      "isValid": true,
      "percent": 30,
      "pumpId": 3410800930021,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "rate": 1.0237500000000002,
      "type": "NORMAL",
      "utcOffset": 60,
      "created_at": "2024-01-16T10:21:05.000Z",
      "identifier": "d111b914-11cf-59fa-ab5b-77f79dc1cfa6",
      "srvModified": 1705401080518,
      "srvCreated": 1705400468119,
      "subject": "Aaps",
      "endId": 3410802134023,
      "modifiedBy": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705399614000,
      "duration": 14,
      "durationInMilliseconds": 850000,
      "eventType": "Temp Basal",
      "isReadOnly": false,
      "isValid": true,
      "percent": -100,
      "pumpId": 3410799228019,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "rate": 0,
      "type": "NORMAL",
      "utcOffset": 60,
      "created_at": "2024-01-16T10:06:54.000Z",
      "identifier": "db9ca831-23ec-5135-b101-d4f09f1af40a",
      "srvModified": 1705400467988,
      "srvCreated": 1705399617320,
      "subject": "Aaps",
      "endId": 3410800928020,
      "modifiedBy": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705398990000,
      "duration": 10,
      "durationInMilliseconds": 623000,
      "eventType": "Temp Basal",
      "isReadOnly": false,
      "isValid": true,
      "percent": -60,
      "pumpId": 3410797980017,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "rate": 0.31500000000000006,
      "type": "NORMAL",
      "utcOffset": 60,
      "created_at": "2024-01-16T09:56:30.000Z",
      "identifier": "6d0452e1-6414-5f4e-b568-f8a213500add",
      "srvModified": 1705399617134,
      "srvCreated": 1705398993616,
      "subject": "Aaps",
      "endId": 3410799226018,
      "modifiedBy": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705398647000,
      "duration": 5,
      "durationInMilliseconds": 342000,
      "eventType": "Temp Basal",
      "isReadOnly": false,
      "isValid": true,
      "percent": -50,
      "pumpId": 3410797294015,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "rate": 0.39375000000000004,
      "type": "NORMAL",
      "utcOffset": 60,
      "created_at": "2024-01-16T09:50:47.000Z",
      "identifier": "2d3ccb53-6614-5a82-b7f1-b5ef68c8b063",
      "srvModified": 1705398993324,
      "srvCreated": 1705398650115,
      "subject": "Aaps",
      "endId": 3410797978016,
      "modifiedBy": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705396546000,
      "duration": 35,
      "durationInMilliseconds": 2100000,
      "eventType": "Temp Basal",
      "isReadOnly": false,
      "isValid": true,
      "percent": -100,
      "pumpId": 3410793092013,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "rate": 0,
      "type": "NORMAL",
      "utcOffset": 60,
      "created_at": "2024-01-16T09:15:46.000Z",
      "identifier": "d0d53f19-2529-5918-b725-78037d9ba9ed",
      "srvModified": 1705398649979,
      "srvCreated": 1705396548951,
      "subject": "Aaps",
      "endId": 3410797292014,
      "modifiedBy": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705395956331,
      "eventType": "Note",
      "isReadOnly": false,
      "isValid": true,
      "notes": "Arbeit_Mo-Do Buero(105%)",
      "originalCustomizedName": "Arbeit_Mo-Do Buero(105%)",
      "originalDuration": 0,
      "originalEnd": 1705395946000,
      "originalPercentage": 105,
      "originalProfileName": "Arbeit_Mo-Do Buero",
      "originalTimeshift": 0,
      "profileJson": "{\"units\":\"mg\\/dl\",\"dia\":6,\"timezone\":\"Europe\\/Brussels\",\"sens\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":38.095238095238095},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":52.38095238095238},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":47.61904761904761},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":35.714285714285715},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":38.095238095238095},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":42.857142857142854},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":28.57142857142857}],\"carbratio\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":10.476190476190476},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":8.571428571428571},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":3.6190476190476186},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":4.761904761904762},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":7.142857142857142},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":10.476190476190476}],\"basal\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":1.3125},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":1.6800000000000002},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":1.3125},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":1.2075},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":1.3125},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":1.47},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":1.2075},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":0.7875000000000001},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":0.63},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":0.6825000000000001},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":1.3125},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":1.47},{\"time\":\"19:00\",\"timeAsSeconds\":68400,\"value\":1.2075},{\"time\":\"20:00\",\"timeAsSeconds\":72000,\"value\":1.47},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":1.3125}],\"target_low\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":90},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":100},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":90}],\"target_high\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":110},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":110},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":110}]}",
      "utcOffset": 60,
      "created_at": "2024-01-16T09:05:56.331Z",
      "identifier": "72be7a9c-5c78-5ab5-9942-6ac70a981784",
      "srvModified": 1705396146075,
      "srvCreated": 1705396146075,
      "subject": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705395946000,
      "duration": 0,
      "eventType": "Profile Switch",
      "isReadOnly": false,
      "isValid": true,
      "originalDuration": 0,
      "originalProfileName": "Arbeit_Mo-Do Buero",
      "percentage": 105,
      "profile": "Arbeit_Mo-Do Buero(105%)",
      "profileJson": "{\"units\":\"mg\\/dl\",\"dia\":6,\"timezone\":\"Europe\\/Brussels\",\"sens\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":40},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":55},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":50},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":37.5},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":40},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":45},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":30},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":30}],\"carbratio\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":11},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":11},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":9},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":3.8},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":5},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":7.5},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":11},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":11}],\"basal\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":1.25},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":1.6},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":1.25},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":1.15},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":1.25},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":1.25},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":1.4},{\"time\":\"07:00\",\"timeAsSeconds\":25200,\"value\":1.4},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":1.15},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":0.75},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":0.75},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":0.75},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":0.75},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":0.6},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":0.6},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":0.65},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":1.25},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":1.4},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":1.4},{\"time\":\"19:00\",\"timeAsSeconds\":68400,\"value\":1.15},{\"time\":\"20:00\",\"timeAsSeconds\":72000,\"value\":1.4},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":1.25},{\"time\":\"22:00\",\"timeAsSeconds\":79200,\"value\":1.25},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":1.25}],\"target_low\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":90},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":100},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":90}],\"target_high\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":110},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":110},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":110}]}",
      "timeshift": 0,
      "utcOffset": 60,
      "created_at": "2024-01-16T09:05:46.000Z",
      "identifier": "b3eb35a8-a73d-5476-9186-eac3b7c4627c",
      "srvModified": 1705395948527,
      "srvCreated": 1705395948527,
      "subject": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705395941000,
      "duration": 5,
      "durationInMilliseconds": 313000,
      "eventType": "Temp Basal",
      "isReadOnly": false,
      "isValid": true,
      "percent": -40,
      "pumpId": 3410791882010,
      "pumpSerial": "WHG00003FI",
      "pumpType": "DANA_I",
      "rate": 0.45,
      "type": "NORMAL",
      "utcOffset": 60,
      "created_at": "2024-01-16T09:05:41.000Z",
      "identifier": "49b0440f-0f64-59ee-929b-f35b0f75bd9a",
      "srvModified": 1705396514620,
      "srvCreated": 1705395943748,
      "subject": "Aaps",
      "endId": 3410792508012,
      "modifiedBy": "Aaps"
    },
    {
      "app": "AAPS",
      "date": 1705395939331,
      "eventType": "Note",
      "isReadOnly": false,
      "isValid": true,
      "notes": "Arbeit_Mo-Do Buero",
      "originalCustomizedName": "Arbeit_Mo-Do Buero",
      "originalDuration": 0,
      "originalEnd": 1705395927000,
      "originalPercentage": 100,
      "originalProfileName": "Arbeit_Mo-Do Buero",
      "originalTimeshift": 0,
      "profileJson": "{\"units\":\"mg\\/dl\",\"dia\":6,\"timezone\":\"Europe\\/Brussels\",\"sens\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":40},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":55},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":50},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":37.5},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":40},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":45},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":30}],\"carbratio\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":11},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":9},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":3.8},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":5},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":7.5},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":11}],\"basal\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":1.25},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":1.6},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":1.25},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":1.15},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":1.25},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":1.4},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":1.15},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":0.75},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":0.6},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":0.65},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":1.25},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":1.4},{\"time\":\"19:00\",\"timeAsSeconds\":68400,\"value\":1.15},{\"time\":\"20:00\",\"timeAsSeconds\":72000,\"value\":1.4},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":1.25}],\"target_low\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":90},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":100},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":90}],\"target_high\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":110},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":110},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":110}]}",
      "utcOffset": 60,
      "created_at": "2024-01-16T09:05:39.331Z",
      "identifier": "b01fd9f3-ad17-57c6-b8e0-a3f8bd4ecde8",
      "srvModified": 1705395940953,
      "srvCreated": 1705395940953,
      "subject": "Aaps"
    }
  ]
}

To Reproduce
Steps to reproduce the behavior:
/api3-docs
insert bearer auth,
Try it out

Expected behavior
Get an unempty response

Your setup information

  • Nightscout 15.0.1
  • AndroidAPS 3.2.0.1 engeenering mode
  • Upload only from AAPS via NS v3 client
@bniels707
Copy link

In my experimentation, it is because filter parameters are apparently expected to be passed directly instead of via the filter_parameters query arg.

E.g.: date$gte=2024-03-04 works, filter_parameters=date$gte=2024-03-04 doesn't. I still haven't figured out how to pass multiple filter parameters to set a range, date$gte=2024-03-04&date$lte=2024-03-05 doesn't work.

If I can figure this out, I might look into why the Swagger output is wrong.

@bniels707
Copy link

I opened a MR (#8252) to fix range queries for a single field.

Unfortunately I don't think the current implementation of filter_parameters in APIv3 is OpenAPI / Swagger compatible so I can't figure out a way to fix it. It can made better by changing the type of filter_parameters to a string array, with style set to form and explode set to true. Unfortunately it still prepends filter_parameters to every parameter so the filters aren't actually applied by the API endpoint.

I'll have to see if I can come up with a way to handle the API as defined in the Swagger definition without breaking the old behavior.

@bniels707
Copy link

I have opened another MR (#8253) to support filter parameters passed via the filter_parameters argument to match the behavior described in the current Swagger definition, as well as an update to the Swagger definition which makes it explicit that multiple filter parameters can be passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants