Getting a list of KPI instances
                This endpoint returns a list of not logically deleted KPI instances, filtered by the provider, and associated with a specific session.
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
GET
                
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-kpi/kpi/api/instances/?providerId=<providerId>
                        Request resource
Not applicable.
Request parameters
| Parameter | Required | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 
                                         provider_id  | 
                                    
                                         NO  | 
                                    
                                         Integer type. It contains the identifier of a data provider. If the parameter is not specified, all the not logically deleted instances are returned. In the table you can see the list of available providers: 
  | 
                                
Request content-type
application/JSON
Request body (payload)
The payload is empty.
Response status
| HTTP status | Description | 
|---|---|
| 
                                         200 OK  | 
                                    
                                         The list of not logically deleted KPI instances s returned.  | 
                                
Response content-type
application/JSON
Response output
A JSON object with an array of KPI instances.
Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-kpi/kpi/api/instances/?providerd=2
                        Additional Notes
A list of KPI instances associated to the provider TRE is returned.
Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-kpi/kpi/api/instances
                        Response output
{
"kpiInstances": [
    {
        "id": <id>,
        "name": "<name>",
        "description": "description",
        "providerName": "<provider_name>"
    },
    {
        "id": <id>,
        "name": "<name>",
        "description": "description",
        "providerName": "<provider_name>"
    },
....
    {
....
    },
]
                        Additional Notes
The provider is not indicated In the request, therefore a JSON object with all KPI instances is included in the response and is not filtered by provider.