get-model
Get a model definition including its fields, dimensions, measures, and access info
Request Body
application/json
Response Body
application/json
Input
{
"projectId": "string",
"repoId": "string",
"branchId": "string",
"envId": "string",
"modelId": "string",
"getMalloy": false
}Output
{
"needValidate": true,
"model": {
"structId": "string",
"modelId": "string",
"type": "Store",
"source": "string",
"connectionId": "string",
"connectionType": "PostgreSQL",
"filePath": "string",
"fileText": "string",
"storeContent": {},
"dateRangeIncludesRightSide": true,
"accessRoles": [
"string"
],
"label": "string",
"fields": [
{
"id": "string",
"malloyFieldName": "string",
"malloyFieldPath": [
"string"
],
"malloyBaseFieldId": "string",
"malloyTags": [
{
"key": "string",
"value": "string"
}
],
"mproveTags": [
{}
],
"hidden": true,
"required": true,
"maxFractions": 0,
"label": "string",
"fieldClass": "dimension",
"fieldFileName": "string",
"fieldFilePath": "string",
"result": "day_of_week",
"fieldLineNum": 0,
"suggestModelDimension": "string",
"sqlName": "string",
"topId": "string",
"topLabel": "string",
"description": "string",
"type": "count_distinct",
"groupId": "string",
"groupLabel": "string",
"groupDescription": "string",
"formatNumber": "string",
"currencyPrefix": "string",
"currencySuffix": "string",
"buildMetrics": true,
"isTimeframeBase": true,
"timeframe": "string",
"detail": "timestamps"
}
],
"nodes": [
{
"id": "string",
"label": "string",
"description": "string",
"nodeClass": "dimension",
"viewName": "string",
"isField": true,
"fieldFileName": "string",
"viewFilePath": "string",
"fieldFilePath": "string",
"fieldResult": "day_of_week",
"fieldLineNum": 0,
"hidden": true,
"required": true,
"children": [
{}
]
}
],
"malloyModelDef": {},
"serverTs": 0,
"hasAccess": true
}
}