示例

GET /api/provisioning_templates
200
{
  "total": 14,
  "subtotal": 14,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 1007981701,
      "name": "centos5_3_pxelinux",
      "template_kind_id": 452984334,
      "template_kind_name": "PXELinux"
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 698706415,
      "name": "iPXE Dummy Menu",
      "template_kind_id": 698706415,
      "template_kind_name": "iPXE"
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 718456980,
      "name": "Locked Template",
      "template_kind_id": 983253650,
      "template_kind_name": "provision"
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 104314179,
      "name": "MyFinish",
      "template_kind_id": 550103832,
      "template_kind_name": "finish"
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 981457253,
      "name": "MyScript",
      "template_kind_id": 478250810,
      "template_kind_name": "script"
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 943779058,
      "name": "MyString",
      "template_kind_id": 698706415,
      "template_kind_name": "iPXE"
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 269958254,
      "name": "MyString2",
      "template_kind_id": 983253650,
      "template_kind_name": "provision"
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 684651467,
      "name": "PXE Default Menu",
      "template_kind_id": 710512633,
      "template_kind_name": null
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 554905648,
      "name": "PXEGrub2 global default",
      "template_kind_id": 701398793,
      "template_kind_name": "PXEGrub2"
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 131565194,
      "name": "PXEGrub Dummy Menu",
      "template_kind_id": 131565194,
      "template_kind_name": "PXEGrub"
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 824224502,
      "name": "PXEGrub global default",
      "template_kind_id": 131565194,
      "template_kind_name": "PXEGrub"
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 821548108,
      "name": "PXELinux default local boot",
      "template_kind_id": 452984334,
      "template_kind_name": "PXELinux"
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 352050261,
      "name": "PXELinux global default",
      "template_kind_id": 452984334,
      "template_kind_name": "PXELinux"
    },
    {
      "snippet": false,
      "description": null,
      "audit_comment": null,
      "created_at": "2019-11-07 08:44:12 UTC",
      "updated_at": "2019-11-07 08:44:12 UTC",
      "id": 56083308,
      "name": "suse_pxelinux",
      "template_kind_id": 452984334,
      "template_kind_name": "PXELinux"
    }
  ]
}

参数

参数名字 描述
operatingsystem_id
选填

操作系统 ID

Validations:

  • Must be a String

location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

search
选填

过滤结果

Validations:

  • Must be a String

order
选填

排序项和顺序,例如 ‘id DESC’

Validations:

  • Must be a String

page
选填

页号,从 1 开始

Validations:

  • Must be a number.

per_page
选填

每页中显示的返回结果数

Validations:

  • Must be a number.

搜索字段

字段名 类型 可能的值
default_template true, false
environment string
hostgroup string
kind string
location string
location_id integer
locked true, false
name string
operatingsystem string
organization string
organization_id integer
snippet true, false
template text
vendor string