swagger: '2.0' info: title: Automile ClientApi ResourceOwnerVehicleHealth API version: v1 tags: - name: ResourceOwnerVehicleHealth paths: /v1/resourceowner/vehiclehealth/{vehicleId}: get: tags: - ResourceOwnerVehicleHealth summary: Get health indicators for a vehicle description: Only vehicle that the user has access to can be queried operationId: GetResourceOwnerVehicleHealth produces: - text/plain - application/json - text/json parameters: - in: path name: vehicleId description: The vehicle id required: true type: integer format: int32 responses: '200': description: The VehicleHealths are returned schema: $ref: '#/definitions/VehicleHealth' '403': description: Request is forbidden, meaning you don't have access to this vehicle '500': description: Internal server error security: - oauth2: [] /v1/resourceowner/vehiclehealth/{dateperiod}/{vehicleId}: get: tags: - ResourceOwnerVehicleHealth summary: Get health indicators for a vehicle over a period of time description: Only vehicle that the user has access to can be queried operationId: GetResourceOwnerVehicleHealthPeriod produces: - text/plain - application/json - text/json parameters: - in: path name: dateperiod description: Date period parameter, in the form of only year (2014), year and month (201401), or interval {201301-201401} required: true type: string - in: path name: vehicleId description: The vehicle id required: true type: integer format: int32 responses: '200': description: The VehicleHealths are returned schema: $ref: '#/definitions/VehicleHealth' '403': description: Request is forbidden, meaning you don't have access to this vehicle '400': description: Bad request, date period is not in a correct format '500': description: Internal server error security: - oauth2: [] definitions: BatteryEvent: type: object properties: Occured: format: date-time type: string Latitude: format: double type: number Longitude: format: double type: number BatteryStatus: format: int32 enum: - 0 - 1 - 2 - 3 type: integer additionalProperties: false DTCEventDetail: type: object properties: DTC: type: string FaultLocation: type: string ProbableCause: type: string additionalProperties: false VehicleHealth: type: object properties: VehicleId: format: int32 type: integer PeriodFrom: format: int32 type: integer PeriodTo: format: int32 type: integer LastBatteryStatus: format: int32 enum: - 0 - 1 - 2 - 3 type: integer LastBatteryWarning: $ref: '#/definitions/BatteryEvent' BatteryEventsForSelectedPeriod: type: array items: $ref: '#/definitions/BatteryEvent' LastMILEvent: $ref: '#/definitions/MILEvent' MILEventsForSelectedPeriod: type: array items: $ref: '#/definitions/MILEvent' LastDTCEvent: $ref: '#/definitions/DTCEvent' LastPendingDTCEvent: $ref: '#/definitions/DTCEvent' DTCEventsForSelectedPeriod: type: array items: $ref: '#/definitions/DTCEvent' PendingDTCEventsForSelectedPeriod: type: array items: $ref: '#/definitions/DTCEvent' additionalProperties: false DTCEvent: type: object properties: Occured: format: date-time type: string DTCEventDetails: type: array items: $ref: '#/definitions/DTCEventDetail' Latitude: format: double type: number Longitude: format: double type: number additionalProperties: false MILEvent: type: object properties: Occured: format: date-time type: string MILStatus: format: int32 enum: - 0 - 1 type: integer MILDistance: format: int32 type: integer CLRDistanceUntilToday: format: double type: number NumberOfDTCs: format: int32 type: integer Latitude: format: double type: number Longitude: format: double type: number additionalProperties: false securityDefinitions: oauth2: type: oauth2 flow: implicit authorizationUrl: https://api.automile.com/login/ scopes: read: Read access to protected resources write: Write access to protected resources description: OAuth2 Implicit Grant