drio
Technical ReviewAPI Reference

Widgets

Widget CRUD and widget action wiring.

GET
/api/v1/apps/{appId}/widgets

Authorization

oauth openid, profile, email
AuthorizationBearer <token>

In: header

Scope: openid, profile, email

Path Parameters

appId*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://mcp.getdrio.com/api/v1/apps/string/widgets"
{
  "widgets": [
    {
      "id": "widget_123",
      "appId": "app_123",
      "toolId": "tool_123",
      "key": "contact-table",
      "name": "Contact Table",
      "primitive": "data-table",
      "displayMode": "inline",
      "visibility": "visible",
      "config": {
        "fieldMappings": {
          "rows": "$.results"
        },
        "style": {
          "density": "compact"
        }
      },
      "actions": [
        {
          "trigger": "row.select",
          "type": "callTool",
          "template": "{{ row.email }}",
          "targetToolId": "tool_456",
          "targetToolName": "Summarize Contact",
          "callMode": "once"
        }
      ]
    }
  ]
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
POST
/api/v1/apps/{appId}/widgets

Authorization

oauth openid, profile, email
AuthorizationBearer <token>

In: header

Scope: openid, profile, email

Path Parameters

appId*string

Request Body

application/json

Widget payload

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://mcp.getdrio.com/api/v1/apps/string/widgets" \  -H "Content-Type: application/json" \  -d '{    "toolId": "tool_123",    "name": "Contact Table",    "primitive": "data-table",    "displayMode": "inline",    "visibility": "visible",    "config": {      "fieldMappings": {        "rows": "$.results"      },      "style": {        "density": "compact"      }    },    "actions": [      {        "trigger": "row.select",        "type": "callTool",        "template": "{{ row.email }}",        "targetToolId": "tool_456",        "targetToolName": "Summarize Contact",        "callMode": "once"      }    ]  }'
{
  "widget": {
    "id": "widget_123",
    "appId": "app_123",
    "toolId": "tool_123",
    "key": "contact-table",
    "name": "Contact Table",
    "primitive": "data-table",
    "displayMode": "inline",
    "visibility": "visible",
    "config": {
      "fieldMappings": {
        "rows": "$.results"
      },
      "style": {
        "density": "compact"
      }
    },
    "actions": [
      {
        "trigger": "row.select",
        "type": "callTool",
        "template": "{{ row.email }}",
        "targetToolId": "tool_456",
        "targetToolName": "Summarize Contact",
        "callMode": "once"
      }
    ]
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
GET
/api/v1/apps/{appId}/widgets/{widgetId}

Authorization

oauth openid, profile, email
AuthorizationBearer <token>

In: header

Scope: openid, profile, email

Path Parameters

appId*string
widgetId*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://mcp.getdrio.com/api/v1/apps/string/widgets/string"
{
  "widget": {
    "id": "string",
    "appId": "string",
    "toolId": "string",
    "key": "string",
    "name": "string",
    "primitive": "string",
    "displayMode": "inline",
    "visibility": "visible",
    "config": {
      "fieldMappings": {
        "property1": "string",
        "property2": "string"
      },
      "formConfig": {
        "version": "v1",
        "fields": [
          {
            "id": "string",
            "key": "string",
            "label": "string",
            "type": "text",
            "required": true,
            "placeholder": "string",
            "helpText": "string",
            "options": [
              "string"
            ],
            "accept": "string",
            "multiple": true,
            "aiFillable": true,
            "aiVisible": true,
            "validation": {
              "minLength": 0,
              "maxLength": 0,
              "min": 0,
              "max": 0,
              "pattern": "string"
            }
          }
        ],
        "submission": {
          "mode": "callTool",
          "targetToolName": "string",
          "successMessage": "string",
          "resetOnSubmit": true
        }
      },
      "style": {
        "property1": "string",
        "property2": "string"
      },
      "layout": {
        "property1": "string",
        "property2": "string"
      },
      "resourceDomains": [
        "string"
      ],
      "hiddenFields": [
        "string"
      ],
      "connectDomains": [
        "string"
      ],
      "redirectDomains": [
        "string"
      ]
    },
    "actions": [
      {
        "trigger": "string",
        "type": "followUpMessage",
        "template": "string",
        "targetToolId": "string",
        "targetToolName": "string",
        "callMode": "once",
        "pollIntervalMs": 0,
        "pollTimeoutMs": 0,
        "pollMaxAttempts": 0,
        "pollStopWhenPath": "string",
        "pollStopWhenEquals": "string"
      }
    ]
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
PATCH
/api/v1/apps/{appId}/widgets/{widgetId}

Authorization

oauth openid, profile, email
AuthorizationBearer <token>

In: header

Scope: openid, profile, email

Path Parameters

appId*string
widgetId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://mcp.getdrio.com/api/v1/apps/string/widgets/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "widget": {
    "id": "string",
    "appId": "string",
    "toolId": "string",
    "key": "string",
    "name": "string",
    "primitive": "string",
    "displayMode": "inline",
    "visibility": "visible",
    "config": {
      "fieldMappings": {
        "property1": "string",
        "property2": "string"
      },
      "formConfig": {
        "version": "v1",
        "fields": [
          {
            "id": "string",
            "key": "string",
            "label": "string",
            "type": "text",
            "required": true,
            "placeholder": "string",
            "helpText": "string",
            "options": [
              "string"
            ],
            "accept": "string",
            "multiple": true,
            "aiFillable": true,
            "aiVisible": true,
            "validation": {
              "minLength": 0,
              "maxLength": 0,
              "min": 0,
              "max": 0,
              "pattern": "string"
            }
          }
        ],
        "submission": {
          "mode": "callTool",
          "targetToolName": "string",
          "successMessage": "string",
          "resetOnSubmit": true
        }
      },
      "style": {
        "property1": "string",
        "property2": "string"
      },
      "layout": {
        "property1": "string",
        "property2": "string"
      },
      "resourceDomains": [
        "string"
      ],
      "hiddenFields": [
        "string"
      ],
      "connectDomains": [
        "string"
      ],
      "redirectDomains": [
        "string"
      ]
    },
    "actions": [
      {
        "trigger": "string",
        "type": "followUpMessage",
        "template": "string",
        "targetToolId": "string",
        "targetToolName": "string",
        "callMode": "once",
        "pollIntervalMs": 0,
        "pollTimeoutMs": 0,
        "pollMaxAttempts": 0,
        "pollStopWhenPath": "string",
        "pollStopWhenEquals": "string"
      }
    ]
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
DELETE
/api/v1/apps/{appId}/widgets/{widgetId}

Authorization

oauth openid, profile, email
AuthorizationBearer <token>

In: header

Scope: openid, profile, email

Path Parameters

appId*string
widgetId*string

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://mcp.getdrio.com/api/v1/apps/string/widgets/string"
{
  "deleted": true
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
PUT
/api/v1/apps/{appId}/widgets/{widgetId}/actions

Authorization

oauth openid, profile, email
AuthorizationBearer <token>

In: header

Scope: openid, profile, email

Path Parameters

appId*string
widgetId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://mcp.getdrio.com/api/v1/apps/string/widgets/string/actions" \  -H "Content-Type: application/json" \  -d '{    "actions": [      {        "trigger": "string",        "type": "followUpMessage",        "template": "string"      }    ]  }'
{
  "widget": {
    "id": "string",
    "appId": "string",
    "toolId": "string",
    "key": "string",
    "name": "string",
    "primitive": "string",
    "displayMode": "inline",
    "visibility": "visible",
    "config": {
      "fieldMappings": {
        "property1": "string",
        "property2": "string"
      },
      "formConfig": {
        "version": "v1",
        "fields": [
          {
            "id": "string",
            "key": "string",
            "label": "string",
            "type": "text",
            "required": true,
            "placeholder": "string",
            "helpText": "string",
            "options": [
              "string"
            ],
            "accept": "string",
            "multiple": true,
            "aiFillable": true,
            "aiVisible": true,
            "validation": {
              "minLength": 0,
              "maxLength": 0,
              "min": 0,
              "max": 0,
              "pattern": "string"
            }
          }
        ],
        "submission": {
          "mode": "callTool",
          "targetToolName": "string",
          "successMessage": "string",
          "resetOnSubmit": true
        }
      },
      "style": {
        "property1": "string",
        "property2": "string"
      },
      "layout": {
        "property1": "string",
        "property2": "string"
      },
      "resourceDomains": [
        "string"
      ],
      "hiddenFields": [
        "string"
      ],
      "connectDomains": [
        "string"
      ],
      "redirectDomains": [
        "string"
      ]
    },
    "actions": [
      {
        "trigger": "string",
        "type": "followUpMessage",
        "template": "string",
        "targetToolId": "string",
        "targetToolName": "string",
        "callMode": "once",
        "pollIntervalMs": 0,
        "pollTimeoutMs": 0,
        "pollMaxAttempts": 0,
        "pollStopWhenPath": "string",
        "pollStopWhenEquals": "string"
      }
    ]
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"
  }
}