示例

PUT /api/report_templates/1007981706
{
  "report_template": {
    "template": ""
  }
}
422
{
  "error": {
    "id": 1007981706,
    "errors": {
      "template": [
        "can't be blank"
      ]
    },
    "full_messages": [
      "Template can't be blank"
    ]
  }
}

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be a String

report_template
必填

Validations:

  • Must be a Hash

report_template[name]
选填

Validations:

  • Must be a String

report_template[description]
选填 , 允许空值

Validations:

  • Must be a String

report_template[template]
选填

Validations:

  • Must be a String

report_template[snippet]
选填 , 允许空值

Validations:

  • Must be one of: true, false, 1, 0.

report_template[audit_comment]
选填 , 允许空值

Validations:

  • Must be a String

report_template[locked]
选填 , 允许空值

是否已锁定该模板进行编辑

Validations:

  • Must be one of: true, false, 1, 0.

report_template[default]
选填 , 允许空值

模板是否会自动添加到新的机构和位置

Validations:

  • Must be one of: true, false, 1, 0.

report_template[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

report_template[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type