window.onload = function() { var url = window.location.search.match(/url=([^&]+)/); if (url && url.length > 1) { url = decodeURIComponent(url[1]); } else { url = window.location.origin; } var options = { "swaggerDoc": {"openapi":"3.0.3","info":{"title":"McEasy - VSMS Public API","version":"2.0.0"},"tags":[{"name":"Authentication","description":"Everything About Authorization"},{"name":"Vehicles","description":"Everything About Vehicles Data"},{"name":"Geofences","description":"Everything About Geofences Data"},{"name":"Trips","description":"Everything About Vehicle Trips Data"},{"name":"Reports","description":"Everything About Reporting"},{"name":"Live Data","description":"Everything About Live Data"}],"servers":[{"url":"https://vsms-v2-public.mceasy.com/v1"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"APIKeyResponse":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/APIKeyData"}},"required":["message"]},"APIKeyData":{"type":"object","properties":{"key":{"type":"string"}},"required":["key"]},"UpdateResponse":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateData"}},"required":["message"]},"DeviceIntervalInput":{"type":"object","properties":{"imei":{"type":"string"},"deviceIntervalType":{"type":"string"}},"required":["imei","deviceIntervalType"]},"GeofencesData":{"type":"object","properties":{"geofenceId":{"type":"number"},"companyId":{"type":"number"},"polyData":{"type":"string"},"circData":{"type":"string"},"address":{"type":"string"},"addressDetail":{"type":"string"},"province":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"number"},"category":{"type":"string"},"contactName":{"type":"string"},"phoneNo":{"type":"string"},"isGarage":{"type":"boolean"},"isServiceLoc":{"type":"boolean"},"serviceLocType":{"type":"string"},"hasRelation":{"type":"boolean"}},"required":["geofenceId","companyId","polyData","circData","address","addressDetail","province","city","postalCode","category","contactName","phoneNo","isGarage","isServiceLoc","serviceLocType","hasRelation"]},"GeofencesResponse":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/GeofencesData"}}},"required":["message"]},"GeofenceInput":{"type":"object","properties":{"fenceName":{"type":"string"},"type":{"type":"string","description":"Ex: polygon / circle"},"polyData":{"type":"string","description":"Ex: ((latitude1, longitude1), (latitude2, longitude2), (latitude3, longitude3)) => Jumlah Titik Tidak Terbatas"},"circData":{"type":"string","description":"Ex: <(latitude,longitude),radius> => Radius Dalam Meter"},"address":{"type":"string"},"addressDetail":{"type":"string"},"province":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"industry":{"type":"string"},"contactName":{"type":"string"},"phoneNo":{"type":"string"},"telephone":{"type":"string"},"category":{"type":"string"},"isGarage":{"type":"boolean"},"isServiceLoc":{"type":"boolean"},"serviceLocType":{"type":"string"}},"required":["isGarage","isServiceLoc"]},"UpdateData":{"type":"object","properties":{"id":{"type":"number"},"information":{"type":"string"}},"required":["id","information"]},"CreateTemporaryLiveViewInput":{"type":"object","properties":{"name":{"type":"string","description":"Ex: Live View 1"},"duration":{"type":"number","description":"Ex: 10 (Satuan Dalam Menit)"},"note":{"type":"string","description":"Ex: Temporary Live View Note"},"licensePlates":{"type":"string[]","description":"Ex: [\"L 1234 TEST\", \"L 1235 TEST\"]"},"pickedColumns":{"type":"string[]","description":"Ex: [\"driverName\", \"engineStatus\", \"lastSeen\", \"speed\", \"temperature\"] => Pilih Salah Satu Atau Lebih"}},"required":["name","duration","licensePlates","pickedColumns"]},"DeleteTemporaryLiveViewInput":{"type":"object","properties":{"link":{"type":"string"}},"required":["link"]},"LoginResponse":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"string"}},"required":["message","data"]},"LoginInput":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","format":"password"},"apiKey":{"type":"string","format":"key"}},"required":["email","password","apiKey"]},"HistoricalOfflineGpsResponse":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/HistoricalOfflineGpsApiResponse"}}},"required":["message"]},"HistoricalOfflineGpsApiResponse":{"type":"object","properties":{"vehicleType":{"type":"string"},"licensePlate":{"type":"string"},"startTime":{"allOf":[{"type":"string"},{"type":"Date"}]},"startLocation":{"type":"string"},"startLatitude":{"type":"number"},"startLongitude":{"type":"number"},"stopTime":{"allOf":[{"type":"string"},{"type":"Date"}]},"stopLocation":{"type":"string"},"stopLatitude":{"type":"number"},"stopLongitude":{"type":"number"},"offlineDuration":{"type":"number"},"driver":{"type":"string"},"startActivity":{"type":"string"},"stopActivity":{"type":"string"}},"required":["vehicleType","licensePlate","startTime","startLocation","startLatitude","startLongitude","stopTime","stopLocation","stopLatitude","stopLongitude","offlineDuration","driver","startActivity","stopActivity"]},"TripsResponse":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/SummaryTripData"}}},"required":["message"]},"DetailTripResponse":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DetailTripData"}}},"required":["message"]},"RawDetailTripData":{"type":"object","properties":{"reportDetailVehicleTrip":{"type":"{ vehicleId: number; latitude: number; longitude: number; speed: number; sentOn: string; address: string; vehicle: { imei: string; licensePlate: string; vehicleStatus: { direction: number; engineOn: boolean; lastPacket: Date; lastReceive: Date; motionStatus: string; }; }; }"},"driver":{"type":"{ fullName: string; }"}},"required":["reportDetailVehicleTrip","driver"]},"DetailTripData":{"type":"object","properties":{"vehicleId":{"type":"number"},"latitude":{"type":"number"},"longitude":{"type":"number"},"speed":{"type":"number"},"sentOn":{"type":"string"},"address":{"type":"string"},"direction":{"type":"number"},"engineOn":{"type":"boolean"},"lastPacket":{"type":"string","format":"date-time"},"lastReceive":{"type":"string","format":"date-time"},"imei":{"type":"string"},"licensePlate":{"type":"string"},"driver":{"$ref":"#/components/schemas/DriverData"}},"required":["vehicleId","latitude","longitude","speed","sentOn","address","direction","engineOn","lastPacket","lastReceive","imei","licensePlate"]},"SummaryTripData":{"type":"object","properties":{"startTime":{"type":"string"},"stopTime":{"type":"string"},"vehicleId":{"type":"number"},"tripMileage":{"type":"number"},"startLong":{"type":"number"},"startLat":{"type":"number"},"stopLong":{"type":"number"},"stopLat":{"type":"number"},"maxSpeed":{"type":"number"},"type":{"type":"string"},"driver":{"$ref":"#/components/schemas/DriverData"},"driverId":{"type":"number"},"totalHourStart":{"type":"string"},"totalHourStop":{"type":"string"}},"required":["startTime","stopTime","vehicleId","tripMileage","startLong","startLat","stopLong","stopLat","maxSpeed","type","driverId","totalHourStart","totalHourStop"]},"LastTripData":{"type":"object","properties":{"totalTrip":{"type":"number"},"totalHourStart":{"type":"string"},"totalHourStop":{"type":"string"},"motionStatus":{"type":"string"},"summaryTrips":{"$ref":"#/components/schemas/SummaryTripData"}},"required":["totalTrip","totalHourStart","totalHourStop","motionStatus"]},"LastTripResponse":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/LastTripData"}},"required":["message"]},"LocationInput":{"type":"object","properties":{"imei":{"type":"string"},"gpsTime":{"type":"string"},"latitude":{"allOf":[{"type":"string"},{"type":"number"}]},"longitude":{"allOf":[{"type":"string"},{"type":"number"}]},"speed":{"allOf":[{"type":"string"},{"type":"number"}]},"ignition":{"type":"boolean"},"angle":{"type":"number"},"satellite":{"type":"number"},"door1":{"type":"boolean"},"door2":{"type":"boolean"},"temp":{"type":"number"},"fuel_percentage":{"type":"number"}},"required":["imei","gpsTime","latitude","longitude","speed","ignition"]},"DriverData":{"type":"object","properties":{"fullName":{"type":"string"}},"required":["fullName"]},"VehicleData":{"type":"object","properties":{"id":{"type":"number"},"companyId":{"type":"number"},"vehicleTypeId":{"type":"number"},"driverId":{"type":"number"},"garageId":{"type":"number"},"tonnage":{"type":"number"},"volume":{"type":"number"},"fuelEfficiency":{"type":"number"},"fuelCapacity":{"type":"number"},"odometer":{"type":"number"},"status":{"type":"string"},"imei":{"type":"string"},"licensePlate":{"type":"string"},"thermoType":{"type":"string"},"boxType":{"type":"string"},"chassisNumber":{"type":"string"},"machineNumber":{"type":"string"},"carrosserie":{"type":"string"},"year":{"type":"number"},"hullNo":{"type":"string"}},"required":["id","companyId","vehicleTypeId","driverId","garageId","tonnage","volume","fuelEfficiency","fuelCapacity","odometer","status","imei","licensePlate","thermoType","boxType","chassisNumber","machineNumber","carrosserie","year","hullNo"]},"VehicleResponse":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/VehicleData"}},"required":["message"]},"VehiclesResponse":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/VehicleData"}}},"required":["message"]},"VehicleInput":{"type":"object","properties":{"licensePlate":{"type":"string"},"vehicleTypeId":{"allOf":[{"type":"string"},{"type":"number"}]},"driverId":{"allOf":[{"type":"string"},{"type":"number"}]},"tonnage":{"allOf":[{"type":"string"},{"type":"number"}]},"volume":{"allOf":[{"type":"string"},{"type":"number"}]},"fuelCapacity":{"allOf":[{"type":"string"},{"type":"number"}]},"fuelEfficiency":{"allOf":[{"type":"string"},{"type":"number"}]},"odometer":{"allOf":[{"type":"string"},{"type":"number"}]},"status":{"type":"string","description":"Ex: I (Aktif) / R (Repair atau Servis) / A (Arsip atau Tidak Aktif)"},"imei":{"type":"string"},"thermoType":{"type":"string"},"boxType":{"type":"string"},"chassisNumber":{"type":"string"},"machineNumber":{"type":"string"},"carrosserie":{"type":"string"},"year":{"allOf":[{"type":"string"},{"type":"number"}]},"hullNo":{"type":"string"}},"required":["licensePlate","vehicleTypeId"]},"VehicleOdometerInput":{"type":"object","properties":{"licensePlate":{"type":"string"},"imei":{"type":"string"},"vehicleId":{"allOf":[{"type":"string"},{"type":"number"}]},"odometer":{"allOf":[{"type":"string"},{"type":"number"}]}},"required":["odometer"]},"UpdateVehicleData":{"type":"object","properties":{"id":{"type":"number"},"oldData":{"allOf":[{"type":"{ odometer: string"},{"type":"number; }"}]},"newData":{"allOf":[{"type":"{ odometer: string"},{"type":"number; }"}]}},"required":["id","oldData","newData"]},"VehicleStatusData":{"type":"object","properties":{"vehicleId":{"type":"number"},"companyId":{"type":"number"},"companyName":{"type":"string"},"driverId":{"type":"number"},"tripDriverId":{"type":"number"},"lastPacket":{"type":"string","format":"date-time"},"lastReceive":{"type":"string","format":"date-time"},"lastMotion":{"type":"string","format":"date-time"},"lastStatusChg":{"type":"string","format":"date-time"},"driverChangeOn":{"type":"string","format":"date-time"},"latitude":{"type":"number"},"longitude":{"type":"number"},"altitude":{"type":"number"},"temperature":{"type":"number[]"},"fuel":{"type":"number[]"},"fuelFiltered":{"type":"number"},"fuelCapacity":{"type":"number"},"sumFuel":{"type":"number"},"tripFuel":{"type":"number"},"sumDistance":{"type":"number"},"tripDistance":{"type":"number"},"sumDrivetime":{"type":"number"},"tripDrivetime":{"type":"number"},"sumDrivetimeFormatted":{"type":"string"},"tripDrivetimeFormatted":{"type":"string"},"speed":{"type":"number"},"calculatedSpeed":{"type":"number"},"direction":{"type":"number"},"signalStrength":{"type":"number"},"battery":{"type":"number"},"harshBrakes":{"type":"number"},"harshAccels":{"type":"number"},"sharpTurns":{"type":"number"},"overspeeds":{"type":"number"},"fenceCtr":{"type":"number"},"door1Status":{"type":"number"},"door2Status":{"type":"number"},"refrigeratorStatus":{"type":"number"},"tripMaxspeed":{"type":"number"},"lastDoor1Data":{"type":"string","format":"date-time"},"lastDoor1Alert":{"type":"string","format":"date-time"},"lastDoor2Alert":{"type":"string","format":"date-time"},"lastSpeedAlert":{"type":"string","format":"date-time"},"lastSummary":{"type":"string","format":"date-time"},"tripstartOn":{"type":"string","format":"date-time"},"tripstartLong":{"type":"number"},"tripstartLat":{"type":"number"},"motionStatus":{"type":"string"},"calculatedMotionStatus":{"type":"string"},"licensePlate":{"type":"string"},"hullNo":{"type":"string"},"engineOn":{"type":"boolean"},"batteryAlarmSet":{"type":"boolean"},"gsmAlarmSet":{"type":"boolean"},"imei":{"type":"string"},"vehicleGroups":{"type":"string[]"},"requestedDate":{"type":"string"}},"required":["vehicleId","companyId","companyName","driverId","tripDriverId","lastPacket","lastReceive","lastMotion","lastStatusChg","driverChangeOn","latitude","longitude","altitude","temperature","fuel","fuelFiltered","fuelCapacity","sumFuel","tripFuel","sumDistance","tripDistance","sumDrivetime","tripDrivetime","sumDrivetimeFormatted","tripDrivetimeFormatted","speed","calculatedSpeed","direction","signalStrength","battery","harshBrakes","harshAccels","sharpTurns","overspeeds","fenceCtr","door1Status","door2Status","refrigeratorStatus","tripMaxspeed","lastDoor1Data","lastDoor1Alert","lastDoor2Alert","lastSpeedAlert","lastSummary","tripstartOn","tripstartLong","tripstartLat","motionStatus","calculatedMotionStatus","licensePlate","hullNo","engineOn","batteryAlarmSet","gsmAlarmSet","imei","vehicleGroups","requestedDate"]},"VehicleStatusesResponse":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/VehicleStatusData"}}},"required":["message"]},"VehicleStatusResponse":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/VehicleStatusData"}},"required":["message"]},"BadRequest":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"detail":{"type":"string"}}},"Unauthorized":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api-key":{"get":{"tags":["Authentication"],"summary":"Get API Key Using Email & Password (If Not Logged In) or Token (If Already Logged In)","parameters":[{"in":"query","name":"email","schema":{"type":"string","format":"email"}},{"in":"query","name":"password","schema":{"type":"string","format":"password"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponse"},"example":{"message":"Success","data":{"key":"wergjweirug2394t2jkwrghhne"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}},"403":{"description":"Forbidden Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"},"example":{"code":"E-AK1/1-01","message":"Either authentication token or user credential is required"}}}}}}},"/geofences":{"get":{"tags":["Geofences"],"summary":"Get All Geofence Data","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeofencesResponse"},"example":{"message":"Success","data":[{"geofenceId":1234,"companyId":2,"fenceName":"Nama Geofence","type":"C","polyData":null,"circData":"<(-10.00,123.000),100>","address":"Jalan Tugu Pahlawan","addressDetail":"","province":"Jawa Timur","city":"Surabaya","postalCode":null,"category":"Kantor Pusat","contactName":null,"phoneNo":null,"isGarage":true,"isServiceLoc":false,"serviceLocType":"","hasRelation":false}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}},"post":{"tags":["Geofences"],"summary":"Create New Geofence Data","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/GeofenceInput"}},"application/json":{"schema":{"$ref":"#/components/schemas/GeofenceInput"}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}},"/live-data/create_temp_live_view":{"post":{"tags":["Live Data"],"summary":"Create Temporary Live View Link","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/CreateTemporaryLiveViewInput"}},"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemporaryLiveViewInput"}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}},"/live-data/stop_temp_live_view":{"post":{"tags":["Live Data"],"summary":"Stop Temporary Live View","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DeleteTemporaryLiveViewInput"}},"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTemporaryLiveViewInput"}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}},"/live-data/temp_live_view":{"get":{"tags":["Live Data"],"summary":"Get Temporary Live View","parameters":[{"in":"query","name":"vehicleIds","schema":{"type":"number[]"},"required":false},{"in":"query","name":"expiredOnStartDate","schema":{"type":"string"},"required":false},{"in":"query","name":"expiredOnEndDate","schema":{"type":"string"},"required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}},"/login":{"post":{"tags":["Authentication"],"summary":"Login Using Email, Password, and API Key","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/LoginInput"}},"application/json":{"schema":{"$ref":"#/components/schemas/LoginInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"},"example":{"message":"Success","data":"4h34yg34234524y34h.34552323t324yh3"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}},"403":{"description":"Forbidden Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"},"example":{"code":"E-V1/L1-01","message":"All credentials must be filled"}}}}}}},"/reports/offline-history":{"get":{"tags":["Reports"],"summary":"Get Historical Data Of Offline Gps For Specified Vehicle (Vehicle ID/License Plate/IMEI) And Date Range","parameters":[{"in":"query","name":"id","description":"`Vehicle ID/License Plate/IMEI`\n","required":true,"schema":{"type":"string"}},{"in":"query","name":"startDate","required":true,"description":"Format Date (`2000-12-31`) in **UTC+07 Timezone**\n","schema":{"type":"string","format":"date"}},{"in":"query","name":"endDate","required":true,"description":"Format Date (`2000-12-31`) in **UTC+07 Timezone**\n","schema":{"type":"string","format":"date"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoricalOfflineGpsResponse"},"example":{"message":"Success","data":[{"vehicleType":"","licensePlate":"L 123 TES","startTime":"2021-02-06T06:20:59.000Z","startLocation":null,"startLatitude":-7.2688883,"startLongitude":112.7502666,"stopTime":"2021-02-06T07:20:08.000Z","stopLocation":null,"stopLatitude":-7.2688883,"stopLongitude":112.7502666,"offlineDuration":1234,"driver":"John Doe","startActivity":"","stopActivity":""}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}},"/trips":{"get":{"tags":["Trips"],"summary":"Get Vehicle's Summary Trip History","parameters":[{"in":"query","name":"vehicleId","schema":{"type":"number"}},{"in":"query","name":"driverId","schema":{"type":"number"}},{"in":"query","name":"startDate","description":"Format ISO (`2000-12-31T00:00:00.000Z`) in **UTC Timezone**\n","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"endDate","description":"Format ISO (`2000-12-31T00:00:00.000Z`) in **UTC Timezone**\n","schema":{"type":"string","format":"date-time"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TripsResponse"},"examples":{"Data Exist":{"value":{"message":"Success","data":{"totalTrip":8.2,"totalMovingTripDistance":8.2,"totalAssistedTripDistance":0,"totalHourStart":"00:42:17","totalMovingTripDuration":"00:42:17","totalAssistedTripDuration":"00:00:00","totalHourStop":"288:17:42","summaryTrips":[{"startTime":"2023-02-27T09:55:10.000Z","stopTime":"2023-02-27T09:57:50.000Z","vehicleId":12345,"tripMileage":1.03,"startLong":112.7451766,"startLat":-7.272995,"stopLong":112.7504116,"stopLat":-7.268985,"maxSpeed":49,"type":"M","driver":null,"driverId":1,"totalHourStart":"00:02:40","totalHourStop":"00:07:27"}]}}},"Data Empty":{"value":{"message":"Success","data":{"totalTrip":0,"totalMovingTripDistance":0,"totalAssistedTripDistance":0,"totalHourStart":"00:00:00","totalMovingTripDuration":"00:00:00","totalAssistedTripDuration":"00:00:00","totalHourStop":"00:00:00","summaryTrips":[]}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}},"/trips/{id}/detail":{"get":{"tags":["Trips"],"summary":"Get Vehicle's Detail Trip History","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"`Vehicle ID/License Plate/IMEI`\n"},{"in":"query","name":"speedLimit","schema":{"type":"integer"}},{"in":"query","name":"startDate","required":true,"description":"Format ISO (`2000-12-31T00:00:00.000Z`) in **UTC Timezone**\n","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"endDate","required":true,"description":"Format ISO (`2000-12-31T00:00:00.000Z`) in **UTC Timezone**\n","schema":{"type":"string","format":"date-time"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailTripResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}},"/trips/last":{"get":{"tags":["Trips"],"summary":"Get Last Vehicle Trip Data","parameters":[{"in":"query","name":"vehicleId","schema":{"type":"number"},"required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LastTripResponse"},"examples":{"Vehicle Moving":{"value":{"message":"Success","data":{"totalTrip":0.13,"totalHourStart":"00:19:30","totalHourStop":"00:28:08","motionStatus":"M","summaryTrips":{"startTime":"2023-04-14T09:15:19.000Z","stopTime":"2023-04-14T09:34:49.000Z","vehicleId":3447,"driverId":1,"tripMileage":0.13,"startLong":null,"startLat":null,"stopLong":null,"stopLat":null,"maxSpeed":15,"type":null,"totalHourStart":"00:19:30","totalHourStop":"00:28:08","driver":null}}}},"Engine Off":{"value":{"message":"Success","data":{"totalTrip":null,"totalHourStart":null,"totalHourStop":null,"motionStatus":null,"summaryTrips":null}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}},"/trips/location":{"post":{"tags":["Trips"],"summary":"Add New Trip Location Data","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/LocationInput"}},"application/json":{"schema":{"$ref":"#/components/schemas/LocationInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}},"/vehicles/{id}":{"get":{"tags":["Vehicles"],"summary":"Get Specific Vehicle Data By ID","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleResponse"},"example":{"message":"Success","data":{"id":12345,"companyId":1,"vehicleTypeId":123,"driverId":1,"garageId":null,"tonnage":null,"volume":null,"fuelEfficiency":null,"fuelCapacity":null,"odometer":null,"status":"I","imei":null,"licensePlate":"L 1231 TES","thermoType":null,"boxType":null,"chassisNumber":null,"machineNumber":null,"carrosserie":null,"year":null,"odometerEditedOn":null,"hullNo":null}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}},"Not Belongs to Company":{"value":{"code":"E-V1/1-04","message":"An error found after requesting data","detail":"Access to this vehicle is not allowed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}},"/vehicles":{"get":{"tags":["Vehicles"],"summary":"Get All Vehicle Data","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehiclesResponse"},"example":{"message":"Success","data":[{"id":12345,"companyId":1,"vehicleTypeId":123,"driverId":1,"garageId":null,"tonnage":null,"volume":null,"fuelEfficiency":null,"fuelCapacity":null,"odometer":null,"status":"I","imei":null,"licensePlate":"L 1231 TES","thermoType":null,"boxType":null,"chassisNumber":null,"machineNumber":null,"carrosserie":null,"year":null,"odometerEditedOn":null,"hullNo":null}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}},"post":{"tags":["Vehicles"],"summary":"Add New Vehicle Data","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/VehicleInput"}},"application/json":{"schema":{"$ref":"#/components/schemas/VehicleInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}},"patch":{"tags":["Vehicles"],"summary":"Update Vehicle Odometer","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/VehicleOdometerInput"}},"application/json":{"schema":{"$ref":"#/components/schemas/VehicleOdometerInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}},"/vehicles/statuses":{"get":{"tags":["Vehicles"],"summary":"Get All Vehicle Status Data","parameters":[{"in":"query","name":"withAddress","schema":{"type":"boolean"},"description":"To get vehicle's current location"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleStatusesResponse"},"examples":{"Without Fuel/Temperature Sensor":{"value":{"message":"Success","data":[{"vehicleId":123,"companyId":1,"companyName":"Test Company","driverId":1,"tripDriverId":1,"lastPacket":"2023-04-14T09:11:17.000Z","lastReceive":"2023-04-14T09:11:24.000Z","lastMotion":"2023-04-14T09:09:15.000Z","lastStatusChg":"2023-04-14T09:09:15.000Z","driverChangeOn":"2022-11-24T07:10:17.000Z","latitude":-7.2688883,"longitude":112.7502666,"altitude":0,"temperature":null,"fuel":null,"fuelFiltered":0,"fuelCapacity":200,"sumFuel":0,"tripFuel":0,"sumDistance":0.07,"tripDistance":0,"sumDrivetime":283,"tripDrivetime":0,"sumDrivetimeFormatted":"00:04:43","tripDrivetimeFormatted":"00:00:00","speed":8,"calculatedSpeed":8,"direction":328,"signalStrength":5,"battery":0,"harshBrakes":0,"harshAccels":0,"sharpTurns":0,"overspeeds":0,"fenceCtr":2,"door1Status":0,"door2Status":1,"refrigeratorStatus":0,"tripMaxspeed":8,"lastDoor1Data":"2022-08-29T08:49:29.000Z","lastDoor1Alert":"2023-04-14T07:12:00.000Z","lastDoor2Alert":"2022-08-29T08:49:29.000Z","lastSpeedAlert":"2023-01-26T11:59:21.000Z","lastSummary":"2022-08-14T08:49:29.000Z","tripstartOn":"2023-04-14T09:09:15.000Z","tripstartLong":112.7502666,"tripstartLat":-7.2688883,"motionStatus":"M","calculatedMotionStatus":"M","licensePlate":"L 123 TES","hullNo":null,"engineOn":true,"batteryAlarmSet":true,"gsmAlarmSet":false,"address":"","vehicleGroups":["Group 1","Group 2"],"requestedDate":"2023-04-25T00:11:24.000Z"}]}},"With Fuel/Temperature Sensor":{"value":{"message":"Success","data":[{"vehicleId":123,"companyId":1,"companyName":"Test Company","driverId":1,"tripDriverId":1,"lastPacket":"2023-04-14T09:11:17.000Z","lastReceive":"2023-04-14T09:11:24.000Z","lastMotion":"2023-04-14T09:09:15.000Z","lastStatusChg":"2023-04-14T09:09:15.000Z","driverChangeOn":"2022-11-24T07:10:17.000Z","latitude":-7.2688883,"longitude":112.7502666,"altitude":0,"temperature":[0,null,null],"fuel":[0,null,1],"fuelFiltered":0,"fuelCapacity":200,"sumFuel":0,"tripFuel":0,"sumDistance":0.07,"tripDistance":0,"sumDrivetime":283,"tripDrivetime":0,"sumDrivetimeFormatted":"00:04:43","tripDrivetimeFormatted":"00:00:00","speed":8,"calculatedSpeed":8,"direction":328,"signalStrength":5,"battery":0,"harshBrakes":0,"harshAccels":0,"sharpTurns":0,"overspeeds":0,"fenceCtr":2,"door1Status":0,"door2Status":1,"refrigeratorStatus":0,"tripMaxspeed":8,"lastDoor1Data":"2022-08-29T08:49:29.000Z","lastDoor1Alert":"2023-04-14T07:12:00.000Z","lastDoor2Alert":"2022-08-29T08:49:29.000Z","lastSpeedAlert":"2023-01-26T11:59:21.000Z","lastSummary":"2022-08-14T08:49:29.000Z","tripstartOn":"2023-04-14T09:09:15.000Z","tripstartLong":112.7502666,"tripstartLat":-7.2688883,"motionStatus":"M","calculatedMotionStatus":"M","licensePlate":"L 123 TES","hullNo":null,"engineOn":true,"batteryAlarmSet":true,"gsmAlarmSet":false,"vehicleGroups":["Group 1","Group 2"],"requestedDate":"2024-04-25T00:11:24.000Z"}]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}},"/vehicles/{id}/status":{"get":{"tags":["Vehicles"],"summary":"Get Specific Vehicle Status Data By Vehicle ID/License Plate/IMEI","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"`Vehicle ID/License Plate/IMEI`\n"},{"in":"query","name":"withAddress","schema":{"type":"boolean"},"description":"To get vehicle's current location"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleStatusResponse"},"examples":{"Without Fuel/Temperature Sensor":{"value":{"message":"Success","data":{"vehicleId":123,"companyId":1,"companyName":"Test Company","driverId":1,"tripDriverId":1,"lastPacket":"2023-04-14T09:11:17.000Z","lastReceive":"2023-04-14T09:11:24.000Z","lastMotion":"2023-04-14T09:09:15.000Z","lastStatusChg":"2023-04-14T09:09:15.000Z","driverChangeOn":"2022-11-24T07:10:17.000Z","latitude":-7.2688883,"longitude":112.7502666,"altitude":0,"temperature":null,"fuel":null,"fuelFiltered":0,"fuelCapacity":200,"sumFuel":0,"tripFuel":0,"sumDistance":0.07,"tripDistance":0,"sumDrivetime":283,"tripDrivetime":0,"sumDrivetimeFormatted":"00:04:43","tripDrivetimeFormatted":"00:00:00","speed":8,"calculatedSpeed":8,"direction":328,"signalStrength":5,"battery":0,"harshBrakes":0,"harshAccels":0,"sharpTurns":0,"overspeeds":0,"fenceCtr":2,"door1Status":0,"door2Status":1,"refrigeratorStatus":0,"tripMaxspeed":8,"lastDoor1Data":"2022-08-29T08:49:29.000Z","lastDoor1Alert":"2023-04-14T07:12:00.000Z","lastDoor2Alert":"2022-08-29T08:49:29.000Z","lastSpeedAlert":"2023-01-26T11:59:21.000Z","lastSummary":"2022-08-14T08:49:29.000Z","tripstartOn":"2023-04-14T09:09:15.000Z","tripstartLong":112.7502666,"tripstartLat":-7.2688883,"motionStatus":"M","calculatedMotionStatus":"M","licensePlate":"L 123 TES","hullNo":null,"engineOn":true,"batteryAlarmSet":true,"gsmAlarmSet":false,"address":"","vehicleGroups":["Group 1","Group 2"],"requestedDate":"2023-04-25T00:11:24.000Z"}}},"With Fuel/Temperature Sensor":{"value":{"message":"Success","data":{"vehicleId":123,"companyId":1,"companyName":"Test Company","driverId":1,"tripDriverId":1,"lastPacket":"2023-04-14T09:11:17.000Z","lastReceive":"2023-04-14T09:11:24.000Z","lastMotion":"2023-04-14T09:09:15.000Z","lastStatusChg":"2023-04-14T09:09:15.000Z","driverChangeOn":"2022-11-24T07:10:17.000Z","latitude":-7.2688883,"longitude":112.7502666,"altitude":0,"temperature":[0,null,null],"fuel":[0,null,1],"fuelFiltered":0,"fuelCapacity":200,"sumFuel":0,"tripFuel":0,"sumDistance":0.07,"tripDistance":0,"sumDrivetime":283,"tripDrivetime":0,"sumDrivetimeFormatted":"00:04:43","tripDrivetimeFormatted":"00:00:00","speed":8,"calculatedSpeed":8,"direction":328,"signalStrength":5,"battery":0,"harshBrakes":0,"harshAccels":0,"sharpTurns":0,"overspeeds":0,"fenceCtr":2,"door1Status":0,"door2Status":1,"refrigeratorStatus":0,"tripMaxspeed":8,"lastDoor1Data":"2022-08-29T08:49:29.000Z","lastDoor1Alert":"2023-04-14T07:12:00.000Z","lastDoor2Alert":"2022-08-29T08:49:29.000Z","lastSpeedAlert":"2023-01-26T11:59:21.000Z","lastSummary":"2022-08-14T08:49:29.000Z","tripstartOn":"2023-04-14T09:09:15.000Z","tripstartLong":112.7502666,"tripstartLat":-7.2688883,"motionStatus":"M","calculatedMotionStatus":"M","licensePlate":"L 123 TES","hullNo":null,"engineOn":true,"batteryAlarmSet":true,"gsmAlarmSet":false,"vehicleGroups":["Group 1","Group 2"],"requestedDate":"2024-04-25T00:11:24.000Z"}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"},"examples":{"Expired Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt expired"}},"Bad Token":{"value":{"code":"E-V1/1-03","message":"An error occurred while executing query","detail":"Context creation failed: jwt malformed"}}}}}},"401":{"description":"Unauthorized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":{"code":"E-G1/1-01","message":"Authentication token is required"}}}}}}}}}, "customOptions": { "defaultModelsExpandDepth": -1 } } url = options.swaggerUrl || url var urls = options.swaggerUrls var customOptions = options.customOptions var spec1 = options.swaggerDoc var swaggerOptions = { spec: spec1, url: url, urls: urls, dom_id: '#swagger-ui', deepLinking: true, presets: [ SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ], plugins: [ SwaggerUIBundle.plugins.DownloadUrl ], layout: "StandaloneLayout" } for (var attrname in customOptions) { swaggerOptions[attrname] = customOptions[attrname]; } var ui = SwaggerUIBundle(swaggerOptions) if (customOptions.oauth) { ui.initOAuth(customOptions.oauth) } if (customOptions.preauthorizeApiKey) { const key = customOptions.preauthorizeApiKey.authDefinitionKey; const value = customOptions.preauthorizeApiKey.apiKeyValue; if (!!key && !!value) { const pid = setInterval(() => { const authorized = ui.preauthorizeApiKey(key, value); if(!!authorized) clearInterval(pid); }, 500) } } if (customOptions.authAction) { ui.authActions.authorize(customOptions.authAction) } window.ui = ui // Manual Override document.getElementsByClassName('topbar')[0].style.backgroundColor = '#0d4490' document.getElementsByClassName('topbar')[0].innerHTML = `

VSMS Public API

2.0.0
OAS${ spec1.openapi.split('.')[0] }
${document.getElementsByClassName('topbar-wrapper')[0].childNodes[0].innerHTML.replace('height="40"', 'class="swagger-logo" height="50"')}
` document.getElementsByClassName('information-container')[0].remove() document.getElementById("addon").style.display = "inherit"; } function toggle(code) { const content = document.getElementById(`content-${code}`); const arrow = document.getElementById(`toggle-${code}`).getElementsByTagName('div'); if (content.className == 'content') { content.className = 'content-shown'; arrow[0].style.rotate = '-30deg'; arrow[1].style.rotate = '30deg'; } else { content.className = 'content'; arrow[0].style.rotate = '30deg'; arrow[1].style.rotate = '-30deg'; } }