Getting KPI results based on Simulation Group ID
                This endpoint returns results associated to a specific Simulation Group ID.
Configuration of the ISO 8601 date format
You can get a response including a timestamp:
- 
                        
In the ISO 8601 date format, with the Universal Time Coordinated (UTC) time offset
 - 
                        
In legacy format.
 
The option is handled through a string parameter associated with the tag <configuration>/<api-date-format> of the file /opt/ptv-optima-as/standalone/configuration/optima/optima-configuration.xml.
| 
                                 Property  | 
                            
                                 Type  | 
                            
                                 Description  | 
                        
|---|---|---|
| 
                                 api-date-format  | 
                            
                                 String  | 
                            
                                 It determines the timestamp format: 
 Important: If api-date-format is not present in the optima-configuration.xml file, the legacy timestamp is enabled.  | 
                        
Authentication phase
Before using the endpoint, you must run the authentication phase (→ Login).
After the authentication, a session opens and a valid session token persists until:
- The end of the session time-out, that is set through the parameter sessionTimeout (→ OptimaWSI configuration > OptimaAuth section).
 - An explicit Logout call (→ Logout).
 
Request
POST
                
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-kpi/kpi/api/results/bySimulationGroupId/<simg_id>
                        Request resource
Not applicable.
Request parameters
| Parameter | Required | Description | 
|---|---|---|
| 
                                         simg_id  | 
                                    
                                         YES  | 
                                    
                                         Integer type. It contains the identifier of an existing simulation group.  | 
                                
Request content-type
application/JSON
Request body (payload)
The payload is empty.
Response status
| HTTP status | Description | 
|---|---|
| 
                                         200 OK  | 
                                    
                                         The result of the processed request.  | 
                                
| 
                                         400 Bad request  | 
                                    
                                         Several conditions can be classified under this code. Generally, when an illegal argument occurs in the request.  | 
                                
| 
                                         404 Not found  | 
                                    
                                         No results available.  | 
                                
Response content-type
application/JSON
Response output
In the output you get a JSON object containing an array of elements associated to the values calculated for a specific <simg_id>.
In case of error 400, the output is formatted as a couple:
<error_code>: <error_message>
According to the configuration of api-date-format, the tag startTime can hold the offset (ISO format) or the offset can be removed (legacy format).
Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-kpi/kpi/api/results/bySimulationGroupId/<simg_id>
                        Response status
| HTTP status | Description | 
|---|---|
| 
                                         200 OK  | 
                                    
                                         The processing request has been accepted.  | 
                                
Response output
{
    "kpiResults": [
        {
            "simulationId": <simulation_id>,
            "kpiId": <kpi_id>,
            "startTime": "+52349-12-02T13:00:41+01:00",
            "value": <value>,
            "normalizedValue":<normalized_value>
        },
        ...,
        {
            "simulationId": <simulation_id>,
            "kpiId": <kpi_id>,
            "startTime": "+52349-12-02T13:00:41+03:00",
            "value": <value>,
            "normalizedValue":<normalized_value>
        }
    ]
}