Skip to content

Read Template

GET
/v2/template/read/{template_id}
curl --request GET \
--url http://localhost:3000/v2/template/read/example
template_id
required
string

Unique identifier for the template

OK

Media type application/json
object
Examples

Success: JSON template

{
"id": "api.query.template.read",
"ver": "v2",
"ts": "2024-05-30T23:54:14+05:30",
"params": {
"status": "SUCCESS",
"resmsgid": "ad1c0a98-1ba3-4203-9fac-59ccaf442347"
},
"responseCode": "OK",
"result": {
"template_id": "jsontemplate111",
"template_name": "jsontemplate111",
"query": "{\"queryType\":\"select\",\"datasetId\":\"{{DATASET}}\",\"intervals\":\"{{STARTDATE}}/{{ENDDATE}}\",\"limit\":\"{{LIMITS}}\"}",
"query_type": "json",
"created_by": "SYSTEM",
"updated_by": "SYSTEM",
"created_date": "2024-04-29T01:16:57.023Z",
"updated_date": "2024-04-29T01:16:57.023Z"
}
}
X-Powered-By
string
Example
Express
Content-Length
integer
Example
537
ETag
string
Example
W/"219-BOO8L4HgRkX4zEKoNwUwfDQA+uU"
Date
string
Example
Thu, 30 May 2024 18:24:14 GMT
Connection
string
Example
keep-alive
Keep-Alive
string
Example
timeout=5

Not Found

Media type application/json
object
Example
{
"id": "api.query.template.read",
"ver": "v2",
"ts": "2024-05-30T23:55:16+05:30",
"params": {
"status": "FAILED",
"resmsgid": "958bf0e7-bdb8-4153-abdc-ab84e8004a0e"
},
"responseCode": "NOT_FOUND",
"result": {},
"error": {
"code": "QUERY_TEMPLATE_NOT_EXISTS",
"message": "Template sql100 does not exists",
"trace": ""
}
}
X-Powered-By
string
Example
Express
Content-Length
integer
Example
294
ETag
string
Example
W/"126-zq5j1yor+xr1XFEEbP09fQTDI/k"
Date
string
Example
Thu, 30 May 2024 18:25:16 GMT
Connection
string
Example
keep-alive
Keep-Alive
string
Example
timeout=5