- Home
- Resources
- DriveCycleService
A set of end points to fetch DriveCycle data.
      
        GET /v1/vehicle/drive-cycle/{id} 
        Get the DriveCycle for the provided drive cycle id.
        
          Request Parameters
          
          
            | name | type | description | 
          
          
          
            | id | path |  | 
          
        
        
          Response Codes
          
          
            | code | condition | 
          
          
          
            | 400 | If the provided id does not match a drive cycle. | 
          
        
        
          Response Body
          
          
            | media type | data type | description | 
          
          
          
            | application/json | DriveCycle
 (JSON) |  | 
          
        
        Example
        
          
            
              Request
              
GET /cf45d943-f4c4-45ca-ac1f-1978f8c2dd28
Content-Type: */*
Accept: application/json
                
...
                
              
             
            
              Response
              
HTTP/1.1 200 OK
Content-Type: application/json
                
{
  "id" : "cf45d943-f4c4-45ca-ac1f-1978f8c2dd28",
  "start" : "2025-08-21T10:15:00Z",
  "length" : 10,
  "wcuID" : "...",
  "vin" : "..."
}
                
              
             
           
         
       
      
        GET /v1/vehicle/drive-cycle/result-file/{id} 
        Get the id of a DriveCycle if available. If no id is available, an empty string is returned.
        
          Request Parameters
          
          
            | name | type | description | constraints | 
          
          
          
            | id | path | The id of the result file. | required long | 
          
        
        
          Response Codes
          
          
            | code | condition | 
          
          
          
            | 400 | If the provided id does not match a result file. | 
          
            | 403 | If the requesting user is not allowed to access the provided result file. | 
          
        
        
          Response Body
          
          
            | media type | data type | description | 
          
          
          
            | text/plain | string | The drive cycle id | 
          
        
        Example
        
          
            
              Request
              
GET /result-file/cf45d943-f4c4-45ca-ac1f-1978f8c2dd28
Content-Type: */*
Accept: text/plain
                
...
                
              
             
            
              Response
              
HTTP/1.1 200 OK
Content-Type: text/plain
                
...
                
              
             
           
         
       
      
        GET /v1/vehicle/drive-cycle/vin/{id} 
        Get the drive cycle id for a Vehicle and timestamp. The timestamp must be within (inclusive) the start and end of a drive cycle.
If no drive cycle exists for the provided WCU and timestamp, an empty string is returned.
        
          Request Parameters
          
          
            | name | type | description | 
          
          
          
            | id | path | The VIN of the vehicle. | 
          
            | timestamp | query | The timestamp expressed as an ISO-8601 string. E.g 2025-08-21T10:15:30Z or 2025-08-21T12:15:30+02:00 | 
          
        
        
          Response Codes
          
          
            | code | condition | 
          
          
          
            | 400 | If the timestamp could not be parsed. | 
          
            | 403 | If the requesting user does not have access to the WCU the Vehicle was connected to. | 
          
        
        
          Response Body
          
          
            | media type | data type | description | 
          
          
          
            | text/plain | string | The drive cycle id | 
          
        
        Example
        
          
            
              Request
              
GET /vin/some_vin?timestamp=2025-08-21T10:15:30Z
Content-Type: */*
Accept: text/plain
                
...
                
              
             
            
              Response
              
HTTP/1.1 200 OK
Content-Type: text/plain
                
...
                
              
             
           
         
       
      
        GET /v1/vehicle/drive-cycle/wcuid/{id} 
        Get the drive cycle id for a WCU and a timestamp. The timestamp must be within (inclusive) the start and end of a drive cycle.
If no drive cycle exists for the provided WCU and timestamp, an empty string is returned.
        
          Request Parameters
          
          
            | name | type | description | 
          
          
          
            | id | path | The WCU ID. | 
          
            | timestamp | query | The timestamp expressed as an ISO-8601 string. E.g 2025-08-21T10:15:30Z or 2025-08-21T12:15:30+02:00 | 
          
        
        
          Response Codes
          
          
            | code | condition | 
          
          
          
            | 400 | If the timestamp could not be parsed. | 
          
            | 403 | If the requesting user does not have access to the provided WCU. | 
          
        
        
          Response Body
          
          
            | media type | data type | description | 
          
          
          
            | text/plain | string | The drive cycle id | 
          
        
        Example
        
          
            
              Request
              
GET /wcuid/some_wcu_id?timestamp=2025-08-21T10:15:30Z
Content-Type: */*
Accept: text/plain
                
...
                
              
             
            
              Response
              
HTTP/1.1 200 OK
Content-Type: text/plain
                
...