Create request template
POST
/v1/request-templates
const url = 'https://localhost:8080/v1/request-templates';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"business_justification":"example","description":"example","name":"example","risk_level":"low","scope":[{"datasets":[{"columns":["example"],"filters":{"conditions":[{"column":"example","op":"example","raw":"example","value":"example"}],"logic":"example"},"joins":[{"on":"example","source":{"kind":"example","name":"example"},"type":"example"}],"source":{"kind":"example","name":"example"}}],"datasource":"example","virtual_table":{"name":"example","sql":"example"}}],"title":"example","validity_period":"1h"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://localhost:8080/v1/request-templates \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "business_justification": "example", "description": "example", "name": "example", "risk_level": "low", "scope": [ { "datasets": [ { "columns": [ "example" ], "filters": { "conditions": [ { "column": "example", "op": "example", "raw": "example", "value": "example" } ], "logic": "example" }, "joins": [ { "on": "example", "source": { "kind": "example", "name": "example" }, "type": "example" } ], "source": { "kind": "example", "name": "example" } } ], "datasource": "example", "virtual_table": { "name": "example", "sql": "example" } } ], "title": "example", "validity_period": "1h" }'Creates a reusable request template for the authenticated user
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Request template payload
Media typeapplication/json
object
business_justification
required
string
description
required
string
name
required
string
risk_level
required
string
scope
required
Array<object>
object
datasets
required
Array<object>
object
columns
required
Array<string>
filters
object
conditions
required
Array<object>
object
column
string
op
string
raw
string
value
logic
string
joins
Array<object>
object
on
string
source
object
kind
string
name
string
type
string
source
object
kind
string
name
string
datasource
required
string
virtual_table
object
name
string
sql
string
title
required
string
validity_period
required
string
Responses
Section titled “Responses”Created
Media typeapplication/json
object
data
object
business_justification
string
can_manage
boolean
created_at
string
datasource_names
Array<string>
description
string
id
string
name
string
parameters
Parameters are derived from [tag] placeholders in the scope’s raw
filters; the requester supplies them when creating a request.
Array<object>
object
name
string
type
string
uses
Array<object>
object
column
string
datasource
string
op
string
table
string
risk_level
string
scope
Array<object>
object
datasets
required
Array<object>
object
columns
required
Array<string>
filters
object
conditions
required
Array<object>
object
column
string
op
string
raw
string
value
logic
string
joins
Array<object>
object
on
string
source
object
kind
string
name
string
type
string
source
object
kind
string
name
string
datasource
required
string
virtual_table
object
name
string
sql
string
title
string
updated_at
string
validity_period
string
success
boolean
Example generated
{ "data": { "business_justification": "example", "can_manage": true, "created_at": "example", "datasource_names": [ "example" ], "description": "example", "id": "example", "name": "example", "parameters": [ { "name": "example", "type": "example", "uses": [ { "column": "example", "datasource": "example", "op": "example", "table": "example" } ] } ], "risk_level": "example", "scope": [ { "datasets": [ { "columns": [ "example" ], "filters": { "conditions": [ { "column": "example", "op": "example", "raw": "example", "value": "example" } ], "logic": "example" }, "joins": [ { "on": "example", "source": { "kind": "example", "name": "example" }, "type": "example" } ], "source": { "kind": "example", "name": "example" } } ], "datasource": "example", "virtual_table": { "name": "example", "sql": "example" } } ], "title": "example", "updated_at": "example", "validity_period": "example" }, "success": true}Bad Request
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Unauthorized
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Internal Server Error
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}