API for last cached time

Hello Team,

Is there any API using which we can get the details of last cached time of particular report? I am using Helical Insight enterprise edition 5.2 GA.

Thank you

Yes, we do have API using which we can get the details of the cache time.
In order to get the date and time of last cached report/dashboard of Helical Insight, we need to execute the API. The API details is as below:

URL:http://127.0.0.1:8085/hi-ee//services
Request Method: POST
Parameters with Key Value Pair:

type: adhoc
serviceType: report
service: fetchData
formData: Below is sample FormData which contains details of report. ‘{“location”:“BlueParrot/Metadata”,“metadataFileName”:“Domain_Chart.metadata”,“columns”:[{“column”:“blueparrot.View 1.Domain”,“alias”:“Domain”,“floatingType”:“discrete”},{“column”:“blueparrot.View 1.Amount”,“alias”:“Amount”,“aggregate”:true,“aggregateList”:[“db.generic.aggregate.sum”],“floatingType”:“discrete”},{“column”:“blueparrot.View 1.Type”,“alias”:“Type”,“floatingType”:“discrete”},{“column”:“blueparrot.View 1.Value”,“alias”:“sum_Value”,“aggregate”:true,“aggregateList”:[“db.generic.aggregate.sum”],“floatingType”:“discrete”,“hidden”:true,“includeInResultset”:true}],“functions”:{“aggregate”:[{“column”:“blueparrot.View 1.Amount”,“function”:“db.generic.aggregate.sum”,“alias”:“Amount”},{“column”:“blueparrot.View 1.Value”,“function”:“db.generic.aggregate.sum”,“alias”:“sum_Value”}],“groupBy”:[{“column”:“Domain”,“custom”:true},{“column”:“Type”,“custom”:true}],“orderBy”:[{“alias”:“sum_Value”,“order”:“desc”,“custom”:true}]},“limitBy”:1000,“prependTableNameToAlias”:false}’

requestId: 8fd4ef5f-6e44-4f15-ad74-54b490b92bf4 (This can be any unique id)

After executing the above API, we will get response something like below:

{
"status": 1,
"response": {
"data": [
            {
"Domain": "Healthtech ",
"Amount": 72.2300000000000000000,
"Type": "Profit"
            },
            {
"Domain": "Consumer Retail ",
"Amount": 19.7791148000000000000,
"Type": "Profit"
            },
            {
"Domain": "Sustainability & Consumer",
"Amount": 19.7798002000000000000,
"Type": "Profit"
            },
            {
"Domain": "Edutech ",
"Amount": 1.0003326000000000000,
"Type": "Profit"
            },
            {
"Domain": "Fintech",
"Amount": 0.4326920000000000000,
"Type": "Profit"
            },
            {
"Domain": "Consumer Internet",
"Amount": 0.3350902294046624000,
"Type": "Profit"
            },
            {
"Domain": "D2C",
"Amount": 0E-19,
"Type": "Profit"
            },
            {
"Domain": "Consumer FnB ",
"Amount": 0.1569616712840944000,
"Type": "Profit"
            },
            {
"Domain": "Cyber Security ",
"Amount": 0E-19,
"Type": "Profit"
            },
            {
"Domain": "Deeptech",
"Amount": -0.0049518799999999814,
"Type": "Profit"
            },
            {
"Domain": "Consumer Internet",
"Amount": 10.0500000000000000000,
"Type": "Invested Amount"
            },
            {
"Domain": "Sustainability & Consumer",
"Amount": 20.0000000000000000000,
"Type": "Invested Amount"
            },
            {
"Domain": "Consumer FnB ",
"Amount": 20.0378200000000000000,
"Type": "Invested Amount"
            },
            {
"Domain": "Fintech",
"Amount": 20.0018000000000000000,
"Type": "Invested Amount"
            },
            {
"Domain": "Consumer Retail ",
"Amount": 20.0685400000000000000,
"Type": "Invested Amount"
            },
            {
"Domain": "Deeptech",
"Amount": 20.5179600000000000000,
"Type": "Invested Amount"
            },
            {
"Domain": "D2C",
"Amount": 36.0477000000000000000,
"Type": "Invested Amount"
            },
            {
"Domain": "Edutech ",
"Amount": 30.5811600000000000000,
"Type": "Invested Amount"
            },
            {
"Domain": "Healthtech ",
"Amount": 25.0000000000000000000,
"Type": "Invested Amount"
            },
            {
"Domain": "Cyber Security ",
"Amount": 20.1030000000000000000,
"Type": "Invested Amount"
            }
        ],
"metadata": [
            {
"1": {
"name": "Domain",
"type": "text"
                },
"2": {
"name": "Amount",
"type": "numeric"
                },
"3": {
"name": "Type",
"type": "text"
                }
            },
            {
"rows": 20
            }
        ]
    },
"lastModified": 1714125831361
}

As we have seen in above API’s response, we got key value pair in our response as “lastModified”: 1714125831361

The value mentioned above is in Epoch time, we need to convert it into Human Readable Format using code, we can get direct code using online reference based on programming language which we are using. This converted time (into Human Readable) can be used to display the last cached time of that report.

Thank you,
Helcial Insight.