swagger: "2.0"
schemes:
  - https
host: api.mercedes-benz.com
basePath: /remotediagnostic_tryout/v1
info:
  contact:
    name: The open API platform by Mercedes-Benz
    x-twitter: MercedesBenz
  description: The Remote Diagnostic Support API will provide the possibility for 3rd party applications (e.g. ADAC, ATU, etc.) to access vehicle diagnostics data remotely on behalf of the Daimler customer. To use the endpoints you need a valid vin/fin (vehicleId).
  title: Remote Diagnostic Support
  version: "1.0"
  x-apisguru-categories:
    - transport
  x-logo:
    url: https://twitter.com/MercedesBenz/profile_image?size=original
  x-origin:
    - format: swagger
      url: https://developer.mercedes-benz.com/content/sites/default/files/2018-10/swagger_remote_diagnostics_api_2.yaml
      version: "2.0"
  x-providerName: mercedes-benz.com
  x-serviceName: diagnostics
tags:
  - description: Remote Diagnostic Support service for view all resources.
    name: Resources
  - description: Remote Diagnostic Support services for view ecu List.
    name: Electronical Control Units (ECU's)
  - description: Remote Diagnostic Support service for view dtc List.
    name: Diagnostic Trouble Codes (DTC's)
  - description: Remote Diagnostic Support service for view dtc snapshot List.
    name: Diagnostic Trouble Code (DTC) Snapshots
paths:
  "/vehicles/{vehicleId}/dtcReadouts":
    post:
      description: "This API creates a readout of DTCs for one vehicle. If the result is available immediately, the result is returned. If the result isn't available, a location to the DTC readout is returned. This location shall be polled until the result is available. INFO: GET Requests are not yet supported!"
      operationId: getDtcDataListByEcuUsingPOST
      parameters:
        - description: The vehicle identifier of the vehicle to read from.
          in: path
          name: vehicleId
          required: true
          type: string
          x-example: WDD111111PKW01000
        - description: "Return DTCs from this ECU id only. Default: Return DTCs from all ECUs."
          in: query
          name: ecuId
          required: false
          type: string
        - description: "Returns DTCs with this statuses only. Default: Return DTCs with all statuses."
          in: query
          name: dtcStatus
          required: false
          type: string
      produces:
        - application/x.exve.org.dtcreadout.v1+json;charset=utf-8
        - application/json;charset=utf-8
      responses:
        "201":
          description: Returns a DTC List
          schema:
            $ref: "#/definitions/DtcDataContainer"
        "202":
          description: The request has been accepted for processing, but not completed.
        "400":
          description: Bad Request
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "402":
          description: Payment required
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Forbidden
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource Not Found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "406":
          description: Not Acceptable
          schema:
            $ref: "#/definitions/ErrorResponse"
        "429":
          description: Quota limit is exceeded.
        "500":
          description: Internal server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "501":
          description: Not Implemented
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service Unavailable
          schema:
            $ref: "#/definitions/ErrorResponse"
        "505":
          description: Version not supported
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: View the List of DTCs for specific vehicleId.
      tags:
        - Diagnostic Trouble Codes (DTC's)
  "/vehicles/{vehicleId}/ecuId/{ecuId}/dtcId/{dtcId}/dtcSnapshotReadouts":
    post:
      description: "This API creates a readout of a DTC snapshot from one vehicle. If the result is available immediately, the result is returned. If the result isn't available, a location to the DTC snapshot readout is returned. This location shall be polled until the result is available. INFO: GET Requests are not yet supported!"
      operationId: getDtcSnapshotReadoutsUsingPOST
      parameters:
        - description: The vehicle identifier of the vehicle to read from
          in: path
          name: vehicleId
          required: true
          type: string
          x-example: WDD111111PKW01000
        - description: The id of the ECU to read from
          in: path
          name: ecuId
          required: true
          type: string
          x-example: DTR212
        - description: The id of the DTC associated with the snapshot
          in: path
          name: dtcId
          required: true
          type: string
          x-example: C163AFA
      produces:
        - application/x.exve.org.dtcSnapshotReadout.v1+json;charset=utf-8
        - application/json;charset=utf-8
      responses:
        "201":
          description: Returns a DTC Snapshot List
          schema:
            $ref: "#/definitions/DtcSnapshotDataContainer"
        "202":
          description: The request has been accepted for processing, but not completed.
        "204":
          description: The request has been accepted for processing, but no content is available.
        "400":
          description: Bad Request
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "402":
          description: Payment required
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Forbidden
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource Not Found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "406":
          description: Not Acceptable
          schema:
            $ref: "#/definitions/ErrorResponse"
        "429":
          description: Quota limit is exceeded.
        "500":
          description: Internal server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "501":
          description: Not Implemented
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service Unavailable
          schema:
            $ref: "#/definitions/ErrorResponse"
        "505":
          description: Version not supported
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: View the List of DTC Snapshot for specific vehicleId.
      tags:
        - Diagnostic Trouble Code (DTC) Snapshots
  "/vehicles/{vehicleId}/ecuReadouts":
    post:
      description: "This API creates a readout of ECUs for one vehicle. If the result is available immediately, the result is returned. If the result isn't available, a location to the ECU readout is returned. This location shall be polled until the result is available. INFO: GET Requests are not yet supported!"
      operationId: getEcuDataListByVehicleIdUsingPOST
      parameters:
        - description: The vehicle identifier of the vehicle to read from
          in: path
          name: vehicleId
          required: true
          type: string
          x-example: WDD111111PKW01000
        - description: "Return this ECU id only. Default: Return all ECUs."
          in: query
          name: ecuId
          required: false
          type: string
      produces:
        - application/x.exve.org.ecureadout.v1+json;charset=utf-8
        - application/json;charset=utf-8
      responses:
        "201":
          description: Returns an ECU List
          schema:
            $ref: "#/definitions/EcuDataContainer"
        "202":
          description: The request has been accepted for processing, but not completed.
        "400":
          description: Bad Request
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "402":
          description: Payment required
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Forbidden
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource Not Found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "406":
          description: Not Acceptable
          schema:
            $ref: "#/definitions/ErrorResponse"
        "429":
          description: Quota limit is exceeded.
        "500":
          description: Internal server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "501":
          description: Not Implemented
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service Unavailable
          schema:
            $ref: "#/definitions/ErrorResponse"
        "505":
          description: Version not supported
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: View the List of ECU for specific vehicleId.
      tags:
        - Electronical Control Units (ECU's)
  "/vehicles/{vehicleId}/resourceReadouts":
    post:
      description: "This API creates a readout of available resources to the accessing party for one vehicle. If the result is available immediately, the result is returned. If the result isn't available, a location to the resource readout is returned. This location shall be polled until the result is available. INFO: GET Requests are not yet supported!"
      operationId: getResourceReadoutsUsingPOST
      parameters:
        - description: vehicleId of the resources to be viewed
          in: path
          name: vehicleId
          required: true
          type: string
          x-example: WDD111111PKW01000
      produces:
        - application/x.exve.org.resourceReadout.v1+json;charset=utf-8
        - application/json;charset=utf-8
      responses:
        "201":
          description: Returns a resource to the accessing party
          schema:
            $ref: "#/definitions/ResourceDataContainer"
        "202":
          description: The request has been accepted for processing, but not completed.
        "400":
          description: Bad Request
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "402":
          description: Payment required
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Forbidden
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource Not Found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "406":
          description: Not Acceptable
          schema:
            $ref: "#/definitions/ErrorResponse"
        "429":
          description: Quota limit is exceeded.
        "500":
          description: Internal server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "501":
          description: Not Implemented
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service Unavailable
          schema:
            $ref: "#/definitions/ErrorResponse"
        "505":
          description: Version not supported
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: View the List of resources
      tags:
        - Resources
definitions:
  CommonType:
    properties:
      asyncEstimatedComplete:
        description: Not Implemented. Estimated completion time of the readout
        format: date-time
        type: string
      asyncProgress:
        description: Not Implemented. Progress of the readout in percent.
        format: int32
        type: integer
      asyncStatus:
        description: Reflects the status of the readouts
        enum:
          - Pending
          - InProgress
          - Complete
          - Fail
        type: string
      asyncWait:
        description: Not Implemented. Recommended waiting time in milliseconds until next request for status.
        format: int64
        type: integer
      exveErrorId:
        description: The id of the error in case something failed
        type: string
      exveErrorMsg:
        description: The error message in case something failed
        type: string
      exveErrorRef:
        description: A unique reference to the error. Can be used in communication with the offering party to help in resolving problems.
        type: string
      exveNote:
        description: A message regarding the result of the request. Can be filled both when the request was completed and failed.
        type: string
      id:
        description: Id unique for this readout.
        type: string
      messageTimestamp:
        description: Timestamp when this message was created.
        format: date-time
        type: string
      receivedTimestamp:
        description: Timestamp when the data in the message was received by the ExVe backend from the vehicle.
        format: date-time
        type: string
      vehicleId:
        description: The vehicle identifier of the extended vehicle, e.g VIN
        type: string
    required:
      - id
      - messageTimestamp
      - asyncStatus
      - vehicleId
    type: object
  DtcDataContainer:
    properties:
      dtcReadout:
        $ref: "#/definitions/DtcDataType"
    type: object
  DtcDataItem:
    properties:
      dtcId:
        description: Identifier of the DTC.
        type: string
      dtcTimestamp:
        description: Date and time when the DTC occurred
        type: string
      ecuId:
        description: Identifier of the ECU where the DTC occurred
        type: string
      occurrenceCounter:
        description: Counter of how many times this DTC has occurred
        format: int32
        type: integer
      status:
        description: Reflects the status of the DTC
        enum:
          - ACTIVE
          - PENDING
          - PREVIOUSLY_ACTIVE
        type: string
    required:
      - dtcId
      - ecuId
      - status
    type: object
  DtcDataType:
    allOf:
      - $ref: "#/definitions/CommonType"
      - properties:
          dtcs:
            description: List of DTCs
            items:
              $ref: "#/definitions/DtcDataItem"
            type: array
        type: object
  DtcSnapshotDataContainer:
    properties:
      dtcSnapshotReadout:
        $ref: "#/definitions/DtcSnapshotDataType"
    type: object
  DtcSnapshotDataItem:
    properties:
      id:
        description: Name of snapshot parameter
        type: string
      value:
        description: Value of snapshot parameter
        type: string
    required:
      - id
      - value
    type: object
  DtcSnapshotDataType:
    allOf:
      - $ref: "#/definitions/CommonType"
      - properties:
          dtcId:
            description: Identifier of the DTC
            type: string
          dtcSnapshotParameters:
            description: List of dtcSnapshotParameters.
            items:
              $ref: "#/definitions/DtcSnapshotDataItem"
            type: array
          ecuId:
            description: Identifier of the ECU
            type: string
        required:
          - dtcId
          - ecuId
        type: object
  EcuDataContainer:
    properties:
      ecuReadout:
        $ref: "#/definitions/EcuDataType"
    type: object
  EcuDataItem:
    properties:
      ecuId:
        description: Identifier of the ECU
        type: string
      hardwareIds:
        description: Identifier(s) of the hardware unit(s) in this ECU
        items:
          type: string
        type: array
      softwareIds:
        description: Identifier(s) of the software unit(s) in this ECU
        items:
          type: string
        type: array
    required:
      - ecuId
      - hardwareIds
      - softwareIds
    type: object
  EcuDataType:
    allOf:
      - $ref: "#/definitions/CommonType"
      - properties:
          ecus:
            description: List of ECUs
            items:
              $ref: "#/definitions/EcuDataItem"
            type: array
        type: object
  ErrorResponse:
    properties:
      errorCode:
        description: Error Code
        type: string
      errorMessage:
        description: Error Message
        type: string
    type: object
  ResourceDataContainer:
    properties:
      resourceReadout:
        $ref: "#/definitions/ResourceDataType"
    type: object
  ResourceDataItem:
    properties:
      api:
        description: URI to API exposing resource
        type: string
      name:
        description: Name of resource
        type: string
      version:
        description: Version of resource in API
        type: string
    required:
      - api
      - name
      - version
    type: object
  ResourceDataType:
    allOf:
      - $ref: "#/definitions/CommonType"
      - properties:
          resources:
            description: List of resources.
            items:
              $ref: "#/definitions/ResourceDataItem"
            type: array
        type: object
x-default-token: a1b2c3d4-a1b2-a1b2-a1b2-a1b2c3d4e5f6
