Skip to main content

Execute mysql Commands

POST 

/v1/model/plugin/prod/mysqlCommand

Execute mysql commands. Authentication only supports: Management Console Token, API Key

Request

Body

required
    sqlTemplate stringrequired

    Sql statement (can carry parameters named as {{ var }}), for example: select * from table_name where _id = {{ _id }}

    parameter object[]

    Query parameter, optional. When sqlTemplate carries parameters, this parameter needs to be passed.

  • Array [
  • key string

    Parameter key, e.g.: _id

    type string

    Parameter type, e.g.: STRING, NUMBER, ARRAY, BOOLEAN, OBJECT

    value string

    Parameter value, e.g.: o8L3N6y, 123, [1,2,3], true, {name: 'foo'}

  • ]
  • config object

    RunMysqlCommand configuration, optional, e.g.: {"preparedStatements":true}

    timeout integer

    Possible values: <= 30

    Default value: 5

    Timeout duration set to 5s

    preparedStatements boolean

    Whether to enable prepared statements

    dbLinkName string

    Data connector Name configuration

Responses

Successful.

Schema
    oneOf
    data object
    backendExecute string

    Backend execution time (ms)

    executeResultList array

    Execution result list

    total integer

    Total count

    requestId string

    Request unique ID

Loading...