Search…
Runtime
When a script is saved, a new runtime environment is created which contains all routes, policies, triggers, jobs, and object exports. Runtime environments can be accessed via the environment or the environment object scripts.
"Runtime" decorators are evaluated during execution. The differentiation between static and runtime exists in Cortex because static runtime are evaluated at compile-time.
Runtime
Result
1
return (env.read('runtime')).routes.map(route => {
2
3
const { configuration: { method, path } } = route
4
5
return `${method} /routes/${path}`
6
7
})
Copied!
1
{
2
"data": [
3
"get /routes/get_public_group",
4
"get /routes/export",
5
"get /routes/axon_stats_task_responses",
6
"post /routes/c_patients_route",
7
"post /routes/c_patients_callback",
8
"post /routes/account_public_user_link",
9
10
[ ... ]
11
12
"get /routes/reports/:objectId/:outputFormat",
13
"get /routes/review_tab_info",
14
"get /routes/site_tab_info",
15
"get /routes/task_details/:taskResponseId",
16
"get /routes/task_step_details/:taskResponseId",
17
"post /routes/uploadQueryRule"
18
],
19
"hasMore": false,
20
"object": "list"
21
}
Copied!
Last modified 1mo ago
Copy link