示例

POST /api/bookmarks
{
  "bookmark": {
    "public": false,
    "controller": "hosts",
    "name": "facts.architecture",
    "query": " facts.architecture = x86_64"
  }
}
201
{
  "name": "facts.architecture",
  "controller": "hosts",
  "query": "facts.architecture = x86_64",
  "public": false,
  "id": 980190963,
  "owner_id": 135138680,
  "owner_type": "User"
}

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

bookmark
必填

Validations:

  • Must be a Hash

bookmark[name]
必填

Validations:

  • Must be a String

bookmark[controller]
必填

Validations:

  • Must be a String

bookmark[query]
必填

Validations:

  • Must be a String

bookmark[public]
选填 , 允许空值

Validations:

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